diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index de9173d9..42327db5 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,5 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:d4b80feffe1579818cdc39466152e9de95789a193408506cd4a1ffbe8804dc00 -# created: 2022-07-13T13:53:17.676447481Z + digest: sha256:f14e3fefe8e361e85752bd9890c8e56f2fe25f1e89cbb9597e4e3c7a429203a3 diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index 275ab343..f1935b88 100755 --- a/.kokoro/release/publish_javadoc.sh +++ b/.kokoro/release/publish_javadoc.sh @@ -28,7 +28,7 @@ fi pushd $(dirname "$0")/../../ # install docuploader package -python3 -m pip install gcp-docuploader +python3 -m pip install --require-hashes -r .kokoro/requirements.txt # compile all packages mvn clean install -B -q -DskipTests=true diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh index 9541be2f..a2974615 100755 --- a/.kokoro/release/publish_javadoc11.sh +++ b/.kokoro/release/publish_javadoc11.sh @@ -28,7 +28,7 @@ fi pushd $(dirname "$0")/../../ # install docuploader package -python3 -m pip install gcp-docuploader +python3 -m pip install --require-hashes -r .kokoro/requirements.txt # compile all packages mvn clean install -B -q -DskipTests=true diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh index 1dba8de1..61e714d6 100755 --- a/.kokoro/release/stage.sh +++ b/.kokoro/release/stage.sh @@ -16,7 +16,8 @@ set -eo pipefail # Start the releasetool reporter -python3 -m pip install gcp-releasetool +requirementsFile=$(realpath $(dirname "${BASH_SOURCE[0]}")/../requirements.txt) +python3 -m pip install --require-hashes -r $requirementsFile python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script source $(dirname "$0")/common.sh diff --git a/.kokoro/requirements.in b/.kokoro/requirements.in new file mode 100644 index 00000000..cfdc2e7e --- /dev/null +++ b/.kokoro/requirements.in @@ -0,0 +1,31 @@ +gcp-docuploader==0.6.3 +google-crc32c==1.3.0 +googleapis-common-protos==1.56.3 +gcp-releasetool==1.8.7 +cachetools==4.2.4 +cffi==1.15.1 +jeepney==0.7.1 +jinja2==3.0.3 +markupsafe==2.0.1 +keyring==23.4.1 +packaging==21.3 +protobuf==3.19.5 +pyjwt==2.4.0 +pyparsing==3.0.9 +pycparser==2.21 +pyperclip==1.8.2 +python-dateutil==2.8.2 +requests==2.27.1 +importlib-metadata==4.8.3 +zipp==3.6.0 +google_api_core==2.8.2 +google-cloud-storage==2.0.0 +google-cloud-core==2.3.1 +typing-extensions==4.1.1 +urllib3==1.26.12 +zipp==3.6.0 +rsa==4.9 +six==1.16.0 +attrs==22.1.0 +google-auth==2.11.0 +idna==3.4 \ No newline at end of file diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt new file mode 100644 index 00000000..170f1c63 --- /dev/null +++ b/.kokoro/requirements.txt @@ -0,0 +1,452 @@ +# +# This file is autogenerated by pip-compile with python 3.10 +# To update, run: +# +# pip-compile --allow-unsafe --generate-hashes requirements.in +# +attrs==22.1.0 \ + --hash=sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6 \ + --hash=sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c + # via + # -r requirements.in + # gcp-releasetool +cachetools==4.2.4 \ + --hash=sha256:89ea6f1b638d5a73a4f9226be57ac5e4f399d22770b92355f92dcb0f7f001693 \ + --hash=sha256:92971d3cb7d2a97efff7c7bb1657f21a8f5fb309a37530537c71b1774189f2d1 + # via + # -r requirements.in + # google-auth +certifi==2022.9.14 \ + --hash=sha256:36973885b9542e6bd01dea287b2b4b3b21236307c56324fcc3f1160f2d655ed5 \ + --hash=sha256:e232343de1ab72c2aa521b625c80f699e356830fd0e2c620b465b304b17b0516 + # via requests +cffi==1.15.1 \ + --hash=sha256:00a9ed42e88df81ffae7a8ab6d9356b371399b91dbdf0c3cb1e84c03a13aceb5 \ + --hash=sha256:03425bdae262c76aad70202debd780501fabeaca237cdfddc008987c0e0f59ef \ + --hash=sha256:04ed324bda3cda42b9b695d51bb7d54b680b9719cfab04227cdd1e04e5de3104 \ + --hash=sha256:0e2642fe3142e4cc4af0799748233ad6da94c62a8bec3a6648bf8ee68b1c7426 \ + --hash=sha256:173379135477dc8cac4bc58f45db08ab45d228b3363adb7af79436135d028405 \ + --hash=sha256:198caafb44239b60e252492445da556afafc7d1e3ab7a1fb3f0584ef6d742375 \ + --hash=sha256:1e74c6b51a9ed6589199c787bf5f9875612ca4a8a0785fb2d4a84429badaf22a \ + --hash=sha256:2012c72d854c2d03e45d06ae57f40d78e5770d252f195b93f581acf3ba44496e \ + --hash=sha256:21157295583fe8943475029ed5abdcf71eb3911894724e360acff1d61c1d54bc \ + --hash=sha256:2470043b93ff09bf8fb1d46d1cb756ce6132c54826661a32d4e4d132e1977adf \ + --hash=sha256:285d29981935eb726a4399badae8f0ffdff4f5050eaa6d0cfc3f64b857b77185 \ + --hash=sha256:30d78fbc8ebf9c92c9b7823ee18eb92f2e6ef79b45ac84db507f52fbe3ec4497 \ + --hash=sha256:320dab6e7cb2eacdf0e658569d2575c4dad258c0fcc794f46215e1e39f90f2c3 \ + --hash=sha256:33ab79603146aace82c2427da5ca6e58f2b3f2fb5da893ceac0c42218a40be35 \ + --hash=sha256:3548db281cd7d2561c9ad9984681c95f7b0e38881201e157833a2342c30d5e8c \ + --hash=sha256:3799aecf2e17cf585d977b780ce79ff0dc9b78d799fc694221ce814c2c19db83 \ + --hash=sha256:39d39875251ca8f612b6f33e6b1195af86d1b3e60086068be9cc053aa4376e21 \ + --hash=sha256:3b926aa83d1edb5aa5b427b4053dc420ec295a08e40911296b9eb1b6170f6cca \ + --hash=sha256:3bcde07039e586f91b45c88f8583ea7cf7a0770df3a1649627bf598332cb6984 \ + --hash=sha256:3d08afd128ddaa624a48cf2b859afef385b720bb4b43df214f85616922e6a5ac \ + --hash=sha256:3eb6971dcff08619f8d91607cfc726518b6fa2a9eba42856be181c6d0d9515fd \ + --hash=sha256:40f4774f5a9d4f5e344f31a32b5096977b5d48560c5592e2f3d2c4374bd543ee \ + --hash=sha256:4289fc34b2f5316fbb762d75362931e351941fa95fa18789191b33fc4cf9504a \ + --hash=sha256:470c103ae716238bbe698d67ad020e1db9d9dba34fa5a899b5e21577e6d52ed2 \ + --hash=sha256:4f2c9f67e9821cad2e5f480bc8d83b8742896f1242dba247911072d4fa94c192 \ + --hash=sha256:50a74364d85fd319352182ef59c5c790484a336f6db772c1a9231f1c3ed0cbd7 \ + --hash=sha256:54a2db7b78338edd780e7ef7f9f6c442500fb0d41a5a4ea24fff1c929d5af585 \ + --hash=sha256:5635bd9cb9731e6d4a1132a498dd34f764034a8ce60cef4f5319c0541159392f \ + --hash=sha256:59c0b02d0a6c384d453fece7566d1c7e6b7bae4fc5874ef2ef46d56776d61c9e \ + --hash=sha256:5d598b938678ebf3c67377cdd45e09d431369c3b1a5b331058c338e201f12b27 \ + --hash=sha256:5df2768244d19ab7f60546d0c7c63ce1581f7af8b5de3eb3004b9b6fc8a9f84b \ + --hash=sha256:5ef34d190326c3b1f822a5b7a45f6c4535e2f47ed06fec77d3d799c450b2651e \ + --hash=sha256:6975a3fac6bc83c4a65c9f9fcab9e47019a11d3d2cf7f3c0d03431bf145a941e \ + --hash=sha256:6c9a799e985904922a4d207a94eae35c78ebae90e128f0c4e521ce339396be9d \ + --hash=sha256:70df4e3b545a17496c9b3f41f5115e69a4f2e77e94e1d2a8e1070bc0c38c8a3c \ + --hash=sha256:7473e861101c9e72452f9bf8acb984947aa1661a7704553a9f6e4baa5ba64415 \ + --hash=sha256:8102eaf27e1e448db915d08afa8b41d6c7ca7a04b7d73af6514df10a3e74bd82 \ + --hash=sha256:87c450779d0914f2861b8526e035c5e6da0a3199d8f1add1a665e1cbc6fc6d02 \ + --hash=sha256:8b7ee99e510d7b66cdb6c593f21c043c248537a32e0bedf02e01e9553a172314 \ + --hash=sha256:91fc98adde3d7881af9b59ed0294046f3806221863722ba7d8d120c575314325 \ + --hash=sha256:94411f22c3985acaec6f83c6df553f2dbe17b698cc7f8ae751ff2237d96b9e3c \ + --hash=sha256:98d85c6a2bef81588d9227dde12db8a7f47f639f4a17c9ae08e773aa9c697bf3 \ + --hash=sha256:9ad5db27f9cabae298d151c85cf2bad1d359a1b9c686a275df03385758e2f914 \ + --hash=sha256:a0b71b1b8fbf2b96e41c4d990244165e2c9be83d54962a9a1d118fd8657d2045 \ + --hash=sha256:a0f100c8912c114ff53e1202d0078b425bee3649ae34d7b070e9697f93c5d52d \ + --hash=sha256:a591fe9e525846e4d154205572a029f653ada1a78b93697f3b5a8f1f2bc055b9 \ + --hash=sha256:a5c84c68147988265e60416b57fc83425a78058853509c1b0629c180094904a5 \ + --hash=sha256:a66d3508133af6e8548451b25058d5812812ec3798c886bf38ed24a98216fab2 \ + --hash=sha256:a8c4917bd7ad33e8eb21e9a5bbba979b49d9a97acb3a803092cbc1133e20343c \ + --hash=sha256:b3bbeb01c2b273cca1e1e0c5df57f12dce9a4dd331b4fa1635b8bec26350bde3 \ + --hash=sha256:cba9d6b9a7d64d4bd46167096fc9d2f835e25d7e4c121fb2ddfc6528fb0413b2 \ + --hash=sha256:cc4d65aeeaa04136a12677d3dd0b1c0c94dc43abac5860ab33cceb42b801c1e8 \ + --hash=sha256:ce4bcc037df4fc5e3d184794f27bdaab018943698f4ca31630bc7f84a7b69c6d \ + --hash=sha256:cec7d9412a9102bdc577382c3929b337320c4c4c4849f2c5cdd14d7368c5562d \ + --hash=sha256:d400bfb9a37b1351253cb402671cea7e89bdecc294e8016a707f6d1d8ac934f9 \ + --hash=sha256:d61f4695e6c866a23a21acab0509af1cdfd2c013cf256bbf5b6b5e2695827162 \ + --hash=sha256:db0fbb9c62743ce59a9ff687eb5f4afbe77e5e8403d6697f7446e5f609976f76 \ + --hash=sha256:dd86c085fae2efd48ac91dd7ccffcfc0571387fe1193d33b6394db7ef31fe2a4 \ + --hash=sha256:e00b098126fd45523dd056d2efba6c5a63b71ffe9f2bbe1a4fe1716e1d0c331e \ + --hash=sha256:e229a521186c75c8ad9490854fd8bbdd9a0c9aa3a524326b55be83b54d4e0ad9 \ + --hash=sha256:e263d77ee3dd201c3a142934a086a4450861778baaeeb45db4591ef65550b0a6 \ + --hash=sha256:ed9cb427ba5504c1dc15ede7d516b84757c3e3d7868ccc85121d9310d27eed0b \ + --hash=sha256:fa6693661a4c91757f4412306191b6dc88c1703f780c8234035eac011922bc01 \ + --hash=sha256:fcd131dd944808b5bdb38e6f5b53013c5aa4f334c5cad0c72742f6eba4b73db0 + # via + # -r requirements.in + # cryptography +charset-normalizer==2.0.12 \ + --hash=sha256:2857e29ff0d34db842cd7ca3230549d1a697f96ee6d3fb071cfa6c7393832597 \ + --hash=sha256:6881edbebdb17b39b4eaaa821b438bf6eddffb4468cf344f09f89def34a8b1df + # via requests +click==8.0.4 \ + --hash=sha256:6a7a62563bbfabfda3a38f3023a1db4a35978c0abd76f6c9605ecd6554d6d9b1 \ + --hash=sha256:8458d7b1287c5fb128c90e23381cf99dcde74beaf6c7ff6384ce84d6fe090adb + # via + # gcp-docuploader + # gcp-releasetool +colorlog==6.7.0 \ + --hash=sha256:0d33ca236784a1ba3ff9c532d4964126d8a2c44f1f0cb1d2b0728196f512f662 \ + --hash=sha256:bd94bd21c1e13fac7bd3153f4bc3a7dc0eb0974b8bc2fdf1a989e474f6e582e5 + # via gcp-docuploader +cryptography==38.0.1 \ + --hash=sha256:0297ffc478bdd237f5ca3a7dc96fc0d315670bfa099c04dc3a4a2172008a405a \ + --hash=sha256:10d1f29d6292fc95acb597bacefd5b9e812099d75a6469004fd38ba5471a977f \ + --hash=sha256:16fa61e7481f4b77ef53991075de29fc5bacb582a1244046d2e8b4bb72ef66d0 \ + --hash=sha256:194044c6b89a2f9f169df475cc167f6157eb9151cc69af8a2a163481d45cc407 \ + --hash=sha256:1db3d807a14931fa317f96435695d9ec386be7b84b618cc61cfa5d08b0ae33d7 \ + --hash=sha256:3261725c0ef84e7592597606f6583385fed2a5ec3909f43bc475ade9729a41d6 \ + --hash=sha256:3b72c360427889b40f36dc214630e688c2fe03e16c162ef0aa41da7ab1455153 \ + --hash=sha256:3e3a2599e640927089f932295a9a247fc40a5bdf69b0484532f530471a382750 \ + --hash=sha256:3fc26e22840b77326a764ceb5f02ca2d342305fba08f002a8c1f139540cdfaad \ + --hash=sha256:5067ee7f2bce36b11d0e334abcd1ccf8c541fc0bbdaf57cdd511fdee53e879b6 \ + --hash=sha256:52e7bee800ec869b4031093875279f1ff2ed12c1e2f74923e8f49c916afd1d3b \ + --hash=sha256:64760ba5331e3f1794d0bcaabc0d0c39e8c60bf67d09c93dc0e54189dfd7cfe5 \ + --hash=sha256:765fa194a0f3372d83005ab83ab35d7c5526c4e22951e46059b8ac678b44fa5a \ + --hash=sha256:79473cf8a5cbc471979bd9378c9f425384980fcf2ab6534b18ed7d0d9843987d \ + --hash=sha256:896dd3a66959d3a5ddcfc140a53391f69ff1e8f25d93f0e2e7830c6de90ceb9d \ + --hash=sha256:89ed49784ba88c221756ff4d4755dbc03b3c8d2c5103f6d6b4f83a0fb1e85294 \ + --hash=sha256:ac7e48f7e7261207d750fa7e55eac2d45f720027d5703cd9007e9b37bbb59ac0 \ + --hash=sha256:ad7353f6ddf285aeadfaf79e5a6829110106ff8189391704c1d8801aa0bae45a \ + --hash=sha256:b0163a849b6f315bf52815e238bc2b2346604413fa7c1601eea84bcddb5fb9ac \ + --hash=sha256:b6c9b706316d7b5a137c35e14f4103e2115b088c412140fdbd5f87c73284df61 \ + --hash=sha256:c2e5856248a416767322c8668ef1845ad46ee62629266f84a8f007a317141013 \ + --hash=sha256:ca9f6784ea96b55ff41708b92c3f6aeaebde4c560308e5fbbd3173fbc466e94e \ + --hash=sha256:d1a5bd52d684e49a36582193e0b89ff267704cd4025abefb9e26803adeb3e5fb \ + --hash=sha256:d3971e2749a723e9084dd507584e2a2761f78ad2c638aa31e80bc7a15c9db4f9 \ + --hash=sha256:d4ef6cc305394ed669d4d9eebf10d3a101059bdcf2669c366ec1d14e4fb227bd \ + --hash=sha256:d9e69ae01f99abe6ad646947bba8941e896cb3aa805be2597a0400e0764b5818 + # via + # gcp-releasetool + # secretstorage +gcp-docuploader==0.6.3 \ + --hash=sha256:ba8c9d76b3bbac54b0311c503a373b00edc2dc02d6d54ea9507045adb8e870f7 \ + --hash=sha256:c0f5aaa82ce1854a386197e4e359b120ad6d4e57ae2c812fce42219a3288026b + # via -r requirements.in +gcp-releasetool==1.8.7 \ + --hash=sha256:3d2a67c9db39322194afb3b427e9cb0476ce8f2a04033695f0aeb63979fc2b37 \ + --hash=sha256:5e4d28f66e90780d77f3ecf1e9155852b0c3b13cbccb08ab07e66b2357c8da8d + # via -r requirements.in +google-api-core==2.8.2 \ + --hash=sha256:06f7244c640322b508b125903bb5701bebabce8832f85aba9335ec00b3d02edc \ + --hash=sha256:93c6a91ccac79079ac6bbf8b74ee75db970cc899278b97d53bc012f35908cf50 + # via + # -r requirements.in + # google-cloud-core + # google-cloud-storage +google-auth==2.11.0 \ + --hash=sha256:be62acaae38d0049c21ca90f27a23847245c9f161ff54ede13af2cb6afecbac9 \ + --hash=sha256:ed65ecf9f681832298e29328e1ef0a3676e3732b2e56f41532d45f70a22de0fb + # via + # -r requirements.in + # gcp-releasetool + # google-api-core + # google-cloud-core + # google-cloud-storage +google-cloud-core==2.3.1 \ + --hash=sha256:113ba4f492467d5bd442c8d724c1a25ad7384045c3178369038840ecdd19346c \ + --hash=sha256:34334359cb04187bdc80ddcf613e462dfd7a3aabbc3fe4d118517ab4b9303d53 + # via + # -r requirements.in + # google-cloud-storage +google-cloud-storage==2.0.0 \ + --hash=sha256:a57a15aead0f9dfbd4381f1bfdbe8bf89818a4bd75bab846cafcefb2db846c47 \ + --hash=sha256:ec4be60bb223a3a960f0d01697d849b86d91cad815a84915a32ed3635e93a5e7 + # via + # -r requirements.in + # gcp-docuploader +google-crc32c==1.3.0 \ + --hash=sha256:04e7c220798a72fd0f08242bc8d7a05986b2a08a0573396187fd32c1dcdd58b3 \ + --hash=sha256:05340b60bf05b574159e9bd940152a47d38af3fb43803ffe71f11d704b7696a6 \ + --hash=sha256:12674a4c3b56b706153a358eaa1018c4137a5a04635b92b4652440d3d7386206 \ + --hash=sha256:127f9cc3ac41b6a859bd9dc4321097b1a4f6aa7fdf71b4f9227b9e3ebffb4422 \ + --hash=sha256:13af315c3a0eec8bb8b8d80b8b128cb3fcd17d7e4edafc39647846345a3f003a \ + --hash=sha256:1926fd8de0acb9d15ee757175ce7242e235482a783cd4ec711cc999fc103c24e \ + --hash=sha256:226f2f9b8e128a6ca6a9af9b9e8384f7b53a801907425c9a292553a3a7218ce0 \ + --hash=sha256:276de6273eb074a35bc598f8efbc00c7869c5cf2e29c90748fccc8c898c244df \ + --hash=sha256:318f73f5484b5671f0c7f5f63741ab020a599504ed81d209b5c7129ee4667407 \ + --hash=sha256:3bbce1be3687bbfebe29abdb7631b83e6b25da3f4e1856a1611eb21854b689ea \ + --hash=sha256:42ae4781333e331a1743445931b08ebdad73e188fd554259e772556fc4937c48 \ + --hash=sha256:58be56ae0529c664cc04a9c76e68bb92b091e0194d6e3c50bea7e0f266f73713 \ + --hash=sha256:5da2c81575cc3ccf05d9830f9e8d3c70954819ca9a63828210498c0774fda1a3 \ + --hash=sha256:6311853aa2bba4064d0c28ca54e7b50c4d48e3de04f6770f6c60ebda1e975267 \ + --hash=sha256:650e2917660e696041ab3dcd7abac160b4121cd9a484c08406f24c5964099829 \ + --hash=sha256:6a4db36f9721fdf391646685ecffa404eb986cbe007a3289499020daf72e88a2 \ + --hash=sha256:779cbf1ce375b96111db98fca913c1f5ec11b1d870e529b1dc7354b2681a8c3a \ + --hash=sha256:7f6fe42536d9dcd3e2ffb9d3053f5d05221ae3bbcefbe472bdf2c71c793e3183 \ + --hash=sha256:891f712ce54e0d631370e1f4997b3f182f3368179198efc30d477c75d1f44942 \ + --hash=sha256:95c68a4b9b7828ba0428f8f7e3109c5d476ca44996ed9a5f8aac6269296e2d59 \ + --hash=sha256:96a8918a78d5d64e07c8ea4ed2bc44354e3f93f46a4866a40e8db934e4c0d74b \ + --hash=sha256:9c3cf890c3c0ecfe1510a452a165431b5831e24160c5fcf2071f0f85ca5a47cd \ + --hash=sha256:9f58099ad7affc0754ae42e6d87443299f15d739b0ce03c76f515153a5cda06c \ + --hash=sha256:a0b9e622c3b2b8d0ce32f77eba617ab0d6768b82836391e4f8f9e2074582bf02 \ + --hash=sha256:a7f9cbea4245ee36190f85fe1814e2d7b1e5f2186381b082f5d59f99b7f11328 \ + --hash=sha256:bab4aebd525218bab4ee615786c4581952eadc16b1ff031813a2fd51f0cc7b08 \ + --hash=sha256:c124b8c8779bf2d35d9b721e52d4adb41c9bfbde45e6a3f25f0820caa9aba73f \ + --hash=sha256:c9da0a39b53d2fab3e5467329ed50e951eb91386e9d0d5b12daf593973c3b168 \ + --hash=sha256:ca60076c388728d3b6ac3846842474f4250c91efbfe5afa872d3ffd69dd4b318 \ + --hash=sha256:cb6994fff247987c66a8a4e550ef374671c2b82e3c0d2115e689d21e511a652d \ + --hash=sha256:d1c1d6236feab51200272d79b3d3e0f12cf2cbb12b208c835b175a21efdb0a73 \ + --hash=sha256:dd7760a88a8d3d705ff562aa93f8445ead54f58fd482e4f9e2bafb7e177375d4 \ + --hash=sha256:dda4d8a3bb0b50f540f6ff4b6033f3a74e8bf0bd5320b70fab2c03e512a62812 \ + --hash=sha256:e0f1ff55dde0ebcfbef027edc21f71c205845585fffe30d4ec4979416613e9b3 \ + --hash=sha256:e7a539b9be7b9c00f11ef16b55486141bc2cdb0c54762f84e3c6fc091917436d \ + --hash=sha256:eb0b14523758e37802f27b7f8cd973f5f3d33be7613952c0df904b68c4842f0e \ + --hash=sha256:ed447680ff21c14aaceb6a9f99a5f639f583ccfe4ce1a5e1d48eb41c3d6b3217 \ + --hash=sha256:f52a4ad2568314ee713715b1e2d79ab55fab11e8b304fd1462ff5cccf4264b3e \ + --hash=sha256:fbd60c6aaa07c31d7754edbc2334aef50601b7f1ada67a96eb1eb57c7c72378f \ + --hash=sha256:fc28e0db232c62ca0c3600884933178f0825c99be4474cdd645e378a10588125 \ + --hash=sha256:fe31de3002e7b08eb20823b3735b97c86c5926dd0581c7710a680b418a8709d4 \ + --hash=sha256:fec221a051150eeddfdfcff162e6db92c65ecf46cb0f7bb1bf812a1520ec026b \ + --hash=sha256:ff71073ebf0e42258a42a0b34f2c09ec384977e7f6808999102eedd5b49920e3 + # via + # -r requirements.in + # google-resumable-media +google-resumable-media==2.3.3 \ + --hash=sha256:27c52620bd364d1c8116eaac4ea2afcbfb81ae9139fb3199652fcac1724bfb6c \ + --hash=sha256:5b52774ea7a829a8cdaa8bd2d4c3d4bc660c91b30857ab2668d0eb830f4ea8c5 + # via google-cloud-storage +googleapis-common-protos==1.56.3 \ + --hash=sha256:6f1369b58ed6cf3a4b7054a44ebe8d03b29c309257583a2bbdc064cd1e4a1442 \ + --hash=sha256:87955d7b3a73e6e803f2572a33179de23989ebba725e05ea42f24838b792e461 + # via + # -r requirements.in + # google-api-core +idna==3.4 \ + --hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 \ + --hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2 + # via + # -r requirements.in + # requests +importlib-metadata==4.8.3 \ + --hash=sha256:65a9576a5b2d58ca44d133c42a241905cc45e34d2c06fd5ba2bafa221e5d7b5e \ + --hash=sha256:766abffff765960fcc18003801f7044eb6755ffae4521c8e8ce8e83b9c9b0668 + # via + # -r requirements.in + # keyring +jeepney==0.7.1 \ + --hash=sha256:1b5a0ea5c0e7b166b2f5895b91a08c14de8915afda4407fb5022a195224958ac \ + --hash=sha256:fa9e232dfa0c498bd0b8a3a73b8d8a31978304dcef0515adc859d4e096f96f4f + # via + # -r requirements.in + # keyring + # secretstorage +jinja2==3.0.3 \ + --hash=sha256:077ce6014f7b40d03b47d1f1ca4b0fc8328a692bd284016f806ed0eaca390ad8 \ + --hash=sha256:611bb273cd68f3b993fabdc4064fc858c5b47a973cb5aa7999ec1ba405c87cd7 + # via + # -r requirements.in + # gcp-releasetool +keyring==23.4.1 \ + --hash=sha256:17e49fb0d6883c2b4445359434dba95aad84aabb29bbff044ad0ed7100232eca \ + --hash=sha256:89cbd74d4683ed164c8082fb38619341097741323b3786905c6dac04d6915a55 + # via + # -r requirements.in + # gcp-releasetool +markupsafe==2.0.1 \ + --hash=sha256:01a9b8ea66f1658938f65b93a85ebe8bc016e6769611be228d797c9d998dd298 \ + --hash=sha256:023cb26ec21ece8dc3907c0e8320058b2e0cb3c55cf9564da612bc325bed5e64 \ + --hash=sha256:0446679737af14f45767963a1a9ef7620189912317d095f2d9ffa183a4d25d2b \ + --hash=sha256:04635854b943835a6ea959e948d19dcd311762c5c0c6e1f0e16ee57022669194 \ + --hash=sha256:0717a7390a68be14b8c793ba258e075c6f4ca819f15edfc2a3a027c823718567 \ + --hash=sha256:0955295dd5eec6cb6cc2fe1698f4c6d84af2e92de33fbcac4111913cd100a6ff \ + --hash=sha256:0d4b31cc67ab36e3392bbf3862cfbadac3db12bdd8b02a2731f509ed5b829724 \ + --hash=sha256:10f82115e21dc0dfec9ab5c0223652f7197feb168c940f3ef61563fc2d6beb74 \ + --hash=sha256:168cd0a3642de83558a5153c8bd34f175a9a6e7f6dc6384b9655d2697312a646 \ + --hash=sha256:1d609f577dc6e1aa17d746f8bd3c31aa4d258f4070d61b2aa5c4166c1539de35 \ + --hash=sha256:1f2ade76b9903f39aa442b4aadd2177decb66525062db244b35d71d0ee8599b6 \ + --hash=sha256:20dca64a3ef2d6e4d5d615a3fd418ad3bde77a47ec8a23d984a12b5b4c74491a \ + --hash=sha256:2a7d351cbd8cfeb19ca00de495e224dea7e7d919659c2841bbb7f420ad03e2d6 \ + --hash=sha256:2d7d807855b419fc2ed3e631034685db6079889a1f01d5d9dac950f764da3dad \ + --hash=sha256:2ef54abee730b502252bcdf31b10dacb0a416229b72c18b19e24a4509f273d26 \ + --hash=sha256:36bc903cbb393720fad60fc28c10de6acf10dc6cc883f3e24ee4012371399a38 \ + --hash=sha256:37205cac2a79194e3750b0af2a5720d95f786a55ce7df90c3af697bfa100eaac \ + --hash=sha256:3c112550557578c26af18a1ccc9e090bfe03832ae994343cfdacd287db6a6ae7 \ + --hash=sha256:3dd007d54ee88b46be476e293f48c85048603f5f516008bee124ddd891398ed6 \ + --hash=sha256:4296f2b1ce8c86a6aea78613c34bb1a672ea0e3de9c6ba08a960efe0b0a09047 \ + --hash=sha256:47ab1e7b91c098ab893b828deafa1203de86d0bc6ab587b160f78fe6c4011f75 \ + --hash=sha256:49e3ceeabbfb9d66c3aef5af3a60cc43b85c33df25ce03d0031a608b0a8b2e3f \ + --hash=sha256:4dc8f9fb58f7364b63fd9f85013b780ef83c11857ae79f2feda41e270468dd9b \ + --hash=sha256:4efca8f86c54b22348a5467704e3fec767b2db12fc39c6d963168ab1d3fc9135 \ + --hash=sha256:53edb4da6925ad13c07b6d26c2a852bd81e364f95301c66e930ab2aef5b5ddd8 \ + --hash=sha256:5855f8438a7d1d458206a2466bf82b0f104a3724bf96a1c781ab731e4201731a \ + --hash=sha256:594c67807fb16238b30c44bdf74f36c02cdf22d1c8cda91ef8a0ed8dabf5620a \ + --hash=sha256:5b6d930f030f8ed98e3e6c98ffa0652bdb82601e7a016ec2ab5d7ff23baa78d1 \ + --hash=sha256:5bb28c636d87e840583ee3adeb78172efc47c8b26127267f54a9c0ec251d41a9 \ + --hash=sha256:60bf42e36abfaf9aff1f50f52644b336d4f0a3fd6d8a60ca0d054ac9f713a864 \ + --hash=sha256:611d1ad9a4288cf3e3c16014564df047fe08410e628f89805e475368bd304914 \ + --hash=sha256:6300b8454aa6930a24b9618fbb54b5a68135092bc666f7b06901f897fa5c2fee \ + --hash=sha256:63f3268ba69ace99cab4e3e3b5840b03340efed0948ab8f78d2fd87ee5442a4f \ + --hash=sha256:6557b31b5e2c9ddf0de32a691f2312a32f77cd7681d8af66c2692efdbef84c18 \ + --hash=sha256:693ce3f9e70a6cf7d2fb9e6c9d8b204b6b39897a2c4a1aa65728d5ac97dcc1d8 \ + --hash=sha256:6a7fae0dd14cf60ad5ff42baa2e95727c3d81ded453457771d02b7d2b3f9c0c2 \ + --hash=sha256:6c4ca60fa24e85fe25b912b01e62cb969d69a23a5d5867682dd3e80b5b02581d \ + --hash=sha256:6fcf051089389abe060c9cd7caa212c707e58153afa2c649f00346ce6d260f1b \ + --hash=sha256:7d91275b0245b1da4d4cfa07e0faedd5b0812efc15b702576d103293e252af1b \ + --hash=sha256:89c687013cb1cd489a0f0ac24febe8c7a666e6e221b783e53ac50ebf68e45d86 \ + --hash=sha256:8d206346619592c6200148b01a2142798c989edcb9c896f9ac9722a99d4e77e6 \ + --hash=sha256:905fec760bd2fa1388bb5b489ee8ee5f7291d692638ea5f67982d968366bef9f \ + --hash=sha256:97383d78eb34da7e1fa37dd273c20ad4320929af65d156e35a5e2d89566d9dfb \ + --hash=sha256:984d76483eb32f1bcb536dc27e4ad56bba4baa70be32fa87152832cdd9db0833 \ + --hash=sha256:99df47edb6bda1249d3e80fdabb1dab8c08ef3975f69aed437cb69d0a5de1e28 \ + --hash=sha256:9f02365d4e99430a12647f09b6cc8bab61a6564363f313126f775eb4f6ef798e \ + --hash=sha256:a30e67a65b53ea0a5e62fe23682cfe22712e01f453b95233b25502f7c61cb415 \ + --hash=sha256:ab3ef638ace319fa26553db0624c4699e31a28bb2a835c5faca8f8acf6a5a902 \ + --hash=sha256:aca6377c0cb8a8253e493c6b451565ac77e98c2951c45f913e0b52facdcff83f \ + --hash=sha256:add36cb2dbb8b736611303cd3bfcee00afd96471b09cda130da3581cbdc56a6d \ + --hash=sha256:b2f4bf27480f5e5e8ce285a8c8fd176c0b03e93dcc6646477d4630e83440c6a9 \ + --hash=sha256:b7f2d075102dc8c794cbde1947378051c4e5180d52d276987b8d28a3bd58c17d \ + --hash=sha256:baa1a4e8f868845af802979fcdbf0bb11f94f1cb7ced4c4b8a351bb60d108145 \ + --hash=sha256:be98f628055368795d818ebf93da628541e10b75b41c559fdf36d104c5787066 \ + --hash=sha256:bf5d821ffabf0ef3533c39c518f3357b171a1651c1ff6827325e4489b0e46c3c \ + --hash=sha256:c47adbc92fc1bb2b3274c4b3a43ae0e4573d9fbff4f54cd484555edbf030baf1 \ + --hash=sha256:cdfba22ea2f0029c9261a4bd07e830a8da012291fbe44dc794e488b6c9bb353a \ + --hash=sha256:d6c7ebd4e944c85e2c3421e612a7057a2f48d478d79e61800d81468a8d842207 \ + --hash=sha256:d7f9850398e85aba693bb640262d3611788b1f29a79f0c93c565694658f4071f \ + --hash=sha256:d8446c54dc28c01e5a2dbac5a25f071f6653e6e40f3a8818e8b45d790fe6ef53 \ + --hash=sha256:deb993cacb280823246a026e3b2d81c493c53de6acfd5e6bfe31ab3402bb37dd \ + --hash=sha256:e0f138900af21926a02425cf736db95be9f4af72ba1bb21453432a07f6082134 \ + --hash=sha256:e9936f0b261d4df76ad22f8fee3ae83b60d7c3e871292cd42f40b81b70afae85 \ + --hash=sha256:f0567c4dc99f264f49fe27da5f735f414c4e7e7dd850cfd8e69f0862d7c74ea9 \ + --hash=sha256:f5653a225f31e113b152e56f154ccbe59eeb1c7487b39b9d9f9cdb58e6c79dc5 \ + --hash=sha256:f826e31d18b516f653fe296d967d700fddad5901ae07c622bb3705955e1faa94 \ + --hash=sha256:f8ba0e8349a38d3001fae7eadded3f6606f0da5d748ee53cc1dab1d6527b9509 \ + --hash=sha256:f9081981fe268bd86831e5c75f7de206ef275defcb82bc70740ae6dc507aee51 \ + --hash=sha256:fa130dd50c57d53368c9d59395cb5526eda596d3ffe36666cd81a44d56e48872 + # via + # -r requirements.in + # jinja2 +packaging==21.3 \ + --hash=sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb \ + --hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522 + # via + # -r requirements.in + # gcp-releasetool +protobuf==3.19.5 \ + --hash=sha256:1867f93b06a183f87696871bb8d1e99ee71dbb69d468ce1f0cc8bf3d30f982f3 \ + --hash=sha256:3c4160b601220627f7e91154e572baf5e161a9c3f445a8242d536ee3d0b7b17c \ + --hash=sha256:4ee2af7051d3b10c8a4fe6fd1a2c69f201fea36aeee7086cf202a692e1b99ee1 \ + --hash=sha256:5266c36cc0af3bb3dbf44f199d225b33da66a9a5c3bdc2b14865ad10eddf0e37 \ + --hash=sha256:5470f892961af464ae6eaf0f3099e2c1190ae8c7f36f174b89491281341f79ca \ + --hash=sha256:66d14b5b90090353efe75c9fb1bf65ef7267383034688d255b500822e37d5c2f \ + --hash=sha256:67efb5d20618020aa9596e17bfc37ca068c28ec0c1507d9507f73c93d46c9855 \ + --hash=sha256:696e6cfab94cc15a14946f2bf72719dced087d437adbd994fff34f38986628bc \ + --hash=sha256:6a02172b9650f819d01fb8e224fc69b0706458fc1ab4f1c669281243c71c1a5e \ + --hash=sha256:6eca9ae238ba615d702387a2ddea635d535d769994a9968c09a4ca920c487ab9 \ + --hash=sha256:950abd6c00e7b51f87ae8b18a0ce4d69fea217f62f171426e77de5061f6d9850 \ + --hash=sha256:9e1d74032f56ff25f417cfe84c8147047732e5059137ca42efad20cbbd25f5e0 \ + --hash=sha256:9e42b1cf2ecd8a1bd161239e693f22035ba99905ae6d7efeac8a0546c7ec1a27 \ + --hash=sha256:9f957ef53e872d58a0afd3bf6d80d48535d28c99b40e75e6634cbc33ea42fd54 \ + --hash=sha256:a89aa0c042e61e11ade320b802d6db4ee5391d8d973e46d3a48172c1597789f8 \ + --hash=sha256:c0f80876a8ff0ae7064084ed094eb86497bd5a3812e6fc96a05318b92301674e \ + --hash=sha256:c44e3282cff74ad18c7e8a0375f407f69ee50c2116364b44492a196293e08b21 \ + --hash=sha256:d249519ba5ecf5dd6b18150c9b6bcde510b273714b696f3923ff8308fc11ae49 \ + --hash=sha256:d3973a2d58aefc7d1230725c2447ce7f86a71cbc094b86a77c6ee1505ac7cdb1 \ + --hash=sha256:dca2284378a5f2a86ffed35c6ac147d14c48b525eefcd1083e5a9ce28dfa8657 \ + --hash=sha256:e63b0b3c42e51c94add62b010366cd4979cb6d5f06158bcae8faac4c294f91e1 \ + --hash=sha256:f2b599a21c9a32e171ec29a2ac54e03297736c578698e11b099d031f79da114b \ + --hash=sha256:f2bde37667b18c2b5280df83bc799204394a5d2d774e4deaf9de0eb741df6833 \ + --hash=sha256:f4f909f4dde413dec435a44b0894956d55bb928ded7d6e3c726556ca4c796e84 \ + --hash=sha256:f976234e20ab2785f54224bcdafa027674e23663b132fa3ca0caa291a6cfbde7 \ + --hash=sha256:f9cebda093c2f6bfed88f1c17cdade09d4d96096421b344026feee236532d4de + # via + # -r requirements.in + # gcp-docuploader + # gcp-releasetool + # google-api-core + # google-cloud-storage + # googleapis-common-protos +pyasn1==0.4.8 \ + --hash=sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d \ + --hash=sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba + # via + # pyasn1-modules + # rsa +pyasn1-modules==0.2.8 \ + --hash=sha256:905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e \ + --hash=sha256:a50b808ffeb97cb3601dd25981f6b016cbb3d31fbf57a8b8a87428e6158d0c74 + # via google-auth +pycparser==2.21 \ + --hash=sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9 \ + --hash=sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206 + # via + # -r requirements.in + # cffi +pyjwt==2.4.0 \ + --hash=sha256:72d1d253f32dbd4f5c88eaf1fdc62f3a19f676ccbadb9dbc5d07e951b2b26daf \ + --hash=sha256:d42908208c699b3b973cbeb01a969ba6a96c821eefb1c5bfe4c390c01d67abba + # via + # -r requirements.in + # gcp-releasetool +pyparsing==3.0.9 \ + --hash=sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb \ + --hash=sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc + # via + # -r requirements.in + # packaging +pyperclip==1.8.2 \ + --hash=sha256:105254a8b04934f0bc84e9c24eb360a591aaf6535c9def5f29d92af107a9bf57 + # via + # -r requirements.in + # gcp-releasetool +python-dateutil==2.8.2 \ + --hash=sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86 \ + --hash=sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9 + # via + # -r requirements.in + # gcp-releasetool +requests==2.27.1 \ + --hash=sha256:68d7c56fd5a8999887728ef304a6d12edc7be74f1cfa47714fc8b414525c9a61 \ + --hash=sha256:f22fa1e554c9ddfd16e6e41ac79759e17be9e492b3587efa038054674760e72d + # via + # -r requirements.in + # gcp-releasetool + # google-api-core + # google-cloud-storage +rsa==4.9 \ + --hash=sha256:90260d9058e514786967344d0ef75fa8727eed8a7d2e43ce9f4bcf1b536174f7 \ + --hash=sha256:e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21 + # via + # -r requirements.in + # google-auth +secretstorage==3.3.3 \ + --hash=sha256:2403533ef369eca6d2ba81718576c5e0f564d5cca1b58f73a8b23e7d4eeebd77 \ + --hash=sha256:f356e6628222568e3af06f2eba8df495efa13b3b63081dafd4f7d9a7b7bc9f99 + # via keyring +six==1.16.0 \ + --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ + --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 + # via + # -r requirements.in + # gcp-docuploader + # google-auth + # python-dateutil +typing-extensions==4.1.1 \ + --hash=sha256:1a9462dcc3347a79b1f1c0271fbe79e844580bb598bafa1ed208b94da3cdcd42 \ + --hash=sha256:21c85e0fe4b9a155d0799430b0ad741cdce7e359660ccbd8b530613e8df88ce2 + # via -r requirements.in +urllib3==1.26.12 \ + --hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \ + --hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997 + # via + # -r requirements.in + # requests +zipp==3.6.0 \ + --hash=sha256:71c644c5369f4a6e07636f0aa966270449561fcea2e3d6747b8d23efaa9d7832 \ + --hash=sha256:9fe5ea21568a0a70e50f273397638d39b03353731e6cbbb3fd8502a33fec40bc + # via + # -r requirements.in + # importlib-metadata diff --git a/CHANGELOG.md b/CHANGELOG.md index 8911d6fb..cea1d03b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,45 @@ # Changelog +## [2.5.1](https://github.com/googleapis/java-retail/compare/v2.5.0...v2.5.1) (2022-10-03) + + +### Bug Fixes + +* **samples:** Bug fix for removing buckets from bq. ([#548](https://github.com/googleapis/java-retail/issues/548)) ([c407fe3](https://github.com/googleapis/java-retail/commit/c407fe3581a39598d86eb968b2650c8e8f4e8063)) +* **samples:** Bug fix for setup script ([#549](https://github.com/googleapis/java-retail/issues/549)) ([abc4b3e](https://github.com/googleapis/java-retail/commit/abc4b3eab3ae664ceeb4de54b3623406aac85950)) +* **samples:** Lro added out-of-order step. ([#539](https://github.com/googleapis/java-retail/issues/539)) ([2befbb1](https://github.com/googleapis/java-retail/commit/2befbb1349131345488890ad33eb20ba91692f1b)) +* **samples:** Removed delays on LRO ([#527](https://github.com/googleapis/java-retail/issues/527)) ([934c6b4](https://github.com/googleapis/java-retail/commit/934c6b4dd259e18d1aee88abbffd4b88d1b70343)) +* **samples:** Replaced your-project-id with default. ([#541](https://github.com/googleapis/java-retail/issues/541)) ([f1b2397](https://github.com/googleapis/java-retail/commit/f1b23977282b213029533756449213d591673f62)) +* **samples:** Updating both json files. ([#540](https://github.com/googleapis/java-retail/issues/540)) ([22386d5](https://github.com/googleapis/java-retail/commit/22386d50f0cf66449236562e241bce212ada70ea)) + + +### Dependencies + +* Update dependency cachetools to v5 ([#566](https://github.com/googleapis/java-retail/issues/566)) ([95ea349](https://github.com/googleapis/java-retail/commit/95ea3490140be099b54deaa0ff74ad4659869a92)) +* Update dependency certifi to v2022.9.24 ([#568](https://github.com/googleapis/java-retail/issues/568)) ([45253be](https://github.com/googleapis/java-retail/commit/45253be7a091375b790bb229a9ca55a65b4a3f32)) +* Update dependency charset-normalizer to v2.1.1 ([#556](https://github.com/googleapis/java-retail/issues/556)) ([f244afc](https://github.com/googleapis/java-retail/commit/f244afcf0a27c84a489ed3621201b9e18d168cdb)) +* Update dependency com.google.cloud:google-cloud-bigquery to v2.16.1 ([#542](https://github.com/googleapis/java-retail/issues/542)) ([e9e88d3](https://github.com/googleapis/java-retail/commit/e9e88d3014f1e35655b76e0f834889a37ac02f00)) +* Update dependency com.google.cloud:google-cloud-shared-dependencies to v3.0.4 ([#577](https://github.com/googleapis/java-retail/issues/577)) ([a963dc6](https://github.com/googleapis/java-retail/commit/a963dc6cf0b4ef93ee5bf411cf5f97a98062e633)) +* Update dependency com.google.cloud:google-cloud-storage to v2.12.0 ([#543](https://github.com/googleapis/java-retail/issues/543)) ([24386db](https://github.com/googleapis/java-retail/commit/24386db488f724d4e10965cd25605f3af2ed403a)) +* Update dependency gcp-releasetool to v1.8.8 ([#569](https://github.com/googleapis/java-retail/issues/569)) ([45a7e22](https://github.com/googleapis/java-retail/commit/45a7e22e2793aa21b9044865944e28d436cfa9d6)) +* Update dependency google-api-core to v2.10.1 ([#558](https://github.com/googleapis/java-retail/issues/558)) ([8712708](https://github.com/googleapis/java-retail/commit/8712708260b380e4856a34aa03434448190ce5dd)) +* Update dependency google-auth to v2.11.1 ([#570](https://github.com/googleapis/java-retail/issues/570)) ([0b4e3a5](https://github.com/googleapis/java-retail/commit/0b4e3a5d1b0fecdeffc9c1f160ea9b08fe220300)) +* Update dependency google-cloud-core to v2.3.2 ([#554](https://github.com/googleapis/java-retail/issues/554)) ([98db758](https://github.com/googleapis/java-retail/commit/98db758b0b9d12281b150a341790eecd4d5664a2)) +* Update dependency google-cloud-storage to v2.5.0 ([#559](https://github.com/googleapis/java-retail/issues/559)) ([01ddcf9](https://github.com/googleapis/java-retail/commit/01ddcf9b16dce0ab80430ac20938ff4b9216b382)) +* Update dependency google-crc32c to v1.5.0 ([#560](https://github.com/googleapis/java-retail/issues/560)) ([e877900](https://github.com/googleapis/java-retail/commit/e87790009c7f5b3bf131f1db04ad97713b6b6c8c)) +* Update dependency googleapis-common-protos to v1.56.4 ([#555](https://github.com/googleapis/java-retail/issues/555)) ([1cb27b3](https://github.com/googleapis/java-retail/commit/1cb27b3ee903c2104911c27217b78bd9cacea26a)) +* Update dependency importlib-metadata to v4.12.0 ([#561](https://github.com/googleapis/java-retail/issues/561)) ([9f4d04b](https://github.com/googleapis/java-retail/commit/9f4d04b23e909829b129f2acc2d6061e8894a20f)) +* Update dependency jeepney to v0.8.0 ([#571](https://github.com/googleapis/java-retail/issues/571)) ([5ca90a0](https://github.com/googleapis/java-retail/commit/5ca90a04c6f0c8de9f90675b6ef91612701a15d8)) +* Update dependency jinja2 to v3.1.2 ([#572](https://github.com/googleapis/java-retail/issues/572)) ([0cf30ee](https://github.com/googleapis/java-retail/commit/0cf30eee9ba1256164255444344b4be5d09a5143)) +* Update dependency keyring to v23.9.3 ([#573](https://github.com/googleapis/java-retail/issues/573)) ([ab772da](https://github.com/googleapis/java-retail/commit/ab772dafca75ae557b8f2558e32da6899082b2c0)) +* Update dependency markupsafe to v2.1.1 ([#553](https://github.com/googleapis/java-retail/issues/553)) ([fce0ade](https://github.com/googleapis/java-retail/commit/fce0ade246a75dc35b05e106f1b7f5aa73fc516e)) +* Update dependency protobuf to v3.20.2 ([#574](https://github.com/googleapis/java-retail/issues/574)) ([7fa228e](https://github.com/googleapis/java-retail/commit/7fa228eb669cb0b59e64ca0d2e8641e01df05a9e)) +* Update dependency protobuf to v4 ([#567](https://github.com/googleapis/java-retail/issues/567)) ([cf6be4c](https://github.com/googleapis/java-retail/commit/cf6be4ceff0cd39af95b8e0201aa1657579b21a0)) +* Update dependency pyjwt to v2.5.0 ([#562](https://github.com/googleapis/java-retail/issues/562)) ([96ec337](https://github.com/googleapis/java-retail/commit/96ec337e1ec00811b23f1f509156749d2a062301)) +* Update dependency requests to v2.28.1 ([#563](https://github.com/googleapis/java-retail/issues/563)) ([8bd27c1](https://github.com/googleapis/java-retail/commit/8bd27c1a264132f932701ae5b5f14b6540bdb8a1)) +* Update dependency typing-extensions to v4.3.0 ([#564](https://github.com/googleapis/java-retail/issues/564)) ([7c0cd75](https://github.com/googleapis/java-retail/commit/7c0cd7590d9d52acf7c82ecc1cbd8df85ba5e7ca)) +* Update dependency zipp to v3.8.1 ([#565](https://github.com/googleapis/java-retail/issues/565)) ([4c30271](https://github.com/googleapis/java-retail/commit/4c302718f919d231d02fa5415a45825aab38fe18)) + ## [2.5.0](https://github.com/googleapis/java-retail/compare/v2.4.0...v2.5.0) (2022-09-16) diff --git a/README.md b/README.md index 37bf83d1..03b6e403 100644 --- a/README.md +++ b/README.md @@ -19,7 +19,7 @@ If you are using Maven, add this to your pom.xml file: com.google.cloud google-cloud-retail - 2.4.0 + 2.5.0 ``` @@ -27,13 +27,13 @@ If you are using Maven, add this to your pom.xml file: If you are using Gradle without BOM, add this to your dependencies: ```Groovy -implementation 'com.google.cloud:google-cloud-retail:2.4.0' +implementation 'com.google.cloud:google-cloud-retail:2.5.0' ``` If you are using SBT, add this to your dependencies: ```Scala -libraryDependencies += "com.google.cloud" % "google-cloud-retail" % "2.4.0" +libraryDependencies += "com.google.cloud" % "google-cloud-retail" % "2.5.0" ``` ## Authentication diff --git a/google-cloud-retail-bom/pom.xml b/google-cloud-retail-bom/pom.xml index 2b0a686c..6fcb1ba6 100644 --- a/google-cloud-retail-bom/pom.xml +++ b/google-cloud-retail-bom/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-retail-bom - 2.5.0 + 2.5.1 pom com.google.cloud @@ -57,37 +57,37 @@ com.google.cloud google-cloud-retail - 2.5.0 + 2.5.1 com.google.api.grpc grpc-google-cloud-retail-v2 - 2.5.0 + 2.5.1 com.google.api.grpc grpc-google-cloud-retail-v2alpha - 2.5.0 + 2.5.1 com.google.api.grpc grpc-google-cloud-retail-v2beta - 2.5.0 + 2.5.1 com.google.api.grpc proto-google-cloud-retail-v2 - 2.5.0 + 2.5.1 com.google.api.grpc proto-google-cloud-retail-v2alpha - 2.5.0 + 2.5.1 com.google.api.grpc proto-google-cloud-retail-v2beta - 2.5.0 + 2.5.1 diff --git a/google-cloud-retail/pom.xml b/google-cloud-retail/pom.xml index 586ac742..3c3c0a37 100644 --- a/google-cloud-retail/pom.xml +++ b/google-cloud-retail/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-cloud-retail - 2.5.0 + 2.5.1 jar Google Cloud Retail https://github.com/googleapis/java-retail @@ -11,7 +11,7 @@ com.google.cloud google-cloud-retail-parent - 2.5.0 + 2.5.1 google-cloud-retail diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CatalogServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CatalogServiceClient.java index 320310e5..eacfa518 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CatalogServiceClient.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CatalogServiceClient.java @@ -42,8 +42,11 @@ * calls that map to API methods. Sample code to get started: * *
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
  *   Catalog catalog = Catalog.newBuilder().build();
  *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -80,8 +83,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CatalogServiceSettings catalogServiceSettings =
  *     CatalogServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -92,8 +98,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CatalogServiceSettings catalogServiceSettings =
  *     CatalogServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * CatalogServiceClient catalogServiceClient = CatalogServiceClient.create(catalogServiceSettings);
@@ -103,8 +112,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CatalogServiceSettings catalogServiceSettings =
  *     CatalogServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -172,8 +184,11 @@ public CatalogServiceStub getStub() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   for (Catalog element : catalogServiceClient.listCatalogs(parent).iterateAll()) {
@@ -203,8 +218,11 @@ public final ListCatalogsPagedResponse listCatalogs(LocationName parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   for (Catalog element : catalogServiceClient.listCatalogs(parent).iterateAll()) {
@@ -231,8 +249,11 @@ public final ListCatalogsPagedResponse listCatalogs(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   ListCatalogsRequest request =
    *       ListCatalogsRequest.newBuilder()
@@ -260,8 +281,11 @@ public final ListCatalogsPagedResponse listCatalogs(ListCatalogsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   ListCatalogsRequest request =
    *       ListCatalogsRequest.newBuilder()
@@ -290,8 +314,11 @@ public final ListCatalogsPagedResponse listCatalogs(ListCatalogsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   ListCatalogsRequest request =
    *       ListCatalogsRequest.newBuilder()
@@ -325,8 +352,11 @@ public final UnaryCallable listCatalo
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   Catalog catalog = Catalog.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -358,8 +388,11 @@ public final Catalog updateCatalog(Catalog catalog, FieldMask updateMask) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   UpdateCatalogRequest request =
    *       UpdateCatalogRequest.newBuilder()
@@ -384,8 +417,11 @@ public final Catalog updateCatalog(UpdateCatalogRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   UpdateCatalogRequest request =
    *       UpdateCatalogRequest.newBuilder()
@@ -438,8 +474,11 @@ public final UnaryCallable updateCatalogCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   CatalogName catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   catalogServiceClient.setDefaultBranch(catalog);
@@ -494,8 +533,11 @@ public final void setDefaultBranch(CatalogName catalog) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   String catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   catalogServiceClient.setDefaultBranch(catalog);
@@ -548,8 +590,11 @@ public final void setDefaultBranch(String catalog) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   SetDefaultBranchRequest request =
    *       SetDefaultBranchRequest.newBuilder()
@@ -606,8 +651,11 @@ public final void setDefaultBranch(SetDefaultBranchRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   SetDefaultBranchRequest request =
    *       SetDefaultBranchRequest.newBuilder()
@@ -636,8 +684,11 @@ public final UnaryCallable setDefaultBranchCalla
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   CatalogName catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   GetDefaultBranchResponse response = catalogServiceClient.getDefaultBranch(catalog);
@@ -665,8 +716,11 @@ public final GetDefaultBranchResponse getDefaultBranch(CatalogName catalog) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   String catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   GetDefaultBranchResponse response = catalogServiceClient.getDefaultBranch(catalog);
@@ -692,8 +746,11 @@ public final GetDefaultBranchResponse getDefaultBranch(String catalog) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   GetDefaultBranchRequest request =
    *       GetDefaultBranchRequest.newBuilder()
@@ -719,8 +776,11 @@ public final GetDefaultBranchResponse getDefaultBranch(GetDefaultBranchRequest r
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   GetDefaultBranchRequest request =
    *       GetDefaultBranchRequest.newBuilder()
@@ -745,8 +805,11 @@ public final GetDefaultBranchResponse getDefaultBranch(GetDefaultBranchRequest r
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   CompletionConfigName name = CompletionConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   CompletionConfig response = catalogServiceClient.getCompletionConfig(name);
@@ -772,8 +835,11 @@ public final CompletionConfig getCompletionConfig(CompletionConfigName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   String name = CompletionConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   CompletionConfig response = catalogServiceClient.getCompletionConfig(name);
@@ -797,8 +863,11 @@ public final CompletionConfig getCompletionConfig(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   GetCompletionConfigRequest request =
    *       GetCompletionConfigRequest.newBuilder()
@@ -822,8 +891,11 @@ public final CompletionConfig getCompletionConfig(GetCompletionConfigRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   GetCompletionConfigRequest request =
    *       GetCompletionConfigRequest.newBuilder()
@@ -848,8 +920,11 @@ public final CompletionConfig getCompletionConfig(GetCompletionConfigRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   CompletionConfig completionConfig = CompletionConfig.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -894,8 +969,11 @@ public final CompletionConfig updateCompletionConfig(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   UpdateCompletionConfigRequest request =
    *       UpdateCompletionConfigRequest.newBuilder()
@@ -920,8 +998,11 @@ public final CompletionConfig updateCompletionConfig(UpdateCompletionConfigReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   UpdateCompletionConfigRequest request =
    *       UpdateCompletionConfigRequest.newBuilder()
@@ -947,8 +1028,11 @@ public final CompletionConfig updateCompletionConfig(UpdateCompletionConfigReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   AttributesConfigName name = AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   AttributesConfig response = catalogServiceClient.getAttributesConfig(name);
@@ -974,8 +1058,11 @@ public final AttributesConfig getAttributesConfig(AttributesConfigName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   String name = AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   AttributesConfig response = catalogServiceClient.getAttributesConfig(name);
@@ -999,8 +1086,11 @@ public final AttributesConfig getAttributesConfig(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   GetAttributesConfigRequest request =
    *       GetAttributesConfigRequest.newBuilder()
@@ -1024,8 +1114,11 @@ public final AttributesConfig getAttributesConfig(GetAttributesConfigRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   GetAttributesConfigRequest request =
    *       GetAttributesConfigRequest.newBuilder()
@@ -1056,8 +1149,11 @@ public final AttributesConfig getAttributesConfig(GetAttributesConfigRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   AttributesConfig attributesConfig = AttributesConfig.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -1100,8 +1196,11 @@ public final AttributesConfig updateAttributesConfig(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   UpdateAttributesConfigRequest request =
    *       UpdateAttributesConfigRequest.newBuilder()
@@ -1132,8 +1231,11 @@ public final AttributesConfig updateAttributesConfig(UpdateAttributesConfigReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   UpdateAttributesConfigRequest request =
    *       UpdateAttributesConfigRequest.newBuilder()
@@ -1163,8 +1265,11 @@ public final AttributesConfig updateAttributesConfig(UpdateAttributesConfigReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   AddCatalogAttributeRequest request =
    *       AddCatalogAttributeRequest.newBuilder()
@@ -1194,8 +1299,11 @@ public final AttributesConfig addCatalogAttribute(AddCatalogAttributeRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   AddCatalogAttributeRequest request =
    *       AddCatalogAttributeRequest.newBuilder()
@@ -1226,8 +1334,11 @@ public final AttributesConfig addCatalogAttribute(AddCatalogAttributeRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   RemoveCatalogAttributeRequest request =
    *       RemoveCatalogAttributeRequest.newBuilder()
@@ -1257,8 +1368,11 @@ public final AttributesConfig removeCatalogAttribute(RemoveCatalogAttributeReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   RemoveCatalogAttributeRequest request =
    *       RemoveCatalogAttributeRequest.newBuilder()
@@ -1290,8 +1404,11 @@ public final AttributesConfig removeCatalogAttribute(RemoveCatalogAttributeReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   ReplaceCatalogAttributeRequest request =
    *       ReplaceCatalogAttributeRequest.newBuilder()
@@ -1323,8 +1440,11 @@ public final AttributesConfig replaceCatalogAttribute(ReplaceCatalogAttributeReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   ReplaceCatalogAttributeRequest request =
    *       ReplaceCatalogAttributeRequest.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CatalogServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CatalogServiceSettings.java
index 7e02a723..0414924c 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CatalogServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CatalogServiceSettings.java
@@ -54,17 +54,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CatalogServiceSettings.Builder catalogServiceSettingsBuilder =
  *     CatalogServiceSettings.newBuilder();
  * catalogServiceSettingsBuilder
  *     .updateCatalogSettings()
  *     .setRetrySettings(
- *         catalogServiceSettingsBuilder
- *             .updateCatalogSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         catalogServiceSettingsBuilder.updateCatalogSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * CatalogServiceSettings catalogServiceSettings = catalogServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CompletionServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CompletionServiceClient.java
index 2a7a821f..40d4259e 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CompletionServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CompletionServiceClient.java
@@ -40,8 +40,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
  *   CompleteQueryRequest request =
  *       CompleteQueryRequest.newBuilder()
@@ -87,8 +90,11 @@
  * 

To customize credentials: * *

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

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CompletionServiceSettings completionServiceSettings =
  *     CompletionServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * CompletionServiceClient completionServiceClient =
@@ -112,8 +121,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CompletionServiceSettings completionServiceSettings =
  *     CompletionServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -210,8 +222,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
    *   CompleteQueryRequest request =
    *       CompleteQueryRequest.newBuilder()
@@ -244,8 +259,11 @@ public final CompleteQueryResponse completeQuery(CompleteQueryRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
    *   CompleteQueryRequest request =
    *       CompleteQueryRequest.newBuilder()
@@ -283,8 +301,11 @@ public final UnaryCallable complete
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
    *   ImportCompletionDataRequest request =
    *       ImportCompletionDataRequest.newBuilder()
@@ -320,8 +341,11 @@ public final UnaryCallable complete
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
    *   ImportCompletionDataRequest request =
    *       ImportCompletionDataRequest.newBuilder()
@@ -357,8 +381,11 @@ public final UnaryCallable complete
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
    *   ImportCompletionDataRequest request =
    *       ImportCompletionDataRequest.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CompletionServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CompletionServiceSettings.java
index 8eec040c..41229c24 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CompletionServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/CompletionServiceSettings.java
@@ -52,17 +52,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CompletionServiceSettings.Builder completionServiceSettingsBuilder =
  *     CompletionServiceSettings.newBuilder();
  * completionServiceSettingsBuilder
  *     .completeQuerySettings()
  *     .setRetrySettings(
- *         completionServiceSettingsBuilder
- *             .completeQuerySettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         completionServiceSettingsBuilder.completeQuerySettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * CompletionServiceSettings completionServiceSettings = completionServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ControlServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ControlServiceClient.java
index 43d3ccb5..7e5e7cbf 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ControlServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ControlServiceClient.java
@@ -42,8 +42,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
  *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
  *   Control control = Control.newBuilder().build();
@@ -81,8 +84,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ControlServiceSettings controlServiceSettings =
  *     ControlServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -93,8 +99,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ControlServiceSettings controlServiceSettings =
  *     ControlServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ControlServiceClient controlServiceClient = ControlServiceClient.create(controlServiceSettings);
@@ -104,8 +113,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ControlServiceSettings controlServiceSettings =
  *     ControlServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -176,8 +188,11 @@ public ControlServiceStub getStub() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   Control control = Control.newBuilder().build();
@@ -214,8 +229,11 @@ public final Control createControl(CatalogName parent, Control control, String c
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   Control control = Control.newBuilder().build();
@@ -252,8 +270,11 @@ public final Control createControl(String parent, Control control, String contro
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   CreateControlRequest request =
    *       CreateControlRequest.newBuilder()
@@ -282,8 +303,11 @@ public final Control createControl(CreateControlRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   CreateControlRequest request =
    *       CreateControlRequest.newBuilder()
@@ -311,8 +335,11 @@ public final UnaryCallable createControlCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   ControlName name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]");
    *   controlServiceClient.deleteControl(name);
@@ -339,8 +366,11 @@ public final void deleteControl(ControlName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   String name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString();
    *   controlServiceClient.deleteControl(name);
@@ -366,8 +396,11 @@ public final void deleteControl(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   DeleteControlRequest request =
    *       DeleteControlRequest.newBuilder()
@@ -395,8 +428,11 @@ public final void deleteControl(DeleteControlRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   DeleteControlRequest request =
    *       DeleteControlRequest.newBuilder()
@@ -424,8 +460,11 @@ public final UnaryCallable deleteControlCallable()
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   Control control = Control.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -459,8 +498,11 @@ public final Control updateControl(Control control, FieldMask updateMask) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   UpdateControlRequest request =
    *       UpdateControlRequest.newBuilder()
@@ -489,8 +531,11 @@ public final Control updateControl(UpdateControlRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   UpdateControlRequest request =
    *       UpdateControlRequest.newBuilder()
@@ -514,8 +559,11 @@ public final UnaryCallable updateControlCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   ControlName name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]");
    *   Control response = controlServiceClient.getControl(name);
@@ -539,8 +587,11 @@ public final Control getControl(ControlName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   String name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString();
    *   Control response = controlServiceClient.getControl(name);
@@ -563,8 +614,11 @@ public final Control getControl(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   GetControlRequest request =
    *       GetControlRequest.newBuilder()
@@ -589,8 +643,11 @@ public final Control getControl(GetControlRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   GetControlRequest request =
    *       GetControlRequest.newBuilder()
@@ -614,8 +671,11 @@ public final UnaryCallable getControlCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   for (Control element : controlServiceClient.listControls(parent).iterateAll()) {
@@ -643,8 +703,11 @@ public final ListControlsPagedResponse listControls(CatalogName parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   for (Control element : controlServiceClient.listControls(parent).iterateAll()) {
@@ -669,8 +732,11 @@ public final ListControlsPagedResponse listControls(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   ListControlsRequest request =
    *       ListControlsRequest.newBuilder()
@@ -699,8 +765,11 @@ public final ListControlsPagedResponse listControls(ListControlsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   ListControlsRequest request =
    *       ListControlsRequest.newBuilder()
@@ -730,8 +799,11 @@ public final ListControlsPagedResponse listControls(ListControlsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   ListControlsRequest request =
    *       ListControlsRequest.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ControlServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ControlServiceSettings.java
index b03d0aaf..fa0c2596 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ControlServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ControlServiceSettings.java
@@ -54,17 +54,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ControlServiceSettings.Builder controlServiceSettingsBuilder =
  *     ControlServiceSettings.newBuilder();
  * controlServiceSettingsBuilder
  *     .createControlSettings()
  *     .setRetrySettings(
- *         controlServiceSettingsBuilder
- *             .createControlSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         controlServiceSettingsBuilder.createControlSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ControlServiceSettings controlServiceSettings = controlServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/PredictionServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/PredictionServiceClient.java
index 6562b4e8..2811327e 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/PredictionServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/PredictionServiceClient.java
@@ -32,8 +32,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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()
@@ -80,8 +83,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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))
@@ -93,8 +99,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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 =
@@ -105,8 +114,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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()
  *         .setTransportChannelProvider(
@@ -175,8 +187,11 @@ public PredictionServiceStub getStub() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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()
@@ -207,8 +222,11 @@ public final PredictResponse predict(PredictRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/PredictionServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/PredictionServiceSettings.java
index 0213704f..81a6d04d 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/PredictionServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/PredictionServiceSettings.java
@@ -50,17 +50,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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()
+ *         predictionServiceSettingsBuilder.predictSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * PredictionServiceSettings predictionServiceSettings = predictionServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceClient.java
index 08a9c350..d71daa51 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceClient.java
@@ -48,8 +48,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
  *   BranchName parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
  *   Product product = Product.newBuilder().build();
@@ -87,8 +90,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductServiceSettings productServiceSettings =
  *     ProductServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -99,8 +105,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductServiceSettings productServiceSettings =
  *     ProductServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ProductServiceClient productServiceClient = ProductServiceClient.create(productServiceSettings);
@@ -110,8 +119,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductServiceSettings productServiceSettings =
  *     ProductServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -204,8 +216,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   BranchName parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
    *   Product product = Product.newBuilder().build();
@@ -247,8 +262,11 @@ public final Product createProduct(BranchName parent, Product product, String pr
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString();
    *   Product product = Product.newBuilder().build();
@@ -290,8 +308,11 @@ public final Product createProduct(String parent, Product product, String produc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   CreateProductRequest request =
    *       CreateProductRequest.newBuilder()
@@ -318,8 +339,11 @@ public final Product createProduct(CreateProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   CreateProductRequest request =
    *       CreateProductRequest.newBuilder()
@@ -345,8 +369,11 @@ public final UnaryCallable createProductCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ProductName name =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
@@ -376,8 +403,11 @@ public final Product getProduct(ProductName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String name =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
@@ -407,8 +437,11 @@ public final Product getProduct(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   GetProductRequest request =
    *       GetProductRequest.newBuilder()
@@ -434,8 +467,11 @@ public final Product getProduct(GetProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   GetProductRequest request =
    *       GetProductRequest.newBuilder()
@@ -460,8 +496,11 @@ public final UnaryCallable getProductCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   BranchName parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
    *   for (Product element : productServiceClient.listProducts(parent).iterateAll()) {
@@ -493,8 +532,11 @@ public final ListProductsPagedResponse listProducts(BranchName parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString();
    *   for (Product element : productServiceClient.listProducts(parent).iterateAll()) {
@@ -523,8 +565,11 @@ public final ListProductsPagedResponse listProducts(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ListProductsRequest request =
    *       ListProductsRequest.newBuilder()
@@ -555,8 +600,11 @@ public final ListProductsPagedResponse listProducts(ListProductsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ListProductsRequest request =
    *       ListProductsRequest.newBuilder()
@@ -588,8 +636,11 @@ public final ListProductsPagedResponse listProducts(ListProductsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ListProductsRequest request =
    *       ListProductsRequest.newBuilder()
@@ -626,8 +677,11 @@ public final UnaryCallable listProduc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   Product product = Product.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -665,8 +719,11 @@ public final Product updateProduct(Product product, FieldMask updateMask) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   UpdateProductRequest request =
    *       UpdateProductRequest.newBuilder()
@@ -692,8 +749,11 @@ public final Product updateProduct(UpdateProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   UpdateProductRequest request =
    *       UpdateProductRequest.newBuilder()
@@ -718,8 +778,11 @@ public final UnaryCallable updateProductCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ProductName name =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
@@ -758,8 +821,11 @@ public final void deleteProduct(ProductName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String name =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
@@ -798,8 +864,11 @@ public final void deleteProduct(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   DeleteProductRequest request =
    *       DeleteProductRequest.newBuilder()
@@ -825,8 +894,11 @@ public final void deleteProduct(DeleteProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   DeleteProductRequest request =
    *       DeleteProductRequest.newBuilder()
@@ -856,8 +928,11 @@ public final UnaryCallable deleteProductCallable()
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ImportProductsRequest request =
    *       ImportProductsRequest.newBuilder()
@@ -893,8 +968,11 @@ public final OperationFuture importProdu
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ImportProductsRequest request =
    *       ImportProductsRequest.newBuilder()
@@ -930,8 +1008,11 @@ public final OperationFuture importProdu
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ImportProductsRequest request =
    *       ImportProductsRequest.newBuilder()
@@ -1002,8 +1083,11 @@ public final UnaryCallable importProductsCalla
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   Product inventory = Product.newBuilder().build();
    *   FieldMask setMask = FieldMask.newBuilder().build();
@@ -1124,8 +1208,11 @@ public final OperationFuture setInve
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   SetInventoryRequest request =
    *       SetInventoryRequest.newBuilder()
@@ -1194,8 +1281,11 @@ public final OperationFuture setInve
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   SetInventoryRequest request =
    *       SetInventoryRequest.newBuilder()
@@ -1264,8 +1354,11 @@ public final OperationFuture setInve
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   SetInventoryRequest request =
    *       SetInventoryRequest.newBuilder()
@@ -1309,8 +1402,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ProductName product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
@@ -1361,8 +1457,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
@@ -1412,8 +1511,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   AddFulfillmentPlacesRequest request =
    *       AddFulfillmentPlacesRequest.newBuilder()
@@ -1463,8 +1565,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   AddFulfillmentPlacesRequest request =
    *       AddFulfillmentPlacesRequest.newBuilder()
@@ -1514,8 +1619,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   AddFulfillmentPlacesRequest request =
    *       AddFulfillmentPlacesRequest.newBuilder()
@@ -1564,8 +1672,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ProductName product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
@@ -1616,8 +1727,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
@@ -1667,8 +1781,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   RemoveFulfillmentPlacesRequest request =
    *       RemoveFulfillmentPlacesRequest.newBuilder()
@@ -1718,8 +1835,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   RemoveFulfillmentPlacesRequest request =
    *       RemoveFulfillmentPlacesRequest.newBuilder()
@@ -1771,8 +1891,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   RemoveFulfillmentPlacesRequest request =
    *       RemoveFulfillmentPlacesRequest.newBuilder()
@@ -1826,8 +1949,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ProductName product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
@@ -1883,8 +2009,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
@@ -1939,8 +2068,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   AddLocalInventoriesRequest request =
    *       AddLocalInventoriesRequest.newBuilder()
@@ -1995,8 +2127,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   AddLocalInventoriesRequest request =
    *       AddLocalInventoriesRequest.newBuilder()
@@ -2051,8 +2186,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   AddLocalInventoriesRequest request =
    *       AddLocalInventoriesRequest.newBuilder()
@@ -2103,8 +2241,11 @@ public final UnaryCallable addLocalInvent
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ProductName product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
@@ -2158,8 +2299,11 @@ public final UnaryCallable addLocalInvent
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
@@ -2212,8 +2356,11 @@ public final UnaryCallable addLocalInvent
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   RemoveLocalInventoriesRequest request =
    *       RemoveLocalInventoriesRequest.newBuilder()
@@ -2265,8 +2412,11 @@ public final UnaryCallable addLocalInvent
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   RemoveLocalInventoriesRequest request =
    *       RemoveLocalInventoriesRequest.newBuilder()
@@ -2320,8 +2470,11 @@ public final UnaryCallable addLocalInvent
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   RemoveLocalInventoriesRequest request =
    *       RemoveLocalInventoriesRequest.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceSettings.java
index 246c88c4..55194bf9 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ProductServiceSettings.java
@@ -56,17 +56,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductServiceSettings.Builder productServiceSettingsBuilder =
  *     ProductServiceSettings.newBuilder();
  * productServiceSettingsBuilder
  *     .createProductSettings()
  *     .setRetrySettings(
- *         productServiceSettingsBuilder
- *             .createProductSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         productServiceSettingsBuilder.createProductSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ProductServiceSettings productServiceSettings = productServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/SearchServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/SearchServiceClient.java
index f3f3a528..dc326aa1 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/SearchServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/SearchServiceClient.java
@@ -43,8 +43,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
  *   SearchRequest request =
  *       SearchRequest.newBuilder()
@@ -105,8 +108,11 @@
  * 

To customize credentials: * *

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

To customize the endpoint: * *

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

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
    *   SearchRequest request =
    *       SearchRequest.newBuilder()
@@ -250,8 +265,11 @@ public final SearchPagedResponse search(SearchRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
    *   SearchRequest request =
    *       SearchRequest.newBuilder()
@@ -300,8 +318,11 @@ public final UnaryCallable searchPagedCallab
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
    *   SearchRequest request =
    *       SearchRequest.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/SearchServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/SearchServiceSettings.java
index 4a7ec04e..c43f52a6 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/SearchServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/SearchServiceSettings.java
@@ -53,16 +53,16 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * SearchServiceSettings.Builder searchServiceSettingsBuilder = SearchServiceSettings.newBuilder();
  * searchServiceSettingsBuilder
  *     .searchSettings()
  *     .setRetrySettings(
- *         searchServiceSettingsBuilder
- *             .searchSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         searchServiceSettingsBuilder.searchSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * SearchServiceSettings searchServiceSettings = searchServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ServingConfigServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ServingConfigServiceClient.java
index 69e3c868..5df9b79c 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ServingConfigServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ServingConfigServiceClient.java
@@ -42,8 +42,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ServingConfigServiceClient servingConfigServiceClient =
  *     ServingConfigServiceClient.create()) {
  *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
@@ -84,8 +87,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ServingConfigServiceSettings servingConfigServiceSettings =
  *     ServingConfigServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -97,8 +103,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ServingConfigServiceSettings servingConfigServiceSettings =
  *     ServingConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ServingConfigServiceClient servingConfigServiceClient =
@@ -109,8 +118,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ServingConfigServiceSettings servingConfigServiceSettings =
  *     ServingConfigServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -182,8 +194,11 @@ public ServingConfigServiceStub getStub() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
@@ -223,8 +238,11 @@ public final ServingConfig createServingConfig(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
@@ -264,8 +282,11 @@ public final ServingConfig createServingConfig(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   CreateServingConfigRequest request =
@@ -295,8 +316,11 @@ public final ServingConfig createServingConfig(CreateServingConfigRequest reques
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   CreateServingConfigRequest request =
@@ -326,8 +350,11 @@ public final ServingConfig createServingConfig(CreateServingConfigRequest reques
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ServingConfigName name =
@@ -357,8 +384,11 @@ public final void deleteServingConfig(ServingConfigName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   String name =
@@ -387,8 +417,11 @@ public final void deleteServingConfig(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   DeleteServingConfigRequest request =
@@ -417,8 +450,11 @@ public final void deleteServingConfig(DeleteServingConfigRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   DeleteServingConfigRequest request =
@@ -445,8 +481,11 @@ public final UnaryCallable deleteServingConfi
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ServingConfig servingConfig = ServingConfig.newBuilder().build();
@@ -483,8 +522,11 @@ public final ServingConfig updateServingConfig(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   UpdateServingConfigRequest request =
@@ -510,8 +552,11 @@ public final ServingConfig updateServingConfig(UpdateServingConfigRequest reques
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   UpdateServingConfigRequest request =
@@ -540,8 +585,11 @@ public final ServingConfig updateServingConfig(UpdateServingConfigRequest reques
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ServingConfigName name =
@@ -569,8 +617,11 @@ public final ServingConfig getServingConfig(ServingConfigName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   String name =
@@ -598,8 +649,11 @@ public final ServingConfig getServingConfig(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   GetServingConfigRequest request =
@@ -628,8 +682,11 @@ public final ServingConfig getServingConfig(GetServingConfigRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   GetServingConfigRequest request =
@@ -656,8 +713,11 @@ public final UnaryCallable getServingCon
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
@@ -687,8 +747,11 @@ public final ListServingConfigsPagedResponse listServingConfigs(CatalogName pare
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
@@ -716,8 +779,11 @@ public final ListServingConfigsPagedResponse listServingConfigs(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ListServingConfigsRequest request =
@@ -748,8 +814,11 @@ public final ListServingConfigsPagedResponse listServingConfigs(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ListServingConfigsRequest request =
@@ -779,8 +848,11 @@ public final ListServingConfigsPagedResponse listServingConfigs(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ListServingConfigsRequest request =
@@ -821,8 +893,11 @@ public final ListServingConfigsPagedResponse listServingConfigs(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ServingConfigName servingConfig =
@@ -854,8 +929,11 @@ public final ServingConfig addControl(ServingConfigName servingConfig) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   String servingConfig =
@@ -886,8 +964,11 @@ public final ServingConfig addControl(String servingConfig) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   AddControlRequest request =
@@ -919,8 +1000,11 @@ public final ServingConfig addControl(AddControlRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   AddControlRequest request =
@@ -949,8 +1033,11 @@ public final UnaryCallable addControlCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ServingConfigName servingConfig =
@@ -979,8 +1066,11 @@ public final ServingConfig removeControl(ServingConfigName servingConfig) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   String servingConfig =
@@ -1008,8 +1098,11 @@ public final ServingConfig removeControl(String servingConfig) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   RemoveControlRequest request =
@@ -1038,8 +1131,11 @@ public final ServingConfig removeControl(RemoveControlRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   RemoveControlRequest request =
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ServingConfigServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ServingConfigServiceSettings.java
index 6cbf779a..ed59673a 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ServingConfigServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/ServingConfigServiceSettings.java
@@ -54,8 +54,11 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ServingConfigServiceSettings.Builder servingConfigServiceSettingsBuilder =
  *     ServingConfigServiceSettings.newBuilder();
  * servingConfigServiceSettingsBuilder
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/UserEventServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/UserEventServiceClient.java
index 0ad6fd11..eb0abf23 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/UserEventServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/UserEventServiceClient.java
@@ -38,8 +38,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
  *   WriteUserEventRequest request =
  *       WriteUserEventRequest.newBuilder()
@@ -80,8 +83,11 @@
  * 

To customize credentials: * *

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

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * UserEventServiceSettings userEventServiceSettings =
  *     UserEventServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * UserEventServiceClient userEventServiceClient =
@@ -105,8 +114,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * UserEventServiceSettings userEventServiceSettings =
  *     UserEventServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -200,8 +212,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   WriteUserEventRequest request =
    *       WriteUserEventRequest.newBuilder()
@@ -226,8 +241,11 @@ public final UserEvent writeUserEvent(WriteUserEventRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   WriteUserEventRequest request =
    *       WriteUserEventRequest.newBuilder()
@@ -256,8 +274,11 @@ public final UnaryCallable writeUserEventCalla
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   CollectUserEventRequest request =
    *       CollectUserEventRequest.newBuilder()
@@ -288,8 +309,11 @@ public final HttpBody collectUserEvent(CollectUserEventRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   CollectUserEventRequest request =
    *       CollectUserEventRequest.newBuilder()
@@ -318,8 +342,11 @@ public final UnaryCallable collectUserEventCa
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   PurgeUserEventsRequest request =
    *       PurgeUserEventsRequest.newBuilder()
@@ -348,8 +375,11 @@ public final OperationFuture purgeUserEv
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   PurgeUserEventsRequest request =
    *       PurgeUserEventsRequest.newBuilder()
@@ -378,8 +408,11 @@ public final OperationFuture purgeUserEv
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   PurgeUserEventsRequest request =
    *       PurgeUserEventsRequest.newBuilder()
@@ -409,8 +442,11 @@ public final UnaryCallable purgeUserEventsCal
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   ImportUserEventsRequest request =
    *       ImportUserEventsRequest.newBuilder()
@@ -442,8 +478,11 @@ public final OperationFuture importUse
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   ImportUserEventsRequest request =
    *       ImportUserEventsRequest.newBuilder()
@@ -474,8 +513,11 @@ public final OperationFuture importUse
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   ImportUserEventsRequest request =
    *       ImportUserEventsRequest.newBuilder()
@@ -506,8 +548,11 @@ public final UnaryCallable importUserEventsC
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   RejoinUserEventsRequest request =
    *       RejoinUserEventsRequest.newBuilder().setParent("parent-995424086").build();
@@ -536,8 +581,11 @@ public final UnaryCallable importUserEventsC
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   RejoinUserEventsRequest request =
    *       RejoinUserEventsRequest.newBuilder().setParent("parent-995424086").build();
@@ -566,8 +614,11 @@ public final UnaryCallable importUserEventsC
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   RejoinUserEventsRequest request =
    *       RejoinUserEventsRequest.newBuilder().setParent("parent-995424086").build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/UserEventServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/UserEventServiceSettings.java
index 51560da9..6430ae3c 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/UserEventServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/UserEventServiceSettings.java
@@ -53,17 +53,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * UserEventServiceSettings.Builder userEventServiceSettingsBuilder =
  *     UserEventServiceSettings.newBuilder();
  * userEventServiceSettingsBuilder
  *     .writeUserEventSettings()
  *     .setRetrySettings(
- *         userEventServiceSettingsBuilder
- *             .writeUserEventSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         userEventServiceSettingsBuilder.writeUserEventSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * UserEventServiceSettings userEventServiceSettings = userEventServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/package-info.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/package-info.java
index d6892b47..d1e3cc2d 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/package-info.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/package-info.java
@@ -26,8 +26,11 @@
  * 

Sample for CatalogServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
  *   Catalog catalog = Catalog.newBuilder().build();
  *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -45,8 +48,11 @@
  * 

Sample for CompletionServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
  *   CompleteQueryRequest request =
  *       CompleteQueryRequest.newBuilder()
@@ -69,8 +75,11 @@
  * 

Sample for ControlServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
  *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
  *   Control control = Control.newBuilder().build();
@@ -86,8 +95,11 @@
  * 

Sample for PredictionServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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()
@@ -112,8 +124,11 @@
  * 

Sample for ProductServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
  *   BranchName parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
  *   Product product = Product.newBuilder().build();
@@ -132,8 +147,11 @@
  * 

Sample for SearchServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
  *   SearchRequest request =
  *       SearchRequest.newBuilder()
@@ -172,8 +190,11 @@
  * 

Sample for ServingConfigServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ServingConfigServiceClient servingConfigServiceClient =
  *     ServingConfigServiceClient.create()) {
  *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
@@ -191,8 +212,11 @@
  * 

Sample for UserEventServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
  *   WriteUserEventRequest request =
  *       WriteUserEventRequest.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CatalogServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CatalogServiceStubSettings.java
index 0b80cc4a..74466078 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CatalogServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CatalogServiceStubSettings.java
@@ -87,17 +87,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CatalogServiceStubSettings.Builder catalogServiceSettingsBuilder =
  *     CatalogServiceStubSettings.newBuilder();
  * catalogServiceSettingsBuilder
  *     .updateCatalogSettings()
  *     .setRetrySettings(
- *         catalogServiceSettingsBuilder
- *             .updateCatalogSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         catalogServiceSettingsBuilder.updateCatalogSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * CatalogServiceStubSettings catalogServiceSettings = catalogServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CompletionServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CompletionServiceStubSettings.java
index 09f076fd..60b7ddd1 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CompletionServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/CompletionServiceStubSettings.java
@@ -71,17 +71,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CompletionServiceStubSettings.Builder completionServiceSettingsBuilder =
  *     CompletionServiceStubSettings.newBuilder();
  * completionServiceSettingsBuilder
  *     .completeQuerySettings()
  *     .setRetrySettings(
- *         completionServiceSettingsBuilder
- *             .completeQuerySettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         completionServiceSettingsBuilder.completeQuerySettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * CompletionServiceStubSettings completionServiceSettings =
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ControlServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ControlServiceStubSettings.java
index 5a26e32c..10c89c45 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ControlServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ControlServiceStubSettings.java
@@ -77,17 +77,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ControlServiceStubSettings.Builder controlServiceSettingsBuilder =
  *     ControlServiceStubSettings.newBuilder();
  * controlServiceSettingsBuilder
  *     .createControlSettings()
  *     .setRetrySettings(
- *         controlServiceSettingsBuilder
- *             .createControlSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         controlServiceSettingsBuilder.createControlSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ControlServiceStubSettings controlServiceSettings = controlServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonCatalogServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonCatalogServiceStub.java
index 47a3738d..62fb0edf 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonCatalogServiceStub.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonCatalogServiceStub.java
@@ -130,7 +130,8 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("catalog", request.getCatalog()))
+                              ProtoRestSerializer.create()
+                                  .toBody("catalog", request.getCatalog(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -166,7 +167,7 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearCatalog().build()))
+                                  .toBody("*", request.toBuilder().clearCatalog().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -272,7 +273,7 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("completionConfig", request.getCompletionConfig()))
+                                  .toBody("completionConfig", request.getCompletionConfig(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -345,7 +346,7 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("attributesConfig", request.getAttributesConfig()))
+                                  .toBody("attributesConfig", request.getAttributesConfig(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -382,7 +383,10 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearAttributesConfig().build()))
+                                  .toBody(
+                                      "*",
+                                      request.toBuilder().clearAttributesConfig().build(),
+                                      false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -419,7 +423,10 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearAttributesConfig().build()))
+                                  .toBody(
+                                      "*",
+                                      request.toBuilder().clearAttributesConfig().build(),
+                                      false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -456,7 +463,10 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearAttributesConfig().build()))
+                                  .toBody(
+                                      "*",
+                                      request.toBuilder().clearAttributesConfig().build(),
+                                      false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonCompletionServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonCompletionServiceStub.java
index cb0dbd53..a6f2734e 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonCompletionServiceStub.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonCompletionServiceStub.java
@@ -129,7 +129,7 @@ public class HttpJsonCompletionServiceStub extends CompletionServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonControlServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonControlServiceStub.java
index bade560c..c9dac230 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonControlServiceStub.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonControlServiceStub.java
@@ -85,7 +85,8 @@ public class HttpJsonControlServiceStub extends ControlServiceStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("control", request.getControl()))
+                              ProtoRestSerializer.create()
+                                  .toBody("control", request.getControl(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -155,7 +156,8 @@ public class HttpJsonControlServiceStub extends ControlServiceStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("control", request.getControl()))
+                              ProtoRestSerializer.create()
+                                  .toBody("control", request.getControl(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonPredictionServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonPredictionServiceStub.java
index 13f12693..b9467908 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonPredictionServiceStub.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonPredictionServiceStub.java
@@ -79,7 +79,7 @@ public class HttpJsonPredictionServiceStub extends PredictionServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearPlacement().build()))
+                                  .toBody("*", request.toBuilder().clearPlacement().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonProductServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonProductServiceStub.java
index b8cf0324..7a85b375 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonProductServiceStub.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonProductServiceStub.java
@@ -121,7 +121,8 @@ public class HttpJsonProductServiceStub extends ProductServiceStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("product", request.getProduct()))
+                              ProtoRestSerializer.create()
+                                  .toBody("product", request.getProduct(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -229,7 +230,8 @@ public class HttpJsonProductServiceStub extends ProductServiceStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("product", request.getProduct()))
+                              ProtoRestSerializer.create()
+                                  .toBody("product", request.getProduct(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -298,7 +300,7 @@ public class HttpJsonProductServiceStub extends ProductServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -337,7 +339,8 @@ public class HttpJsonProductServiceStub extends ProductServiceStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("*", request.toBuilder().build()))
+                              ProtoRestSerializer.create()
+                                  .toBody("*", request.toBuilder().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -376,7 +379,7 @@ public class HttpJsonProductServiceStub extends ProductServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearProduct().build()))
+                                  .toBody("*", request.toBuilder().clearProduct().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -415,7 +418,7 @@ public class HttpJsonProductServiceStub extends ProductServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearProduct().build()))
+                                  .toBody("*", request.toBuilder().clearProduct().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -454,7 +457,7 @@ public class HttpJsonProductServiceStub extends ProductServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearProduct().build()))
+                                  .toBody("*", request.toBuilder().clearProduct().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -493,7 +496,7 @@ public class HttpJsonProductServiceStub extends ProductServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearProduct().build()))
+                                  .toBody("*", request.toBuilder().clearProduct().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonSearchServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonSearchServiceStub.java
index 41876506..b94c478f 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonSearchServiceStub.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonSearchServiceStub.java
@@ -80,7 +80,7 @@ public class HttpJsonSearchServiceStub extends SearchServiceStub {
                   .setRequestBodyExtractor(
                       request ->
                           ProtoRestSerializer.create()
-                              .toBody("*", request.toBuilder().clearPlacement().build()))
+                              .toBody("*", request.toBuilder().clearPlacement().build(), false))
                   .build())
           .setResponseParser(
               ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonServingConfigServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonServingConfigServiceStub.java
index 9c741946..fb7806e8 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonServingConfigServiceStub.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonServingConfigServiceStub.java
@@ -89,7 +89,7 @@ public class HttpJsonServingConfigServiceStub extends ServingConfigServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("servingConfig", request.getServingConfig()))
+                                  .toBody("servingConfig", request.getServingConfig(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -160,7 +160,7 @@ public class HttpJsonServingConfigServiceStub extends ServingConfigServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("servingConfig", request.getServingConfig()))
+                                  .toBody("servingConfig", request.getServingConfig(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -265,7 +265,8 @@ public class HttpJsonServingConfigServiceStub extends ServingConfigServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearServingConfig().build()))
+                                  .toBody(
+                                      "*", request.toBuilder().clearServingConfig().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -302,7 +303,8 @@ public class HttpJsonServingConfigServiceStub extends ServingConfigServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearServingConfig().build()))
+                                  .toBody(
+                                      "*", request.toBuilder().clearServingConfig().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonUserEventServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonUserEventServiceStub.java
index 38e4a9d1..4c63abe4 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonUserEventServiceStub.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/HttpJsonUserEventServiceStub.java
@@ -100,7 +100,7 @@ public class HttpJsonUserEventServiceStub extends UserEventServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("userEvent", request.getUserEvent()))
+                                  .toBody("userEvent", request.getUserEvent(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -172,7 +172,7 @@ public class HttpJsonUserEventServiceStub extends UserEventServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -211,7 +211,7 @@ public class HttpJsonUserEventServiceStub extends UserEventServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -250,7 +250,7 @@ public class HttpJsonUserEventServiceStub extends UserEventServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/PredictionServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/PredictionServiceStubSettings.java
index 679165b8..232b022d 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/PredictionServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/PredictionServiceStubSettings.java
@@ -63,17 +63,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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()
+ *         predictionServiceSettingsBuilder.predictSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * PredictionServiceStubSettings predictionServiceSettings =
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ProductServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ProductServiceStubSettings.java
index 995e1139..390b4293 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ProductServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ProductServiceStubSettings.java
@@ -101,17 +101,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductServiceStubSettings.Builder productServiceSettingsBuilder =
  *     ProductServiceStubSettings.newBuilder();
  * productServiceSettingsBuilder
  *     .createProductSettings()
  *     .setRetrySettings(
- *         productServiceSettingsBuilder
- *             .createProductSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         productServiceSettingsBuilder.createProductSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ProductServiceStubSettings productServiceSettings = productServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/SearchServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/SearchServiceStubSettings.java
index f8a89672..f7b1c8a9 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/SearchServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/SearchServiceStubSettings.java
@@ -72,17 +72,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * SearchServiceStubSettings.Builder searchServiceSettingsBuilder =
  *     SearchServiceStubSettings.newBuilder();
  * searchServiceSettingsBuilder
  *     .searchSettings()
  *     .setRetrySettings(
- *         searchServiceSettingsBuilder
- *             .searchSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         searchServiceSettingsBuilder.searchSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * SearchServiceStubSettings searchServiceSettings = searchServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ServingConfigServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ServingConfigServiceStubSettings.java
index d05ff801..63129922 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ServingConfigServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/ServingConfigServiceStubSettings.java
@@ -79,8 +79,11 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ServingConfigServiceStubSettings.Builder servingConfigServiceSettingsBuilder =
  *     ServingConfigServiceStubSettings.newBuilder();
  * servingConfigServiceSettingsBuilder
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/UserEventServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/UserEventServiceStubSettings.java
index 9b556438..c3e0a5ed 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/UserEventServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2/stub/UserEventServiceStubSettings.java
@@ -79,17 +79,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * UserEventServiceStubSettings.Builder userEventServiceSettingsBuilder =
  *     UserEventServiceStubSettings.newBuilder();
  * userEventServiceSettingsBuilder
  *     .writeUserEventSettings()
  *     .setRetrySettings(
- *         userEventServiceSettingsBuilder
- *             .writeUserEventSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         userEventServiceSettingsBuilder.writeUserEventSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * UserEventServiceStubSettings userEventServiceSettings = userEventServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CatalogServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CatalogServiceClient.java
index 7e07233d..b442edc7 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CatalogServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CatalogServiceClient.java
@@ -43,8 +43,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
  *   Catalog catalog = Catalog.newBuilder().build();
  *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -81,8 +84,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CatalogServiceSettings catalogServiceSettings =
  *     CatalogServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -93,8 +99,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CatalogServiceSettings catalogServiceSettings =
  *     CatalogServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * CatalogServiceClient catalogServiceClient = CatalogServiceClient.create(catalogServiceSettings);
@@ -104,8 +113,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CatalogServiceSettings catalogServiceSettings =
  *     CatalogServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -174,8 +186,11 @@ public CatalogServiceStub getStub() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   for (Catalog element : catalogServiceClient.listCatalogs(parent).iterateAll()) {
@@ -205,8 +220,11 @@ public final ListCatalogsPagedResponse listCatalogs(LocationName parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   for (Catalog element : catalogServiceClient.listCatalogs(parent).iterateAll()) {
@@ -233,8 +251,11 @@ public final ListCatalogsPagedResponse listCatalogs(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   ListCatalogsRequest request =
    *       ListCatalogsRequest.newBuilder()
@@ -262,8 +283,11 @@ public final ListCatalogsPagedResponse listCatalogs(ListCatalogsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   ListCatalogsRequest request =
    *       ListCatalogsRequest.newBuilder()
@@ -292,8 +316,11 @@ public final ListCatalogsPagedResponse listCatalogs(ListCatalogsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   ListCatalogsRequest request =
    *       ListCatalogsRequest.newBuilder()
@@ -327,8 +354,11 @@ public final UnaryCallable listCatalo
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   Catalog catalog = Catalog.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -360,8 +390,11 @@ public final Catalog updateCatalog(Catalog catalog, FieldMask updateMask) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   UpdateCatalogRequest request =
    *       UpdateCatalogRequest.newBuilder()
@@ -386,8 +419,11 @@ public final Catalog updateCatalog(UpdateCatalogRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   UpdateCatalogRequest request =
    *       UpdateCatalogRequest.newBuilder()
@@ -440,8 +476,11 @@ public final UnaryCallable updateCatalogCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   CatalogName catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   catalogServiceClient.setDefaultBranch(catalog);
@@ -496,8 +535,11 @@ public final void setDefaultBranch(CatalogName catalog) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   String catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   catalogServiceClient.setDefaultBranch(catalog);
@@ -550,8 +592,11 @@ public final void setDefaultBranch(String catalog) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   SetDefaultBranchRequest request =
    *       SetDefaultBranchRequest.newBuilder()
@@ -608,8 +653,11 @@ public final void setDefaultBranch(SetDefaultBranchRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   SetDefaultBranchRequest request =
    *       SetDefaultBranchRequest.newBuilder()
@@ -638,8 +686,11 @@ public final UnaryCallable setDefaultBranchCalla
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   CatalogName catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   GetDefaultBranchResponse response = catalogServiceClient.getDefaultBranch(catalog);
@@ -667,8 +718,11 @@ public final GetDefaultBranchResponse getDefaultBranch(CatalogName catalog) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   String catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   GetDefaultBranchResponse response = catalogServiceClient.getDefaultBranch(catalog);
@@ -694,8 +748,11 @@ public final GetDefaultBranchResponse getDefaultBranch(String catalog) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   GetDefaultBranchRequest request =
    *       GetDefaultBranchRequest.newBuilder()
@@ -721,8 +778,11 @@ public final GetDefaultBranchResponse getDefaultBranch(GetDefaultBranchRequest r
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   GetDefaultBranchRequest request =
    *       GetDefaultBranchRequest.newBuilder()
@@ -747,8 +807,11 @@ public final GetDefaultBranchResponse getDefaultBranch(GetDefaultBranchRequest r
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   CompletionConfigName name = CompletionConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   CompletionConfig response = catalogServiceClient.getCompletionConfig(name);
@@ -774,8 +837,11 @@ public final CompletionConfig getCompletionConfig(CompletionConfigName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   String name = CompletionConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   CompletionConfig response = catalogServiceClient.getCompletionConfig(name);
@@ -799,8 +865,11 @@ public final CompletionConfig getCompletionConfig(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   GetCompletionConfigRequest request =
    *       GetCompletionConfigRequest.newBuilder()
@@ -824,8 +893,11 @@ public final CompletionConfig getCompletionConfig(GetCompletionConfigRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   GetCompletionConfigRequest request =
    *       GetCompletionConfigRequest.newBuilder()
@@ -850,8 +922,11 @@ public final CompletionConfig getCompletionConfig(GetCompletionConfigRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   CompletionConfig completionConfig = CompletionConfig.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -896,8 +971,11 @@ public final CompletionConfig updateCompletionConfig(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   UpdateCompletionConfigRequest request =
    *       UpdateCompletionConfigRequest.newBuilder()
@@ -922,8 +1000,11 @@ public final CompletionConfig updateCompletionConfig(UpdateCompletionConfigReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   UpdateCompletionConfigRequest request =
    *       UpdateCompletionConfigRequest.newBuilder()
@@ -949,8 +1030,11 @@ public final CompletionConfig updateCompletionConfig(UpdateCompletionConfigReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   AttributesConfigName name = AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   AttributesConfig response = catalogServiceClient.getAttributesConfig(name);
@@ -976,8 +1060,11 @@ public final AttributesConfig getAttributesConfig(AttributesConfigName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   String name = AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   AttributesConfig response = catalogServiceClient.getAttributesConfig(name);
@@ -1001,8 +1088,11 @@ public final AttributesConfig getAttributesConfig(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   GetAttributesConfigRequest request =
    *       GetAttributesConfigRequest.newBuilder()
@@ -1026,8 +1116,11 @@ public final AttributesConfig getAttributesConfig(GetAttributesConfigRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   GetAttributesConfigRequest request =
    *       GetAttributesConfigRequest.newBuilder()
@@ -1058,8 +1151,11 @@ public final AttributesConfig getAttributesConfig(GetAttributesConfigRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   AttributesConfig attributesConfig = AttributesConfig.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -1102,8 +1198,11 @@ public final AttributesConfig updateAttributesConfig(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   UpdateAttributesConfigRequest request =
    *       UpdateAttributesConfigRequest.newBuilder()
@@ -1134,8 +1233,11 @@ public final AttributesConfig updateAttributesConfig(UpdateAttributesConfigReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   UpdateAttributesConfigRequest request =
    *       UpdateAttributesConfigRequest.newBuilder()
@@ -1165,8 +1267,11 @@ public final AttributesConfig updateAttributesConfig(UpdateAttributesConfigReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   AddCatalogAttributeRequest request =
    *       AddCatalogAttributeRequest.newBuilder()
@@ -1196,8 +1301,11 @@ public final AttributesConfig addCatalogAttribute(AddCatalogAttributeRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   AddCatalogAttributeRequest request =
    *       AddCatalogAttributeRequest.newBuilder()
@@ -1228,8 +1336,11 @@ public final AttributesConfig addCatalogAttribute(AddCatalogAttributeRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   RemoveCatalogAttributeRequest request =
    *       RemoveCatalogAttributeRequest.newBuilder()
@@ -1259,8 +1370,11 @@ public final AttributesConfig removeCatalogAttribute(RemoveCatalogAttributeReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   RemoveCatalogAttributeRequest request =
    *       RemoveCatalogAttributeRequest.newBuilder()
@@ -1293,8 +1407,11 @@ public final AttributesConfig removeCatalogAttribute(RemoveCatalogAttributeReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   ReplaceCatalogAttributeRequest request =
    *       ReplaceCatalogAttributeRequest.newBuilder()
@@ -1327,8 +1444,11 @@ public final AttributesConfig replaceCatalogAttribute(ReplaceCatalogAttributeReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   ReplaceCatalogAttributeRequest request =
    *       ReplaceCatalogAttributeRequest.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CatalogServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CatalogServiceSettings.java
index a2692406..94369d62 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CatalogServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CatalogServiceSettings.java
@@ -54,17 +54,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CatalogServiceSettings.Builder catalogServiceSettingsBuilder =
  *     CatalogServiceSettings.newBuilder();
  * catalogServiceSettingsBuilder
  *     .updateCatalogSettings()
  *     .setRetrySettings(
- *         catalogServiceSettingsBuilder
- *             .updateCatalogSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         catalogServiceSettingsBuilder.updateCatalogSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * CatalogServiceSettings catalogServiceSettings = catalogServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CompletionServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CompletionServiceClient.java
index a7f1d6e2..9714cb9f 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CompletionServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CompletionServiceClient.java
@@ -40,8 +40,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
  *   CompleteQueryRequest request =
  *       CompleteQueryRequest.newBuilder()
@@ -87,8 +90,11 @@
  * 

To customize credentials: * *

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

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CompletionServiceSettings completionServiceSettings =
  *     CompletionServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * CompletionServiceClient completionServiceClient =
@@ -112,8 +121,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CompletionServiceSettings completionServiceSettings =
  *     CompletionServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -211,8 +223,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
    *   CompleteQueryRequest request =
    *       CompleteQueryRequest.newBuilder()
@@ -245,8 +260,11 @@ public final CompleteQueryResponse completeQuery(CompleteQueryRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
    *   CompleteQueryRequest request =
    *       CompleteQueryRequest.newBuilder()
@@ -284,8 +302,11 @@ public final UnaryCallable complete
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
    *   ImportCompletionDataRequest request =
    *       ImportCompletionDataRequest.newBuilder()
@@ -321,8 +342,11 @@ public final UnaryCallable complete
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
    *   ImportCompletionDataRequest request =
    *       ImportCompletionDataRequest.newBuilder()
@@ -358,8 +382,11 @@ public final UnaryCallable complete
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
    *   ImportCompletionDataRequest request =
    *       ImportCompletionDataRequest.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CompletionServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CompletionServiceSettings.java
index b9d4cc2a..160be485 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CompletionServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/CompletionServiceSettings.java
@@ -52,17 +52,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CompletionServiceSettings.Builder completionServiceSettingsBuilder =
  *     CompletionServiceSettings.newBuilder();
  * completionServiceSettingsBuilder
  *     .completeQuerySettings()
  *     .setRetrySettings(
- *         completionServiceSettingsBuilder
- *             .completeQuerySettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         completionServiceSettingsBuilder.completeQuerySettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * CompletionServiceSettings completionServiceSettings = completionServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ControlServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ControlServiceClient.java
index e067826b..a2c3badd 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ControlServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ControlServiceClient.java
@@ -43,8 +43,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
  *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
  *   Control control = Control.newBuilder().build();
@@ -82,8 +85,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ControlServiceSettings controlServiceSettings =
  *     ControlServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -94,8 +100,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ControlServiceSettings controlServiceSettings =
  *     ControlServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ControlServiceClient controlServiceClient = ControlServiceClient.create(controlServiceSettings);
@@ -105,8 +114,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ControlServiceSettings controlServiceSettings =
  *     ControlServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -178,8 +190,11 @@ public ControlServiceStub getStub() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   Control control = Control.newBuilder().build();
@@ -216,8 +231,11 @@ public final Control createControl(CatalogName parent, Control control, String c
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   Control control = Control.newBuilder().build();
@@ -254,8 +272,11 @@ public final Control createControl(String parent, Control control, String contro
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   CreateControlRequest request =
    *       CreateControlRequest.newBuilder()
@@ -284,8 +305,11 @@ public final Control createControl(CreateControlRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   CreateControlRequest request =
    *       CreateControlRequest.newBuilder()
@@ -313,8 +337,11 @@ public final UnaryCallable createControlCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   ControlName name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]");
    *   controlServiceClient.deleteControl(name);
@@ -341,8 +368,11 @@ public final void deleteControl(ControlName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   String name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString();
    *   controlServiceClient.deleteControl(name);
@@ -368,8 +398,11 @@ public final void deleteControl(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   DeleteControlRequest request =
    *       DeleteControlRequest.newBuilder()
@@ -397,8 +430,11 @@ public final void deleteControl(DeleteControlRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   DeleteControlRequest request =
    *       DeleteControlRequest.newBuilder()
@@ -426,8 +462,11 @@ public final UnaryCallable deleteControlCallable()
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   Control control = Control.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -461,8 +500,11 @@ public final Control updateControl(Control control, FieldMask updateMask) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   UpdateControlRequest request =
    *       UpdateControlRequest.newBuilder()
@@ -491,8 +533,11 @@ public final Control updateControl(UpdateControlRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   UpdateControlRequest request =
    *       UpdateControlRequest.newBuilder()
@@ -516,8 +561,11 @@ public final UnaryCallable updateControlCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   ControlName name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]");
    *   Control response = controlServiceClient.getControl(name);
@@ -541,8 +589,11 @@ public final Control getControl(ControlName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   String name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString();
    *   Control response = controlServiceClient.getControl(name);
@@ -565,8 +616,11 @@ public final Control getControl(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   GetControlRequest request =
    *       GetControlRequest.newBuilder()
@@ -591,8 +645,11 @@ public final Control getControl(GetControlRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   GetControlRequest request =
    *       GetControlRequest.newBuilder()
@@ -616,8 +673,11 @@ public final UnaryCallable getControlCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   for (Control element : controlServiceClient.listControls(parent).iterateAll()) {
@@ -645,8 +705,11 @@ public final ListControlsPagedResponse listControls(CatalogName parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   for (Control element : controlServiceClient.listControls(parent).iterateAll()) {
@@ -671,8 +734,11 @@ public final ListControlsPagedResponse listControls(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   ListControlsRequest request =
    *       ListControlsRequest.newBuilder()
@@ -701,8 +767,11 @@ public final ListControlsPagedResponse listControls(ListControlsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   ListControlsRequest request =
    *       ListControlsRequest.newBuilder()
@@ -732,8 +801,11 @@ public final ListControlsPagedResponse listControls(ListControlsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   ListControlsRequest request =
    *       ListControlsRequest.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ControlServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ControlServiceSettings.java
index b15aac0d..82300a41 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ControlServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ControlServiceSettings.java
@@ -54,17 +54,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ControlServiceSettings.Builder controlServiceSettingsBuilder =
  *     ControlServiceSettings.newBuilder();
  * controlServiceSettingsBuilder
  *     .createControlSettings()
  *     .setRetrySettings(
- *         controlServiceSettingsBuilder
- *             .createControlSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         controlServiceSettingsBuilder.createControlSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ControlServiceSettings controlServiceSettings = controlServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceClient.java
index 5adbfa93..4f18d763 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceClient.java
@@ -59,8 +59,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
  *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
  *   Model response = modelServiceClient.pauseModel(name);
@@ -96,8 +99,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ModelServiceSettings modelServiceSettings =
  *     ModelServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -108,8 +114,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ModelServiceSettings modelServiceSettings =
  *     ModelServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings);
@@ -119,8 +128,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ModelServiceSettings modelServiceSettings =
  *     ModelServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -213,8 +225,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   Model model = Model.newBuilder().build();
@@ -244,8 +259,11 @@ public final OperationFuture createModelAsync(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   Model model = Model.newBuilder().build();
@@ -272,8 +290,11 @@ public final OperationFuture createModelAsync(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   CreateModelRequest request =
    *       CreateModelRequest.newBuilder()
@@ -300,8 +321,11 @@ public final OperationFuture createModelAsync(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   CreateModelRequest request =
    *       CreateModelRequest.newBuilder()
@@ -328,8 +352,11 @@ public final OperationFuture createModelAsync(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   CreateModelRequest request =
    *       CreateModelRequest.newBuilder()
@@ -354,8 +381,11 @@ public final UnaryCallable createModelCallable()
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
    *   Model response = modelServiceClient.pauseModel(name);
@@ -379,8 +409,11 @@ public final Model pauseModel(ModelName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   String name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString();
    *   Model response = modelServiceClient.pauseModel(name);
@@ -403,8 +436,11 @@ public final Model pauseModel(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   PauseModelRequest request =
    *       PauseModelRequest.newBuilder()
@@ -428,8 +464,11 @@ public final Model pauseModel(PauseModelRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   PauseModelRequest request =
    *       PauseModelRequest.newBuilder()
@@ -452,8 +491,11 @@ public final UnaryCallable pauseModelCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   String name = "name3373707";
    *   Model response = modelServiceClient.resumeModel(name);
@@ -476,8 +518,11 @@ public final Model resumeModel(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   ResumeModelRequest request = ResumeModelRequest.newBuilder().setName("name3373707").build();
    *   Model response = modelServiceClient.resumeModel(request);
@@ -498,8 +543,11 @@ public final Model resumeModel(ResumeModelRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   ResumeModelRequest request = ResumeModelRequest.newBuilder().setName("name3373707").build();
    *   ApiFuture future = modelServiceClient.resumeModelCallable().futureCall(request);
@@ -519,8 +567,11 @@ public final UnaryCallable resumeModelCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
    *   modelServiceClient.deleteModel(name);
@@ -544,8 +595,11 @@ public final void deleteModel(ModelName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   String name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString();
    *   modelServiceClient.deleteModel(name);
@@ -568,8 +622,11 @@ public final void deleteModel(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   DeleteModelRequest request =
    *       DeleteModelRequest.newBuilder()
@@ -593,8 +650,11 @@ public final void deleteModel(DeleteModelRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   DeleteModelRequest request =
    *       DeleteModelRequest.newBuilder()
@@ -617,8 +677,11 @@ public final UnaryCallable deleteModelCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   for (Model element : modelServiceClient.listModels(parent).iterateAll()) {
@@ -644,8 +707,11 @@ public final ListModelsPagedResponse listModels(CatalogName parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   for (Model element : modelServiceClient.listModels(parent).iterateAll()) {
@@ -670,8 +736,11 @@ public final ListModelsPagedResponse listModels(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   ListModelsRequest request =
    *       ListModelsRequest.newBuilder()
@@ -699,8 +768,11 @@ public final ListModelsPagedResponse listModels(ListModelsRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   ListModelsRequest request =
    *       ListModelsRequest.newBuilder()
@@ -727,8 +799,11 @@ public final UnaryCallable listModel
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   ListModelsRequest request =
    *       ListModelsRequest.newBuilder()
@@ -763,8 +838,11 @@ public final UnaryCallable listModelsCall
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   Model model = Model.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -791,8 +869,11 @@ public final Model updateModel(Model model, FieldMask updateMask) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   UpdateModelRequest request =
    *       UpdateModelRequest.newBuilder()
@@ -818,8 +899,11 @@ public final Model updateModel(UpdateModelRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   UpdateModelRequest request =
    *       UpdateModelRequest.newBuilder()
@@ -843,8 +927,11 @@ public final UnaryCallable updateModelCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
    *   TuneModelResponse response = modelServiceClient.tuneModelAsync(name).get();
@@ -869,8 +956,11 @@ public final OperationFuture tuneModelAsyn
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   String name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString();
    *   TuneModelResponse response = modelServiceClient.tuneModelAsync(name).get();
@@ -893,8 +983,11 @@ public final OperationFuture tuneModelAsyn
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   TuneModelRequest request =
    *       TuneModelRequest.newBuilder()
@@ -919,8 +1012,11 @@ public final OperationFuture tuneModelAsyn
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   TuneModelRequest request =
    *       TuneModelRequest.newBuilder()
@@ -945,8 +1041,11 @@ public final OperationFuture tuneModelAsyn
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
    *   TuneModelRequest request =
    *       TuneModelRequest.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceSettings.java
index 40cfd2f4..4c070ef5 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ModelServiceSettings.java
@@ -56,16 +56,16 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ModelServiceSettings.Builder modelServiceSettingsBuilder = ModelServiceSettings.newBuilder();
  * modelServiceSettingsBuilder
  *     .pauseModelSettings()
  *     .setRetrySettings(
- *         modelServiceSettingsBuilder
- *             .pauseModelSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         modelServiceSettingsBuilder.pauseModelSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ModelServiceSettings modelServiceSettings = modelServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/PredictionServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/PredictionServiceClient.java
index c4126cd1..c0b71f55 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/PredictionServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/PredictionServiceClient.java
@@ -33,8 +33,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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()
@@ -81,8 +84,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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))
@@ -94,8 +100,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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 =
@@ -106,8 +115,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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()
  *         .setTransportChannelProvider(
@@ -177,8 +189,11 @@ public PredictionServiceStub getStub() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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()
@@ -209,8 +224,11 @@ public final PredictResponse predict(PredictRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/PredictionServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/PredictionServiceSettings.java
index 60d2a1e4..8c8bb86e 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/PredictionServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/PredictionServiceSettings.java
@@ -50,17 +50,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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()
+ *         predictionServiceSettingsBuilder.predictSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * PredictionServiceSettings predictionServiceSettings = predictionServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceClient.java
index e2031ece..b019b696 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceClient.java
@@ -48,8 +48,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
  *   BranchName parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
  *   Product product = Product.newBuilder().build();
@@ -87,8 +90,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductServiceSettings productServiceSettings =
  *     ProductServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -99,8 +105,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductServiceSettings productServiceSettings =
  *     ProductServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ProductServiceClient productServiceClient = ProductServiceClient.create(productServiceSettings);
@@ -110,8 +119,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductServiceSettings productServiceSettings =
  *     ProductServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -205,8 +217,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   BranchName parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
    *   Product product = Product.newBuilder().build();
@@ -248,8 +263,11 @@ public final Product createProduct(BranchName parent, Product product, String pr
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString();
    *   Product product = Product.newBuilder().build();
@@ -291,8 +309,11 @@ public final Product createProduct(String parent, Product product, String produc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   CreateProductRequest request =
    *       CreateProductRequest.newBuilder()
@@ -319,8 +340,11 @@ public final Product createProduct(CreateProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   CreateProductRequest request =
    *       CreateProductRequest.newBuilder()
@@ -346,8 +370,11 @@ public final UnaryCallable createProductCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ProductName name =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
@@ -378,8 +405,11 @@ public final Product getProduct(ProductName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String name =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
@@ -410,8 +440,11 @@ public final Product getProduct(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   GetProductRequest request =
    *       GetProductRequest.newBuilder()
@@ -437,8 +470,11 @@ public final Product getProduct(GetProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   GetProductRequest request =
    *       GetProductRequest.newBuilder()
@@ -463,8 +499,11 @@ public final UnaryCallable getProductCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   BranchName parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
    *   for (Product element : productServiceClient.listProducts(parent).iterateAll()) {
@@ -496,8 +535,11 @@ public final ListProductsPagedResponse listProducts(BranchName parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString();
    *   for (Product element : productServiceClient.listProducts(parent).iterateAll()) {
@@ -526,8 +568,11 @@ public final ListProductsPagedResponse listProducts(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ListProductsRequest request =
    *       ListProductsRequest.newBuilder()
@@ -559,8 +604,11 @@ public final ListProductsPagedResponse listProducts(ListProductsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ListProductsRequest request =
    *       ListProductsRequest.newBuilder()
@@ -593,8 +641,11 @@ public final ListProductsPagedResponse listProducts(ListProductsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ListProductsRequest request =
    *       ListProductsRequest.newBuilder()
@@ -632,8 +683,11 @@ public final UnaryCallable listProduc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   Product product = Product.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -671,8 +725,11 @@ public final Product updateProduct(Product product, FieldMask updateMask) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   UpdateProductRequest request =
    *       UpdateProductRequest.newBuilder()
@@ -698,8 +755,11 @@ public final Product updateProduct(UpdateProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   UpdateProductRequest request =
    *       UpdateProductRequest.newBuilder()
@@ -724,8 +784,11 @@ public final UnaryCallable updateProductCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ProductName name =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
@@ -765,8 +828,11 @@ public final void deleteProduct(ProductName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String name =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
@@ -806,8 +872,11 @@ public final void deleteProduct(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   DeleteProductRequest request =
    *       DeleteProductRequest.newBuilder()
@@ -833,8 +902,11 @@ public final void deleteProduct(DeleteProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   DeleteProductRequest request =
    *       DeleteProductRequest.newBuilder()
@@ -872,8 +944,11 @@ public final UnaryCallable deleteProductCallable()
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   PurgeProductsRequest request =
    *       PurgeProductsRequest.newBuilder()
@@ -914,8 +989,11 @@ public final OperationFuture purge
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   PurgeProductsRequest request =
    *       PurgeProductsRequest.newBuilder()
@@ -956,8 +1034,11 @@ public final OperationFuture purge
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   PurgeProductsRequest request =
    *       PurgeProductsRequest.newBuilder()
@@ -989,8 +1070,11 @@ public final UnaryCallable purgeProductsCallabl
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ImportProductsRequest request =
    *       ImportProductsRequest.newBuilder()
@@ -1027,8 +1111,11 @@ public final OperationFuture importProdu
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ImportProductsRequest request =
    *       ImportProductsRequest.newBuilder()
@@ -1065,8 +1152,11 @@ public final OperationFuture importProdu
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ImportProductsRequest request =
    *       ImportProductsRequest.newBuilder()
@@ -1133,8 +1223,11 @@ public final UnaryCallable importProductsCalla
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   Product inventory = Product.newBuilder().build();
    *   FieldMask setMask = FieldMask.newBuilder().build();
@@ -1250,8 +1343,11 @@ public final OperationFuture setInve
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   SetInventoryRequest request =
    *       SetInventoryRequest.newBuilder()
@@ -1315,8 +1411,11 @@ public final OperationFuture setInve
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   SetInventoryRequest request =
    *       SetInventoryRequest.newBuilder()
@@ -1380,8 +1479,11 @@ public final OperationFuture setInve
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   SetInventoryRequest request =
    *       SetInventoryRequest.newBuilder()
@@ -1419,8 +1521,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ProductName product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
@@ -1465,8 +1570,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
@@ -1510,8 +1618,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   AddFulfillmentPlacesRequest request =
    *       AddFulfillmentPlacesRequest.newBuilder()
@@ -1555,8 +1666,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   AddFulfillmentPlacesRequest request =
    *       AddFulfillmentPlacesRequest.newBuilder()
@@ -1600,8 +1714,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   AddFulfillmentPlacesRequest request =
    *       AddFulfillmentPlacesRequest.newBuilder()
@@ -1644,8 +1761,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ProductName product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
@@ -1690,8 +1810,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
@@ -1735,8 +1858,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   RemoveFulfillmentPlacesRequest request =
    *       RemoveFulfillmentPlacesRequest.newBuilder()
@@ -1780,8 +1906,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   RemoveFulfillmentPlacesRequest request =
    *       RemoveFulfillmentPlacesRequest.newBuilder()
@@ -1827,8 +1956,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   RemoveFulfillmentPlacesRequest request =
    *       RemoveFulfillmentPlacesRequest.newBuilder()
@@ -1876,8 +2008,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ProductName product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
@@ -1927,8 +2062,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
@@ -1977,8 +2115,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   AddLocalInventoriesRequest request =
    *       AddLocalInventoriesRequest.newBuilder()
@@ -2027,8 +2168,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   AddLocalInventoriesRequest request =
    *       AddLocalInventoriesRequest.newBuilder()
@@ -2077,8 +2221,11 @@ public final UnaryCallable setInventoryCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   AddLocalInventoriesRequest request =
    *       AddLocalInventoriesRequest.newBuilder()
@@ -2123,8 +2270,11 @@ public final UnaryCallable addLocalInvent
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ProductName product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
@@ -2172,8 +2322,11 @@ public final UnaryCallable addLocalInvent
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
@@ -2220,8 +2373,11 @@ public final UnaryCallable addLocalInvent
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   RemoveLocalInventoriesRequest request =
    *       RemoveLocalInventoriesRequest.newBuilder()
@@ -2267,8 +2423,11 @@ public final UnaryCallable addLocalInvent
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   RemoveLocalInventoriesRequest request =
    *       RemoveLocalInventoriesRequest.newBuilder()
@@ -2316,8 +2475,11 @@ public final UnaryCallable addLocalInvent
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   RemoveLocalInventoriesRequest request =
    *       RemoveLocalInventoriesRequest.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceSettings.java
index de3e6fbf..4c707df6 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ProductServiceSettings.java
@@ -56,17 +56,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductServiceSettings.Builder productServiceSettingsBuilder =
  *     ProductServiceSettings.newBuilder();
  * productServiceSettingsBuilder
  *     .createProductSettings()
  *     .setRetrySettings(
- *         productServiceSettingsBuilder
- *             .createProductSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         productServiceSettingsBuilder.createProductSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ProductServiceSettings productServiceSettings = productServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceClient.java
index dd0e6a07..fd4d586d 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceClient.java
@@ -44,8 +44,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
  *   SearchRequest request =
  *       SearchRequest.newBuilder()
@@ -106,8 +109,11 @@
  * 

To customize credentials: * *

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

To customize the endpoint: * *

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

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
    *   SearchRequest request =
    *       SearchRequest.newBuilder()
@@ -252,8 +267,11 @@ public final SearchPagedResponse search(SearchRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
    *   SearchRequest request =
    *       SearchRequest.newBuilder()
@@ -302,8 +320,11 @@ public final UnaryCallable searchPagedCallab
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
    *   SearchRequest request =
    *       SearchRequest.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceSettings.java
index bb53ae37..e0358c89 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/SearchServiceSettings.java
@@ -53,16 +53,16 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * SearchServiceSettings.Builder searchServiceSettingsBuilder = SearchServiceSettings.newBuilder();
  * searchServiceSettingsBuilder
  *     .searchSettings()
  *     .setRetrySettings(
- *         searchServiceSettingsBuilder
- *             .searchSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         searchServiceSettingsBuilder.searchSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * SearchServiceSettings searchServiceSettings = searchServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClient.java
index dde3e417..a01327bd 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigServiceClient.java
@@ -43,8 +43,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ServingConfigServiceClient servingConfigServiceClient =
  *     ServingConfigServiceClient.create()) {
  *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
@@ -85,8 +88,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ServingConfigServiceSettings servingConfigServiceSettings =
  *     ServingConfigServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -98,8 +104,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ServingConfigServiceSettings servingConfigServiceSettings =
  *     ServingConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ServingConfigServiceClient servingConfigServiceClient =
@@ -110,8 +119,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ServingConfigServiceSettings servingConfigServiceSettings =
  *     ServingConfigServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -185,8 +197,11 @@ public ServingConfigServiceStub getStub() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
@@ -227,8 +242,11 @@ public final ServingConfig createServingConfig(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
@@ -269,8 +287,11 @@ public final ServingConfig createServingConfig(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   CreateServingConfigRequest request =
@@ -301,8 +322,11 @@ public final ServingConfig createServingConfig(CreateServingConfigRequest reques
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   CreateServingConfigRequest request =
@@ -332,8 +356,11 @@ public final ServingConfig createServingConfig(CreateServingConfigRequest reques
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ServingConfigName name =
@@ -363,8 +390,11 @@ public final void deleteServingConfig(ServingConfigName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   String name =
@@ -393,8 +423,11 @@ public final void deleteServingConfig(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   DeleteServingConfigRequest request =
@@ -423,8 +456,11 @@ public final void deleteServingConfig(DeleteServingConfigRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   DeleteServingConfigRequest request =
@@ -451,8 +487,11 @@ public final UnaryCallable deleteServingConfi
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ServingConfig servingConfig = ServingConfig.newBuilder().build();
@@ -489,8 +528,11 @@ public final ServingConfig updateServingConfig(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   UpdateServingConfigRequest request =
@@ -516,8 +558,11 @@ public final ServingConfig updateServingConfig(UpdateServingConfigRequest reques
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   UpdateServingConfigRequest request =
@@ -546,8 +591,11 @@ public final ServingConfig updateServingConfig(UpdateServingConfigRequest reques
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ServingConfigName name =
@@ -575,8 +623,11 @@ public final ServingConfig getServingConfig(ServingConfigName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   String name =
@@ -604,8 +655,11 @@ public final ServingConfig getServingConfig(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   GetServingConfigRequest request =
@@ -634,8 +688,11 @@ public final ServingConfig getServingConfig(GetServingConfigRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   GetServingConfigRequest request =
@@ -662,8 +719,11 @@ public final UnaryCallable getServingCon
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
@@ -693,8 +753,11 @@ public final ListServingConfigsPagedResponse listServingConfigs(CatalogName pare
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
@@ -722,8 +785,11 @@ public final ListServingConfigsPagedResponse listServingConfigs(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ListServingConfigsRequest request =
@@ -754,8 +820,11 @@ public final ListServingConfigsPagedResponse listServingConfigs(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ListServingConfigsRequest request =
@@ -785,8 +854,11 @@ public final ListServingConfigsPagedResponse listServingConfigs(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ListServingConfigsRequest request =
@@ -827,8 +899,11 @@ public final ListServingConfigsPagedResponse listServingConfigs(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ServingConfigName servingConfig =
@@ -860,8 +935,11 @@ public final ServingConfig addControl(ServingConfigName servingConfig) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   String servingConfig =
@@ -892,8 +970,11 @@ public final ServingConfig addControl(String servingConfig) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   AddControlRequest request =
@@ -925,8 +1006,11 @@ public final ServingConfig addControl(AddControlRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   AddControlRequest request =
@@ -955,8 +1039,11 @@ public final UnaryCallable addControlCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ServingConfigName servingConfig =
@@ -985,8 +1072,11 @@ public final ServingConfig removeControl(ServingConfigName servingConfig) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   String servingConfig =
@@ -1014,8 +1104,11 @@ public final ServingConfig removeControl(String servingConfig) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   RemoveControlRequest request =
@@ -1044,8 +1137,11 @@ public final ServingConfig removeControl(RemoveControlRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   RemoveControlRequest request =
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigServiceSettings.java
index b6c0cb66..616bf28e 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/ServingConfigServiceSettings.java
@@ -54,8 +54,11 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ServingConfigServiceSettings.Builder servingConfigServiceSettingsBuilder =
  *     ServingConfigServiceSettings.newBuilder();
  * servingConfigServiceSettingsBuilder
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/UserEventServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/UserEventServiceClient.java
index 7eef5484..39f7c2cb 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/UserEventServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/UserEventServiceClient.java
@@ -38,8 +38,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
  *   WriteUserEventRequest request =
  *       WriteUserEventRequest.newBuilder()
@@ -80,8 +83,11 @@
  * 

To customize credentials: * *

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

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * UserEventServiceSettings userEventServiceSettings =
  *     UserEventServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * UserEventServiceClient userEventServiceClient =
@@ -105,8 +114,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * UserEventServiceSettings userEventServiceSettings =
  *     UserEventServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -201,8 +213,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   WriteUserEventRequest request =
    *       WriteUserEventRequest.newBuilder()
@@ -227,8 +242,11 @@ public final UserEvent writeUserEvent(WriteUserEventRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   WriteUserEventRequest request =
    *       WriteUserEventRequest.newBuilder()
@@ -257,8 +275,11 @@ public final UnaryCallable writeUserEventCalla
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   CollectUserEventRequest request =
    *       CollectUserEventRequest.newBuilder()
@@ -289,8 +310,11 @@ public final HttpBody collectUserEvent(CollectUserEventRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   CollectUserEventRequest request =
    *       CollectUserEventRequest.newBuilder()
@@ -319,8 +343,11 @@ public final UnaryCallable collectUserEventCa
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   PurgeUserEventsRequest request =
    *       PurgeUserEventsRequest.newBuilder()
@@ -349,8 +376,11 @@ public final OperationFuture purgeUserEv
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   PurgeUserEventsRequest request =
    *       PurgeUserEventsRequest.newBuilder()
@@ -379,8 +409,11 @@ public final OperationFuture purgeUserEv
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   PurgeUserEventsRequest request =
    *       PurgeUserEventsRequest.newBuilder()
@@ -410,8 +443,11 @@ public final UnaryCallable purgeUserEventsCal
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   ImportUserEventsRequest request =
    *       ImportUserEventsRequest.newBuilder()
@@ -443,8 +479,11 @@ public final OperationFuture importUse
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   ImportUserEventsRequest request =
    *       ImportUserEventsRequest.newBuilder()
@@ -475,8 +514,11 @@ public final OperationFuture importUse
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   ImportUserEventsRequest request =
    *       ImportUserEventsRequest.newBuilder()
@@ -507,8 +549,11 @@ public final UnaryCallable importUserEventsC
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   RejoinUserEventsRequest request =
    *       RejoinUserEventsRequest.newBuilder().setParent("parent-995424086").build();
@@ -537,8 +582,11 @@ public final UnaryCallable importUserEventsC
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   RejoinUserEventsRequest request =
    *       RejoinUserEventsRequest.newBuilder().setParent("parent-995424086").build();
@@ -567,8 +615,11 @@ public final UnaryCallable importUserEventsC
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   RejoinUserEventsRequest request =
    *       RejoinUserEventsRequest.newBuilder().setParent("parent-995424086").build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/UserEventServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/UserEventServiceSettings.java
index a6470138..13ecbb91 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/UserEventServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/UserEventServiceSettings.java
@@ -53,17 +53,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * UserEventServiceSettings.Builder userEventServiceSettingsBuilder =
  *     UserEventServiceSettings.newBuilder();
  * userEventServiceSettingsBuilder
  *     .writeUserEventSettings()
  *     .setRetrySettings(
- *         userEventServiceSettingsBuilder
- *             .writeUserEventSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         userEventServiceSettingsBuilder.writeUserEventSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * UserEventServiceSettings userEventServiceSettings = userEventServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/package-info.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/package-info.java
index 59c6d0ca..6313a338 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/package-info.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/package-info.java
@@ -26,8 +26,11 @@
  * 

Sample for CatalogServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
  *   Catalog catalog = Catalog.newBuilder().build();
  *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -45,8 +48,11 @@
  * 

Sample for CompletionServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
  *   CompleteQueryRequest request =
  *       CompleteQueryRequest.newBuilder()
@@ -69,8 +75,11 @@
  * 

Sample for ControlServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
  *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
  *   Control control = Control.newBuilder().build();
@@ -98,8 +107,11 @@
  * 

Sample for ModelServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
  *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
  *   Model response = modelServiceClient.pauseModel(name);
@@ -113,8 +125,11 @@
  * 

Sample for PredictionServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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()
@@ -139,8 +154,11 @@
  * 

Sample for ProductServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
  *   BranchName parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
  *   Product product = Product.newBuilder().build();
@@ -159,8 +177,11 @@
  * 

Sample for SearchServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
  *   SearchRequest request =
  *       SearchRequest.newBuilder()
@@ -199,8 +220,11 @@
  * 

Sample for ServingConfigServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ServingConfigServiceClient servingConfigServiceClient =
  *     ServingConfigServiceClient.create()) {
  *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
@@ -218,8 +242,11 @@
  * 

Sample for UserEventServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
  *   WriteUserEventRequest request =
  *       WriteUserEventRequest.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/CatalogServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/CatalogServiceStubSettings.java
index b5542b5e..20e248d3 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/CatalogServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/CatalogServiceStubSettings.java
@@ -87,17 +87,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CatalogServiceStubSettings.Builder catalogServiceSettingsBuilder =
  *     CatalogServiceStubSettings.newBuilder();
  * catalogServiceSettingsBuilder
  *     .updateCatalogSettings()
  *     .setRetrySettings(
- *         catalogServiceSettingsBuilder
- *             .updateCatalogSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         catalogServiceSettingsBuilder.updateCatalogSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * CatalogServiceStubSettings catalogServiceSettings = catalogServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/CompletionServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/CompletionServiceStubSettings.java
index 413700f2..4de4f6ef 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/CompletionServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/CompletionServiceStubSettings.java
@@ -71,17 +71,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CompletionServiceStubSettings.Builder completionServiceSettingsBuilder =
  *     CompletionServiceStubSettings.newBuilder();
  * completionServiceSettingsBuilder
  *     .completeQuerySettings()
  *     .setRetrySettings(
- *         completionServiceSettingsBuilder
- *             .completeQuerySettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         completionServiceSettingsBuilder.completeQuerySettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * CompletionServiceStubSettings completionServiceSettings =
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ControlServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ControlServiceStubSettings.java
index c42ca138..4e285caa 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ControlServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ControlServiceStubSettings.java
@@ -77,17 +77,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ControlServiceStubSettings.Builder controlServiceSettingsBuilder =
  *     ControlServiceStubSettings.newBuilder();
  * controlServiceSettingsBuilder
  *     .createControlSettings()
  *     .setRetrySettings(
- *         controlServiceSettingsBuilder
- *             .createControlSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         controlServiceSettingsBuilder.createControlSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ControlServiceStubSettings controlServiceSettings = controlServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonCatalogServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonCatalogServiceStub.java
index aaf8a44a..4253e976 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonCatalogServiceStub.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonCatalogServiceStub.java
@@ -130,7 +130,8 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("catalog", request.getCatalog()))
+                              ProtoRestSerializer.create()
+                                  .toBody("catalog", request.getCatalog(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -166,7 +167,7 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearCatalog().build()))
+                                  .toBody("*", request.toBuilder().clearCatalog().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -273,7 +274,7 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("completionConfig", request.getCompletionConfig()))
+                                  .toBody("completionConfig", request.getCompletionConfig(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -347,7 +348,7 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("attributesConfig", request.getAttributesConfig()))
+                                  .toBody("attributesConfig", request.getAttributesConfig(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -384,7 +385,10 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearAttributesConfig().build()))
+                                  .toBody(
+                                      "*",
+                                      request.toBuilder().clearAttributesConfig().build(),
+                                      false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -422,7 +426,10 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearAttributesConfig().build()))
+                                  .toBody(
+                                      "*",
+                                      request.toBuilder().clearAttributesConfig().build(),
+                                      false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -460,7 +467,10 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearAttributesConfig().build()))
+                                  .toBody(
+                                      "*",
+                                      request.toBuilder().clearAttributesConfig().build(),
+                                      false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonCompletionServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonCompletionServiceStub.java
index 397adb86..570517c3 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonCompletionServiceStub.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonCompletionServiceStub.java
@@ -130,7 +130,7 @@ public class HttpJsonCompletionServiceStub extends CompletionServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonControlServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonControlServiceStub.java
index 2dbd5c64..55ad8fa0 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonControlServiceStub.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonControlServiceStub.java
@@ -85,7 +85,8 @@ public class HttpJsonControlServiceStub extends ControlServiceStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("control", request.getControl()))
+                              ProtoRestSerializer.create()
+                                  .toBody("control", request.getControl(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -155,7 +156,8 @@ public class HttpJsonControlServiceStub extends ControlServiceStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("control", request.getControl()))
+                              ProtoRestSerializer.create()
+                                  .toBody("control", request.getControl(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonModelServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonModelServiceStub.java
index 8a23548f..1c2aa032 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonModelServiceStub.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonModelServiceStub.java
@@ -100,7 +100,8 @@ public class HttpJsonModelServiceStub extends ModelServiceStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("model", request.getModel()))
+                              ProtoRestSerializer.create()
+                                  .toBody("model", request.getModel(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -138,7 +139,7 @@ public class HttpJsonModelServiceStub extends ModelServiceStub {
                   .setRequestBodyExtractor(
                       request ->
                           ProtoRestSerializer.create()
-                              .toBody("*", request.toBuilder().clearName().build()))
+                              .toBody("*", request.toBuilder().clearName().build(), false))
                   .build())
           .setResponseParser(
               ProtoMessageResponseParser.newBuilder()
@@ -173,7 +174,7 @@ public class HttpJsonModelServiceStub extends ModelServiceStub {
                   .setRequestBodyExtractor(
                       request ->
                           ProtoRestSerializer.create()
-                              .toBody("*", request.toBuilder().clearName().build()))
+                              .toBody("*", request.toBuilder().clearName().build(), false))
                   .build())
           .setResponseParser(
               ProtoMessageResponseParser.newBuilder()
@@ -274,7 +275,8 @@ public class HttpJsonModelServiceStub extends ModelServiceStub {
                         return fields;
                       })
                   .setRequestBodyExtractor(
-                      request -> ProtoRestSerializer.create().toBody("model", request.getModel()))
+                      request ->
+                          ProtoRestSerializer.create().toBody("model", request.getModel(), false))
                   .build())
           .setResponseParser(
               ProtoMessageResponseParser.newBuilder()
@@ -309,7 +311,7 @@ public class HttpJsonModelServiceStub extends ModelServiceStub {
                   .setRequestBodyExtractor(
                       request ->
                           ProtoRestSerializer.create()
-                              .toBody("*", request.toBuilder().clearName().build()))
+                              .toBody("*", request.toBuilder().clearName().build(), false))
                   .build())
           .setResponseParser(
               ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonPredictionServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonPredictionServiceStub.java
index 04c6a2aa..d7b78064 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonPredictionServiceStub.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonPredictionServiceStub.java
@@ -79,7 +79,7 @@ public class HttpJsonPredictionServiceStub extends PredictionServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearPlacement().build()))
+                                  .toBody("*", request.toBuilder().clearPlacement().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonProductServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonProductServiceStub.java
index 8bfa4371..d724d0f9 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonProductServiceStub.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonProductServiceStub.java
@@ -126,7 +126,8 @@ public class HttpJsonProductServiceStub extends ProductServiceStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("product", request.getProduct()))
+                              ProtoRestSerializer.create()
+                                  .toBody("product", request.getProduct(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -236,7 +237,8 @@ public class HttpJsonProductServiceStub extends ProductServiceStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("product", request.getProduct()))
+                              ProtoRestSerializer.create()
+                                  .toBody("product", request.getProduct(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -305,7 +307,7 @@ public class HttpJsonProductServiceStub extends ProductServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -344,7 +346,7 @@ public class HttpJsonProductServiceStub extends ProductServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -383,7 +385,8 @@ public class HttpJsonProductServiceStub extends ProductServiceStub {
                           })
                       .setRequestBodyExtractor(
                           request ->
-                              ProtoRestSerializer.create().toBody("*", request.toBuilder().build()))
+                              ProtoRestSerializer.create()
+                                  .toBody("*", request.toBuilder().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -422,7 +425,7 @@ public class HttpJsonProductServiceStub extends ProductServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearProduct().build()))
+                                  .toBody("*", request.toBuilder().clearProduct().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -462,7 +465,7 @@ public class HttpJsonProductServiceStub extends ProductServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearProduct().build()))
+                                  .toBody("*", request.toBuilder().clearProduct().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -501,7 +504,7 @@ public class HttpJsonProductServiceStub extends ProductServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearProduct().build()))
+                                  .toBody("*", request.toBuilder().clearProduct().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -541,7 +544,7 @@ public class HttpJsonProductServiceStub extends ProductServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearProduct().build()))
+                                  .toBody("*", request.toBuilder().clearProduct().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonSearchServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonSearchServiceStub.java
index 6c5ffb32..1aa67cff 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonSearchServiceStub.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonSearchServiceStub.java
@@ -80,7 +80,7 @@ public class HttpJsonSearchServiceStub extends SearchServiceStub {
                   .setRequestBodyExtractor(
                       request ->
                           ProtoRestSerializer.create()
-                              .toBody("*", request.toBuilder().clearPlacement().build()))
+                              .toBody("*", request.toBuilder().clearPlacement().build(), false))
                   .build())
           .setResponseParser(
               ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonServingConfigServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonServingConfigServiceStub.java
index 17883438..c37f4602 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonServingConfigServiceStub.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonServingConfigServiceStub.java
@@ -90,7 +90,7 @@ public class HttpJsonServingConfigServiceStub extends ServingConfigServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("servingConfig", request.getServingConfig()))
+                                  .toBody("servingConfig", request.getServingConfig(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -163,7 +163,7 @@ public class HttpJsonServingConfigServiceStub extends ServingConfigServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("servingConfig", request.getServingConfig()))
+                                  .toBody("servingConfig", request.getServingConfig(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -270,7 +270,8 @@ public class HttpJsonServingConfigServiceStub extends ServingConfigServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearServingConfig().build()))
+                                  .toBody(
+                                      "*", request.toBuilder().clearServingConfig().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -307,7 +308,8 @@ public class HttpJsonServingConfigServiceStub extends ServingConfigServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearServingConfig().build()))
+                                  .toBody(
+                                      "*", request.toBuilder().clearServingConfig().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonUserEventServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonUserEventServiceStub.java
index df1eb705..83117f17 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonUserEventServiceStub.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/HttpJsonUserEventServiceStub.java
@@ -100,7 +100,7 @@ public class HttpJsonUserEventServiceStub extends UserEventServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("userEvent", request.getUserEvent()))
+                                  .toBody("userEvent", request.getUserEvent(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -172,7 +172,7 @@ public class HttpJsonUserEventServiceStub extends UserEventServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -211,7 +211,7 @@ public class HttpJsonUserEventServiceStub extends UserEventServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
@@ -250,7 +250,7 @@ public class HttpJsonUserEventServiceStub extends UserEventServiceStub {
                       .setRequestBodyExtractor(
                           request ->
                               ProtoRestSerializer.create()
-                                  .toBody("*", request.toBuilder().clearParent().build()))
+                                  .toBody("*", request.toBuilder().clearParent().build(), false))
                       .build())
               .setResponseParser(
                   ProtoMessageResponseParser.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStubSettings.java
index f6cd13e1..dc947b3a 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ModelServiceStubSettings.java
@@ -88,17 +88,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ModelServiceStubSettings.Builder modelServiceSettingsBuilder =
  *     ModelServiceStubSettings.newBuilder();
  * modelServiceSettingsBuilder
  *     .pauseModelSettings()
  *     .setRetrySettings(
- *         modelServiceSettingsBuilder
- *             .pauseModelSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         modelServiceSettingsBuilder.pauseModelSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ModelServiceStubSettings modelServiceSettings = modelServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/PredictionServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/PredictionServiceStubSettings.java
index 4cb6f0fd..5c930e20 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/PredictionServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/PredictionServiceStubSettings.java
@@ -63,17 +63,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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()
+ *         predictionServiceSettingsBuilder.predictSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * PredictionServiceStubSettings predictionServiceSettings =
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProductServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProductServiceStubSettings.java
index 87fea367..0b6f7946 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProductServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ProductServiceStubSettings.java
@@ -104,17 +104,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductServiceStubSettings.Builder productServiceSettingsBuilder =
  *     ProductServiceStubSettings.newBuilder();
  * productServiceSettingsBuilder
  *     .createProductSettings()
  *     .setRetrySettings(
- *         productServiceSettingsBuilder
- *             .createProductSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         productServiceSettingsBuilder.createProductSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ProductServiceStubSettings productServiceSettings = productServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/SearchServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/SearchServiceStubSettings.java
index f75f284e..4d0416c0 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/SearchServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/SearchServiceStubSettings.java
@@ -72,17 +72,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * SearchServiceStubSettings.Builder searchServiceSettingsBuilder =
  *     SearchServiceStubSettings.newBuilder();
  * searchServiceSettingsBuilder
  *     .searchSettings()
  *     .setRetrySettings(
- *         searchServiceSettingsBuilder
- *             .searchSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         searchServiceSettingsBuilder.searchSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * SearchServiceStubSettings searchServiceSettings = searchServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ServingConfigServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ServingConfigServiceStubSettings.java
index a1fd03f7..1677b165 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ServingConfigServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/ServingConfigServiceStubSettings.java
@@ -79,8 +79,11 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ServingConfigServiceStubSettings.Builder servingConfigServiceSettingsBuilder =
  *     ServingConfigServiceStubSettings.newBuilder();
  * servingConfigServiceSettingsBuilder
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/UserEventServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/UserEventServiceStubSettings.java
index d739dde8..9ae0b842 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/UserEventServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2alpha/stub/UserEventServiceStubSettings.java
@@ -79,17 +79,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * UserEventServiceStubSettings.Builder userEventServiceSettingsBuilder =
  *     UserEventServiceStubSettings.newBuilder();
  * userEventServiceSettingsBuilder
  *     .writeUserEventSettings()
  *     .setRetrySettings(
- *         userEventServiceSettingsBuilder
- *             .writeUserEventSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         userEventServiceSettingsBuilder.writeUserEventSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * UserEventServiceStubSettings userEventServiceSettings = userEventServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceClient.java
index f66631bb..4bf27053 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceClient.java
@@ -43,8 +43,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
  *   Catalog catalog = Catalog.newBuilder().build();
  *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -81,8 +84,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CatalogServiceSettings catalogServiceSettings =
  *     CatalogServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -93,8 +99,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CatalogServiceSettings catalogServiceSettings =
  *     CatalogServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * CatalogServiceClient catalogServiceClient = CatalogServiceClient.create(catalogServiceSettings);
@@ -104,8 +113,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CatalogServiceSettings catalogServiceSettings =
  *     CatalogServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -174,8 +186,11 @@ public CatalogServiceStub getStub() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
    *   for (Catalog element : catalogServiceClient.listCatalogs(parent).iterateAll()) {
@@ -205,8 +220,11 @@ public final ListCatalogsPagedResponse listCatalogs(LocationName parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
    *   for (Catalog element : catalogServiceClient.listCatalogs(parent).iterateAll()) {
@@ -233,8 +251,11 @@ public final ListCatalogsPagedResponse listCatalogs(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   ListCatalogsRequest request =
    *       ListCatalogsRequest.newBuilder()
@@ -262,8 +283,11 @@ public final ListCatalogsPagedResponse listCatalogs(ListCatalogsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   ListCatalogsRequest request =
    *       ListCatalogsRequest.newBuilder()
@@ -292,8 +316,11 @@ public final ListCatalogsPagedResponse listCatalogs(ListCatalogsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   ListCatalogsRequest request =
    *       ListCatalogsRequest.newBuilder()
@@ -327,8 +354,11 @@ public final UnaryCallable listCatalo
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   Catalog catalog = Catalog.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -360,8 +390,11 @@ public final Catalog updateCatalog(Catalog catalog, FieldMask updateMask) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   UpdateCatalogRequest request =
    *       UpdateCatalogRequest.newBuilder()
@@ -386,8 +419,11 @@ public final Catalog updateCatalog(UpdateCatalogRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   UpdateCatalogRequest request =
    *       UpdateCatalogRequest.newBuilder()
@@ -440,8 +476,11 @@ public final UnaryCallable updateCatalogCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   CatalogName catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   catalogServiceClient.setDefaultBranch(catalog);
@@ -496,8 +535,11 @@ public final void setDefaultBranch(CatalogName catalog) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   String catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   catalogServiceClient.setDefaultBranch(catalog);
@@ -550,8 +592,11 @@ public final void setDefaultBranch(String catalog) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   SetDefaultBranchRequest request =
    *       SetDefaultBranchRequest.newBuilder()
@@ -608,8 +653,11 @@ public final void setDefaultBranch(SetDefaultBranchRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   SetDefaultBranchRequest request =
    *       SetDefaultBranchRequest.newBuilder()
@@ -638,8 +686,11 @@ public final UnaryCallable setDefaultBranchCalla
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   CatalogName catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   GetDefaultBranchResponse response = catalogServiceClient.getDefaultBranch(catalog);
@@ -667,8 +718,11 @@ public final GetDefaultBranchResponse getDefaultBranch(CatalogName catalog) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   String catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   GetDefaultBranchResponse response = catalogServiceClient.getDefaultBranch(catalog);
@@ -694,8 +748,11 @@ public final GetDefaultBranchResponse getDefaultBranch(String catalog) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   GetDefaultBranchRequest request =
    *       GetDefaultBranchRequest.newBuilder()
@@ -721,8 +778,11 @@ public final GetDefaultBranchResponse getDefaultBranch(GetDefaultBranchRequest r
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   GetDefaultBranchRequest request =
    *       GetDefaultBranchRequest.newBuilder()
@@ -747,8 +807,11 @@ public final GetDefaultBranchResponse getDefaultBranch(GetDefaultBranchRequest r
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   CompletionConfigName name = CompletionConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   CompletionConfig response = catalogServiceClient.getCompletionConfig(name);
@@ -756,7 +819,7 @@ public final GetDefaultBranchResponse getDefaultBranch(GetDefaultBranchRequest r
    * }
* * @param name Required. Full CompletionConfig resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CompletionConfig getCompletionConfig(CompletionConfigName name) { @@ -774,8 +837,11 @@ public final CompletionConfig getCompletionConfig(CompletionConfigName name) { *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   String name = CompletionConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   CompletionConfig response = catalogServiceClient.getCompletionConfig(name);
@@ -783,7 +849,7 @@ public final CompletionConfig getCompletionConfig(CompletionConfigName name) {
    * }
* * @param name Required. Full CompletionConfig resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final CompletionConfig getCompletionConfig(String name) { @@ -799,8 +865,11 @@ public final CompletionConfig getCompletionConfig(String name) { *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   GetCompletionConfigRequest request =
    *       GetCompletionConfigRequest.newBuilder()
@@ -824,8 +893,11 @@ public final CompletionConfig getCompletionConfig(GetCompletionConfigRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   GetCompletionConfigRequest request =
    *       GetCompletionConfigRequest.newBuilder()
@@ -850,8 +922,11 @@ public final CompletionConfig getCompletionConfig(GetCompletionConfigRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   CompletionConfig completionConfig = CompletionConfig.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -896,8 +971,11 @@ public final CompletionConfig updateCompletionConfig(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   UpdateCompletionConfigRequest request =
    *       UpdateCompletionConfigRequest.newBuilder()
@@ -922,8 +1000,11 @@ public final CompletionConfig updateCompletionConfig(UpdateCompletionConfigReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   UpdateCompletionConfigRequest request =
    *       UpdateCompletionConfigRequest.newBuilder()
@@ -949,8 +1030,11 @@ public final CompletionConfig updateCompletionConfig(UpdateCompletionConfigReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   AttributesConfigName name = AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   AttributesConfig response = catalogServiceClient.getAttributesConfig(name);
@@ -976,8 +1060,11 @@ public final AttributesConfig getAttributesConfig(AttributesConfigName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   String name = AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   AttributesConfig response = catalogServiceClient.getAttributesConfig(name);
@@ -1001,8 +1088,11 @@ public final AttributesConfig getAttributesConfig(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   GetAttributesConfigRequest request =
    *       GetAttributesConfigRequest.newBuilder()
@@ -1026,8 +1116,11 @@ public final AttributesConfig getAttributesConfig(GetAttributesConfigRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   GetAttributesConfigRequest request =
    *       GetAttributesConfigRequest.newBuilder()
@@ -1058,8 +1151,11 @@ public final AttributesConfig getAttributesConfig(GetAttributesConfigRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   AttributesConfig attributesConfig = AttributesConfig.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -1102,8 +1198,11 @@ public final AttributesConfig updateAttributesConfig(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   UpdateAttributesConfigRequest request =
    *       UpdateAttributesConfigRequest.newBuilder()
@@ -1134,8 +1233,11 @@ public final AttributesConfig updateAttributesConfig(UpdateAttributesConfigReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   UpdateAttributesConfigRequest request =
    *       UpdateAttributesConfigRequest.newBuilder()
@@ -1165,8 +1267,11 @@ public final AttributesConfig updateAttributesConfig(UpdateAttributesConfigReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   AddCatalogAttributeRequest request =
    *       AddCatalogAttributeRequest.newBuilder()
@@ -1196,8 +1301,11 @@ public final AttributesConfig addCatalogAttribute(AddCatalogAttributeRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   AddCatalogAttributeRequest request =
    *       AddCatalogAttributeRequest.newBuilder()
@@ -1228,8 +1336,11 @@ public final AttributesConfig addCatalogAttribute(AddCatalogAttributeRequest req
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   RemoveCatalogAttributeRequest request =
    *       RemoveCatalogAttributeRequest.newBuilder()
@@ -1259,8 +1370,11 @@ public final AttributesConfig removeCatalogAttribute(RemoveCatalogAttributeReque
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   RemoveCatalogAttributeRequest request =
    *       RemoveCatalogAttributeRequest.newBuilder()
@@ -1280,6 +1394,72 @@ public final AttributesConfig removeCatalogAttribute(RemoveCatalogAttributeReque
     return stub.removeCatalogAttributeCallable();
   }
 
+  // AUTO-GENERATED DOCUMENTATION AND METHOD.
+  /**
+   * Removes all specified [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s from the
+   * [AttributesConfig][google.cloud.retail.v2beta.AttributesConfig].
+   *
+   * 

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+   *   BatchRemoveCatalogAttributesRequest request =
+   *       BatchRemoveCatalogAttributesRequest.newBuilder()
+   *           .setAttributesConfig(
+   *               AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+   *           .addAllAttributeKeys(new ArrayList())
+   *           .build();
+   *   BatchRemoveCatalogAttributesResponse response =
+   *       catalogServiceClient.batchRemoveCatalogAttributes(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 BatchRemoveCatalogAttributesResponse batchRemoveCatalogAttributes( + BatchRemoveCatalogAttributesRequest request) { + return batchRemoveCatalogAttributesCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Removes all specified [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s from the + * [AttributesConfig][google.cloud.retail.v2beta.AttributesConfig]. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+   *   BatchRemoveCatalogAttributesRequest request =
+   *       BatchRemoveCatalogAttributesRequest.newBuilder()
+   *           .setAttributesConfig(
+   *               AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+   *           .addAllAttributeKeys(new ArrayList())
+   *           .build();
+   *   ApiFuture future =
+   *       catalogServiceClient.batchRemoveCatalogAttributesCallable().futureCall(request);
+   *   // Do something.
+   *   BatchRemoveCatalogAttributesResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable< + BatchRemoveCatalogAttributesRequest, BatchRemoveCatalogAttributesResponse> + batchRemoveCatalogAttributesCallable() { + return stub.batchRemoveCatalogAttributesCallable(); + } + // AUTO-GENERATED DOCUMENTATION AND METHOD. /** * Replaces the specified [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] in the @@ -1293,8 +1473,11 @@ public final AttributesConfig removeCatalogAttribute(RemoveCatalogAttributeReque *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   ReplaceCatalogAttributeRequest request =
    *       ReplaceCatalogAttributeRequest.newBuilder()
@@ -1327,8 +1510,11 @@ public final AttributesConfig replaceCatalogAttribute(ReplaceCatalogAttributeReq
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
    *   ReplaceCatalogAttributeRequest request =
    *       ReplaceCatalogAttributeRequest.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceSettings.java
index 09c6f2b2..6145374e 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceSettings.java
@@ -54,17 +54,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CatalogServiceSettings.Builder catalogServiceSettingsBuilder =
  *     CatalogServiceSettings.newBuilder();
  * catalogServiceSettingsBuilder
  *     .updateCatalogSettings()
  *     .setRetrySettings(
- *         catalogServiceSettingsBuilder
- *             .updateCatalogSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         catalogServiceSettingsBuilder.updateCatalogSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * CatalogServiceSettings catalogServiceSettings = catalogServiceSettingsBuilder.build();
@@ -132,6 +132,13 @@ public UnaryCallSettings setDefaultBranchSetting
     return ((CatalogServiceStubSettings) getStubSettings()).removeCatalogAttributeSettings();
   }
 
+  /** Returns the object with the settings used for calls to batchRemoveCatalogAttributes. */
+  public UnaryCallSettings<
+          BatchRemoveCatalogAttributesRequest, BatchRemoveCatalogAttributesResponse>
+      batchRemoveCatalogAttributesSettings() {
+    return ((CatalogServiceStubSettings) getStubSettings()).batchRemoveCatalogAttributesSettings();
+  }
+
   /** Returns the object with the settings used for calls to replaceCatalogAttribute. */
   public UnaryCallSettings
       replaceCatalogAttributeSettings() {
@@ -312,6 +319,13 @@ public UnaryCallSettings.Builder setDefaultBranc
       return getStubSettingsBuilder().removeCatalogAttributeSettings();
     }
 
+    /** Returns the builder for the settings used for calls to batchRemoveCatalogAttributes. */
+    public UnaryCallSettings.Builder<
+            BatchRemoveCatalogAttributesRequest, BatchRemoveCatalogAttributesResponse>
+        batchRemoveCatalogAttributesSettings() {
+      return getStubSettingsBuilder().batchRemoveCatalogAttributesSettings();
+    }
+
     /** Returns the builder for the settings used for calls to replaceCatalogAttribute. */
     public UnaryCallSettings.Builder
         replaceCatalogAttributeSettings() {
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceClient.java
index 8f1bca20..e41b8d4e 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceClient.java
@@ -33,15 +33,18 @@
 /**
  * Service Description: Auto-completion service for retail.
  *
- * 

This feature is only available for users who have Retail Search enabled. Please enable Retail - * Search on Cloud Console before using this feature. + *

This feature is only available for users who have Retail Search enabled. Enable Retail Search + * on Cloud Console before using this feature. * *

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 for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
  *   CompleteQueryRequest request =
  *       CompleteQueryRequest.newBuilder()
@@ -87,8 +90,11 @@
  * 

To customize credentials: * *

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

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CompletionServiceSettings completionServiceSettings =
  *     CompletionServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * CompletionServiceClient completionServiceClient =
@@ -112,8 +121,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CompletionServiceSettings completionServiceSettings =
  *     CompletionServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -205,14 +217,17 @@ public final OperationsClient getHttpJsonOperationsClient() {
   /**
    * Completes the specified prefix with keyword suggestions.
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
    *   CompleteQueryRequest request =
    *       CompleteQueryRequest.newBuilder()
@@ -239,14 +254,17 @@ public final CompleteQueryResponse completeQuery(CompleteQueryRequest request) {
   /**
    * Completes the specified prefix with keyword suggestions.
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
    *   CompleteQueryRequest request =
    *       CompleteQueryRequest.newBuilder()
@@ -278,14 +296,17 @@ public final UnaryCallable complete
    * 

The operation is successfully finished only after the imported suggestions are indexed * successfully and ready for serving. The process takes hours. * - *

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
    *   ImportCompletionDataRequest request =
    *       ImportCompletionDataRequest.newBuilder()
@@ -315,14 +336,17 @@ public final UnaryCallable complete
    * 

The operation is successfully finished only after the imported suggestions are indexed * successfully and ready for serving. The process takes hours. * - *

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
    *   ImportCompletionDataRequest request =
    *       ImportCompletionDataRequest.newBuilder()
@@ -352,14 +376,17 @@ public final UnaryCallable complete
    * 

The operation is successfully finished only after the imported suggestions are indexed * successfully and ready for serving. The process takes hours. * - *

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
    *   ImportCompletionDataRequest request =
    *       ImportCompletionDataRequest.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceSettings.java
index 8d7abe19..ad6e42fd 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceSettings.java
@@ -52,17 +52,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CompletionServiceSettings.Builder completionServiceSettingsBuilder =
  *     CompletionServiceSettings.newBuilder();
  * completionServiceSettingsBuilder
  *     .completeQuerySettings()
  *     .setRetrySettings(
- *         completionServiceSettingsBuilder
- *             .completeQuerySettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         completionServiceSettingsBuilder.completeQuerySettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * CompletionServiceSettings completionServiceSettings = completionServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ControlServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ControlServiceClient.java
index e5f27422..b48813e7 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ControlServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ControlServiceClient.java
@@ -43,8 +43,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
  *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
  *   Control control = Control.newBuilder().build();
@@ -82,8 +85,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ControlServiceSettings controlServiceSettings =
  *     ControlServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -94,8 +100,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ControlServiceSettings controlServiceSettings =
  *     ControlServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ControlServiceClient controlServiceClient = ControlServiceClient.create(controlServiceSettings);
@@ -105,8 +114,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ControlServiceSettings controlServiceSettings =
  *     ControlServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -178,8 +190,11 @@ public ControlServiceStub getStub() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   Control control = Control.newBuilder().build();
@@ -216,8 +231,11 @@ public final Control createControl(CatalogName parent, Control control, String c
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   Control control = Control.newBuilder().build();
@@ -254,8 +272,11 @@ public final Control createControl(String parent, Control control, String contro
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   CreateControlRequest request =
    *       CreateControlRequest.newBuilder()
@@ -284,8 +305,11 @@ public final Control createControl(CreateControlRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   CreateControlRequest request =
    *       CreateControlRequest.newBuilder()
@@ -313,8 +337,11 @@ public final UnaryCallable createControlCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   ControlName name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]");
    *   controlServiceClient.deleteControl(name);
@@ -341,8 +368,11 @@ public final void deleteControl(ControlName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   String name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString();
    *   controlServiceClient.deleteControl(name);
@@ -368,8 +398,11 @@ public final void deleteControl(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   DeleteControlRequest request =
    *       DeleteControlRequest.newBuilder()
@@ -397,8 +430,11 @@ public final void deleteControl(DeleteControlRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   DeleteControlRequest request =
    *       DeleteControlRequest.newBuilder()
@@ -421,13 +457,16 @@ public final UnaryCallable deleteControlCallable()
    *
    * 

[Control][google.cloud.retail.v2beta.Control] cannot be set to a different oneof field, if * so an INVALID_ARGUMENT is returned. If the [Control][google.cloud.retail.v2beta.Control] to - * delete does not exist, a NOT_FOUND error is returned. + * update does not exist, a NOT_FOUND error is returned. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   Control control = Control.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -456,13 +495,16 @@ public final Control updateControl(Control control, FieldMask updateMask) {
    *
    * 

[Control][google.cloud.retail.v2beta.Control] cannot be set to a different oneof field, if * so an INVALID_ARGUMENT is returned. If the [Control][google.cloud.retail.v2beta.Control] to - * delete does not exist, a NOT_FOUND error is returned. + * update does not exist, a NOT_FOUND error is returned. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   UpdateControlRequest request =
    *       UpdateControlRequest.newBuilder()
@@ -486,13 +528,16 @@ public final Control updateControl(UpdateControlRequest request) {
    *
    * 

[Control][google.cloud.retail.v2beta.Control] cannot be set to a different oneof field, if * so an INVALID_ARGUMENT is returned. If the [Control][google.cloud.retail.v2beta.Control] to - * delete does not exist, a NOT_FOUND error is returned. + * update does not exist, a NOT_FOUND error is returned. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   UpdateControlRequest request =
    *       UpdateControlRequest.newBuilder()
@@ -516,15 +561,18 @@ public final UnaryCallable updateControlCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   ControlName name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]");
    *   Control response = controlServiceClient.getControl(name);
    * }
    * }
* - * @param name Required. The resource name of the Control to delete. Format: + * @param name Required. The resource name of the Control to get. Format: * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -541,15 +589,18 @@ public final Control getControl(ControlName name) { *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   String name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString();
    *   Control response = controlServiceClient.getControl(name);
    * }
    * }
* - * @param name Required. The resource name of the Control to delete. Format: + * @param name Required. The resource name of the Control to get. Format: * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ @@ -565,8 +616,11 @@ public final Control getControl(String name) { *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   GetControlRequest request =
    *       GetControlRequest.newBuilder()
@@ -591,8 +645,11 @@ public final Control getControl(GetControlRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   GetControlRequest request =
    *       GetControlRequest.newBuilder()
@@ -611,13 +668,16 @@ public final UnaryCallable getControlCallable() {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD.
   /**
-   * Lists all Controls linked to this catalog.
+   * Lists all Controls by their parent [Catalog][google.cloud.retail.v2beta.Catalog].
    *
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
    *   for (Control element : controlServiceClient.listControls(parent).iterateAll()) {
@@ -640,13 +700,16 @@ public final ListControlsPagedResponse listControls(CatalogName parent) {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD.
   /**
-   * Lists all Controls linked to this catalog.
+   * Lists all Controls by their parent [Catalog][google.cloud.retail.v2beta.Catalog].
    *
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
    *   for (Control element : controlServiceClient.listControls(parent).iterateAll()) {
@@ -666,13 +729,16 @@ public final ListControlsPagedResponse listControls(String parent) {
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD.
   /**
-   * Lists all Controls linked to this catalog.
+   * Lists all Controls by their parent [Catalog][google.cloud.retail.v2beta.Catalog].
    *
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   ListControlsRequest request =
    *       ListControlsRequest.newBuilder()
@@ -696,13 +762,16 @@ public final ListControlsPagedResponse listControls(ListControlsRequest request)
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD.
   /**
-   * Lists all Controls linked to this catalog.
+   * Lists all Controls by their parent [Catalog][google.cloud.retail.v2beta.Catalog].
    *
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   ListControlsRequest request =
    *       ListControlsRequest.newBuilder()
@@ -727,13 +796,16 @@ public final ListControlsPagedResponse listControls(ListControlsRequest request)
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD.
   /**
-   * Lists all Controls linked to this catalog.
+   * Lists all Controls by their parent [Catalog][google.cloud.retail.v2beta.Catalog].
    *
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
    *   ListControlsRequest request =
    *       ListControlsRequest.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ControlServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ControlServiceSettings.java
index dad65f88..6764e9b9 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ControlServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ControlServiceSettings.java
@@ -54,17 +54,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ControlServiceSettings.Builder controlServiceSettingsBuilder =
  *     ControlServiceSettings.newBuilder();
  * controlServiceSettingsBuilder
  *     .createControlSettings()
  *     .setRetrySettings(
- *         controlServiceSettingsBuilder
- *             .createControlSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         controlServiceSettingsBuilder.createControlSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ControlServiceSettings controlServiceSettings = controlServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ModelServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ModelServiceClient.java
new file mode 100644
index 00000000..aa830fa1
--- /dev/null
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ModelServiceClient.java
@@ -0,0 +1,1168 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta;
+
+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.retail.v2beta.stub.ModelServiceStub;
+import com.google.cloud.retail.v2beta.stub.ModelServiceStubSettings;
+import com.google.common.util.concurrent.MoreExecutors;
+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.concurrent.TimeUnit;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * Service Description: Service for performing CRUD operations on models. Recommendation models
+ * contain all the metadata necessary to generate a set of models for the `Predict()` API. A model
+ * is queried indirectly via a ServingConfig, which associates a model with a given Placement (e.g.
+ * Frequently Bought Together on Home Page).
+ *
+ * 

This service allows you to do the following: + * + *

    + *
  • Initiate training of a model. + *
  • Pause training of an existing model. + *
  • List all the available models along with their metadata. + *
  • Control their tuning schedule. + *
+ * + *

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 (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+ *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
+ *   Model response = modelServiceClient.pauseModel(name);
+ * }
+ * }
+ * + *

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

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

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

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

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

This class can be customized by passing in a custom instance of ModelServiceSettings 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
+ * ModelServiceSettings modelServiceSettings =
+ *     ModelServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings);
+ * }
+ * + *

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
+ * ModelServiceSettings modelServiceSettings =
+ *     ModelServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings);
+ * }
+ * + *

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
+ * ModelServiceSettings modelServiceSettings =
+ *     ModelServiceSettings.newBuilder()
+ *         .setTransportChannelProvider(
+ *             ModelServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
+ *         .build();
+ * ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings);
+ * }
+ * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+   *   Model model = Model.newBuilder().build();
+   *   Model response = modelServiceClient.createModelAsync(parent, model).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource under which to create the model. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + * @param model Required. The payload of the [Model][google.cloud.retail.v2beta.Model] to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createModelAsync( + CatalogName parent, Model model) { + CreateModelRequest request = + CreateModelRequest.newBuilder() + .setParent(parent == null ? null : parent.toString()) + .setModel(model) + .build(); + return createModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new model. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
+   *   Model model = Model.newBuilder().build();
+   *   Model response = modelServiceClient.createModelAsync(parent, model).get();
+   * }
+   * }
+ * + * @param parent Required. The parent resource under which to create the model. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + * @param model Required. The payload of the [Model][google.cloud.retail.v2beta.Model] to create. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createModelAsync( + String parent, Model model) { + CreateModelRequest request = + CreateModelRequest.newBuilder().setParent(parent).setModel(model).build(); + return createModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new model. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   CreateModelRequest request =
+   *       CreateModelRequest.newBuilder()
+   *           .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+   *           .setModel(Model.newBuilder().build())
+   *           .setDryRun(true)
+   *           .build();
+   *   Model response = modelServiceClient.createModelAsync(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 createModelAsync( + CreateModelRequest request) { + return createModelOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new model. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   CreateModelRequest request =
+   *       CreateModelRequest.newBuilder()
+   *           .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+   *           .setModel(Model.newBuilder().build())
+   *           .setDryRun(true)
+   *           .build();
+   *   OperationFuture future =
+   *       modelServiceClient.createModelOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Model response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createModelOperationCallable() { + return stub.createModelOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new model. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   CreateModelRequest request =
+   *       CreateModelRequest.newBuilder()
+   *           .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+   *           .setModel(Model.newBuilder().build())
+   *           .setDryRun(true)
+   *           .build();
+   *   ApiFuture future = modelServiceClient.createModelCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createModelCallable() { + return stub.createModelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Pauses the training of an existing model. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
+   *   Model response = modelServiceClient.pauseModel(name);
+   * }
+   * }
+ * + * @param name Required. The name of the model to pause. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Model pauseModel(ModelName name) { + PauseModelRequest request = + PauseModelRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return pauseModel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Pauses the training of an existing model. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString();
+   *   Model response = modelServiceClient.pauseModel(name);
+   * }
+   * }
+ * + * @param name Required. The name of the model to pause. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Model pauseModel(String name) { + PauseModelRequest request = PauseModelRequest.newBuilder().setName(name).build(); + return pauseModel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Pauses the training of an existing model. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   PauseModelRequest request =
+   *       PauseModelRequest.newBuilder()
+   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+   *           .build();
+   *   Model response = modelServiceClient.pauseModel(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 Model pauseModel(PauseModelRequest request) { + return pauseModelCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Pauses the training of an existing model. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   PauseModelRequest request =
+   *       PauseModelRequest.newBuilder()
+   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+   *           .build();
+   *   ApiFuture future = modelServiceClient.pauseModelCallable().futureCall(request);
+   *   // Do something.
+   *   Model response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable pauseModelCallable() { + return stub.pauseModelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resumes the training of an existing model. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String name = "name3373707";
+   *   Model response = modelServiceClient.resumeModel(name);
+   * }
+   * }
+ * + * @param name Required. The name of the model to resume. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Model resumeModel(String name) { + ResumeModelRequest request = ResumeModelRequest.newBuilder().setName(name).build(); + return resumeModel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resumes the training of an existing model. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   ResumeModelRequest request = ResumeModelRequest.newBuilder().setName("name3373707").build();
+   *   Model response = modelServiceClient.resumeModel(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 Model resumeModel(ResumeModelRequest request) { + return resumeModelCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Resumes the training of an existing model. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   ResumeModelRequest request = ResumeModelRequest.newBuilder().setName("name3373707").build();
+   *   ApiFuture future = modelServiceClient.resumeModelCallable().futureCall(request);
+   *   // Do something.
+   *   Model response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable resumeModelCallable() { + return stub.resumeModelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing model. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
+   *   modelServiceClient.deleteModel(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the [Model][google.cloud.retail.v2beta.Model] to + * delete. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteModel(ModelName name) { + DeleteModelRequest request = + DeleteModelRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteModel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing model. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString();
+   *   modelServiceClient.deleteModel(name);
+   * }
+   * }
+ * + * @param name Required. The resource name of the [Model][google.cloud.retail.v2beta.Model] to + * delete. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteModel(String name) { + DeleteModelRequest request = DeleteModelRequest.newBuilder().setName(name).build(); + deleteModel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes an existing model. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   DeleteModelRequest request =
+   *       DeleteModelRequest.newBuilder()
+   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+   *           .build();
+   *   ApiFuture future = modelServiceClient.deleteModelCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteModelCallable() { + return stub.deleteModelCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the models linked to this event store. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+   *   for (Model element : modelServiceClient.listModels(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent for which to list models. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListModelsPagedResponse listModels(CatalogName parent) { + ListModelsRequest request = + ListModelsRequest.newBuilder().setParent(parent == null ? null : parent.toString()).build(); + return listModels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the models linked to this event store. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
+   *   for (Model element : modelServiceClient.listModels(parent).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param parent Required. The parent for which to list models. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListModelsPagedResponse listModels(String parent) { + ListModelsRequest request = ListModelsRequest.newBuilder().setParent(parent).build(); + return listModels(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the models linked to this event store. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   ListModelsRequest request =
+   *       ListModelsRequest.newBuilder()
+   *           .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   for (Model element : modelServiceClient.listModels(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 ListModelsPagedResponse listModels(ListModelsRequest request) { + return listModelsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the models linked to this event store. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   ListModelsRequest request =
+   *       ListModelsRequest.newBuilder()
+   *           .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   ApiFuture future = modelServiceClient.listModelsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Model element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listModelsPagedCallable() { + return stub.listModelsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists all the models linked to this event store. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   ListModelsRequest request =
+   *       ListModelsRequest.newBuilder()
+   *           .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .build();
+   *   while (true) {
+   *     ListModelsResponse response = modelServiceClient.listModelsCallable().call(request);
+   *     for (Model element : response.getModelsList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listModelsCallable() { + return stub.listModelsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update of model metadata. Only fields that currently can be updated are: `filtering_option` and + * `periodic_tuning_state`. If other values are provided, this API method ignores them. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   Model model = Model.newBuilder().build();
+   *   FieldMask updateMask = FieldMask.newBuilder().build();
+   *   Model response = modelServiceClient.updateModel(model, updateMask);
+   * }
+   * }
+ * + * @param model Required. The body of the updated [Model][google.cloud.retail.v2beta.Model]. + * @param updateMask Optional. Indicates which fields in the provided 'model' to update. If not + * set, by default updates all fields. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Model updateModel(Model model, FieldMask updateMask) { + UpdateModelRequest request = + UpdateModelRequest.newBuilder().setModel(model).setUpdateMask(updateMask).build(); + return updateModel(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update of model metadata. Only fields that currently can be updated are: `filtering_option` and + * `periodic_tuning_state`. If other values are provided, this API method ignores them. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   UpdateModelRequest request =
+   *       UpdateModelRequest.newBuilder()
+   *           .setModel(Model.newBuilder().build())
+   *           .setUpdateMask(FieldMask.newBuilder().build())
+   *           .build();
+   *   Model response = modelServiceClient.updateModel(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 Model updateModel(UpdateModelRequest request) { + return updateModelCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Update of model metadata. Only fields that currently can be updated are: `filtering_option` and + * `periodic_tuning_state`. If other values are provided, this API method ignores them. + * + *

Sample code: + * + *

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

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
+   *   TuneModelResponse response = modelServiceClient.tuneModelAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the model to tune. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture tuneModelAsync( + ModelName name) { + TuneModelRequest request = + TuneModelRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return tuneModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Tunes an existing model. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   String name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString();
+   *   TuneModelResponse response = modelServiceClient.tuneModelAsync(name).get();
+   * }
+   * }
+ * + * @param name Required. The resource name of the model to tune. Format: + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}` + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture tuneModelAsync(String name) { + TuneModelRequest request = TuneModelRequest.newBuilder().setName(name).build(); + return tuneModelAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Tunes an existing model. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   TuneModelRequest request =
+   *       TuneModelRequest.newBuilder()
+   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+   *           .build();
+   *   TuneModelResponse response = modelServiceClient.tuneModelAsync(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 tuneModelAsync( + TuneModelRequest request) { + return tuneModelOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Tunes an existing model. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   TuneModelRequest request =
+   *       TuneModelRequest.newBuilder()
+   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+   *           .build();
+   *   OperationFuture future =
+   *       modelServiceClient.tuneModelOperationCallable().futureCall(request);
+   *   // Do something.
+   *   TuneModelResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + tuneModelOperationCallable() { + return stub.tuneModelOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Tunes an existing model. + * + *

Sample code: + * + *

{@code
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+   * try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+   *   TuneModelRequest request =
+   *       TuneModelRequest.newBuilder()
+   *           .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+   *           .build();
+   *   ApiFuture future = modelServiceClient.tuneModelCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable tuneModelCallable() { + return stub.tuneModelCallable(); + } + + @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 ListModelsPagedResponse + extends AbstractPagedListResponse< + ListModelsRequest, + ListModelsResponse, + Model, + ListModelsPage, + ListModelsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListModelsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, input -> new ListModelsPagedResponse(input), MoreExecutors.directExecutor()); + } + + private ListModelsPagedResponse(ListModelsPage page) { + super(page, ListModelsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListModelsPage + extends AbstractPage { + + private ListModelsPage( + PageContext context, + ListModelsResponse response) { + super(context, response); + } + + private static ListModelsPage createEmptyPage() { + return new ListModelsPage(null, null); + } + + @Override + protected ListModelsPage createPage( + PageContext context, + ListModelsResponse response) { + return new ListModelsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListModelsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListModelsRequest, + ListModelsResponse, + Model, + ListModelsPage, + ListModelsFixedSizeCollection> { + + private ListModelsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListModelsFixedSizeCollection createEmptyCollection() { + return new ListModelsFixedSizeCollection(null, 0); + } + + @Override + protected ListModelsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListModelsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ModelServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ModelServiceSettings.java new file mode 100644 index 00000000..5ea4fb1c --- /dev/null +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ModelServiceSettings.java @@ -0,0 +1,294 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2beta; + +import static com.google.cloud.retail.v2beta.ModelServiceClient.ListModelsPagedResponse; + +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.retail.v2beta.stub.ModelServiceStubSettings; +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 ModelServiceClient}. + * + *

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

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

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

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ModelServiceSettings.Builder modelServiceSettingsBuilder = ModelServiceSettings.newBuilder();
+ * modelServiceSettingsBuilder
+ *     .pauseModelSettings()
+ *     .setRetrySettings(
+ *         modelServiceSettingsBuilder.pauseModelSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ModelServiceSettings modelServiceSettings = modelServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ModelServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to createModel. */ + public UnaryCallSettings createModelSettings() { + return ((ModelServiceStubSettings) getStubSettings()).createModelSettings(); + } + + /** Returns the object with the settings used for calls to createModel. */ + public OperationCallSettings + createModelOperationSettings() { + return ((ModelServiceStubSettings) getStubSettings()).createModelOperationSettings(); + } + + /** Returns the object with the settings used for calls to pauseModel. */ + public UnaryCallSettings pauseModelSettings() { + return ((ModelServiceStubSettings) getStubSettings()).pauseModelSettings(); + } + + /** Returns the object with the settings used for calls to resumeModel. */ + public UnaryCallSettings resumeModelSettings() { + return ((ModelServiceStubSettings) getStubSettings()).resumeModelSettings(); + } + + /** Returns the object with the settings used for calls to deleteModel. */ + public UnaryCallSettings deleteModelSettings() { + return ((ModelServiceStubSettings) getStubSettings()).deleteModelSettings(); + } + + /** Returns the object with the settings used for calls to listModels. */ + public PagedCallSettings + listModelsSettings() { + return ((ModelServiceStubSettings) getStubSettings()).listModelsSettings(); + } + + /** Returns the object with the settings used for calls to updateModel. */ + public UnaryCallSettings updateModelSettings() { + return ((ModelServiceStubSettings) getStubSettings()).updateModelSettings(); + } + + /** Returns the object with the settings used for calls to tuneModel. */ + public UnaryCallSettings tuneModelSettings() { + return ((ModelServiceStubSettings) getStubSettings()).tuneModelSettings(); + } + + /** Returns the object with the settings used for calls to tuneModel. */ + public OperationCallSettings + tuneModelOperationSettings() { + return ((ModelServiceStubSettings) getStubSettings()).tuneModelOperationSettings(); + } + + public static final ModelServiceSettings create(ModelServiceStubSettings stub) + throws IOException { + return new ModelServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ModelServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ModelServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ModelServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ModelServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ModelServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return ModelServiceStubSettings.defaultHttpJsonTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ModelServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ModelServiceStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new gRPC builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new REST builder for this class. */ + @BetaApi + public static Builder newHttpJsonBuilder() { + return Builder.createHttpJsonDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ModelServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ModelServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ModelServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(ModelServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ModelServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ModelServiceStubSettings.newBuilder()); + } + + @BetaApi + private static Builder createHttpJsonDefault() { + return new Builder(ModelServiceStubSettings.newHttpJsonBuilder()); + } + + public ModelServiceStubSettings.Builder getStubSettingsBuilder() { + return ((ModelServiceStubSettings.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 createModel. */ + public UnaryCallSettings.Builder createModelSettings() { + return getStubSettingsBuilder().createModelSettings(); + } + + /** Returns the builder for the settings used for calls to createModel. */ + public OperationCallSettings.Builder + createModelOperationSettings() { + return getStubSettingsBuilder().createModelOperationSettings(); + } + + /** Returns the builder for the settings used for calls to pauseModel. */ + public UnaryCallSettings.Builder pauseModelSettings() { + return getStubSettingsBuilder().pauseModelSettings(); + } + + /** Returns the builder for the settings used for calls to resumeModel. */ + public UnaryCallSettings.Builder resumeModelSettings() { + return getStubSettingsBuilder().resumeModelSettings(); + } + + /** Returns the builder for the settings used for calls to deleteModel. */ + public UnaryCallSettings.Builder deleteModelSettings() { + return getStubSettingsBuilder().deleteModelSettings(); + } + + /** Returns the builder for the settings used for calls to listModels. */ + public PagedCallSettings.Builder + listModelsSettings() { + return getStubSettingsBuilder().listModelsSettings(); + } + + /** Returns the builder for the settings used for calls to updateModel. */ + public UnaryCallSettings.Builder updateModelSettings() { + return getStubSettingsBuilder().updateModelSettings(); + } + + /** Returns the builder for the settings used for calls to tuneModel. */ + public UnaryCallSettings.Builder tuneModelSettings() { + return getStubSettingsBuilder().tuneModelSettings(); + } + + /** Returns the builder for the settings used for calls to tuneModel. */ + public OperationCallSettings.Builder + tuneModelOperationSettings() { + return getStubSettingsBuilder().tuneModelOperationSettings(); + } + + @Override + public ModelServiceSettings build() throws IOException { + return new ModelServiceSettings(this); + } + } +} diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceClient.java index d7f3b524..7aade795 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceClient.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceClient.java @@ -33,8 +33,11 @@ * calls that map to API methods. Sample code to get started: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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()
@@ -81,8 +84,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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))
@@ -94,8 +100,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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 =
@@ -106,8 +115,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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()
  *         .setTransportChannelProvider(
@@ -177,8 +189,11 @@ public PredictionServiceStub getStub() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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()
@@ -209,8 +224,11 @@ public final PredictResponse predict(PredictRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying 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()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceSettings.java
index 540b33d9..480c058b 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceSettings.java
@@ -50,17 +50,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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()
+ *         predictionServiceSettingsBuilder.predictSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * PredictionServiceSettings predictionServiceSettings = predictionServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceClient.java
index 585162e4..5c75f56d 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceClient.java
@@ -48,8 +48,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
  *   BranchName parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
  *   Product product = Product.newBuilder().build();
@@ -87,8 +90,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductServiceSettings productServiceSettings =
  *     ProductServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -99,8 +105,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductServiceSettings productServiceSettings =
  *     ProductServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ProductServiceClient productServiceClient = ProductServiceClient.create(productServiceSettings);
@@ -110,8 +119,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductServiceSettings productServiceSettings =
  *     ProductServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -205,8 +217,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   BranchName parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
    *   Product product = Product.newBuilder().build();
@@ -248,8 +263,11 @@ public final Product createProduct(BranchName parent, Product product, String pr
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString();
    *   Product product = Product.newBuilder().build();
@@ -291,8 +309,11 @@ public final Product createProduct(String parent, Product product, String produc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   CreateProductRequest request =
    *       CreateProductRequest.newBuilder()
@@ -319,8 +340,11 @@ public final Product createProduct(CreateProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   CreateProductRequest request =
    *       CreateProductRequest.newBuilder()
@@ -346,8 +370,11 @@ public final UnaryCallable createProductCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ProductName name =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
@@ -378,8 +405,11 @@ public final Product getProduct(ProductName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String name =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
@@ -410,8 +440,11 @@ public final Product getProduct(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   GetProductRequest request =
    *       GetProductRequest.newBuilder()
@@ -437,8 +470,11 @@ public final Product getProduct(GetProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   GetProductRequest request =
    *       GetProductRequest.newBuilder()
@@ -463,8 +499,11 @@ public final UnaryCallable getProductCallable() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   BranchName parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
    *   for (Product element : productServiceClient.listProducts(parent).iterateAll()) {
@@ -496,8 +535,11 @@ public final ListProductsPagedResponse listProducts(BranchName parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString();
    *   for (Product element : productServiceClient.listProducts(parent).iterateAll()) {
@@ -526,8 +568,11 @@ public final ListProductsPagedResponse listProducts(String parent) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ListProductsRequest request =
    *       ListProductsRequest.newBuilder()
@@ -558,8 +603,11 @@ public final ListProductsPagedResponse listProducts(ListProductsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ListProductsRequest request =
    *       ListProductsRequest.newBuilder()
@@ -591,8 +639,11 @@ public final ListProductsPagedResponse listProducts(ListProductsRequest request)
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ListProductsRequest request =
    *       ListProductsRequest.newBuilder()
@@ -629,8 +680,11 @@ public final UnaryCallable listProduc
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   Product product = Product.newBuilder().build();
    *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -668,8 +722,11 @@ public final Product updateProduct(Product product, FieldMask updateMask) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   UpdateProductRequest request =
    *       UpdateProductRequest.newBuilder()
@@ -695,8 +752,11 @@ public final Product updateProduct(UpdateProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   UpdateProductRequest request =
    *       UpdateProductRequest.newBuilder()
@@ -721,8 +781,11 @@ public final UnaryCallable updateProductCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ProductName name =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
@@ -762,8 +825,11 @@ public final void deleteProduct(ProductName name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String name =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
@@ -803,8 +869,11 @@ public final void deleteProduct(String name) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   DeleteProductRequest request =
    *       DeleteProductRequest.newBuilder()
@@ -830,8 +899,11 @@ public final void deleteProduct(DeleteProductRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   DeleteProductRequest request =
    *       DeleteProductRequest.newBuilder()
@@ -861,8 +933,11 @@ public final UnaryCallable deleteProductCallable()
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ImportProductsRequest request =
    *       ImportProductsRequest.newBuilder()
@@ -898,8 +973,11 @@ public final OperationFuture importProdu
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ImportProductsRequest request =
    *       ImportProductsRequest.newBuilder()
@@ -935,8 +1013,11 @@ public final OperationFuture importProdu
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ImportProductsRequest request =
    *       ImportProductsRequest.newBuilder()
@@ -966,8 +1047,8 @@ public final UnaryCallable importProductsCalla
    *
    * 

This process is asynchronous and does not require the * [Product][google.cloud.retail.v2beta.Product] to exist before updating fulfillment information. - * If the request is valid, the update will be enqueued and processed downstream. As a - * consequence, when a response is returned, updates are not immediately manifested in the + * If the request is valid, the update is enqueued and processed downstream. As a consequence, + * when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. @@ -975,20 +1056,20 @@ public final UnaryCallable importProductsCalla *

When inventory is updated with * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct], the - * specified inventory field value(s) will overwrite any existing value(s) while ignoring the last - * update time for this field. Furthermore, the last update time for the specified inventory - * fields will be overwritten to the time of the + * specified inventory field value(s) overwrite any existing value(s) while ignoring the last + * update time for this field. Furthermore, the last update times for the specified inventory + * fields are overwritten by the times of the * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] or * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * request. * *

If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2beta.CreateProductRequest.product], then - * any pre-existing inventory information for this product will be used. + * any pre-existing inventory information for this product is used. * *

If no inventory fields are set in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask], then - * any existing inventory information will be preserved. + * any existing inventory information is preserved. * *

Pre-existing inventory information can only be updated with * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory], @@ -996,14 +1077,24 @@ public final UnaryCallable importProductsCalla * and * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. * - *

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s is obsolete after one day, and the + * [GetOperation][google.longrunning.Operations.GetOperation] API returns `NOT_FOUND` afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates are not marked as [done][google.longrunning.Operation.done] until they + * are obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   Product inventory = Product.newBuilder().build();
    *   FieldMask setMask = FieldMask.newBuilder().build();
@@ -1083,8 +1174,8 @@ public final OperationFuture setInve
    *
    * 

This process is asynchronous and does not require the * [Product][google.cloud.retail.v2beta.Product] to exist before updating fulfillment information. - * If the request is valid, the update will be enqueued and processed downstream. As a - * consequence, when a response is returned, updates are not immediately manifested in the + * If the request is valid, the update is enqueued and processed downstream. As a consequence, + * when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. @@ -1092,20 +1183,20 @@ public final OperationFuture setInve *

When inventory is updated with * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct], the - * specified inventory field value(s) will overwrite any existing value(s) while ignoring the last - * update time for this field. Furthermore, the last update time for the specified inventory - * fields will be overwritten to the time of the + * specified inventory field value(s) overwrite any existing value(s) while ignoring the last + * update time for this field. Furthermore, the last update times for the specified inventory + * fields are overwritten by the times of the * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] or * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * request. * *

If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2beta.CreateProductRequest.product], then - * any pre-existing inventory information for this product will be used. + * any pre-existing inventory information for this product is used. * *

If no inventory fields are set in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask], then - * any existing inventory information will be preserved. + * any existing inventory information is preserved. * *

Pre-existing inventory information can only be updated with * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory], @@ -1113,14 +1204,24 @@ public final OperationFuture setInve * and * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. * - *

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s is obsolete after one day, and the + * [GetOperation][google.longrunning.Operations.GetOperation] API returns `NOT_FOUND` afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates are not marked as [done][google.longrunning.Operation.done] until they + * are obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   SetInventoryRequest request =
    *       SetInventoryRequest.newBuilder()
@@ -1148,8 +1249,8 @@ public final OperationFuture setInve
    *
    * 

This process is asynchronous and does not require the * [Product][google.cloud.retail.v2beta.Product] to exist before updating fulfillment information. - * If the request is valid, the update will be enqueued and processed downstream. As a - * consequence, when a response is returned, updates are not immediately manifested in the + * If the request is valid, the update is enqueued and processed downstream. As a consequence, + * when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. @@ -1157,20 +1258,20 @@ public final OperationFuture setInve *

When inventory is updated with * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct], the - * specified inventory field value(s) will overwrite any existing value(s) while ignoring the last - * update time for this field. Furthermore, the last update time for the specified inventory - * fields will be overwritten to the time of the + * specified inventory field value(s) overwrite any existing value(s) while ignoring the last + * update time for this field. Furthermore, the last update times for the specified inventory + * fields are overwritten by the times of the * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] or * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * request. * *

If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2beta.CreateProductRequest.product], then - * any pre-existing inventory information for this product will be used. + * any pre-existing inventory information for this product is used. * *

If no inventory fields are set in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask], then - * any existing inventory information will be preserved. + * any existing inventory information is preserved. * *

Pre-existing inventory information can only be updated with * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory], @@ -1178,14 +1279,24 @@ public final OperationFuture setInve * and * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. * - *

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s is obsolete after one day, and the + * [GetOperation][google.longrunning.Operations.GetOperation] API returns `NOT_FOUND` afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates are not marked as [done][google.longrunning.Operation.done] until they + * are obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   SetInventoryRequest request =
    *       SetInventoryRequest.newBuilder()
@@ -1213,8 +1324,8 @@ public final OperationFuture setInve
    *
    * 

This process is asynchronous and does not require the * [Product][google.cloud.retail.v2beta.Product] to exist before updating fulfillment information. - * If the request is valid, the update will be enqueued and processed downstream. As a - * consequence, when a response is returned, updates are not immediately manifested in the + * If the request is valid, the update is enqueued and processed downstream. As a consequence, + * when a response is returned, updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. @@ -1222,20 +1333,20 @@ public final OperationFuture setInve *

When inventory is updated with * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] and * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct], the - * specified inventory field value(s) will overwrite any existing value(s) while ignoring the last - * update time for this field. Furthermore, the last update time for the specified inventory - * fields will be overwritten to the time of the + * specified inventory field value(s) overwrite any existing value(s) while ignoring the last + * update time for this field. Furthermore, the last update times for the specified inventory + * fields are overwritten by the times of the * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] or * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * request. * *

If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2beta.CreateProductRequest.product], then - * any pre-existing inventory information for this product will be used. + * any pre-existing inventory information for this product is used. * *

If no inventory fields are set in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask], then - * any existing inventory information will be preserved. + * any existing inventory information is preserved. * *

Pre-existing inventory information can only be updated with * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory], @@ -1243,14 +1354,24 @@ public final OperationFuture setInve * and * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. * - *

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s is obsolete after one day, and the + * [GetOperation][google.longrunning.Operations.GetOperation] API returns `NOT_FOUND` afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates are not marked as [done][google.longrunning.Operation.done] until they + * are obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   SetInventoryRequest request =
    *       SetInventoryRequest.newBuilder()
@@ -1282,14 +1403,25 @@ public final UnaryCallable setInventoryCallable(
    * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or
    * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ProductName product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
@@ -1328,14 +1460,25 @@ public final UnaryCallable setInventoryCallable(
    * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or
    * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
@@ -1373,14 +1516,25 @@ public final UnaryCallable setInventoryCallable(
    * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or
    * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   AddFulfillmentPlacesRequest request =
    *       AddFulfillmentPlacesRequest.newBuilder()
@@ -1418,14 +1572,25 @@ public final UnaryCallable setInventoryCallable(
    * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or
    * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   AddFulfillmentPlacesRequest request =
    *       AddFulfillmentPlacesRequest.newBuilder()
@@ -1463,14 +1628,25 @@ public final UnaryCallable setInventoryCallable(
    * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or
    * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   AddFulfillmentPlacesRequest request =
    *       AddFulfillmentPlacesRequest.newBuilder()
@@ -1507,14 +1683,25 @@ public final UnaryCallable setInventoryCallable(
    * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or
    * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ProductName product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
@@ -1553,14 +1740,25 @@ public final UnaryCallable setInventoryCallable(
    * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or
    * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
@@ -1598,14 +1796,25 @@ public final UnaryCallable setInventoryCallable(
    * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or
    * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   RemoveFulfillmentPlacesRequest request =
    *       RemoveFulfillmentPlacesRequest.newBuilder()
@@ -1643,14 +1852,25 @@ public final UnaryCallable setInventoryCallable(
    * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or
    * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   RemoveFulfillmentPlacesRequest request =
    *       RemoveFulfillmentPlacesRequest.newBuilder()
@@ -1690,14 +1910,25 @@ public final UnaryCallable setInventoryCallable(
    * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] or
    * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   RemoveFulfillmentPlacesRequest request =
    *       RemoveFulfillmentPlacesRequest.newBuilder()
@@ -1739,14 +1970,25 @@ public final UnaryCallable setInventoryCallable(
    * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no
    * effect on local inventories.
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ProductName product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
@@ -1790,14 +2032,25 @@ public final UnaryCallable setInventoryCallable(
    * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no
    * effect on local inventories.
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
@@ -1840,14 +2093,25 @@ public final UnaryCallable setInventoryCallable(
    * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no
    * effect on local inventories.
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   AddLocalInventoriesRequest request =
    *       AddLocalInventoriesRequest.newBuilder()
@@ -1890,14 +2154,25 @@ public final UnaryCallable setInventoryCallable(
    * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no
    * effect on local inventories.
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   AddLocalInventoriesRequest request =
    *       AddLocalInventoriesRequest.newBuilder()
@@ -1940,14 +2215,25 @@ public final UnaryCallable setInventoryCallable(
    * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no
    * effect on local inventories.
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   AddLocalInventoriesRequest request =
    *       AddLocalInventoriesRequest.newBuilder()
@@ -1986,14 +2272,25 @@ public final UnaryCallable addLocalInvent
    * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no
    * effect on local inventories.
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   ProductName product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
@@ -2035,14 +2332,25 @@ public final UnaryCallable addLocalInvent
    * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no
    * effect on local inventories.
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   String product =
    *       ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
@@ -2083,14 +2391,25 @@ public final UnaryCallable addLocalInvent
    * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no
    * effect on local inventories.
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   RemoveLocalInventoriesRequest request =
    *       RemoveLocalInventoriesRequest.newBuilder()
@@ -2130,14 +2449,25 @@ public final UnaryCallable addLocalInvent
    * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no
    * effect on local inventories.
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   RemoveLocalInventoriesRequest request =
    *       RemoveLocalInventoriesRequest.newBuilder()
@@ -2179,14 +2509,25 @@ public final UnaryCallable addLocalInvent
    * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] has no
    * effect on local inventories.
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

The returned [Operation][google.longrunning.Operation]s will be obsolete after 1 day, and + * [GetOperation][google.longrunning.Operations.GetOperation] API will return NOT_FOUND + * afterwards. + * + *

If conflicting updates are issued, the [Operation][google.longrunning.Operation]s associated + * with the stale updates will not be marked as [done][google.longrunning.Operation.done] until + * being obsolete. + * + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
    *   RemoveLocalInventoriesRequest request =
    *       RemoveLocalInventoriesRequest.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceSettings.java
index 0beba68d..a524992c 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ProductServiceSettings.java
@@ -56,17 +56,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductServiceSettings.Builder productServiceSettingsBuilder =
  *     ProductServiceSettings.newBuilder();
  * productServiceSettingsBuilder
  *     .createProductSettings()
  *     .setRetrySettings(
- *         productServiceSettingsBuilder
- *             .createProductSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         productServiceSettingsBuilder.createProductSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ProductServiceSettings productServiceSettings = productServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/SearchServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/SearchServiceClient.java
index 2fc1ffd6..517e61ee 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/SearchServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/SearchServiceClient.java
@@ -37,15 +37,18 @@
 /**
  * Service Description: Service for search.
  *
- * 

This feature is only available for users who have Retail Search enabled. Please enable Retail - * Search on Cloud Console before using this feature. + *

This feature is only available for users who have Retail Search enabled. Enable Retail Search + * on Cloud Console before using this feature. * *

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 for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
  *   SearchRequest request =
  *       SearchRequest.newBuilder()
@@ -106,8 +109,11 @@
  * 

To customize credentials: * *

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

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * SearchServiceSettings searchServiceSettings =
  *     SearchServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * SearchServiceClient searchServiceClient = SearchServiceClient.create(searchServiceSettings);
@@ -129,8 +138,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * SearchServiceSettings searchServiceSettings =
  *     SearchServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -196,14 +208,17 @@ public SearchServiceStub getStub() {
   /**
    * Performs a search.
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
    *   SearchRequest request =
    *       SearchRequest.newBuilder()
@@ -246,14 +261,17 @@ public final SearchPagedResponse search(SearchRequest request) {
   /**
    * Performs a search.
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
    *   SearchRequest request =
    *       SearchRequest.newBuilder()
@@ -296,14 +314,17 @@ public final UnaryCallable searchPagedCallab
   /**
    * Performs a search.
    *
-   * 

This feature is only available for users who have Retail Search enabled. Please enable - * Retail Search on Cloud Console before using this feature. + *

This feature is only available for users who have Retail Search enabled. Enable Retail + * Search on Cloud Console before using this feature. * *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
    *   SearchRequest request =
    *       SearchRequest.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/SearchServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/SearchServiceSettings.java
index 408f51be..12ddd133 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/SearchServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/SearchServiceSettings.java
@@ -53,16 +53,16 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * SearchServiceSettings.Builder searchServiceSettingsBuilder = SearchServiceSettings.newBuilder();
  * searchServiceSettingsBuilder
  *     .searchSettings()
  *     .setRetrySettings(
- *         searchServiceSettingsBuilder
- *             .searchSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         searchServiceSettingsBuilder.searchSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * SearchServiceSettings searchServiceSettings = searchServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ServingConfigServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ServingConfigServiceClient.java
index c9ed82ae..6c1a1739 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ServingConfigServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ServingConfigServiceClient.java
@@ -43,8 +43,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ServingConfigServiceClient servingConfigServiceClient =
  *     ServingConfigServiceClient.create()) {
  *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
@@ -85,8 +88,11 @@
  * 

To customize credentials: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ServingConfigServiceSettings servingConfigServiceSettings =
  *     ServingConfigServiceSettings.newBuilder()
  *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
@@ -98,8 +104,11 @@
  * 

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ServingConfigServiceSettings servingConfigServiceSettings =
  *     ServingConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * ServingConfigServiceClient servingConfigServiceClient =
@@ -110,8 +119,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ServingConfigServiceSettings servingConfigServiceSettings =
  *     ServingConfigServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -185,8 +197,11 @@ public ServingConfigServiceStub getStub() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
@@ -227,8 +242,11 @@ public final ServingConfig createServingConfig(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
@@ -269,8 +287,11 @@ public final ServingConfig createServingConfig(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   CreateServingConfigRequest request =
@@ -301,8 +322,11 @@ public final ServingConfig createServingConfig(CreateServingConfigRequest reques
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   CreateServingConfigRequest request =
@@ -332,8 +356,11 @@ public final ServingConfig createServingConfig(CreateServingConfigRequest reques
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ServingConfigName name =
@@ -343,7 +370,7 @@ public final ServingConfig createServingConfig(CreateServingConfigRequest reques
    * }
* * @param name Required. The resource name of the ServingConfig to delete. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteServingConfig(ServingConfigName name) { @@ -363,8 +390,11 @@ public final void deleteServingConfig(ServingConfigName name) { *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   String name =
@@ -375,7 +405,7 @@ public final void deleteServingConfig(ServingConfigName name) {
    * }
* * @param name Required. The resource name of the ServingConfig to delete. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final void deleteServingConfig(String name) { @@ -393,8 +423,11 @@ public final void deleteServingConfig(String name) { *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   DeleteServingConfigRequest request =
@@ -423,8 +456,11 @@ public final void deleteServingConfig(DeleteServingConfigRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   DeleteServingConfigRequest request =
@@ -451,8 +487,11 @@ public final UnaryCallable deleteServingConfi
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ServingConfig servingConfig = ServingConfig.newBuilder().build();
@@ -489,8 +528,11 @@ public final ServingConfig updateServingConfig(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   UpdateServingConfigRequest request =
@@ -516,8 +558,11 @@ public final ServingConfig updateServingConfig(UpdateServingConfigRequest reques
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   UpdateServingConfigRequest request =
@@ -546,8 +591,11 @@ public final ServingConfig updateServingConfig(UpdateServingConfigRequest reques
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ServingConfigName name =
@@ -557,7 +605,7 @@ public final ServingConfig updateServingConfig(UpdateServingConfigRequest reques
    * }
* * @param name Required. The resource name of the ServingConfig to get. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ServingConfig getServingConfig(ServingConfigName name) { @@ -575,8 +623,11 @@ public final ServingConfig getServingConfig(ServingConfigName name) { *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   String name =
@@ -587,7 +638,7 @@ public final ServingConfig getServingConfig(ServingConfigName name) {
    * }
* * @param name Required. The resource name of the ServingConfig to get. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ServingConfig getServingConfig(String name) { @@ -604,8 +655,11 @@ public final ServingConfig getServingConfig(String name) { *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   GetServingConfigRequest request =
@@ -634,8 +688,11 @@ public final ServingConfig getServingConfig(GetServingConfigRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   GetServingConfigRequest request =
@@ -662,8 +719,11 @@ public final UnaryCallable getServingCon
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
@@ -675,7 +735,7 @@ public final UnaryCallable getServingCon
    * }
* * @param parent Required. The catalog resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListServingConfigsPagedResponse listServingConfigs(CatalogName parent) { @@ -693,8 +753,11 @@ public final ListServingConfigsPagedResponse listServingConfigs(CatalogName pare *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
@@ -706,7 +769,7 @@ public final ListServingConfigsPagedResponse listServingConfigs(CatalogName pare
    * }
* * @param parent Required. The catalog resource name. Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ListServingConfigsPagedResponse listServingConfigs(String parent) { @@ -722,8 +785,11 @@ public final ListServingConfigsPagedResponse listServingConfigs(String parent) { *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ListServingConfigsRequest request =
@@ -754,8 +820,11 @@ public final ListServingConfigsPagedResponse listServingConfigs(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ListServingConfigsRequest request =
@@ -785,8 +854,11 @@ public final ListServingConfigsPagedResponse listServingConfigs(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ListServingConfigsRequest request =
@@ -827,8 +899,11 @@ public final ListServingConfigsPagedResponse listServingConfigs(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ServingConfigName servingConfig =
@@ -838,7 +913,7 @@ public final ListServingConfigsPagedResponse listServingConfigs(
    * }
* * @param servingConfig Required. The source ServingConfig resource name . Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ServingConfig addControl(ServingConfigName servingConfig) { @@ -860,8 +935,11 @@ public final ServingConfig addControl(ServingConfigName servingConfig) { *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   String servingConfig =
@@ -872,7 +950,7 @@ public final ServingConfig addControl(ServingConfigName servingConfig) {
    * }
* * @param servingConfig Required. The source ServingConfig resource name . Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ServingConfig addControl(String servingConfig) { @@ -892,8 +970,11 @@ public final ServingConfig addControl(String servingConfig) { *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   AddControlRequest request =
@@ -925,8 +1006,11 @@ public final ServingConfig addControl(AddControlRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   AddControlRequest request =
@@ -955,8 +1039,11 @@ public final UnaryCallable addControlCallable(
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   ServingConfigName servingConfig =
@@ -966,7 +1053,7 @@ public final UnaryCallable addControlCallable(
    * }
* * @param servingConfig Required. The source ServingConfig resource name . Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ServingConfig removeControl(ServingConfigName servingConfig) { @@ -985,8 +1072,11 @@ public final ServingConfig removeControl(ServingConfigName servingConfig) { *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   String servingConfig =
@@ -997,7 +1087,7 @@ public final ServingConfig removeControl(ServingConfigName servingConfig) {
    * }
* * @param servingConfig Required. The source ServingConfig resource name . Format: - * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id} + * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}` * @throws com.google.api.gax.rpc.ApiException if the remote call fails */ public final ServingConfig removeControl(String servingConfig) { @@ -1014,8 +1104,11 @@ public final ServingConfig removeControl(String servingConfig) { *

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   RemoveControlRequest request =
@@ -1044,8 +1137,11 @@ public final ServingConfig removeControl(RemoveControlRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (ServingConfigServiceClient servingConfigServiceClient =
    *     ServingConfigServiceClient.create()) {
    *   RemoveControlRequest request =
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ServingConfigServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ServingConfigServiceSettings.java
index 641d2d3f..44116d0c 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ServingConfigServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/ServingConfigServiceSettings.java
@@ -54,8 +54,11 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ServingConfigServiceSettings.Builder servingConfigServiceSettingsBuilder =
  *     ServingConfigServiceSettings.newBuilder();
  * servingConfigServiceSettingsBuilder
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceClient.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceClient.java
index 317ccaf7..4de92b62 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceClient.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceClient.java
@@ -38,8 +38,11 @@
  * calls that map to API methods. Sample code to get started:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
  *   WriteUserEventRequest request =
  *       WriteUserEventRequest.newBuilder()
@@ -80,8 +83,11 @@
  * 

To customize credentials: * *

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

To customize the endpoint: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * UserEventServiceSettings userEventServiceSettings =
  *     UserEventServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
  * UserEventServiceClient userEventServiceClient =
@@ -105,8 +114,11 @@
  * the wire:
  *
  * 
{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * UserEventServiceSettings userEventServiceSettings =
  *     UserEventServiceSettings.newBuilder()
  *         .setTransportChannelProvider(
@@ -201,8 +213,11 @@ public final OperationsClient getHttpJsonOperationsClient() {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   WriteUserEventRequest request =
    *       WriteUserEventRequest.newBuilder()
@@ -227,8 +242,11 @@ public final UserEvent writeUserEvent(WriteUserEventRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   WriteUserEventRequest request =
    *       WriteUserEventRequest.newBuilder()
@@ -257,8 +275,11 @@ public final UnaryCallable writeUserEventCalla
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   CollectUserEventRequest request =
    *       CollectUserEventRequest.newBuilder()
@@ -289,8 +310,11 @@ public final HttpBody collectUserEvent(CollectUserEventRequest request) {
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   CollectUserEventRequest request =
    *       CollectUserEventRequest.newBuilder()
@@ -319,8 +343,11 @@ public final UnaryCallable collectUserEventCa
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   PurgeUserEventsRequest request =
    *       PurgeUserEventsRequest.newBuilder()
@@ -349,8 +376,11 @@ public final OperationFuture purgeUserEv
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   PurgeUserEventsRequest request =
    *       PurgeUserEventsRequest.newBuilder()
@@ -379,8 +409,11 @@ public final OperationFuture purgeUserEv
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   PurgeUserEventsRequest request =
    *       PurgeUserEventsRequest.newBuilder()
@@ -404,14 +437,17 @@ public final UnaryCallable purgeUserEventsCal
    * Bulk import of User events. Request processing might be synchronous. Events that already exist
    * are skipped. Use this method for backfilling historical user events.
    *
-   * 

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

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

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   ImportUserEventsRequest request =
    *       ImportUserEventsRequest.newBuilder()
@@ -437,14 +473,17 @@ public final OperationFuture importUse
    * Bulk import of User events. Request processing might be synchronous. Events that already exist
    * are skipped. Use this method for backfilling historical user events.
    *
-   * 

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

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

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   ImportUserEventsRequest request =
    *       ImportUserEventsRequest.newBuilder()
@@ -469,14 +508,17 @@ public final OperationFuture importUse
    * Bulk import of User events. Request processing might be synchronous. Events that already exist
    * are skipped. Use this method for backfilling historical user events.
    *
-   * 

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

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

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   ImportUserEventsRequest request =
    *       ImportUserEventsRequest.newBuilder()
@@ -497,18 +539,21 @@ public final UnaryCallable importUserEventsC
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD.
   /**
-   * Starts a user event rejoin operation with latest product catalog. Events will not be annotated
-   * with detailed product information if product is missing from the catalog at the time the user
-   * event is ingested, and these events are stored as unjoined events with a limited usage on
-   * training and serving. This method can be used to start a join operation on specified events
-   * with latest version of product catalog. It can also be used to correct events joined with the
+   * Starts a user-event rejoin operation with latest product catalog. Events are not annotated with
+   * detailed product information for products that are missing from the catalog when the user event
+   * is ingested. These events are stored as unjoined events with limited usage on training and
+   * serving. You can use this method to start a join operation on specified events with the latest
+   * version of product catalog. You can also use this method to correct events joined with the
    * wrong product catalog. A rejoin operation can take hours or days to complete.
    *
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   RejoinUserEventsRequest request =
    *       RejoinUserEventsRequest.newBuilder().setParent("parent-995424086").build();
@@ -527,18 +572,21 @@ public final UnaryCallable importUserEventsC
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD.
   /**
-   * Starts a user event rejoin operation with latest product catalog. Events will not be annotated
-   * with detailed product information if product is missing from the catalog at the time the user
-   * event is ingested, and these events are stored as unjoined events with a limited usage on
-   * training and serving. This method can be used to start a join operation on specified events
-   * with latest version of product catalog. It can also be used to correct events joined with the
+   * Starts a user-event rejoin operation with latest product catalog. Events are not annotated with
+   * detailed product information for products that are missing from the catalog when the user event
+   * is ingested. These events are stored as unjoined events with limited usage on training and
+   * serving. You can use this method to start a join operation on specified events with the latest
+   * version of product catalog. You can also use this method to correct events joined with the
    * wrong product catalog. A rejoin operation can take hours or days to complete.
    *
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   RejoinUserEventsRequest request =
    *       RejoinUserEventsRequest.newBuilder().setParent("parent-995424086").build();
@@ -557,18 +605,21 @@ public final UnaryCallable importUserEventsC
 
   // AUTO-GENERATED DOCUMENTATION AND METHOD.
   /**
-   * Starts a user event rejoin operation with latest product catalog. Events will not be annotated
-   * with detailed product information if product is missing from the catalog at the time the user
-   * event is ingested, and these events are stored as unjoined events with a limited usage on
-   * training and serving. This method can be used to start a join operation on specified events
-   * with latest version of product catalog. It can also be used to correct events joined with the
+   * Starts a user-event rejoin operation with latest product catalog. Events are not annotated with
+   * detailed product information for products that are missing from the catalog when the user event
+   * is ingested. These events are stored as unjoined events with limited usage on training and
+   * serving. You can use this method to start a join operation on specified events with the latest
+   * version of product catalog. You can also use this method to correct events joined with the
    * wrong product catalog. A rejoin operation can take hours or days to complete.
    *
    * 

Sample code: * *

{@code
-   * // This snippet has been automatically generated for illustrative purposes only.
-   * // It may require modifications to work in your environment.
+   * // This snippet has been automatically generated and should be regarded as a code template only.
+   * // It will require modifications to work:
+   * // - It may require correct/in-range values for request initialization.
+   * // - It may require specifying regional endpoints when creating the service client as shown in
+   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
    * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
    *   RejoinUserEventsRequest request =
    *       RejoinUserEventsRequest.newBuilder().setParent("parent-995424086").build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceSettings.java
index 527b38cf..b8706cd1 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceSettings.java
@@ -53,17 +53,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * UserEventServiceSettings.Builder userEventServiceSettingsBuilder =
  *     UserEventServiceSettings.newBuilder();
  * userEventServiceSettingsBuilder
  *     .writeUserEventSettings()
  *     .setRetrySettings(
- *         userEventServiceSettingsBuilder
- *             .writeUserEventSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         userEventServiceSettingsBuilder.writeUserEventSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * UserEventServiceSettings userEventServiceSettings = userEventServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/gapic_metadata.json b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/gapic_metadata.json
index e5e1a255..33d1590f 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/gapic_metadata.json
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/gapic_metadata.json
@@ -13,6 +13,9 @@
             "AddCatalogAttribute": {
               "methods": ["addCatalogAttribute", "addCatalogAttributeCallable"]
             },
+            "BatchRemoveCatalogAttributes": {
+              "methods": ["batchRemoveCatalogAttributes", "batchRemoveCatalogAttributesCallable"]
+            },
             "GetAttributesConfig": {
               "methods": ["getAttributesConfig", "getAttributesConfig", "getAttributesConfig", "getAttributesConfigCallable"]
             },
@@ -86,6 +89,36 @@
         }
       }
     },
+    "ModelService": {
+      "clients": {
+        "grpc": {
+          "libraryClient": "ModelServiceClient",
+          "rpcs": {
+            "CreateModel": {
+              "methods": ["createModelAsync", "createModelAsync", "createModelAsync", "createModelOperationCallable", "createModelCallable"]
+            },
+            "DeleteModel": {
+              "methods": ["deleteModel", "deleteModel", "deleteModel", "deleteModelCallable"]
+            },
+            "ListModels": {
+              "methods": ["listModels", "listModels", "listModels", "listModelsPagedCallable", "listModelsCallable"]
+            },
+            "PauseModel": {
+              "methods": ["pauseModel", "pauseModel", "pauseModel", "pauseModelCallable"]
+            },
+            "ResumeModel": {
+              "methods": ["resumeModel", "resumeModel", "resumeModelCallable"]
+            },
+            "TuneModel": {
+              "methods": ["tuneModelAsync", "tuneModelAsync", "tuneModelAsync", "tuneModelOperationCallable", "tuneModelCallable"]
+            },
+            "UpdateModel": {
+              "methods": ["updateModel", "updateModel", "updateModelCallable"]
+            }
+          }
+        }
+      }
+    },
     "PredictionService": {
       "clients": {
         "grpc": {
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/package-info.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/package-info.java
index a28b6961..de9069f7 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/package-info.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/package-info.java
@@ -26,8 +26,11 @@
  * 

Sample for CatalogServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
  *   Catalog catalog = Catalog.newBuilder().build();
  *   FieldMask updateMask = FieldMask.newBuilder().build();
@@ -39,14 +42,17 @@
  *
  * 

Service Description: Auto-completion service for retail. * - *

This feature is only available for users who have Retail Search enabled. Please enable Retail - * Search on Cloud Console before using this feature. + *

This feature is only available for users who have Retail Search enabled. Enable Retail Search + * on Cloud Console before using this feature. * *

Sample for CompletionServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
  *   CompleteQueryRequest request =
  *       CompleteQueryRequest.newBuilder()
@@ -69,8 +75,11 @@
  * 

Sample for ControlServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
  *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
  *   Control control = Control.newBuilder().build();
@@ -79,6 +88,36 @@
  * }
  * }
* + *

======================= ModelServiceClient ======================= + * + *

Service Description: Service for performing CRUD operations on models. Recommendation models + * contain all the metadata necessary to generate a set of models for the `Predict()` API. A model + * is queried indirectly via a ServingConfig, which associates a model with a given Placement (e.g. + * Frequently Bought Together on Home Page). + * + *

This service allows you to do the following: + * + *

    + *
  • Initiate training of a model. + *
  • Pause training of an existing model. + *
  • List all the available models along with their metadata. + *
  • Control their tuning schedule. + *
+ * + *

Sample for ModelServiceClient: + * + *

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

======================= PredictionServiceClient ======================= * *

Service Description: Service for making recommendation prediction. @@ -86,8 +125,11 @@ *

Sample for PredictionServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying 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()
@@ -112,8 +154,11 @@
  * 

Sample for ProductServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
  *   BranchName parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
  *   Product product = Product.newBuilder().build();
@@ -126,14 +171,17 @@
  *
  * 

Service Description: Service for search. * - *

This feature is only available for users who have Retail Search enabled. Please enable Retail - * Search on Cloud Console before using this feature. + *

This feature is only available for users who have Retail Search enabled. Enable Retail Search + * on Cloud Console before using this feature. * *

Sample for SearchServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
  *   SearchRequest request =
  *       SearchRequest.newBuilder()
@@ -172,8 +220,11 @@
  * 

Sample for ServingConfigServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (ServingConfigServiceClient servingConfigServiceClient =
  *     ServingConfigServiceClient.create()) {
  *   CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
@@ -191,8 +242,11 @@
  * 

Sample for UserEventServiceClient: * *

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
  *   WriteUserEventRequest request =
  *       WriteUserEventRequest.newBuilder()
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CatalogServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CatalogServiceStub.java
index dc42b194..31438aaf 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CatalogServiceStub.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CatalogServiceStub.java
@@ -23,6 +23,8 @@
 import com.google.api.gax.rpc.UnaryCallable;
 import com.google.cloud.retail.v2beta.AddCatalogAttributeRequest;
 import com.google.cloud.retail.v2beta.AttributesConfig;
+import com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest;
+import com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse;
 import com.google.cloud.retail.v2beta.Catalog;
 import com.google.cloud.retail.v2beta.CompletionConfig;
 import com.google.cloud.retail.v2beta.GetAttributesConfigRequest;
@@ -98,6 +100,12 @@ public UnaryCallable addCatalogAtt
     throw new UnsupportedOperationException("Not implemented: removeCatalogAttributeCallable()");
   }
 
+  public UnaryCallable
+      batchRemoveCatalogAttributesCallable() {
+    throw new UnsupportedOperationException(
+        "Not implemented: batchRemoveCatalogAttributesCallable()");
+  }
+
   public UnaryCallable
       replaceCatalogAttributeCallable() {
     throw new UnsupportedOperationException("Not implemented: replaceCatalogAttributeCallable()");
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CatalogServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CatalogServiceStubSettings.java
index ea6b765d..7e771567 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CatalogServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CatalogServiceStubSettings.java
@@ -45,6 +45,8 @@
 import com.google.api.gax.rpc.UnaryCallable;
 import com.google.cloud.retail.v2beta.AddCatalogAttributeRequest;
 import com.google.cloud.retail.v2beta.AttributesConfig;
+import com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest;
+import com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse;
 import com.google.cloud.retail.v2beta.Catalog;
 import com.google.cloud.retail.v2beta.CompletionConfig;
 import com.google.cloud.retail.v2beta.GetAttributesConfigRequest;
@@ -87,17 +89,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CatalogServiceStubSettings.Builder catalogServiceSettingsBuilder =
  *     CatalogServiceStubSettings.newBuilder();
  * catalogServiceSettingsBuilder
  *     .updateCatalogSettings()
  *     .setRetrySettings(
- *         catalogServiceSettingsBuilder
- *             .updateCatalogSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         catalogServiceSettingsBuilder.updateCatalogSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * CatalogServiceStubSettings catalogServiceSettings = catalogServiceSettingsBuilder.build();
@@ -129,6 +131,9 @@ public class CatalogServiceStubSettings extends StubSettings
       removeCatalogAttributeSettings;
+  private final UnaryCallSettings<
+          BatchRemoveCatalogAttributesRequest, BatchRemoveCatalogAttributesResponse>
+      batchRemoveCatalogAttributesSettings;
   private final UnaryCallSettings
       replaceCatalogAttributeSettings;
 
@@ -243,6 +248,13 @@ public UnaryCallSettings setDefaultBranchSetting
     return removeCatalogAttributeSettings;
   }
 
+  /** Returns the object with the settings used for calls to batchRemoveCatalogAttributes. */
+  public UnaryCallSettings<
+          BatchRemoveCatalogAttributesRequest, BatchRemoveCatalogAttributesResponse>
+      batchRemoveCatalogAttributesSettings() {
+    return batchRemoveCatalogAttributesSettings;
+  }
+
   /** Returns the object with the settings used for calls to replaceCatalogAttribute. */
   public UnaryCallSettings
       replaceCatalogAttributeSettings() {
@@ -365,6 +377,8 @@ protected CatalogServiceStubSettings(Builder settingsBuilder) throws IOException
     updateAttributesConfigSettings = settingsBuilder.updateAttributesConfigSettings().build();
     addCatalogAttributeSettings = settingsBuilder.addCatalogAttributeSettings().build();
     removeCatalogAttributeSettings = settingsBuilder.removeCatalogAttributeSettings().build();
+    batchRemoveCatalogAttributesSettings =
+        settingsBuilder.batchRemoveCatalogAttributesSettings().build();
     replaceCatalogAttributeSettings = settingsBuilder.replaceCatalogAttributeSettings().build();
   }
 
@@ -391,6 +405,9 @@ public static class Builder extends StubSettings.Builder
         removeCatalogAttributeSettings;
+    private final UnaryCallSettings.Builder<
+            BatchRemoveCatalogAttributesRequest, BatchRemoveCatalogAttributesResponse>
+        batchRemoveCatalogAttributesSettings;
     private final UnaryCallSettings.Builder
         replaceCatalogAttributeSettings;
     private static final ImmutableMap>
@@ -443,6 +460,7 @@ protected Builder(ClientContext clientContext) {
       updateAttributesConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
       addCatalogAttributeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
       removeCatalogAttributeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
+      batchRemoveCatalogAttributesSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
       replaceCatalogAttributeSettings = UnaryCallSettings.newUnaryCallSettingsBuilder();
 
       unaryMethodSettingsBuilders =
@@ -457,6 +475,7 @@ protected Builder(ClientContext clientContext) {
               updateAttributesConfigSettings,
               addCatalogAttributeSettings,
               removeCatalogAttributeSettings,
+              batchRemoveCatalogAttributesSettings,
               replaceCatalogAttributeSettings);
       initDefaults(this);
     }
@@ -474,6 +493,8 @@ protected Builder(CatalogServiceStubSettings settings) {
       updateAttributesConfigSettings = settings.updateAttributesConfigSettings.toBuilder();
       addCatalogAttributeSettings = settings.addCatalogAttributeSettings.toBuilder();
       removeCatalogAttributeSettings = settings.removeCatalogAttributeSettings.toBuilder();
+      batchRemoveCatalogAttributesSettings =
+          settings.batchRemoveCatalogAttributesSettings.toBuilder();
       replaceCatalogAttributeSettings = settings.replaceCatalogAttributeSettings.toBuilder();
 
       unaryMethodSettingsBuilders =
@@ -488,6 +509,7 @@ protected Builder(CatalogServiceStubSettings settings) {
               updateAttributesConfigSettings,
               addCatalogAttributeSettings,
               removeCatalogAttributeSettings,
+              batchRemoveCatalogAttributesSettings,
               replaceCatalogAttributeSettings);
     }
 
@@ -568,6 +590,11 @@ private static Builder initDefaults(Builder builder) {
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
           .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
 
+      builder
+          .batchRemoveCatalogAttributesSettings()
+          .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
+          .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params"));
+
       builder
           .replaceCatalogAttributeSettings()
           .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes"))
@@ -650,6 +677,13 @@ public UnaryCallSettings.Builder setDefaultBranc
       return removeCatalogAttributeSettings;
     }
 
+    /** Returns the builder for the settings used for calls to batchRemoveCatalogAttributes. */
+    public UnaryCallSettings.Builder<
+            BatchRemoveCatalogAttributesRequest, BatchRemoveCatalogAttributesResponse>
+        batchRemoveCatalogAttributesSettings() {
+      return batchRemoveCatalogAttributesSettings;
+    }
+
     /** Returns the builder for the settings used for calls to replaceCatalogAttribute. */
     public UnaryCallSettings.Builder
         replaceCatalogAttributeSettings() {
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CompletionServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CompletionServiceStubSettings.java
index db28316a..d1a6663e 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CompletionServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/CompletionServiceStubSettings.java
@@ -71,17 +71,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * CompletionServiceStubSettings.Builder completionServiceSettingsBuilder =
  *     CompletionServiceStubSettings.newBuilder();
  * completionServiceSettingsBuilder
  *     .completeQuerySettings()
  *     .setRetrySettings(
- *         completionServiceSettingsBuilder
- *             .completeQuerySettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         completionServiceSettingsBuilder.completeQuerySettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * CompletionServiceStubSettings completionServiceSettings =
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ControlServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ControlServiceStubSettings.java
index 70f48e46..153d5e48 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ControlServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ControlServiceStubSettings.java
@@ -77,17 +77,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ControlServiceStubSettings.Builder controlServiceSettingsBuilder =
  *     ControlServiceStubSettings.newBuilder();
  * controlServiceSettingsBuilder
  *     .createControlSettings()
  *     .setRetrySettings(
- *         controlServiceSettingsBuilder
- *             .createControlSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         controlServiceSettingsBuilder.createControlSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ControlServiceStubSettings controlServiceSettings = controlServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/GrpcCatalogServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/GrpcCatalogServiceStub.java
index 67facb2d..2fc8564e 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/GrpcCatalogServiceStub.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/GrpcCatalogServiceStub.java
@@ -27,6 +27,8 @@
 import com.google.api.gax.rpc.UnaryCallable;
 import com.google.cloud.retail.v2beta.AddCatalogAttributeRequest;
 import com.google.cloud.retail.v2beta.AttributesConfig;
+import com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest;
+import com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse;
 import com.google.cloud.retail.v2beta.Catalog;
 import com.google.cloud.retail.v2beta.CompletionConfig;
 import com.google.cloud.retail.v2beta.GetAttributesConfigRequest;
@@ -160,6 +162,21 @@ public class GrpcCatalogServiceStub extends CatalogServiceStub {
               .setResponseMarshaller(ProtoUtils.marshaller(AttributesConfig.getDefaultInstance()))
               .build();
 
+  private static final MethodDescriptor<
+          BatchRemoveCatalogAttributesRequest, BatchRemoveCatalogAttributesResponse>
+      batchRemoveCatalogAttributesMethodDescriptor =
+          MethodDescriptor
+              .
+                  newBuilder()
+              .setType(MethodDescriptor.MethodType.UNARY)
+              .setFullMethodName(
+                  "google.cloud.retail.v2beta.CatalogService/BatchRemoveCatalogAttributes")
+              .setRequestMarshaller(
+                  ProtoUtils.marshaller(BatchRemoveCatalogAttributesRequest.getDefaultInstance()))
+              .setResponseMarshaller(
+                  ProtoUtils.marshaller(BatchRemoveCatalogAttributesResponse.getDefaultInstance()))
+              .build();
+
   private static final MethodDescriptor
       replaceCatalogAttributeMethodDescriptor =
           MethodDescriptor.newBuilder()
@@ -190,6 +207,9 @@ public class GrpcCatalogServiceStub extends CatalogServiceStub {
       addCatalogAttributeCallable;
   private final UnaryCallable
       removeCatalogAttributeCallable;
+  private final UnaryCallable<
+          BatchRemoveCatalogAttributesRequest, BatchRemoveCatalogAttributesResponse>
+      batchRemoveCatalogAttributesCallable;
   private final UnaryCallable
       replaceCatalogAttributeCallable;
 
@@ -350,6 +370,20 @@ protected GrpcCatalogServiceStub(
                       return params.build();
                     })
                 .build();
+    GrpcCallSettings
+        batchRemoveCatalogAttributesTransportSettings =
+            GrpcCallSettings
+                .
+                    newBuilder()
+                .setMethodDescriptor(batchRemoveCatalogAttributesMethodDescriptor)
+                .setParamsExtractor(
+                    request -> {
+                      ImmutableMap.Builder params = ImmutableMap.builder();
+                      params.put(
+                          "attributes_config", String.valueOf(request.getAttributesConfig()));
+                      return params.build();
+                    })
+                .build();
     GrpcCallSettings
         replaceCatalogAttributeTransportSettings =
             GrpcCallSettings.newBuilder()
@@ -408,6 +442,11 @@ protected GrpcCatalogServiceStub(
             removeCatalogAttributeTransportSettings,
             settings.removeCatalogAttributeSettings(),
             clientContext);
+    this.batchRemoveCatalogAttributesCallable =
+        callableFactory.createUnaryCallable(
+            batchRemoveCatalogAttributesTransportSettings,
+            settings.batchRemoveCatalogAttributesSettings(),
+            clientContext);
     this.replaceCatalogAttributeCallable =
         callableFactory.createUnaryCallable(
             replaceCatalogAttributeTransportSettings,
@@ -481,6 +520,12 @@ public UnaryCallable addCatalogAtt
     return removeCatalogAttributeCallable;
   }
 
+  @Override
+  public UnaryCallable
+      batchRemoveCatalogAttributesCallable() {
+    return batchRemoveCatalogAttributesCallable;
+  }
+
   @Override
   public UnaryCallable
       replaceCatalogAttributeCallable() {
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/GrpcModelServiceCallableFactory.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/GrpcModelServiceCallableFactory.java
new file mode 100644
index 00000000..f24c937d
--- /dev/null
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/GrpcModelServiceCallableFactory.java
@@ -0,0 +1,115 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.stub;
+
+import com.google.api.core.BetaApi;
+import com.google.api.gax.grpc.GrpcCallSettings;
+import com.google.api.gax.grpc.GrpcCallableFactory;
+import com.google.api.gax.grpc.GrpcStubCallableFactory;
+import com.google.api.gax.rpc.BatchingCallSettings;
+import com.google.api.gax.rpc.BidiStreamingCallable;
+import com.google.api.gax.rpc.ClientContext;
+import com.google.api.gax.rpc.ClientStreamingCallable;
+import com.google.api.gax.rpc.OperationCallSettings;
+import com.google.api.gax.rpc.OperationCallable;
+import com.google.api.gax.rpc.PagedCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallSettings;
+import com.google.api.gax.rpc.ServerStreamingCallable;
+import com.google.api.gax.rpc.StreamingCallSettings;
+import com.google.api.gax.rpc.UnaryCallSettings;
+import com.google.api.gax.rpc.UnaryCallable;
+import com.google.longrunning.Operation;
+import com.google.longrunning.stub.OperationsStub;
+import javax.annotation.Generated;
+
+// AUTO-GENERATED DOCUMENTATION AND CLASS.
+/**
+ * gRPC callable factory implementation for the ModelService service API.
+ *
+ * 

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcModelServiceCallableFactory 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/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/GrpcModelServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/GrpcModelServiceStub.java new file mode 100644 index 00000000..5415e802 --- /dev/null +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/GrpcModelServiceStub.java @@ -0,0 +1,375 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2beta.stub; + +import static com.google.cloud.retail.v2beta.ModelServiceClient.ListModelsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.retail.v2beta.CreateModelMetadata; +import com.google.cloud.retail.v2beta.CreateModelRequest; +import com.google.cloud.retail.v2beta.DeleteModelRequest; +import com.google.cloud.retail.v2beta.ListModelsRequest; +import com.google.cloud.retail.v2beta.ListModelsResponse; +import com.google.cloud.retail.v2beta.Model; +import com.google.cloud.retail.v2beta.PauseModelRequest; +import com.google.cloud.retail.v2beta.ResumeModelRequest; +import com.google.cloud.retail.v2beta.TuneModelMetadata; +import com.google.cloud.retail.v2beta.TuneModelRequest; +import com.google.cloud.retail.v2beta.TuneModelResponse; +import com.google.cloud.retail.v2beta.UpdateModelRequest; +import com.google.common.collect.ImmutableMap; +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 ModelService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class GrpcModelServiceStub extends ModelServiceStub { + private static final MethodDescriptor createModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2beta.ModelService/CreateModel") + .setRequestMarshaller(ProtoUtils.marshaller(CreateModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor pauseModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2beta.ModelService/PauseModel") + .setRequestMarshaller(ProtoUtils.marshaller(PauseModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Model.getDefaultInstance())) + .build(); + + private static final MethodDescriptor resumeModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2beta.ModelService/ResumeModel") + .setRequestMarshaller(ProtoUtils.marshaller(ResumeModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Model.getDefaultInstance())) + .build(); + + private static final MethodDescriptor deleteModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2beta.ModelService/DeleteModel") + .setRequestMarshaller(ProtoUtils.marshaller(DeleteModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listModelsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2beta.ModelService/ListModels") + .setRequestMarshaller(ProtoUtils.marshaller(ListModelsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListModelsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor updateModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2beta.ModelService/UpdateModel") + .setRequestMarshaller(ProtoUtils.marshaller(UpdateModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Model.getDefaultInstance())) + .build(); + + private static final MethodDescriptor tuneModelMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.retail.v2beta.ModelService/TuneModel") + .setRequestMarshaller(ProtoUtils.marshaller(TuneModelRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable createModelCallable; + private final OperationCallable + createModelOperationCallable; + private final UnaryCallable pauseModelCallable; + private final UnaryCallable resumeModelCallable; + private final UnaryCallable deleteModelCallable; + private final UnaryCallable listModelsCallable; + private final UnaryCallable listModelsPagedCallable; + private final UnaryCallable updateModelCallable; + private final UnaryCallable tuneModelCallable; + private final OperationCallable + tuneModelOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcModelServiceStub create(ModelServiceStubSettings settings) + throws IOException { + return new GrpcModelServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcModelServiceStub create(ClientContext clientContext) throws IOException { + return new GrpcModelServiceStub(ModelServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcModelServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcModelServiceStub( + ModelServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcModelServiceStub, 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 GrpcModelServiceStub(ModelServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcModelServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcModelServiceStub, 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 GrpcModelServiceStub( + ModelServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings createModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createModelMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings pauseModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(pauseModelMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings resumeModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(resumeModelMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings deleteModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteModelMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + GrpcCallSettings listModelsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listModelsMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + }) + .build(); + GrpcCallSettings updateModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateModelMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("model.name", String.valueOf(request.getModel().getName())); + return params.build(); + }) + .build(); + GrpcCallSettings tuneModelTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(tuneModelMethodDescriptor) + .setParamsExtractor( + request -> { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + }) + .build(); + + this.createModelCallable = + callableFactory.createUnaryCallable( + createModelTransportSettings, settings.createModelSettings(), clientContext); + this.createModelOperationCallable = + callableFactory.createOperationCallable( + createModelTransportSettings, + settings.createModelOperationSettings(), + clientContext, + operationsStub); + this.pauseModelCallable = + callableFactory.createUnaryCallable( + pauseModelTransportSettings, settings.pauseModelSettings(), clientContext); + this.resumeModelCallable = + callableFactory.createUnaryCallable( + resumeModelTransportSettings, settings.resumeModelSettings(), clientContext); + this.deleteModelCallable = + callableFactory.createUnaryCallable( + deleteModelTransportSettings, settings.deleteModelSettings(), clientContext); + this.listModelsCallable = + callableFactory.createUnaryCallable( + listModelsTransportSettings, settings.listModelsSettings(), clientContext); + this.listModelsPagedCallable = + callableFactory.createPagedCallable( + listModelsTransportSettings, settings.listModelsSettings(), clientContext); + this.updateModelCallable = + callableFactory.createUnaryCallable( + updateModelTransportSettings, settings.updateModelSettings(), clientContext); + this.tuneModelCallable = + callableFactory.createUnaryCallable( + tuneModelTransportSettings, settings.tuneModelSettings(), clientContext); + this.tuneModelOperationCallable = + callableFactory.createOperationCallable( + tuneModelTransportSettings, + settings.tuneModelOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable createModelCallable() { + return createModelCallable; + } + + @Override + public OperationCallable + createModelOperationCallable() { + return createModelOperationCallable; + } + + @Override + public UnaryCallable pauseModelCallable() { + return pauseModelCallable; + } + + @Override + public UnaryCallable resumeModelCallable() { + return resumeModelCallable; + } + + @Override + public UnaryCallable deleteModelCallable() { + return deleteModelCallable; + } + + @Override + public UnaryCallable listModelsCallable() { + return listModelsCallable; + } + + @Override + public UnaryCallable listModelsPagedCallable() { + return listModelsPagedCallable; + } + + @Override + public UnaryCallable updateModelCallable() { + return updateModelCallable; + } + + @Override + public UnaryCallable tuneModelCallable() { + return tuneModelCallable; + } + + @Override + public OperationCallable + tuneModelOperationCallable() { + return tuneModelOperationCallable; + } + + @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/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonCatalogServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonCatalogServiceStub.java index f1021c22..335f3cad 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonCatalogServiceStub.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonCatalogServiceStub.java @@ -32,6 +32,8 @@ import com.google.api.gax.rpc.UnaryCallable; import com.google.cloud.retail.v2beta.AddCatalogAttributeRequest; import com.google.cloud.retail.v2beta.AttributesConfig; +import com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest; +import com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse; import com.google.cloud.retail.v2beta.Catalog; import com.google.cloud.retail.v2beta.CompletionConfig; import com.google.cloud.retail.v2beta.GetAttributesConfigRequest; @@ -130,7 +132,8 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("catalog", request.getCatalog())) + ProtoRestSerializer.create() + .toBody("catalog", request.getCatalog(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -166,7 +169,7 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearCatalog().build())) + .toBody("*", request.toBuilder().clearCatalog().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -272,7 +275,7 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("completionConfig", request.getCompletionConfig())) + .toBody("completionConfig", request.getCompletionConfig(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -345,7 +348,7 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("attributesConfig", request.getAttributesConfig())) + .toBody("attributesConfig", request.getAttributesConfig(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -382,7 +385,10 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearAttributesConfig().build())) + .toBody( + "*", + request.toBuilder().clearAttributesConfig().build(), + false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -419,7 +425,10 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearAttributesConfig().build())) + .toBody( + "*", + request.toBuilder().clearAttributesConfig().build(), + false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -428,6 +437,50 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub { .build()) .build(); + private static final ApiMethodDescriptor< + BatchRemoveCatalogAttributesRequest, BatchRemoveCatalogAttributesResponse> + batchRemoveCatalogAttributesMethodDescriptor = + ApiMethodDescriptor + . + newBuilder() + .setFullMethodName( + "google.cloud.retail.v2beta.CatalogService/BatchRemoveCatalogAttributes") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2beta/{attributesConfig=projects/*/locations/*/catalogs/*/attributesConfig}:batchRemoveCatalogAttributes", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam( + fields, "attributesConfig", request.getAttributesConfig()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody( + "*", + request.toBuilder().clearAttributesConfig().build(), + false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(BatchRemoveCatalogAttributesResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + private static final ApiMethodDescriptor replaceCatalogAttributeMethodDescriptor = ApiMethodDescriptor.newBuilder() @@ -457,7 +510,10 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearAttributesConfig().build())) + .toBody( + "*", + request.toBuilder().clearAttributesConfig().build(), + false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -485,6 +541,9 @@ public class HttpJsonCatalogServiceStub extends CatalogServiceStub { addCatalogAttributeCallable; private final UnaryCallable removeCatalogAttributeCallable; + private final UnaryCallable< + BatchRemoveCatalogAttributesRequest, BatchRemoveCatalogAttributesResponse> + batchRemoveCatalogAttributesCallable; private final UnaryCallable replaceCatalogAttributeCallable; @@ -587,6 +646,14 @@ protected HttpJsonCatalogServiceStub( .setMethodDescriptor(removeCatalogAttributeMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); + HttpJsonCallSettings + batchRemoveCatalogAttributesTransportSettings = + HttpJsonCallSettings + . + newBuilder() + .setMethodDescriptor(batchRemoveCatalogAttributesMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); HttpJsonCallSettings replaceCatalogAttributeTransportSettings = HttpJsonCallSettings.newBuilder() @@ -639,6 +706,11 @@ protected HttpJsonCatalogServiceStub( removeCatalogAttributeTransportSettings, settings.removeCatalogAttributeSettings(), clientContext); + this.batchRemoveCatalogAttributesCallable = + callableFactory.createUnaryCallable( + batchRemoveCatalogAttributesTransportSettings, + settings.batchRemoveCatalogAttributesSettings(), + clientContext); this.replaceCatalogAttributeCallable = callableFactory.createUnaryCallable( replaceCatalogAttributeTransportSettings, @@ -662,6 +734,7 @@ public static List getMethodDescriptors() { methodDescriptors.add(updateAttributesConfigMethodDescriptor); methodDescriptors.add(addCatalogAttributeMethodDescriptor); methodDescriptors.add(removeCatalogAttributeMethodDescriptor); + methodDescriptors.add(batchRemoveCatalogAttributesMethodDescriptor); methodDescriptors.add(replaceCatalogAttributeMethodDescriptor); return methodDescriptors; } @@ -725,6 +798,12 @@ public UnaryCallable addCatalogAtt return removeCatalogAttributeCallable; } + @Override + public UnaryCallable + batchRemoveCatalogAttributesCallable() { + return batchRemoveCatalogAttributesCallable; + } + @Override public UnaryCallable replaceCatalogAttributeCallable() { diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonCompletionServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonCompletionServiceStub.java index 7fe1921c..a4ed803f 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonCompletionServiceStub.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonCompletionServiceStub.java @@ -130,7 +130,7 @@ public class HttpJsonCompletionServiceStub extends CompletionServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build())) + .toBody("*", request.toBuilder().clearParent().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonControlServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonControlServiceStub.java index cb2b790c..0ccd7f73 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonControlServiceStub.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonControlServiceStub.java @@ -85,7 +85,8 @@ public class HttpJsonControlServiceStub extends ControlServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("control", request.getControl())) + ProtoRestSerializer.create() + .toBody("control", request.getControl(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -155,7 +156,8 @@ public class HttpJsonControlServiceStub extends ControlServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("control", request.getControl())) + ProtoRestSerializer.create() + .toBody("control", request.getControl(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonModelServiceCallableFactory.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonModelServiceCallableFactory.java new file mode 100644 index 00000000..88ab4ce4 --- /dev/null +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonModelServiceCallableFactory.java @@ -0,0 +1,105 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2beta.stub; + +import com.google.api.core.BetaApi; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonCallableFactory; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshotCallable; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.longrunning.stub.OperationsStub; +import com.google.api.gax.rpc.BatchingCallSettings; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallSettings; +import com.google.api.gax.rpc.ServerStreamingCallable; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.longrunning.Operation; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * REST callable factory implementation for the ModelService service API. + * + *

This class is for advanced usage. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonModelServiceCallableFactory + implements HttpJsonStubCallableFactory { + + @Override + public UnaryCallable createUnaryCallable( + HttpJsonCallSettings httpJsonCallSettings, + UnaryCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createUnaryCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public + UnaryCallable createPagedCallable( + HttpJsonCallSettings httpJsonCallSettings, + PagedCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createPagedCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @Override + public UnaryCallable createBatchingCallable( + HttpJsonCallSettings httpJsonCallSettings, + BatchingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createBatchingCallable( + httpJsonCallSettings, callSettings, clientContext); + } + + @BetaApi( + "The surface for long-running operations is not stable yet and may change in the future.") + @Override + public + OperationCallable createOperationCallable( + HttpJsonCallSettings httpJsonCallSettings, + OperationCallSettings callSettings, + ClientContext clientContext, + OperationsStub operationsStub) { + UnaryCallable innerCallable = + HttpJsonCallableFactory.createBaseUnaryCallable( + httpJsonCallSettings, callSettings.getInitialCallSettings(), clientContext); + HttpJsonOperationSnapshotCallable initialCallable = + new HttpJsonOperationSnapshotCallable( + innerCallable, + httpJsonCallSettings.getMethodDescriptor().getOperationSnapshotFactory()); + return HttpJsonCallableFactory.createOperationCallable( + callSettings, clientContext, operationsStub.longRunningClient(), initialCallable); + } + + @Override + public + ServerStreamingCallable createServerStreamingCallable( + HttpJsonCallSettings httpJsonCallSettings, + ServerStreamingCallSettings callSettings, + ClientContext clientContext) { + return HttpJsonCallableFactory.createServerStreamingCallable( + httpJsonCallSettings, callSettings, clientContext); + } +} diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonModelServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonModelServiceStub.java new file mode 100644 index 00000000..9e1a7fd8 --- /dev/null +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonModelServiceStub.java @@ -0,0 +1,565 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2beta.stub; + +import static com.google.cloud.retail.v2beta.ModelServiceClient.ListModelsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.core.InternalApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.httpjson.ApiMethodDescriptor; +import com.google.api.gax.httpjson.HttpJsonCallSettings; +import com.google.api.gax.httpjson.HttpJsonOperationSnapshot; +import com.google.api.gax.httpjson.HttpJsonStubCallableFactory; +import com.google.api.gax.httpjson.ProtoMessageRequestFormatter; +import com.google.api.gax.httpjson.ProtoMessageResponseParser; +import com.google.api.gax.httpjson.ProtoRestSerializer; +import com.google.api.gax.httpjson.longrunning.stub.HttpJsonOperationsStub; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.retail.v2beta.CreateModelMetadata; +import com.google.cloud.retail.v2beta.CreateModelRequest; +import com.google.cloud.retail.v2beta.DeleteModelRequest; +import com.google.cloud.retail.v2beta.ListModelsRequest; +import com.google.cloud.retail.v2beta.ListModelsResponse; +import com.google.cloud.retail.v2beta.Model; +import com.google.cloud.retail.v2beta.PauseModelRequest; +import com.google.cloud.retail.v2beta.ResumeModelRequest; +import com.google.cloud.retail.v2beta.TuneModelMetadata; +import com.google.cloud.retail.v2beta.TuneModelRequest; +import com.google.cloud.retail.v2beta.TuneModelResponse; +import com.google.cloud.retail.v2beta.UpdateModelRequest; +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 ModelService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public class HttpJsonModelServiceStub extends ModelServiceStub { + private static final TypeRegistry typeRegistry = + TypeRegistry.newBuilder() + .add(TuneModelMetadata.getDescriptor()) + .add(CreateModelMetadata.getDescriptor()) + .add(Model.getDescriptor()) + .add(TuneModelResponse.getDescriptor()) + .build(); + + private static final ApiMethodDescriptor + createModelMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2beta.ModelService/CreateModel") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2beta/{parent=projects/*/locations/*/catalogs/*}/models", + 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, "dryRun", request.getDryRun()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("model", request.getModel(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (CreateModelRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private static final ApiMethodDescriptor pauseModelMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2beta.ModelService/PauseModel") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2beta/{name=projects/*/locations/*/catalogs/*/models/*}:pause", + 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(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Model.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor resumeModelMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2beta.ModelService/ResumeModel") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2beta/{name=projects/*/locations/*/catalogs/*/models/*}:resume", + 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(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Model.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor deleteModelMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2beta.ModelService/DeleteModel") + .setHttpMethod("DELETE") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2beta/{name=projects/*/locations/*/catalogs/*/models/*}", + 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(); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Empty.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor + listModelsMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2beta.ModelService/ListModels") + .setHttpMethod("GET") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2beta/{parent=projects/*/locations/*/catalogs/*}/models", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "parent", request.getParent()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "pageSize", request.getPageSize()); + serializer.putQueryParam(fields, "pageToken", request.getPageToken()); + return fields; + }) + .setRequestBodyExtractor(request -> null) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(ListModelsResponse.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor updateModelMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2beta.ModelService/UpdateModel") + .setHttpMethod("PATCH") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2beta/{model.name=projects/*/locations/*/catalogs/*/models/*}", + request -> { + Map fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putPathParam(fields, "model.name", request.getModel().getName()); + return fields; + }) + .setQueryParamsExtractor( + request -> { + Map> fields = new HashMap<>(); + ProtoRestSerializer serializer = + ProtoRestSerializer.create(); + serializer.putQueryParam(fields, "updateMask", request.getUpdateMask()); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create().toBody("model", request.getModel(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Model.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .build(); + + private static final ApiMethodDescriptor tuneModelMethodDescriptor = + ApiMethodDescriptor.newBuilder() + .setFullMethodName("google.cloud.retail.v2beta.ModelService/TuneModel") + .setHttpMethod("POST") + .setType(ApiMethodDescriptor.MethodType.UNARY) + .setRequestFormatter( + ProtoMessageRequestFormatter.newBuilder() + .setPath( + "/v2beta/{name=projects/*/locations/*/catalogs/*/models/*}:tune", + 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(); + return fields; + }) + .setRequestBodyExtractor( + request -> + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().clearName().build(), false)) + .build()) + .setResponseParser( + ProtoMessageResponseParser.newBuilder() + .setDefaultInstance(Operation.getDefaultInstance()) + .setDefaultTypeRegistry(typeRegistry) + .build()) + .setOperationSnapshotFactory( + (TuneModelRequest request, Operation response) -> + HttpJsonOperationSnapshot.create(response)) + .build(); + + private final UnaryCallable createModelCallable; + private final OperationCallable + createModelOperationCallable; + private final UnaryCallable pauseModelCallable; + private final UnaryCallable resumeModelCallable; + private final UnaryCallable deleteModelCallable; + private final UnaryCallable listModelsCallable; + private final UnaryCallable listModelsPagedCallable; + private final UnaryCallable updateModelCallable; + private final UnaryCallable tuneModelCallable; + private final OperationCallable + tuneModelOperationCallable; + + private final BackgroundResource backgroundResources; + private final HttpJsonOperationsStub httpJsonOperationsStub; + private final HttpJsonStubCallableFactory callableFactory; + + public static final HttpJsonModelServiceStub create(ModelServiceStubSettings settings) + throws IOException { + return new HttpJsonModelServiceStub(settings, ClientContext.create(settings)); + } + + public static final HttpJsonModelServiceStub create(ClientContext clientContext) + throws IOException { + return new HttpJsonModelServiceStub( + ModelServiceStubSettings.newHttpJsonBuilder().build(), clientContext); + } + + public static final HttpJsonModelServiceStub create( + ClientContext clientContext, HttpJsonStubCallableFactory callableFactory) throws IOException { + return new HttpJsonModelServiceStub( + ModelServiceStubSettings.newHttpJsonBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of HttpJsonModelServiceStub, 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 HttpJsonModelServiceStub(ModelServiceStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new HttpJsonModelServiceCallableFactory()); + } + + /** + * Constructs an instance of HttpJsonModelServiceStub, 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 HttpJsonModelServiceStub( + ModelServiceStubSettings settings, + ClientContext clientContext, + HttpJsonStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.httpJsonOperationsStub = + HttpJsonOperationsStub.create(clientContext, callableFactory, typeRegistry); + + HttpJsonCallSettings createModelTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(createModelMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings pauseModelTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(pauseModelMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings resumeModelTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(resumeModelMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings deleteModelTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(deleteModelMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings listModelsTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(listModelsMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings updateModelTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(updateModelMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + HttpJsonCallSettings tuneModelTransportSettings = + HttpJsonCallSettings.newBuilder() + .setMethodDescriptor(tuneModelMethodDescriptor) + .setTypeRegistry(typeRegistry) + .build(); + + this.createModelCallable = + callableFactory.createUnaryCallable( + createModelTransportSettings, settings.createModelSettings(), clientContext); + this.createModelOperationCallable = + callableFactory.createOperationCallable( + createModelTransportSettings, + settings.createModelOperationSettings(), + clientContext, + httpJsonOperationsStub); + this.pauseModelCallable = + callableFactory.createUnaryCallable( + pauseModelTransportSettings, settings.pauseModelSettings(), clientContext); + this.resumeModelCallable = + callableFactory.createUnaryCallable( + resumeModelTransportSettings, settings.resumeModelSettings(), clientContext); + this.deleteModelCallable = + callableFactory.createUnaryCallable( + deleteModelTransportSettings, settings.deleteModelSettings(), clientContext); + this.listModelsCallable = + callableFactory.createUnaryCallable( + listModelsTransportSettings, settings.listModelsSettings(), clientContext); + this.listModelsPagedCallable = + callableFactory.createPagedCallable( + listModelsTransportSettings, settings.listModelsSettings(), clientContext); + this.updateModelCallable = + callableFactory.createUnaryCallable( + updateModelTransportSettings, settings.updateModelSettings(), clientContext); + this.tuneModelCallable = + callableFactory.createUnaryCallable( + tuneModelTransportSettings, settings.tuneModelSettings(), clientContext); + this.tuneModelOperationCallable = + callableFactory.createOperationCallable( + tuneModelTransportSettings, + settings.tuneModelOperationSettings(), + clientContext, + httpJsonOperationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + @InternalApi + public static List getMethodDescriptors() { + List methodDescriptors = new ArrayList<>(); + methodDescriptors.add(createModelMethodDescriptor); + methodDescriptors.add(pauseModelMethodDescriptor); + methodDescriptors.add(resumeModelMethodDescriptor); + methodDescriptors.add(deleteModelMethodDescriptor); + methodDescriptors.add(listModelsMethodDescriptor); + methodDescriptors.add(updateModelMethodDescriptor); + methodDescriptors.add(tuneModelMethodDescriptor); + return methodDescriptors; + } + + public HttpJsonOperationsStub getHttpJsonOperationsStub() { + return httpJsonOperationsStub; + } + + @Override + public UnaryCallable createModelCallable() { + return createModelCallable; + } + + @Override + public OperationCallable + createModelOperationCallable() { + return createModelOperationCallable; + } + + @Override + public UnaryCallable pauseModelCallable() { + return pauseModelCallable; + } + + @Override + public UnaryCallable resumeModelCallable() { + return resumeModelCallable; + } + + @Override + public UnaryCallable deleteModelCallable() { + return deleteModelCallable; + } + + @Override + public UnaryCallable listModelsCallable() { + return listModelsCallable; + } + + @Override + public UnaryCallable listModelsPagedCallable() { + return listModelsPagedCallable; + } + + @Override + public UnaryCallable updateModelCallable() { + return updateModelCallable; + } + + @Override + public UnaryCallable tuneModelCallable() { + return tuneModelCallable; + } + + @Override + public OperationCallable + tuneModelOperationCallable() { + return tuneModelOperationCallable; + } + + @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/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonPredictionServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonPredictionServiceStub.java index 7ae0aeb2..a4622900 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonPredictionServiceStub.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonPredictionServiceStub.java @@ -79,7 +79,7 @@ public class HttpJsonPredictionServiceStub extends PredictionServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearPlacement().build())) + .toBody("*", request.toBuilder().clearPlacement().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonProductServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonProductServiceStub.java index 91057013..14cb5cf1 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonProductServiceStub.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonProductServiceStub.java @@ -121,7 +121,8 @@ public class HttpJsonProductServiceStub extends ProductServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("product", request.getProduct())) + ProtoRestSerializer.create() + .toBody("product", request.getProduct(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -229,7 +230,8 @@ public class HttpJsonProductServiceStub extends ProductServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("product", request.getProduct())) + ProtoRestSerializer.create() + .toBody("product", request.getProduct(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -298,7 +300,7 @@ public class HttpJsonProductServiceStub extends ProductServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build())) + .toBody("*", request.toBuilder().clearParent().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -337,7 +339,8 @@ public class HttpJsonProductServiceStub extends ProductServiceStub { }) .setRequestBodyExtractor( request -> - ProtoRestSerializer.create().toBody("*", request.toBuilder().build())) + ProtoRestSerializer.create() + .toBody("*", request.toBuilder().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -376,7 +379,7 @@ public class HttpJsonProductServiceStub extends ProductServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearProduct().build())) + .toBody("*", request.toBuilder().clearProduct().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -416,7 +419,7 @@ public class HttpJsonProductServiceStub extends ProductServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearProduct().build())) + .toBody("*", request.toBuilder().clearProduct().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -455,7 +458,7 @@ public class HttpJsonProductServiceStub extends ProductServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearProduct().build())) + .toBody("*", request.toBuilder().clearProduct().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -494,7 +497,7 @@ public class HttpJsonProductServiceStub extends ProductServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearProduct().build())) + .toBody("*", request.toBuilder().clearProduct().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonSearchServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonSearchServiceStub.java index 6b5ab770..f6849021 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonSearchServiceStub.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonSearchServiceStub.java @@ -80,7 +80,7 @@ public class HttpJsonSearchServiceStub extends SearchServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearPlacement().build())) + .toBody("*", request.toBuilder().clearPlacement().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonServingConfigServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonServingConfigServiceStub.java index 26f39556..43ccf110 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonServingConfigServiceStub.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonServingConfigServiceStub.java @@ -90,7 +90,7 @@ public class HttpJsonServingConfigServiceStub extends ServingConfigServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("servingConfig", request.getServingConfig())) + .toBody("servingConfig", request.getServingConfig(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -163,7 +163,7 @@ public class HttpJsonServingConfigServiceStub extends ServingConfigServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("servingConfig", request.getServingConfig())) + .toBody("servingConfig", request.getServingConfig(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -269,7 +269,8 @@ public class HttpJsonServingConfigServiceStub extends ServingConfigServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearServingConfig().build())) + .toBody( + "*", request.toBuilder().clearServingConfig().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -306,7 +307,8 @@ public class HttpJsonServingConfigServiceStub extends ServingConfigServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearServingConfig().build())) + .toBody( + "*", request.toBuilder().clearServingConfig().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonUserEventServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonUserEventServiceStub.java index 743bdbd1..6b76785f 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonUserEventServiceStub.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/HttpJsonUserEventServiceStub.java @@ -100,7 +100,7 @@ public class HttpJsonUserEventServiceStub extends UserEventServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("userEvent", request.getUserEvent())) + .toBody("userEvent", request.getUserEvent(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -172,7 +172,7 @@ public class HttpJsonUserEventServiceStub extends UserEventServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build())) + .toBody("*", request.toBuilder().clearParent().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -211,7 +211,7 @@ public class HttpJsonUserEventServiceStub extends UserEventServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build())) + .toBody("*", request.toBuilder().clearParent().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() @@ -250,7 +250,7 @@ public class HttpJsonUserEventServiceStub extends UserEventServiceStub { .setRequestBodyExtractor( request -> ProtoRestSerializer.create() - .toBody("*", request.toBuilder().clearParent().build())) + .toBody("*", request.toBuilder().clearParent().build(), false)) .build()) .setResponseParser( ProtoMessageResponseParser.newBuilder() diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ModelServiceStub.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ModelServiceStub.java new file mode 100644 index 00000000..c31a5348 --- /dev/null +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ModelServiceStub.java @@ -0,0 +1,104 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2beta.stub; + +import static com.google.cloud.retail.v2beta.ModelServiceClient.ListModelsPagedResponse; + +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.retail.v2beta.CreateModelMetadata; +import com.google.cloud.retail.v2beta.CreateModelRequest; +import com.google.cloud.retail.v2beta.DeleteModelRequest; +import com.google.cloud.retail.v2beta.ListModelsRequest; +import com.google.cloud.retail.v2beta.ListModelsResponse; +import com.google.cloud.retail.v2beta.Model; +import com.google.cloud.retail.v2beta.PauseModelRequest; +import com.google.cloud.retail.v2beta.ResumeModelRequest; +import com.google.cloud.retail.v2beta.TuneModelMetadata; +import com.google.cloud.retail.v2beta.TuneModelRequest; +import com.google.cloud.retail.v2beta.TuneModelResponse; +import com.google.cloud.retail.v2beta.UpdateModelRequest; +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 ModelService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@BetaApi +@Generated("by gapic-generator-java") +public abstract class ModelServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + return null; + } + + public com.google.api.gax.httpjson.longrunning.stub.OperationsStub getHttpJsonOperationsStub() { + return null; + } + + public OperationCallable + createModelOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createModelOperationCallable()"); + } + + public UnaryCallable createModelCallable() { + throw new UnsupportedOperationException("Not implemented: createModelCallable()"); + } + + public UnaryCallable pauseModelCallable() { + throw new UnsupportedOperationException("Not implemented: pauseModelCallable()"); + } + + public UnaryCallable resumeModelCallable() { + throw new UnsupportedOperationException("Not implemented: resumeModelCallable()"); + } + + public UnaryCallable deleteModelCallable() { + throw new UnsupportedOperationException("Not implemented: deleteModelCallable()"); + } + + public UnaryCallable listModelsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listModelsPagedCallable()"); + } + + public UnaryCallable listModelsCallable() { + throw new UnsupportedOperationException("Not implemented: listModelsCallable()"); + } + + public UnaryCallable updateModelCallable() { + throw new UnsupportedOperationException("Not implemented: updateModelCallable()"); + } + + public OperationCallable + tuneModelOperationCallable() { + throw new UnsupportedOperationException("Not implemented: tuneModelOperationCallable()"); + } + + public UnaryCallable tuneModelCallable() { + throw new UnsupportedOperationException("Not implemented: tuneModelCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ModelServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ModelServiceStubSettings.java new file mode 100644 index 00000000..78fa3896 --- /dev/null +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ModelServiceStubSettings.java @@ -0,0 +1,618 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2beta.stub; + +import static com.google.cloud.retail.v2beta.ModelServiceClient.ListModelsPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.httpjson.GaxHttpJsonProperties; +import com.google.api.gax.httpjson.HttpJsonTransportChannel; +import com.google.api.gax.httpjson.InstantiatingHttpJsonChannelProvider; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.retail.v2beta.CreateModelMetadata; +import com.google.cloud.retail.v2beta.CreateModelRequest; +import com.google.cloud.retail.v2beta.DeleteModelRequest; +import com.google.cloud.retail.v2beta.ListModelsRequest; +import com.google.cloud.retail.v2beta.ListModelsResponse; +import com.google.cloud.retail.v2beta.Model; +import com.google.cloud.retail.v2beta.PauseModelRequest; +import com.google.cloud.retail.v2beta.ResumeModelRequest; +import com.google.cloud.retail.v2beta.TuneModelMetadata; +import com.google.cloud.retail.v2beta.TuneModelRequest; +import com.google.cloud.retail.v2beta.TuneModelResponse; +import com.google.cloud.retail.v2beta.UpdateModelRequest; +import com.google.common.collect.ImmutableList; +import com.google.common.collect.ImmutableMap; +import com.google.common.collect.ImmutableSet; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import javax.annotation.Generated; +import org.threeten.bp.Duration; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Settings class to configure an instance of {@link ModelServiceStub}. + * + *

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

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

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

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

{@code
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+ * ModelServiceStubSettings.Builder modelServiceSettingsBuilder =
+ *     ModelServiceStubSettings.newBuilder();
+ * modelServiceSettingsBuilder
+ *     .pauseModelSettings()
+ *     .setRetrySettings(
+ *         modelServiceSettingsBuilder.pauseModelSettings().getRetrySettings().toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ModelServiceStubSettings modelServiceSettings = modelServiceSettingsBuilder.build();
+ * }
+ */ +@BetaApi +@Generated("by gapic-generator-java") +public class ModelServiceStubSettings 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 createModelSettings; + private final OperationCallSettings + createModelOperationSettings; + private final UnaryCallSettings pauseModelSettings; + private final UnaryCallSettings resumeModelSettings; + private final UnaryCallSettings deleteModelSettings; + private final PagedCallSettings + listModelsSettings; + private final UnaryCallSettings updateModelSettings; + private final UnaryCallSettings tuneModelSettings; + private final OperationCallSettings + tuneModelOperationSettings; + + private static final PagedListDescriptor + LIST_MODELS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListModelsRequest injectToken(ListModelsRequest payload, String token) { + return ListModelsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListModelsRequest injectPageSize(ListModelsRequest payload, int pageSize) { + return ListModelsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListModelsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListModelsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListModelsResponse payload) { + return payload.getModelsList() == null + ? ImmutableList.of() + : payload.getModelsList(); + } + }; + + private static final PagedListResponseFactory< + ListModelsRequest, ListModelsResponse, ListModelsPagedResponse> + LIST_MODELS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListModelsRequest, ListModelsResponse, ListModelsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListModelsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_MODELS_PAGE_STR_DESC, request, context); + return ListModelsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to createModel. */ + public UnaryCallSettings createModelSettings() { + return createModelSettings; + } + + /** Returns the object with the settings used for calls to createModel. */ + public OperationCallSettings + createModelOperationSettings() { + return createModelOperationSettings; + } + + /** Returns the object with the settings used for calls to pauseModel. */ + public UnaryCallSettings pauseModelSettings() { + return pauseModelSettings; + } + + /** Returns the object with the settings used for calls to resumeModel. */ + public UnaryCallSettings resumeModelSettings() { + return resumeModelSettings; + } + + /** Returns the object with the settings used for calls to deleteModel. */ + public UnaryCallSettings deleteModelSettings() { + return deleteModelSettings; + } + + /** Returns the object with the settings used for calls to listModels. */ + public PagedCallSettings + listModelsSettings() { + return listModelsSettings; + } + + /** Returns the object with the settings used for calls to updateModel. */ + public UnaryCallSettings updateModelSettings() { + return updateModelSettings; + } + + /** Returns the object with the settings used for calls to tuneModel. */ + public UnaryCallSettings tuneModelSettings() { + return tuneModelSettings; + } + + /** Returns the object with the settings used for calls to tuneModel. */ + public OperationCallSettings + tuneModelOperationSettings() { + return tuneModelOperationSettings; + } + + public ModelServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcModelServiceStub.create(this); + } + if (getTransportChannelProvider() + .getTransportName() + .equals(HttpJsonTransportChannel.getHttpJsonTransportName())) { + return HttpJsonModelServiceStub.create(this); + } + throw new UnsupportedOperationException( + String.format( + "Transport not supported: %s", getTransportChannelProvider().getTransportName())); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return InstantiatingExecutorProvider.newBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return "retail.googleapis.com:443"; + } + + /** Returns the default mTLS service endpoint. */ + public static String getDefaultMtlsEndpoint() { + return "retail.mtls.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder() + .setScopesToApply(DEFAULT_SERVICE_SCOPES) + .setUseJwtAccessWithScope(true); + } + + /** Returns a builder for the default gRPC ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + /** Returns a builder for the default REST ChannelProvider for this service. */ + @BetaApi + public static InstantiatingHttpJsonChannelProvider.Builder + defaultHttpJsonTransportProviderBuilder() { + return InstantiatingHttpJsonChannelProvider.newBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultGrpcApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ModelServiceStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultHttpJsonApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ModelServiceStubSettings.class)) + .setTransportToken( + GaxHttpJsonProperties.getHttpJsonTokenName(), + GaxHttpJsonProperties.getHttpJsonVersion()); + } + + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ModelServiceStubSettings.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 ModelServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + createModelSettings = settingsBuilder.createModelSettings().build(); + createModelOperationSettings = settingsBuilder.createModelOperationSettings().build(); + pauseModelSettings = settingsBuilder.pauseModelSettings().build(); + resumeModelSettings = settingsBuilder.resumeModelSettings().build(); + deleteModelSettings = settingsBuilder.deleteModelSettings().build(); + listModelsSettings = settingsBuilder.listModelsSettings().build(); + updateModelSettings = settingsBuilder.updateModelSettings().build(); + tuneModelSettings = settingsBuilder.tuneModelSettings().build(); + tuneModelOperationSettings = settingsBuilder.tuneModelOperationSettings().build(); + } + + /** Builder for ModelServiceStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final UnaryCallSettings.Builder createModelSettings; + private final OperationCallSettings.Builder + createModelOperationSettings; + private final UnaryCallSettings.Builder pauseModelSettings; + private final UnaryCallSettings.Builder resumeModelSettings; + private final UnaryCallSettings.Builder deleteModelSettings; + private final PagedCallSettings.Builder< + ListModelsRequest, ListModelsResponse, ListModelsPagedResponse> + listModelsSettings; + private final UnaryCallSettings.Builder updateModelSettings; + private final UnaryCallSettings.Builder tuneModelSettings; + private final OperationCallSettings.Builder< + TuneModelRequest, TuneModelResponse, TuneModelMetadata> + tuneModelOperationSettings; + 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); + + createModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createModelOperationSettings = OperationCallSettings.newBuilder(); + pauseModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + resumeModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listModelsSettings = PagedCallSettings.newBuilder(LIST_MODELS_PAGE_STR_FACT); + updateModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + tuneModelSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + tuneModelOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createModelSettings, + pauseModelSettings, + resumeModelSettings, + deleteModelSettings, + listModelsSettings, + updateModelSettings, + tuneModelSettings); + initDefaults(this); + } + + protected Builder(ModelServiceStubSettings settings) { + super(settings); + + createModelSettings = settings.createModelSettings.toBuilder(); + createModelOperationSettings = settings.createModelOperationSettings.toBuilder(); + pauseModelSettings = settings.pauseModelSettings.toBuilder(); + resumeModelSettings = settings.resumeModelSettings.toBuilder(); + deleteModelSettings = settings.deleteModelSettings.toBuilder(); + listModelsSettings = settings.listModelsSettings.toBuilder(); + updateModelSettings = settings.updateModelSettings.toBuilder(); + tuneModelSettings = settings.tuneModelSettings.toBuilder(); + tuneModelOperationSettings = settings.tuneModelOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + createModelSettings, + pauseModelSettings, + resumeModelSettings, + deleteModelSettings, + listModelsSettings, + updateModelSettings, + tuneModelSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder createHttpJsonDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultHttpJsonTransportProviderBuilder().build()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultHttpJsonApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + builder.setMtlsEndpoint(getDefaultMtlsEndpoint()); + builder.setSwitchToMtlsEndpointAllowed(true); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .createModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .pauseModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .resumeModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .deleteModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .listModelsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .updateModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .tuneModelSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); + + builder + .createModelOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Model.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(CreateModelMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .tuneModelOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(TuneModelResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(TuneModelMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to createModel. */ + public UnaryCallSettings.Builder createModelSettings() { + return createModelSettings; + } + + /** Returns the builder for the settings used for calls to createModel. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createModelOperationSettings() { + return createModelOperationSettings; + } + + /** Returns the builder for the settings used for calls to pauseModel. */ + public UnaryCallSettings.Builder pauseModelSettings() { + return pauseModelSettings; + } + + /** Returns the builder for the settings used for calls to resumeModel. */ + public UnaryCallSettings.Builder resumeModelSettings() { + return resumeModelSettings; + } + + /** Returns the builder for the settings used for calls to deleteModel. */ + public UnaryCallSettings.Builder deleteModelSettings() { + return deleteModelSettings; + } + + /** Returns the builder for the settings used for calls to listModels. */ + public PagedCallSettings.Builder + listModelsSettings() { + return listModelsSettings; + } + + /** Returns the builder for the settings used for calls to updateModel. */ + public UnaryCallSettings.Builder updateModelSettings() { + return updateModelSettings; + } + + /** Returns the builder for the settings used for calls to tuneModel. */ + public UnaryCallSettings.Builder tuneModelSettings() { + return tuneModelSettings; + } + + /** Returns the builder for the settings used for calls to tuneModel. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + tuneModelOperationSettings() { + return tuneModelOperationSettings; + } + + @Override + public ModelServiceStubSettings build() throws IOException { + return new ModelServiceStubSettings(this); + } + } +} diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/PredictionServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/PredictionServiceStubSettings.java index 241806eb..dbba73b0 100644 --- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/PredictionServiceStubSettings.java +++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/PredictionServiceStubSettings.java @@ -63,17 +63,17 @@ *

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require 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()
+ *         predictionServiceSettingsBuilder.predictSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * PredictionServiceStubSettings predictionServiceSettings =
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ProductServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ProductServiceStubSettings.java
index 502ecab7..14d4d0b7 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ProductServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ProductServiceStubSettings.java
@@ -101,17 +101,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ProductServiceStubSettings.Builder productServiceSettingsBuilder =
  *     ProductServiceStubSettings.newBuilder();
  * productServiceSettingsBuilder
  *     .createProductSettings()
  *     .setRetrySettings(
- *         productServiceSettingsBuilder
- *             .createProductSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         productServiceSettingsBuilder.createProductSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * ProductServiceStubSettings productServiceSettings = productServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/SearchServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/SearchServiceStubSettings.java
index ac829cbe..6ff3eff9 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/SearchServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/SearchServiceStubSettings.java
@@ -72,17 +72,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * SearchServiceStubSettings.Builder searchServiceSettingsBuilder =
  *     SearchServiceStubSettings.newBuilder();
  * searchServiceSettingsBuilder
  *     .searchSettings()
  *     .setRetrySettings(
- *         searchServiceSettingsBuilder
- *             .searchSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         searchServiceSettingsBuilder.searchSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * SearchServiceStubSettings searchServiceSettings = searchServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ServingConfigServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ServingConfigServiceStubSettings.java
index 94504ec4..83ea86cd 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ServingConfigServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/ServingConfigServiceStubSettings.java
@@ -79,8 +79,11 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * ServingConfigServiceStubSettings.Builder servingConfigServiceSettingsBuilder =
  *     ServingConfigServiceStubSettings.newBuilder();
  * servingConfigServiceSettingsBuilder
diff --git a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/UserEventServiceStubSettings.java b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/UserEventServiceStubSettings.java
index 94c823c4..721eaa3d 100644
--- a/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/UserEventServiceStubSettings.java
+++ b/google-cloud-retail/src/main/java/com/google/cloud/retail/v2beta/stub/UserEventServiceStubSettings.java
@@ -79,17 +79,17 @@
  * 

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

{@code
- * // This snippet has been automatically generated for illustrative purposes only.
- * // It may require modifications to work in your environment.
+ * // This snippet has been automatically generated and should be regarded as a code template only.
+ * // It will require modifications to work:
+ * // - It may require correct/in-range values for request initialization.
+ * // - It may require specifying regional endpoints when creating the service client as shown in
+ * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
  * UserEventServiceStubSettings.Builder userEventServiceSettingsBuilder =
  *     UserEventServiceStubSettings.newBuilder();
  * userEventServiceSettingsBuilder
  *     .writeUserEventSettings()
  *     .setRetrySettings(
- *         userEventServiceSettingsBuilder
- *             .writeUserEventSettings()
- *             .getRetrySettings()
- *             .toBuilder()
+ *         userEventServiceSettingsBuilder.writeUserEventSettings().getRetrySettings().toBuilder()
  *             .setTotalTimeout(Duration.ofSeconds(30))
  *             .build());
  * UserEventServiceStubSettings userEventServiceSettings = userEventServiceSettingsBuilder.build();
diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/CatalogServiceClientHttpJsonTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/CatalogServiceClientHttpJsonTest.java
index 83ae3ee5..02b7a52a 100644
--- a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/CatalogServiceClientHttpJsonTest.java
+++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/CatalogServiceClientHttpJsonTest.java
@@ -33,6 +33,7 @@
 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;
@@ -868,6 +869,62 @@ public void removeCatalogAttributeExceptionTest() throws Exception {
     }
   }
 
+  @Test
+  public void batchRemoveCatalogAttributesTest() throws Exception {
+    BatchRemoveCatalogAttributesResponse expectedResponse =
+        BatchRemoveCatalogAttributesResponse.newBuilder()
+            .addAllDeletedCatalogAttributes(new ArrayList())
+            .addAllResetCatalogAttributes(new ArrayList())
+            .build();
+    mockService.addResponse(expectedResponse);
+
+    BatchRemoveCatalogAttributesRequest request =
+        BatchRemoveCatalogAttributesRequest.newBuilder()
+            .setAttributesConfig(
+                AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+            .addAllAttributeKeys(new ArrayList())
+            .build();
+
+    BatchRemoveCatalogAttributesResponse actualResponse =
+        client.batchRemoveCatalogAttributes(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 batchRemoveCatalogAttributesExceptionTest() throws Exception {
+    ApiException exception =
+        ApiExceptionFactory.createException(
+            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+    mockService.addException(exception);
+
+    try {
+      BatchRemoveCatalogAttributesRequest request =
+          BatchRemoveCatalogAttributesRequest.newBuilder()
+              .setAttributesConfig(
+                  AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+              .addAllAttributeKeys(new ArrayList())
+              .build();
+      client.batchRemoveCatalogAttributes(request);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
   @Test
   public void replaceCatalogAttributeTest() throws Exception {
     AttributesConfig expectedResponse =
diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/CatalogServiceClientTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/CatalogServiceClientTest.java
index 3978f47c..a1da1392 100644
--- a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/CatalogServiceClientTest.java
+++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/CatalogServiceClientTest.java
@@ -32,6 +32,7 @@
 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;
@@ -737,6 +738,58 @@ public void removeCatalogAttributeExceptionTest() throws Exception {
     }
   }
 
+  @Test
+  public void batchRemoveCatalogAttributesTest() throws Exception {
+    BatchRemoveCatalogAttributesResponse expectedResponse =
+        BatchRemoveCatalogAttributesResponse.newBuilder()
+            .addAllDeletedCatalogAttributes(new ArrayList())
+            .addAllResetCatalogAttributes(new ArrayList())
+            .build();
+    mockCatalogService.addResponse(expectedResponse);
+
+    BatchRemoveCatalogAttributesRequest request =
+        BatchRemoveCatalogAttributesRequest.newBuilder()
+            .setAttributesConfig(
+                AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+            .addAllAttributeKeys(new ArrayList())
+            .build();
+
+    BatchRemoveCatalogAttributesResponse actualResponse =
+        client.batchRemoveCatalogAttributes(request);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockCatalogService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    BatchRemoveCatalogAttributesRequest actualRequest =
+        ((BatchRemoveCatalogAttributesRequest) actualRequests.get(0));
+
+    Assert.assertEquals(request.getAttributesConfig(), actualRequest.getAttributesConfig());
+    Assert.assertEquals(request.getAttributeKeysList(), actualRequest.getAttributeKeysList());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void batchRemoveCatalogAttributesExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockCatalogService.addException(exception);
+
+    try {
+      BatchRemoveCatalogAttributesRequest request =
+          BatchRemoveCatalogAttributesRequest.newBuilder()
+              .setAttributesConfig(
+                  AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+              .addAllAttributeKeys(new ArrayList())
+              .build();
+      client.batchRemoveCatalogAttributes(request);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
   @Test
   public void replaceCatalogAttributeTest() throws Exception {
     AttributesConfig expectedResponse =
diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ControlServiceClientHttpJsonTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ControlServiceClientHttpJsonTest.java
index 78d3f2e4..428b9af2 100644
--- a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ControlServiceClientHttpJsonTest.java
+++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ControlServiceClientHttpJsonTest.java
@@ -86,6 +86,7 @@ public void createControlTest() throws Exception {
             .setDisplayName("displayName1714148973")
             .addAllAssociatedServingConfigIds(new ArrayList())
             .addAllSolutionTypes(new ArrayList())
+            .addAllSearchSolutionUseCase(new ArrayList())
             .build();
     mockService.addResponse(expectedResponse);
 
@@ -137,6 +138,7 @@ public void createControlTest2() throws Exception {
             .setDisplayName("displayName1714148973")
             .addAllAssociatedServingConfigIds(new ArrayList())
             .addAllSolutionTypes(new ArrayList())
+            .addAllSearchSolutionUseCase(new ArrayList())
             .build();
     mockService.addResponse(expectedResponse);
 
@@ -270,6 +272,7 @@ public void updateControlTest() throws Exception {
             .setDisplayName("displayName1714148973")
             .addAllAssociatedServingConfigIds(new ArrayList())
             .addAllSolutionTypes(new ArrayList())
+            .addAllSearchSolutionUseCase(new ArrayList())
             .build();
     mockService.addResponse(expectedResponse);
 
@@ -279,6 +282,7 @@ public void updateControlTest() throws Exception {
             .setDisplayName("displayName1714148973")
             .addAllAssociatedServingConfigIds(new ArrayList())
             .addAllSolutionTypes(new ArrayList())
+            .addAllSearchSolutionUseCase(new ArrayList())
             .build();
     FieldMask updateMask = FieldMask.newBuilder().build();
 
@@ -315,6 +319,7 @@ public void updateControlExceptionTest() throws Exception {
               .setDisplayName("displayName1714148973")
               .addAllAssociatedServingConfigIds(new ArrayList())
               .addAllSolutionTypes(new ArrayList())
+              .addAllSearchSolutionUseCase(new ArrayList())
               .build();
       FieldMask updateMask = FieldMask.newBuilder().build();
       client.updateControl(control, updateMask);
@@ -332,6 +337,7 @@ public void getControlTest() throws Exception {
             .setDisplayName("displayName1714148973")
             .addAllAssociatedServingConfigIds(new ArrayList())
             .addAllSolutionTypes(new ArrayList())
+            .addAllSearchSolutionUseCase(new ArrayList())
             .build();
     mockService.addResponse(expectedResponse);
 
@@ -379,6 +385,7 @@ public void getControlTest2() throws Exception {
             .setDisplayName("displayName1714148973")
             .addAllAssociatedServingConfigIds(new ArrayList())
             .addAllSolutionTypes(new ArrayList())
+            .addAllSearchSolutionUseCase(new ArrayList())
             .build();
     mockService.addResponse(expectedResponse);
 
diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ControlServiceClientTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ControlServiceClientTest.java
index 7362283b..49f22f88 100644
--- a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ControlServiceClientTest.java
+++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ControlServiceClientTest.java
@@ -89,6 +89,7 @@ public void createControlTest() throws Exception {
             .setDisplayName("displayName1714148973")
             .addAllAssociatedServingConfigIds(new ArrayList())
             .addAllSolutionTypes(new ArrayList())
+            .addAllSearchSolutionUseCase(new ArrayList())
             .build();
     mockControlService.addResponse(expectedResponse);
 
@@ -136,6 +137,7 @@ public void createControlTest2() throws Exception {
             .setDisplayName("displayName1714148973")
             .addAllAssociatedServingConfigIds(new ArrayList())
             .addAllSolutionTypes(new ArrayList())
+            .addAllSearchSolutionUseCase(new ArrayList())
             .build();
     mockControlService.addResponse(expectedResponse);
 
@@ -251,6 +253,7 @@ public void updateControlTest() throws Exception {
             .setDisplayName("displayName1714148973")
             .addAllAssociatedServingConfigIds(new ArrayList())
             .addAllSolutionTypes(new ArrayList())
+            .addAllSearchSolutionUseCase(new ArrayList())
             .build();
     mockControlService.addResponse(expectedResponse);
 
@@ -295,6 +298,7 @@ public void getControlTest() throws Exception {
             .setDisplayName("displayName1714148973")
             .addAllAssociatedServingConfigIds(new ArrayList())
             .addAllSolutionTypes(new ArrayList())
+            .addAllSearchSolutionUseCase(new ArrayList())
             .build();
     mockControlService.addResponse(expectedResponse);
 
@@ -336,6 +340,7 @@ public void getControlTest2() throws Exception {
             .setDisplayName("displayName1714148973")
             .addAllAssociatedServingConfigIds(new ArrayList())
             .addAllSolutionTypes(new ArrayList())
+            .addAllSearchSolutionUseCase(new ArrayList())
             .build();
     mockControlService.addResponse(expectedResponse);
 
diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/MockCatalogServiceImpl.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/MockCatalogServiceImpl.java
index 2898705e..1f22c8b8 100644
--- a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/MockCatalogServiceImpl.java
+++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/MockCatalogServiceImpl.java
@@ -269,6 +269,28 @@ public void removeCatalogAttribute(
     }
   }
 
+  @Override
+  public void batchRemoveCatalogAttributes(
+      BatchRemoveCatalogAttributesRequest request,
+      StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof BatchRemoveCatalogAttributesResponse) {
+      requests.add(request);
+      responseObserver.onNext(((BatchRemoveCatalogAttributesResponse) 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 BatchRemoveCatalogAttributes, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  BatchRemoveCatalogAttributesResponse.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+
   @Override
   public void replaceCatalogAttribute(
       ReplaceCatalogAttributeRequest request, StreamObserver responseObserver) {
diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/MockModelService.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/MockModelService.java
new file mode 100644
index 00000000..c3f0c0b1
--- /dev/null
+++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/MockModelService.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta;
+
+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 MockModelService implements MockGrpcService {
+  private final MockModelServiceImpl serviceImpl;
+
+  public MockModelService() {
+    serviceImpl = new MockModelServiceImpl();
+  }
+
+  @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/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/MockModelServiceImpl.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/MockModelServiceImpl.java
new file mode 100644
index 00000000..6c37f333
--- /dev/null
+++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/MockModelServiceImpl.java
@@ -0,0 +1,203 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta;
+
+import com.google.api.core.BetaApi;
+import com.google.cloud.retail.v2beta.ModelServiceGrpc.ModelServiceImplBase;
+import com.google.longrunning.Operation;
+import com.google.protobuf.AbstractMessage;
+import com.google.protobuf.Empty;
+import io.grpc.stub.StreamObserver;
+import java.util.ArrayList;
+import java.util.LinkedList;
+import java.util.List;
+import java.util.Queue;
+import javax.annotation.Generated;
+
+@BetaApi
+@Generated("by gapic-generator-java")
+public class MockModelServiceImpl extends ModelServiceImplBase {
+  private List requests;
+  private Queue responses;
+
+  public MockModelServiceImpl() {
+    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 createModel(CreateModelRequest 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 CreateModel, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  Operation.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+
+  @Override
+  public void pauseModel(PauseModelRequest request, StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof Model) {
+      requests.add(request);
+      responseObserver.onNext(((Model) 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 PauseModel, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  Model.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+
+  @Override
+  public void resumeModel(ResumeModelRequest request, StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof Model) {
+      requests.add(request);
+      responseObserver.onNext(((Model) 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 ResumeModel, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  Model.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+
+  @Override
+  public void deleteModel(DeleteModelRequest request, StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof Empty) {
+      requests.add(request);
+      responseObserver.onNext(((Empty) response));
+      responseObserver.onCompleted();
+    } else if (response instanceof Exception) {
+      responseObserver.onError(((Exception) response));
+    } else {
+      responseObserver.onError(
+          new IllegalArgumentException(
+              String.format(
+                  "Unrecognized response type %s for method DeleteModel, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  Empty.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+
+  @Override
+  public void listModels(
+      ListModelsRequest request, StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof ListModelsResponse) {
+      requests.add(request);
+      responseObserver.onNext(((ListModelsResponse) 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 ListModels, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  ListModelsResponse.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+
+  @Override
+  public void updateModel(UpdateModelRequest request, StreamObserver responseObserver) {
+    Object response = responses.poll();
+    if (response instanceof Model) {
+      requests.add(request);
+      responseObserver.onNext(((Model) 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 UpdateModel, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  Model.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+
+  @Override
+  public void tuneModel(TuneModelRequest 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 TuneModel, expected %s or %s",
+                  response == null ? "null" : response.getClass().getName(),
+                  Operation.class.getName(),
+                  Exception.class.getName())));
+    }
+  }
+}
diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ModelServiceClientHttpJsonTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ModelServiceClientHttpJsonTest.java
new file mode 100644
index 00000000..63dbef2b
--- /dev/null
+++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ModelServiceClientHttpJsonTest.java
@@ -0,0 +1,722 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta;
+
+import static com.google.cloud.retail.v2beta.ModelServiceClient.ListModelsPagedResponse;
+
+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.retail.v2beta.stub.HttpJsonModelServiceStub;
+import com.google.common.collect.Lists;
+import com.google.longrunning.Operation;
+import com.google.protobuf.Any;
+import com.google.protobuf.Empty;
+import com.google.protobuf.FieldMask;
+import com.google.protobuf.Timestamp;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.concurrent.ExecutionException;
+import javax.annotation.Generated;
+import org.junit.After;
+import org.junit.AfterClass;
+import org.junit.Assert;
+import org.junit.Before;
+import org.junit.BeforeClass;
+import org.junit.Test;
+
+@Generated("by gapic-generator-java")
+public class ModelServiceClientHttpJsonTest {
+  private static MockHttpService mockService;
+  private static ModelServiceClient client;
+
+  @BeforeClass
+  public static void startStaticServer() throws IOException {
+    mockService =
+        new MockHttpService(
+            HttpJsonModelServiceStub.getMethodDescriptors(),
+            ModelServiceSettings.getDefaultEndpoint());
+    ModelServiceSettings settings =
+        ModelServiceSettings.newHttpJsonBuilder()
+            .setTransportChannelProvider(
+                ModelServiceSettings.defaultHttpJsonTransportProviderBuilder()
+                    .setHttpTransport(mockService)
+                    .build())
+            .setCredentialsProvider(NoCredentialsProvider.create())
+            .build();
+    client = ModelServiceClient.create(settings);
+  }
+
+  @AfterClass
+  public static void stopServer() {
+    client.close();
+  }
+
+  @Before
+  public void setUp() {}
+
+  @After
+  public void tearDown() throws Exception {
+    mockService.reset();
+  }
+
+  @Test
+  public void createModelTest() throws Exception {
+    Model expectedResponse =
+        Model.newBuilder()
+            .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+            .setDisplayName("displayName1714148973")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setType("type3575610")
+            .setOptimizationObjective("optimizationObjective-1014459828")
+            .setLastTuneTime(Timestamp.newBuilder().build())
+            .setTuningOperation("tuningOperation-1269747150")
+            .setFilteringOption(RecommendationsFilteringOption.forNumber(0))
+            .addAllServingConfigLists(new ArrayList())
+            .build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("createModelTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockService.addResponse(resultOperation);
+
+    CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+    Model model = Model.newBuilder().build();
+
+    Model actualResponse = client.createModelAsync(parent, model).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 createModelExceptionTest() throws Exception {
+    ApiException exception =
+        ApiExceptionFactory.createException(
+            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+    mockService.addException(exception);
+
+    try {
+      CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+      Model model = Model.newBuilder().build();
+      client.createModelAsync(parent, model).get();
+      Assert.fail("No exception raised");
+    } catch (ExecutionException e) {
+    }
+  }
+
+  @Test
+  public void createModelTest2() throws Exception {
+    Model expectedResponse =
+        Model.newBuilder()
+            .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+            .setDisplayName("displayName1714148973")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setType("type3575610")
+            .setOptimizationObjective("optimizationObjective-1014459828")
+            .setLastTuneTime(Timestamp.newBuilder().build())
+            .setTuningOperation("tuningOperation-1269747150")
+            .setFilteringOption(RecommendationsFilteringOption.forNumber(0))
+            .addAllServingConfigLists(new ArrayList())
+            .build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("createModelTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockService.addResponse(resultOperation);
+
+    String parent = "projects/project-6267/locations/location-6267/catalogs/catalog-6267";
+    Model model = Model.newBuilder().build();
+
+    Model actualResponse = client.createModelAsync(parent, model).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 createModelExceptionTest2() throws Exception {
+    ApiException exception =
+        ApiExceptionFactory.createException(
+            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+    mockService.addException(exception);
+
+    try {
+      String parent = "projects/project-6267/locations/location-6267/catalogs/catalog-6267";
+      Model model = Model.newBuilder().build();
+      client.createModelAsync(parent, model).get();
+      Assert.fail("No exception raised");
+    } catch (ExecutionException e) {
+    }
+  }
+
+  @Test
+  public void pauseModelTest() throws Exception {
+    Model expectedResponse =
+        Model.newBuilder()
+            .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+            .setDisplayName("displayName1714148973")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setType("type3575610")
+            .setOptimizationObjective("optimizationObjective-1014459828")
+            .setLastTuneTime(Timestamp.newBuilder().build())
+            .setTuningOperation("tuningOperation-1269747150")
+            .setFilteringOption(RecommendationsFilteringOption.forNumber(0))
+            .addAllServingConfigLists(new ArrayList())
+            .build();
+    mockService.addResponse(expectedResponse);
+
+    ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
+
+    Model actualResponse = client.pauseModel(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 pauseModelExceptionTest() throws Exception {
+    ApiException exception =
+        ApiExceptionFactory.createException(
+            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+    mockService.addException(exception);
+
+    try {
+      ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
+      client.pauseModel(name);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void pauseModelTest2() throws Exception {
+    Model expectedResponse =
+        Model.newBuilder()
+            .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+            .setDisplayName("displayName1714148973")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setType("type3575610")
+            .setOptimizationObjective("optimizationObjective-1014459828")
+            .setLastTuneTime(Timestamp.newBuilder().build())
+            .setTuningOperation("tuningOperation-1269747150")
+            .setFilteringOption(RecommendationsFilteringOption.forNumber(0))
+            .addAllServingConfigLists(new ArrayList())
+            .build();
+    mockService.addResponse(expectedResponse);
+
+    String name =
+        "projects/project-7594/locations/location-7594/catalogs/catalog-7594/models/model-7594";
+
+    Model actualResponse = client.pauseModel(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 pauseModelExceptionTest2() throws Exception {
+    ApiException exception =
+        ApiExceptionFactory.createException(
+            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+    mockService.addException(exception);
+
+    try {
+      String name =
+          "projects/project-7594/locations/location-7594/catalogs/catalog-7594/models/model-7594";
+      client.pauseModel(name);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void resumeModelTest() throws Exception {
+    Model expectedResponse =
+        Model.newBuilder()
+            .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+            .setDisplayName("displayName1714148973")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setType("type3575610")
+            .setOptimizationObjective("optimizationObjective-1014459828")
+            .setLastTuneTime(Timestamp.newBuilder().build())
+            .setTuningOperation("tuningOperation-1269747150")
+            .setFilteringOption(RecommendationsFilteringOption.forNumber(0))
+            .addAllServingConfigLists(new ArrayList())
+            .build();
+    mockService.addResponse(expectedResponse);
+
+    String name =
+        "projects/project-7594/locations/location-7594/catalogs/catalog-7594/models/model-7594";
+
+    Model actualResponse = client.resumeModel(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 resumeModelExceptionTest() throws Exception {
+    ApiException exception =
+        ApiExceptionFactory.createException(
+            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+    mockService.addException(exception);
+
+    try {
+      String name =
+          "projects/project-7594/locations/location-7594/catalogs/catalog-7594/models/model-7594";
+      client.resumeModel(name);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void deleteModelTest() throws Exception {
+    Empty expectedResponse = Empty.newBuilder().build();
+    mockService.addResponse(expectedResponse);
+
+    ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
+
+    client.deleteModel(name);
+
+    List actualRequests = mockService.getRequestPaths();
+    Assert.assertEquals(1, actualRequests.size());
+
+    String apiClientHeaderKey =
+        mockService
+            .getRequestHeaders()
+            .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+            .iterator()
+            .next();
+    Assert.assertTrue(
+        GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+            .matcher(apiClientHeaderKey)
+            .matches());
+  }
+
+  @Test
+  public void deleteModelExceptionTest() throws Exception {
+    ApiException exception =
+        ApiExceptionFactory.createException(
+            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+    mockService.addException(exception);
+
+    try {
+      ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
+      client.deleteModel(name);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void deleteModelTest2() throws Exception {
+    Empty expectedResponse = Empty.newBuilder().build();
+    mockService.addResponse(expectedResponse);
+
+    String name =
+        "projects/project-7594/locations/location-7594/catalogs/catalog-7594/models/model-7594";
+
+    client.deleteModel(name);
+
+    List actualRequests = mockService.getRequestPaths();
+    Assert.assertEquals(1, actualRequests.size());
+
+    String apiClientHeaderKey =
+        mockService
+            .getRequestHeaders()
+            .get(ApiClientHeaderProvider.getDefaultApiClientHeaderKey())
+            .iterator()
+            .next();
+    Assert.assertTrue(
+        GaxHttpJsonProperties.getDefaultApiClientHeaderPattern()
+            .matcher(apiClientHeaderKey)
+            .matches());
+  }
+
+  @Test
+  public void deleteModelExceptionTest2() throws Exception {
+    ApiException exception =
+        ApiExceptionFactory.createException(
+            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+    mockService.addException(exception);
+
+    try {
+      String name =
+          "projects/project-7594/locations/location-7594/catalogs/catalog-7594/models/model-7594";
+      client.deleteModel(name);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void listModelsTest() throws Exception {
+    Model responsesElement = Model.newBuilder().build();
+    ListModelsResponse expectedResponse =
+        ListModelsResponse.newBuilder()
+            .setNextPageToken("")
+            .addAllModels(Arrays.asList(responsesElement))
+            .build();
+    mockService.addResponse(expectedResponse);
+
+    CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+
+    ListModelsPagedResponse pagedListResponse = client.listModels(parent);
+
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getModelsList().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 listModelsExceptionTest() throws Exception {
+    ApiException exception =
+        ApiExceptionFactory.createException(
+            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+    mockService.addException(exception);
+
+    try {
+      CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+      client.listModels(parent);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void listModelsTest2() throws Exception {
+    Model responsesElement = Model.newBuilder().build();
+    ListModelsResponse expectedResponse =
+        ListModelsResponse.newBuilder()
+            .setNextPageToken("")
+            .addAllModels(Arrays.asList(responsesElement))
+            .build();
+    mockService.addResponse(expectedResponse);
+
+    String parent = "projects/project-6267/locations/location-6267/catalogs/catalog-6267";
+
+    ListModelsPagedResponse pagedListResponse = client.listModels(parent);
+
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getModelsList().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 listModelsExceptionTest2() throws Exception {
+    ApiException exception =
+        ApiExceptionFactory.createException(
+            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+    mockService.addException(exception);
+
+    try {
+      String parent = "projects/project-6267/locations/location-6267/catalogs/catalog-6267";
+      client.listModels(parent);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void updateModelTest() throws Exception {
+    Model expectedResponse =
+        Model.newBuilder()
+            .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+            .setDisplayName("displayName1714148973")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setType("type3575610")
+            .setOptimizationObjective("optimizationObjective-1014459828")
+            .setLastTuneTime(Timestamp.newBuilder().build())
+            .setTuningOperation("tuningOperation-1269747150")
+            .setFilteringOption(RecommendationsFilteringOption.forNumber(0))
+            .addAllServingConfigLists(new ArrayList())
+            .build();
+    mockService.addResponse(expectedResponse);
+
+    Model model =
+        Model.newBuilder()
+            .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+            .setDisplayName("displayName1714148973")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setType("type3575610")
+            .setOptimizationObjective("optimizationObjective-1014459828")
+            .setLastTuneTime(Timestamp.newBuilder().build())
+            .setTuningOperation("tuningOperation-1269747150")
+            .setFilteringOption(RecommendationsFilteringOption.forNumber(0))
+            .addAllServingConfigLists(new ArrayList())
+            .build();
+    FieldMask updateMask = FieldMask.newBuilder().build();
+
+    Model actualResponse = client.updateModel(model, 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 updateModelExceptionTest() throws Exception {
+    ApiException exception =
+        ApiExceptionFactory.createException(
+            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+    mockService.addException(exception);
+
+    try {
+      Model model =
+          Model.newBuilder()
+              .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+              .setDisplayName("displayName1714148973")
+              .setCreateTime(Timestamp.newBuilder().build())
+              .setUpdateTime(Timestamp.newBuilder().build())
+              .setType("type3575610")
+              .setOptimizationObjective("optimizationObjective-1014459828")
+              .setLastTuneTime(Timestamp.newBuilder().build())
+              .setTuningOperation("tuningOperation-1269747150")
+              .setFilteringOption(RecommendationsFilteringOption.forNumber(0))
+              .addAllServingConfigLists(new ArrayList())
+              .build();
+      FieldMask updateMask = FieldMask.newBuilder().build();
+      client.updateModel(model, updateMask);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void tuneModelTest() throws Exception {
+    TuneModelResponse expectedResponse = TuneModelResponse.newBuilder().build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("tuneModelTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockService.addResponse(resultOperation);
+
+    ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
+
+    TuneModelResponse actualResponse = client.tuneModelAsync(name).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 tuneModelExceptionTest() throws Exception {
+    ApiException exception =
+        ApiExceptionFactory.createException(
+            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+    mockService.addException(exception);
+
+    try {
+      ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
+      client.tuneModelAsync(name).get();
+      Assert.fail("No exception raised");
+    } catch (ExecutionException e) {
+    }
+  }
+
+  @Test
+  public void tuneModelTest2() throws Exception {
+    TuneModelResponse expectedResponse = TuneModelResponse.newBuilder().build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("tuneModelTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockService.addResponse(resultOperation);
+
+    String name =
+        "projects/project-7594/locations/location-7594/catalogs/catalog-7594/models/model-7594";
+
+    TuneModelResponse actualResponse = client.tuneModelAsync(name).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 tuneModelExceptionTest2() throws Exception {
+    ApiException exception =
+        ApiExceptionFactory.createException(
+            new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false);
+    mockService.addException(exception);
+
+    try {
+      String name =
+          "projects/project-7594/locations/location-7594/catalogs/catalog-7594/models/model-7594";
+      client.tuneModelAsync(name).get();
+      Assert.fail("No exception raised");
+    } catch (ExecutionException e) {
+    }
+  }
+}
diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ModelServiceClientTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ModelServiceClientTest.java
new file mode 100644
index 00000000..b5d20118
--- /dev/null
+++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ModelServiceClientTest.java
@@ -0,0 +1,637 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta;
+
+import static com.google.cloud.retail.v2beta.ModelServiceClient.ListModelsPagedResponse;
+
+import com.google.api.gax.core.NoCredentialsProvider;
+import com.google.api.gax.grpc.GaxGrpcProperties;
+import com.google.api.gax.grpc.testing.LocalChannelProvider;
+import com.google.api.gax.grpc.testing.MockGrpcService;
+import com.google.api.gax.grpc.testing.MockServiceHelper;
+import com.google.api.gax.rpc.ApiClientHeaderProvider;
+import com.google.api.gax.rpc.InvalidArgumentException;
+import com.google.api.gax.rpc.StatusCode;
+import com.google.common.collect.Lists;
+import com.google.longrunning.Operation;
+import com.google.protobuf.AbstractMessage;
+import com.google.protobuf.Any;
+import com.google.protobuf.Empty;
+import com.google.protobuf.FieldMask;
+import com.google.protobuf.Timestamp;
+import io.grpc.StatusRuntimeException;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.UUID;
+import 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 ModelServiceClientTest {
+  private static MockModelService mockModelService;
+  private static MockServiceHelper mockServiceHelper;
+  private LocalChannelProvider channelProvider;
+  private ModelServiceClient client;
+
+  @BeforeClass
+  public static void startStaticServer() {
+    mockModelService = new MockModelService();
+    mockServiceHelper =
+        new MockServiceHelper(
+            UUID.randomUUID().toString(), Arrays.asList(mockModelService));
+    mockServiceHelper.start();
+  }
+
+  @AfterClass
+  public static void stopServer() {
+    mockServiceHelper.stop();
+  }
+
+  @Before
+  public void setUp() throws IOException {
+    mockServiceHelper.reset();
+    channelProvider = mockServiceHelper.createChannelProvider();
+    ModelServiceSettings settings =
+        ModelServiceSettings.newBuilder()
+            .setTransportChannelProvider(channelProvider)
+            .setCredentialsProvider(NoCredentialsProvider.create())
+            .build();
+    client = ModelServiceClient.create(settings);
+  }
+
+  @After
+  public void tearDown() throws Exception {
+    client.close();
+  }
+
+  @Test
+  public void createModelTest() throws Exception {
+    Model expectedResponse =
+        Model.newBuilder()
+            .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+            .setDisplayName("displayName1714148973")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setType("type3575610")
+            .setOptimizationObjective("optimizationObjective-1014459828")
+            .setLastTuneTime(Timestamp.newBuilder().build())
+            .setTuningOperation("tuningOperation-1269747150")
+            .setFilteringOption(RecommendationsFilteringOption.forNumber(0))
+            .addAllServingConfigLists(new ArrayList())
+            .build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("createModelTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockModelService.addResponse(resultOperation);
+
+    CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+    Model model = Model.newBuilder().build();
+
+    Model actualResponse = client.createModelAsync(parent, model).get();
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockModelService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    CreateModelRequest actualRequest = ((CreateModelRequest) actualRequests.get(0));
+
+    Assert.assertEquals(parent.toString(), actualRequest.getParent());
+    Assert.assertEquals(model, actualRequest.getModel());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void createModelExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockModelService.addException(exception);
+
+    try {
+      CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+      Model model = Model.newBuilder().build();
+      client.createModelAsync(parent, model).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 createModelTest2() throws Exception {
+    Model expectedResponse =
+        Model.newBuilder()
+            .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+            .setDisplayName("displayName1714148973")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setType("type3575610")
+            .setOptimizationObjective("optimizationObjective-1014459828")
+            .setLastTuneTime(Timestamp.newBuilder().build())
+            .setTuningOperation("tuningOperation-1269747150")
+            .setFilteringOption(RecommendationsFilteringOption.forNumber(0))
+            .addAllServingConfigLists(new ArrayList())
+            .build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("createModelTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockModelService.addResponse(resultOperation);
+
+    String parent = "parent-995424086";
+    Model model = Model.newBuilder().build();
+
+    Model actualResponse = client.createModelAsync(parent, model).get();
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockModelService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    CreateModelRequest actualRequest = ((CreateModelRequest) actualRequests.get(0));
+
+    Assert.assertEquals(parent, actualRequest.getParent());
+    Assert.assertEquals(model, actualRequest.getModel());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void createModelExceptionTest2() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockModelService.addException(exception);
+
+    try {
+      String parent = "parent-995424086";
+      Model model = Model.newBuilder().build();
+      client.createModelAsync(parent, model).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 pauseModelTest() throws Exception {
+    Model expectedResponse =
+        Model.newBuilder()
+            .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+            .setDisplayName("displayName1714148973")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setType("type3575610")
+            .setOptimizationObjective("optimizationObjective-1014459828")
+            .setLastTuneTime(Timestamp.newBuilder().build())
+            .setTuningOperation("tuningOperation-1269747150")
+            .setFilteringOption(RecommendationsFilteringOption.forNumber(0))
+            .addAllServingConfigLists(new ArrayList())
+            .build();
+    mockModelService.addResponse(expectedResponse);
+
+    ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
+
+    Model actualResponse = client.pauseModel(name);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockModelService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    PauseModelRequest actualRequest = ((PauseModelRequest) actualRequests.get(0));
+
+    Assert.assertEquals(name.toString(), actualRequest.getName());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void pauseModelExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockModelService.addException(exception);
+
+    try {
+      ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
+      client.pauseModel(name);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void pauseModelTest2() throws Exception {
+    Model expectedResponse =
+        Model.newBuilder()
+            .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+            .setDisplayName("displayName1714148973")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setType("type3575610")
+            .setOptimizationObjective("optimizationObjective-1014459828")
+            .setLastTuneTime(Timestamp.newBuilder().build())
+            .setTuningOperation("tuningOperation-1269747150")
+            .setFilteringOption(RecommendationsFilteringOption.forNumber(0))
+            .addAllServingConfigLists(new ArrayList())
+            .build();
+    mockModelService.addResponse(expectedResponse);
+
+    String name = "name3373707";
+
+    Model actualResponse = client.pauseModel(name);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockModelService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    PauseModelRequest actualRequest = ((PauseModelRequest) actualRequests.get(0));
+
+    Assert.assertEquals(name, actualRequest.getName());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void pauseModelExceptionTest2() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockModelService.addException(exception);
+
+    try {
+      String name = "name3373707";
+      client.pauseModel(name);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void resumeModelTest() throws Exception {
+    Model expectedResponse =
+        Model.newBuilder()
+            .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+            .setDisplayName("displayName1714148973")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setType("type3575610")
+            .setOptimizationObjective("optimizationObjective-1014459828")
+            .setLastTuneTime(Timestamp.newBuilder().build())
+            .setTuningOperation("tuningOperation-1269747150")
+            .setFilteringOption(RecommendationsFilteringOption.forNumber(0))
+            .addAllServingConfigLists(new ArrayList())
+            .build();
+    mockModelService.addResponse(expectedResponse);
+
+    String name = "name3373707";
+
+    Model actualResponse = client.resumeModel(name);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockModelService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    ResumeModelRequest actualRequest = ((ResumeModelRequest) actualRequests.get(0));
+
+    Assert.assertEquals(name, actualRequest.getName());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void resumeModelExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockModelService.addException(exception);
+
+    try {
+      String name = "name3373707";
+      client.resumeModel(name);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void deleteModelTest() throws Exception {
+    Empty expectedResponse = Empty.newBuilder().build();
+    mockModelService.addResponse(expectedResponse);
+
+    ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
+
+    client.deleteModel(name);
+
+    List actualRequests = mockModelService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    DeleteModelRequest actualRequest = ((DeleteModelRequest) actualRequests.get(0));
+
+    Assert.assertEquals(name.toString(), actualRequest.getName());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void deleteModelExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockModelService.addException(exception);
+
+    try {
+      ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
+      client.deleteModel(name);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void deleteModelTest2() throws Exception {
+    Empty expectedResponse = Empty.newBuilder().build();
+    mockModelService.addResponse(expectedResponse);
+
+    String name = "name3373707";
+
+    client.deleteModel(name);
+
+    List actualRequests = mockModelService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    DeleteModelRequest actualRequest = ((DeleteModelRequest) actualRequests.get(0));
+
+    Assert.assertEquals(name, actualRequest.getName());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void deleteModelExceptionTest2() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockModelService.addException(exception);
+
+    try {
+      String name = "name3373707";
+      client.deleteModel(name);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void listModelsTest() throws Exception {
+    Model responsesElement = Model.newBuilder().build();
+    ListModelsResponse expectedResponse =
+        ListModelsResponse.newBuilder()
+            .setNextPageToken("")
+            .addAllModels(Arrays.asList(responsesElement))
+            .build();
+    mockModelService.addResponse(expectedResponse);
+
+    CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+
+    ListModelsPagedResponse pagedListResponse = client.listModels(parent);
+
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getModelsList().get(0), resources.get(0));
+
+    List actualRequests = mockModelService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    ListModelsRequest actualRequest = ((ListModelsRequest) actualRequests.get(0));
+
+    Assert.assertEquals(parent.toString(), actualRequest.getParent());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void listModelsExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockModelService.addException(exception);
+
+    try {
+      CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+      client.listModels(parent);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void listModelsTest2() throws Exception {
+    Model responsesElement = Model.newBuilder().build();
+    ListModelsResponse expectedResponse =
+        ListModelsResponse.newBuilder()
+            .setNextPageToken("")
+            .addAllModels(Arrays.asList(responsesElement))
+            .build();
+    mockModelService.addResponse(expectedResponse);
+
+    String parent = "parent-995424086";
+
+    ListModelsPagedResponse pagedListResponse = client.listModels(parent);
+
+    List resources = Lists.newArrayList(pagedListResponse.iterateAll());
+
+    Assert.assertEquals(1, resources.size());
+    Assert.assertEquals(expectedResponse.getModelsList().get(0), resources.get(0));
+
+    List actualRequests = mockModelService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    ListModelsRequest actualRequest = ((ListModelsRequest) actualRequests.get(0));
+
+    Assert.assertEquals(parent, actualRequest.getParent());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void listModelsExceptionTest2() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockModelService.addException(exception);
+
+    try {
+      String parent = "parent-995424086";
+      client.listModels(parent);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void updateModelTest() throws Exception {
+    Model expectedResponse =
+        Model.newBuilder()
+            .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+            .setDisplayName("displayName1714148973")
+            .setCreateTime(Timestamp.newBuilder().build())
+            .setUpdateTime(Timestamp.newBuilder().build())
+            .setType("type3575610")
+            .setOptimizationObjective("optimizationObjective-1014459828")
+            .setLastTuneTime(Timestamp.newBuilder().build())
+            .setTuningOperation("tuningOperation-1269747150")
+            .setFilteringOption(RecommendationsFilteringOption.forNumber(0))
+            .addAllServingConfigLists(new ArrayList())
+            .build();
+    mockModelService.addResponse(expectedResponse);
+
+    Model model = Model.newBuilder().build();
+    FieldMask updateMask = FieldMask.newBuilder().build();
+
+    Model actualResponse = client.updateModel(model, updateMask);
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockModelService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    UpdateModelRequest actualRequest = ((UpdateModelRequest) actualRequests.get(0));
+
+    Assert.assertEquals(model, actualRequest.getModel());
+    Assert.assertEquals(updateMask, actualRequest.getUpdateMask());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void updateModelExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockModelService.addException(exception);
+
+    try {
+      Model model = Model.newBuilder().build();
+      FieldMask updateMask = FieldMask.newBuilder().build();
+      client.updateModel(model, updateMask);
+      Assert.fail("No exception raised");
+    } catch (InvalidArgumentException e) {
+      // Expected exception.
+    }
+  }
+
+  @Test
+  public void tuneModelTest() throws Exception {
+    TuneModelResponse expectedResponse = TuneModelResponse.newBuilder().build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("tuneModelTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockModelService.addResponse(resultOperation);
+
+    ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
+
+    TuneModelResponse actualResponse = client.tuneModelAsync(name).get();
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockModelService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    TuneModelRequest actualRequest = ((TuneModelRequest) actualRequests.get(0));
+
+    Assert.assertEquals(name.toString(), actualRequest.getName());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void tuneModelExceptionTest() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockModelService.addException(exception);
+
+    try {
+      ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
+      client.tuneModelAsync(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 tuneModelTest2() throws Exception {
+    TuneModelResponse expectedResponse = TuneModelResponse.newBuilder().build();
+    Operation resultOperation =
+        Operation.newBuilder()
+            .setName("tuneModelTest")
+            .setDone(true)
+            .setResponse(Any.pack(expectedResponse))
+            .build();
+    mockModelService.addResponse(resultOperation);
+
+    String name = "name3373707";
+
+    TuneModelResponse actualResponse = client.tuneModelAsync(name).get();
+    Assert.assertEquals(expectedResponse, actualResponse);
+
+    List actualRequests = mockModelService.getRequests();
+    Assert.assertEquals(1, actualRequests.size());
+    TuneModelRequest actualRequest = ((TuneModelRequest) actualRequests.get(0));
+
+    Assert.assertEquals(name, actualRequest.getName());
+    Assert.assertTrue(
+        channelProvider.isHeaderSent(
+            ApiClientHeaderProvider.getDefaultApiClientHeaderKey(),
+            GaxGrpcProperties.getDefaultApiClientHeaderPattern()));
+  }
+
+  @Test
+  public void tuneModelExceptionTest2() throws Exception {
+    StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT);
+    mockModelService.addException(exception);
+
+    try {
+      String name = "name3373707";
+      client.tuneModelAsync(name).get();
+      Assert.fail("No exception raised");
+    } catch (ExecutionException e) {
+      Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass());
+      InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause());
+      Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode());
+    }
+  }
+}
diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ProductServiceClientHttpJsonTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ProductServiceClientHttpJsonTest.java
index ae36ae72..7c05980d 100644
--- a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ProductServiceClientHttpJsonTest.java
+++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ProductServiceClientHttpJsonTest.java
@@ -120,6 +120,7 @@ public void createProductTest() throws Exception {
             .setPublishTime(Timestamp.newBuilder().build())
             .setRetrievableFields(FieldMask.newBuilder().build())
             .addAllVariants(new ArrayList())
+            .addAllLocalInventories(new ArrayList())
             .build();
     mockService.addResponse(expectedResponse);
 
@@ -198,6 +199,7 @@ public void createProductTest2() throws Exception {
             .setPublishTime(Timestamp.newBuilder().build())
             .setRetrievableFields(FieldMask.newBuilder().build())
             .addAllVariants(new ArrayList())
+            .addAllLocalInventories(new ArrayList())
             .build();
     mockService.addResponse(expectedResponse);
 
@@ -278,6 +280,7 @@ public void getProductTest() throws Exception {
             .setPublishTime(Timestamp.newBuilder().build())
             .setRetrievableFields(FieldMask.newBuilder().build())
             .addAllVariants(new ArrayList())
+            .addAllLocalInventories(new ArrayList())
             .build();
     mockService.addResponse(expectedResponse);
 
@@ -354,6 +357,7 @@ public void getProductTest2() throws Exception {
             .setPublishTime(Timestamp.newBuilder().build())
             .setRetrievableFields(FieldMask.newBuilder().build())
             .addAllVariants(new ArrayList())
+            .addAllLocalInventories(new ArrayList())
             .build();
     mockService.addResponse(expectedResponse);
 
@@ -532,6 +536,7 @@ public void updateProductTest() throws Exception {
             .setPublishTime(Timestamp.newBuilder().build())
             .setRetrievableFields(FieldMask.newBuilder().build())
             .addAllVariants(new ArrayList())
+            .addAllLocalInventories(new ArrayList())
             .build();
     mockService.addResponse(expectedResponse);
 
@@ -568,6 +573,7 @@ public void updateProductTest() throws Exception {
             .setPublishTime(Timestamp.newBuilder().build())
             .setRetrievableFields(FieldMask.newBuilder().build())
             .addAllVariants(new ArrayList())
+            .addAllLocalInventories(new ArrayList())
             .build();
     FieldMask updateMask = FieldMask.newBuilder().build();
 
@@ -630,6 +636,7 @@ public void updateProductExceptionTest() throws Exception {
               .setPublishTime(Timestamp.newBuilder().build())
               .setRetrievableFields(FieldMask.newBuilder().build())
               .addAllVariants(new ArrayList())
+              .addAllLocalInventories(new ArrayList())
               .build();
       FieldMask updateMask = FieldMask.newBuilder().build();
       client.updateProduct(product, updateMask);
@@ -834,6 +841,7 @@ public void setInventoryTest() throws Exception {
             .setPublishTime(Timestamp.newBuilder().build())
             .setRetrievableFields(FieldMask.newBuilder().build())
             .addAllVariants(new ArrayList())
+            .addAllLocalInventories(new ArrayList())
             .build();
     FieldMask setMask = FieldMask.newBuilder().build();
 
@@ -896,6 +904,7 @@ public void setInventoryExceptionTest() throws Exception {
               .setPublishTime(Timestamp.newBuilder().build())
               .setRetrievableFields(FieldMask.newBuilder().build())
               .addAllVariants(new ArrayList())
+              .addAllLocalInventories(new ArrayList())
               .build();
       FieldMask setMask = FieldMask.newBuilder().build();
       client.setInventoryAsync(inventory, setMask).get();
diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ProductServiceClientTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ProductServiceClientTest.java
index 0ad296bd..ffa71b16 100644
--- a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ProductServiceClientTest.java
+++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ProductServiceClientTest.java
@@ -124,6 +124,7 @@ public void createProductTest() throws Exception {
             .setPublishTime(Timestamp.newBuilder().build())
             .setRetrievableFields(FieldMask.newBuilder().build())
             .addAllVariants(new ArrayList())
+            .addAllLocalInventories(new ArrayList())
             .build();
     mockProductService.addResponse(expectedResponse);
 
@@ -198,6 +199,7 @@ public void createProductTest2() throws Exception {
             .setPublishTime(Timestamp.newBuilder().build())
             .setRetrievableFields(FieldMask.newBuilder().build())
             .addAllVariants(new ArrayList())
+            .addAllLocalInventories(new ArrayList())
             .build();
     mockProductService.addResponse(expectedResponse);
 
@@ -272,6 +274,7 @@ public void getProductTest() throws Exception {
             .setPublishTime(Timestamp.newBuilder().build())
             .setRetrievableFields(FieldMask.newBuilder().build())
             .addAllVariants(new ArrayList())
+            .addAllLocalInventories(new ArrayList())
             .build();
     mockProductService.addResponse(expectedResponse);
 
@@ -342,6 +345,7 @@ public void getProductTest2() throws Exception {
             .setPublishTime(Timestamp.newBuilder().build())
             .setRetrievableFields(FieldMask.newBuilder().build())
             .addAllVariants(new ArrayList())
+            .addAllLocalInventories(new ArrayList())
             .build();
     mockProductService.addResponse(expectedResponse);
 
@@ -498,6 +502,7 @@ public void updateProductTest() throws Exception {
             .setPublishTime(Timestamp.newBuilder().build())
             .setRetrievableFields(FieldMask.newBuilder().build())
             .addAllVariants(new ArrayList())
+            .addAllLocalInventories(new ArrayList())
             .build();
     mockProductService.addResponse(expectedResponse);
 
diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ServingConfigServiceClientHttpJsonTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ServingConfigServiceClientHttpJsonTest.java
index 218b82d1..4dc5d570 100644
--- a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ServingConfigServiceClientHttpJsonTest.java
+++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ServingConfigServiceClientHttpJsonTest.java
@@ -100,6 +100,7 @@ public void createServingConfigTest() throws Exception {
             .addAllIgnoreControlIds(new ArrayList())
             .setDiversityLevel("diversityLevel578206123")
             .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+            .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
             .addAllSolutionTypes(new ArrayList())
             .build();
     mockService.addResponse(expectedResponse);
@@ -167,6 +168,7 @@ public void createServingConfigTest2() throws Exception {
             .addAllIgnoreControlIds(new ArrayList())
             .setDiversityLevel("diversityLevel578206123")
             .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+            .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
             .addAllSolutionTypes(new ArrayList())
             .build();
     mockService.addResponse(expectedResponse);
@@ -318,6 +320,7 @@ public void updateServingConfigTest() throws Exception {
             .addAllIgnoreControlIds(new ArrayList())
             .setDiversityLevel("diversityLevel578206123")
             .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+            .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
             .addAllSolutionTypes(new ArrayList())
             .build();
     mockService.addResponse(expectedResponse);
@@ -342,6 +345,7 @@ public void updateServingConfigTest() throws Exception {
             .addAllIgnoreControlIds(new ArrayList())
             .setDiversityLevel("diversityLevel578206123")
             .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+            .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
             .addAllSolutionTypes(new ArrayList())
             .build();
     FieldMask updateMask = FieldMask.newBuilder().build();
@@ -392,6 +396,7 @@ public void updateServingConfigExceptionTest() throws Exception {
               .addAllIgnoreControlIds(new ArrayList())
               .setDiversityLevel("diversityLevel578206123")
               .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+              .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
               .addAllSolutionTypes(new ArrayList())
               .build();
       FieldMask updateMask = FieldMask.newBuilder().build();
@@ -424,6 +429,7 @@ public void getServingConfigTest() throws Exception {
             .addAllIgnoreControlIds(new ArrayList())
             .setDiversityLevel("diversityLevel578206123")
             .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+            .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
             .addAllSolutionTypes(new ArrayList())
             .build();
     mockService.addResponse(expectedResponse);
@@ -488,6 +494,7 @@ public void getServingConfigTest2() throws Exception {
             .addAllIgnoreControlIds(new ArrayList())
             .setDiversityLevel("diversityLevel578206123")
             .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+            .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
             .addAllSolutionTypes(new ArrayList())
             .build();
     mockService.addResponse(expectedResponse);
@@ -652,6 +659,7 @@ public void addControlTest() throws Exception {
             .addAllIgnoreControlIds(new ArrayList())
             .setDiversityLevel("diversityLevel578206123")
             .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+            .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
             .addAllSolutionTypes(new ArrayList())
             .build();
     mockService.addResponse(expectedResponse);
@@ -716,6 +724,7 @@ public void addControlTest2() throws Exception {
             .addAllIgnoreControlIds(new ArrayList())
             .setDiversityLevel("diversityLevel578206123")
             .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+            .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
             .addAllSolutionTypes(new ArrayList())
             .build();
     mockService.addResponse(expectedResponse);
@@ -780,6 +789,7 @@ public void removeControlTest() throws Exception {
             .addAllIgnoreControlIds(new ArrayList())
             .setDiversityLevel("diversityLevel578206123")
             .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+            .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
             .addAllSolutionTypes(new ArrayList())
             .build();
     mockService.addResponse(expectedResponse);
@@ -844,6 +854,7 @@ public void removeControlTest2() throws Exception {
             .addAllIgnoreControlIds(new ArrayList())
             .setDiversityLevel("diversityLevel578206123")
             .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+            .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
             .addAllSolutionTypes(new ArrayList())
             .build();
     mockService.addResponse(expectedResponse);
diff --git a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ServingConfigServiceClientTest.java b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ServingConfigServiceClientTest.java
index 0a943586..1a4f0ed7 100644
--- a/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ServingConfigServiceClientTest.java
+++ b/google-cloud-retail/src/test/java/com/google/cloud/retail/v2beta/ServingConfigServiceClientTest.java
@@ -103,6 +103,7 @@ public void createServingConfigTest() throws Exception {
             .addAllIgnoreControlIds(new ArrayList())
             .setDiversityLevel("diversityLevel578206123")
             .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+            .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
             .addAllSolutionTypes(new ArrayList())
             .build();
     mockServingConfigService.addResponse(expectedResponse);
@@ -166,6 +167,7 @@ public void createServingConfigTest2() throws Exception {
             .addAllIgnoreControlIds(new ArrayList())
             .setDiversityLevel("diversityLevel578206123")
             .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+            .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
             .addAllSolutionTypes(new ArrayList())
             .build();
     mockServingConfigService.addResponse(expectedResponse);
@@ -299,6 +301,7 @@ public void updateServingConfigTest() throws Exception {
             .addAllIgnoreControlIds(new ArrayList())
             .setDiversityLevel("diversityLevel578206123")
             .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+            .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
             .addAllSolutionTypes(new ArrayList())
             .build();
     mockServingConfigService.addResponse(expectedResponse);
@@ -358,6 +361,7 @@ public void getServingConfigTest() throws Exception {
             .addAllIgnoreControlIds(new ArrayList())
             .setDiversityLevel("diversityLevel578206123")
             .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+            .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
             .addAllSolutionTypes(new ArrayList())
             .build();
     mockServingConfigService.addResponse(expectedResponse);
@@ -416,6 +420,7 @@ public void getServingConfigTest2() throws Exception {
             .addAllIgnoreControlIds(new ArrayList())
             .setDiversityLevel("diversityLevel578206123")
             .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+            .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
             .addAllSolutionTypes(new ArrayList())
             .build();
     mockServingConfigService.addResponse(expectedResponse);
@@ -560,6 +565,7 @@ public void addControlTest() throws Exception {
             .addAllIgnoreControlIds(new ArrayList())
             .setDiversityLevel("diversityLevel578206123")
             .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+            .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
             .addAllSolutionTypes(new ArrayList())
             .build();
     mockServingConfigService.addResponse(expectedResponse);
@@ -618,6 +624,7 @@ public void addControlTest2() throws Exception {
             .addAllIgnoreControlIds(new ArrayList())
             .setDiversityLevel("diversityLevel578206123")
             .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+            .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
             .addAllSolutionTypes(new ArrayList())
             .build();
     mockServingConfigService.addResponse(expectedResponse);
@@ -674,6 +681,7 @@ public void removeControlTest() throws Exception {
             .addAllIgnoreControlIds(new ArrayList())
             .setDiversityLevel("diversityLevel578206123")
             .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+            .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
             .addAllSolutionTypes(new ArrayList())
             .build();
     mockServingConfigService.addResponse(expectedResponse);
@@ -732,6 +740,7 @@ public void removeControlTest2() throws Exception {
             .addAllIgnoreControlIds(new ArrayList())
             .setDiversityLevel("diversityLevel578206123")
             .setEnableCategoryFilterLevel("enableCategoryFilterLevel-1232535413")
+            .setPersonalizationSpec(SearchRequest.PersonalizationSpec.newBuilder().build())
             .addAllSolutionTypes(new ArrayList())
             .build();
     mockServingConfigService.addResponse(expectedResponse);
diff --git a/grpc-google-cloud-retail-v2/pom.xml b/grpc-google-cloud-retail-v2/pom.xml
index 05423a75..b2560af0 100644
--- a/grpc-google-cloud-retail-v2/pom.xml
+++ b/grpc-google-cloud-retail-v2/pom.xml
@@ -4,13 +4,13 @@
   4.0.0
   com.google.api.grpc
   grpc-google-cloud-retail-v2
-  2.5.0
+  2.5.1
   grpc-google-cloud-retail-v2
   GRPC library for google-cloud-retail
   
     com.google.cloud
     google-cloud-retail-parent
-    2.5.0
+    2.5.1
   
   
     
diff --git a/grpc-google-cloud-retail-v2alpha/pom.xml b/grpc-google-cloud-retail-v2alpha/pom.xml
index 82662575..482f1c20 100644
--- a/grpc-google-cloud-retail-v2alpha/pom.xml
+++ b/grpc-google-cloud-retail-v2alpha/pom.xml
@@ -4,13 +4,13 @@
   4.0.0
   com.google.api.grpc
   grpc-google-cloud-retail-v2alpha
-  2.5.0
+  2.5.1
   grpc-google-cloud-retail-v2alpha
   GRPC library for google-cloud-retail
   
     com.google.cloud
     google-cloud-retail-parent
-    2.5.0
+    2.5.1
   
   
     
diff --git a/grpc-google-cloud-retail-v2beta/pom.xml b/grpc-google-cloud-retail-v2beta/pom.xml
index 822decc2..afd4fbec 100644
--- a/grpc-google-cloud-retail-v2beta/pom.xml
+++ b/grpc-google-cloud-retail-v2beta/pom.xml
@@ -4,13 +4,13 @@
   4.0.0
   com.google.api.grpc
   grpc-google-cloud-retail-v2beta
-  2.5.0
+  2.5.1
   grpc-google-cloud-retail-v2beta
   GRPC library for google-cloud-retail
   
     com.google.cloud
     google-cloud-retail-parent
-    2.5.0
+    2.5.1
   
   
     
diff --git a/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceGrpc.java b/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceGrpc.java
index 6765f04f..7c5a62e5 100644
--- a/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceGrpc.java
+++ b/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceGrpc.java
@@ -509,6 +509,59 @@ private CatalogServiceGrpc() {}
     return getRemoveCatalogAttributeMethod;
   }
 
+  private static volatile io.grpc.MethodDescriptor<
+          com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest,
+          com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse>
+      getBatchRemoveCatalogAttributesMethod;
+
+  @io.grpc.stub.annotations.RpcMethod(
+      fullMethodName = SERVICE_NAME + '/' + "BatchRemoveCatalogAttributes",
+      requestType = com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest.class,
+      responseType = com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse.class,
+      methodType = io.grpc.MethodDescriptor.MethodType.UNARY)
+  public static io.grpc.MethodDescriptor<
+          com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest,
+          com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse>
+      getBatchRemoveCatalogAttributesMethod() {
+    io.grpc.MethodDescriptor<
+            com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest,
+            com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse>
+        getBatchRemoveCatalogAttributesMethod;
+    if ((getBatchRemoveCatalogAttributesMethod =
+            CatalogServiceGrpc.getBatchRemoveCatalogAttributesMethod)
+        == null) {
+      synchronized (CatalogServiceGrpc.class) {
+        if ((getBatchRemoveCatalogAttributesMethod =
+                CatalogServiceGrpc.getBatchRemoveCatalogAttributesMethod)
+            == null) {
+          CatalogServiceGrpc.getBatchRemoveCatalogAttributesMethod =
+              getBatchRemoveCatalogAttributesMethod =
+                  io.grpc.MethodDescriptor
+                      .
+                          newBuilder()
+                      .setType(io.grpc.MethodDescriptor.MethodType.UNARY)
+                      .setFullMethodName(
+                          generateFullMethodName(SERVICE_NAME, "BatchRemoveCatalogAttributes"))
+                      .setSampledToLocalTracing(true)
+                      .setRequestMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest
+                                  .getDefaultInstance()))
+                      .setResponseMarshaller(
+                          io.grpc.protobuf.ProtoUtils.marshaller(
+                              com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse
+                                  .getDefaultInstance()))
+                      .setSchemaDescriptor(
+                          new CatalogServiceMethodDescriptorSupplier(
+                              "BatchRemoveCatalogAttributes"))
+                      .build();
+        }
+      }
+    }
+    return getBatchRemoveCatalogAttributesMethod;
+  }
+
   private static volatile io.grpc.MethodDescriptor<
           com.google.cloud.retail.v2beta.ReplaceCatalogAttributeRequest,
           com.google.cloud.retail.v2beta.AttributesConfig>
@@ -802,6 +855,24 @@ public void removeCatalogAttribute(
           getRemoveCatalogAttributeMethod(), responseObserver);
     }
 
+    /**
+     *
+     *
+     * 
+     * Removes all specified
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s from the
+     * [AttributesConfig][google.cloud.retail.v2beta.AttributesConfig].
+     * 
+ */ + public void batchRemoveCatalogAttributes( + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse> + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getBatchRemoveCatalogAttributesMethod(), responseObserver); + } + /** * * @@ -894,6 +965,13 @@ public final io.grpc.ServerServiceDefinition bindService() { com.google.cloud.retail.v2beta.RemoveCatalogAttributeRequest, com.google.cloud.retail.v2beta.AttributesConfig>( this, METHODID_REMOVE_CATALOG_ATTRIBUTE))) + .addMethod( + getBatchRemoveCatalogAttributesMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest, + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse>( + this, METHODID_BATCH_REMOVE_CATALOG_ATTRIBUTES))) .addMethod( getReplaceCatalogAttributeMethod(), io.grpc.stub.ServerCalls.asyncUnaryCall( @@ -1137,6 +1215,26 @@ public void removeCatalogAttribute( responseObserver); } + /** + * + * + *
+     * Removes all specified
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s from the
+     * [AttributesConfig][google.cloud.retail.v2beta.AttributesConfig].
+     * 
+ */ + public void batchRemoveCatalogAttributes( + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse> + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getBatchRemoveCatalogAttributesMethod(), getCallOptions()), + request, + responseObserver); + } + /** * * @@ -1356,6 +1454,22 @@ public com.google.cloud.retail.v2beta.AttributesConfig removeCatalogAttribute( getChannel(), getRemoveCatalogAttributeMethod(), getCallOptions(), request); } + /** + * + * + *
+     * Removes all specified
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s from the
+     * [AttributesConfig][google.cloud.retail.v2beta.AttributesConfig].
+     * 
+ */ + public com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse + batchRemoveCatalogAttributes( + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getBatchRemoveCatalogAttributesMethod(), getCallOptions(), request); + } + /** * * @@ -1583,6 +1697,23 @@ protected CatalogServiceFutureStub build( getChannel().newCall(getRemoveCatalogAttributeMethod(), getCallOptions()), request); } + /** + * + * + *
+     * Removes all specified
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s from the
+     * [AttributesConfig][google.cloud.retail.v2beta.AttributesConfig].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse> + batchRemoveCatalogAttributes( + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getBatchRemoveCatalogAttributesMethod(), getCallOptions()), request); + } + /** * * @@ -1615,7 +1746,8 @@ protected CatalogServiceFutureStub build( private static final int METHODID_UPDATE_ATTRIBUTES_CONFIG = 7; private static final int METHODID_ADD_CATALOG_ATTRIBUTE = 8; private static final int METHODID_REMOVE_CATALOG_ATTRIBUTE = 9; - private static final int METHODID_REPLACE_CATALOG_ATTRIBUTE = 10; + private static final int METHODID_BATCH_REMOVE_CATALOG_ATTRIBUTES = 10; + private static final int METHODID_REPLACE_CATALOG_ATTRIBUTE = 11; private static final class MethodHandlers implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -1693,6 +1825,13 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (io.grpc.stub.StreamObserver) responseObserver); break; + case METHODID_BATCH_REMOVE_CATALOG_ATTRIBUTES: + serviceImpl.batchRemoveCatalogAttributes( + (com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse>) + responseObserver); + break; case METHODID_REPLACE_CATALOG_ATTRIBUTE: serviceImpl.replaceCatalogAttribute( (com.google.cloud.retail.v2beta.ReplaceCatalogAttributeRequest) request, @@ -1773,6 +1912,7 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getUpdateAttributesConfigMethod()) .addMethod(getAddCatalogAttributeMethod()) .addMethod(getRemoveCatalogAttributeMethod()) + .addMethod(getBatchRemoveCatalogAttributesMethod()) .addMethod(getReplaceCatalogAttributeMethod()) .build(); } diff --git a/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceGrpc.java b/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceGrpc.java index 4141ea3c..4fad4d0e 100644 --- a/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceGrpc.java +++ b/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionServiceGrpc.java @@ -23,7 +23,7 @@ *
  * Auto-completion service for retail.
  * This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
  * 
*/ @javax.annotation.Generated( @@ -180,7 +180,7 @@ public CompletionServiceFutureStub newStub( *
    * Auto-completion service for retail.
    * This feature is only available for users who have Retail Search enabled.
-   * Please enable Retail Search on Cloud Console before using this feature.
+   * Enable Retail Search on Cloud Console before using this feature.
    * 
*/ public abstract static class CompletionServiceImplBase implements io.grpc.BindableService { @@ -191,7 +191,7 @@ public abstract static class CompletionServiceImplBase implements io.grpc.Bindab *
      * Completes the specified prefix with keyword suggestions.
      * This feature is only available for users who have Retail Search enabled.
-     * Please enable Retail Search on Cloud Console before using this feature.
+     * Enable Retail Search on Cloud Console before using this feature.
      * 
*/ public void completeQuery( @@ -211,7 +211,7 @@ public void completeQuery( * The operation is successfully finished only after the imported suggestions * are indexed successfully and ready for serving. The process takes hours. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public void importCompletionData( @@ -247,7 +247,7 @@ public final io.grpc.ServerServiceDefinition bindService() { *
    * Auto-completion service for retail.
    * This feature is only available for users who have Retail Search enabled.
-   * Please enable Retail Search on Cloud Console before using this feature.
+   * Enable Retail Search on Cloud Console before using this feature.
    * 
*/ public static final class CompletionServiceStub @@ -268,7 +268,7 @@ protected CompletionServiceStub build( *
      * Completes the specified prefix with keyword suggestions.
      * This feature is only available for users who have Retail Search enabled.
-     * Please enable Retail Search on Cloud Console before using this feature.
+     * Enable Retail Search on Cloud Console before using this feature.
      * 
*/ public void completeQuery( @@ -290,7 +290,7 @@ public void completeQuery( * The operation is successfully finished only after the imported suggestions * are indexed successfully and ready for serving. The process takes hours. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public void importCompletionData( @@ -309,7 +309,7 @@ public void importCompletionData( *
    * Auto-completion service for retail.
    * This feature is only available for users who have Retail Search enabled.
-   * Please enable Retail Search on Cloud Console before using this feature.
+   * Enable Retail Search on Cloud Console before using this feature.
    * 
*/ public static final class CompletionServiceBlockingStub @@ -331,7 +331,7 @@ protected CompletionServiceBlockingStub build( *
      * Completes the specified prefix with keyword suggestions.
      * This feature is only available for users who have Retail Search enabled.
-     * Please enable Retail Search on Cloud Console before using this feature.
+     * Enable Retail Search on Cloud Console before using this feature.
      * 
*/ public com.google.cloud.retail.v2beta.CompleteQueryResponse completeQuery( @@ -349,7 +349,7 @@ public com.google.cloud.retail.v2beta.CompleteQueryResponse completeQuery( * The operation is successfully finished only after the imported suggestions * are indexed successfully and ready for serving. The process takes hours. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public com.google.longrunning.Operation importCompletionData( @@ -365,7 +365,7 @@ public com.google.longrunning.Operation importCompletionData( *
    * Auto-completion service for retail.
    * This feature is only available for users who have Retail Search enabled.
-   * Please enable Retail Search on Cloud Console before using this feature.
+   * Enable Retail Search on Cloud Console before using this feature.
    * 
*/ public static final class CompletionServiceFutureStub @@ -386,7 +386,7 @@ protected CompletionServiceFutureStub build( *
      * Completes the specified prefix with keyword suggestions.
      * This feature is only available for users who have Retail Search enabled.
-     * Please enable Retail Search on Cloud Console before using this feature.
+     * Enable Retail Search on Cloud Console before using this feature.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< @@ -405,7 +405,7 @@ protected CompletionServiceFutureStub build( * The operation is successfully finished only after the imported suggestions * are indexed successfully and ready for serving. The process takes hours. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public com.google.common.util.concurrent.ListenableFuture diff --git a/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ControlServiceGrpc.java b/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ControlServiceGrpc.java index 940e6394..1e517559 100644 --- a/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ControlServiceGrpc.java +++ b/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ControlServiceGrpc.java @@ -349,7 +349,7 @@ public void deleteControl( * Updates a Control. * [Control][google.cloud.retail.v2beta.Control] cannot be set to a different * oneof field, if so an INVALID_ARGUMENT is returned. If the - * [Control][google.cloud.retail.v2beta.Control] to delete does not exist, a + * [Control][google.cloud.retail.v2beta.Control] to update does not exist, a * NOT_FOUND error is returned. * */ @@ -377,7 +377,8 @@ public void getControl( * * *
-     * Lists all Controls linked to this catalog.
+     * Lists all Controls by their parent
+     * [Catalog][google.cloud.retail.v2beta.Catalog].
      * 
*/ public void listControls( @@ -487,7 +488,7 @@ public void deleteControl( * Updates a Control. * [Control][google.cloud.retail.v2beta.Control] cannot be set to a different * oneof field, if so an INVALID_ARGUMENT is returned. If the - * [Control][google.cloud.retail.v2beta.Control] to delete does not exist, a + * [Control][google.cloud.retail.v2beta.Control] to update does not exist, a * NOT_FOUND error is returned. * */ @@ -518,7 +519,8 @@ public void getControl( * * *
-     * Lists all Controls linked to this catalog.
+     * Lists all Controls by their parent
+     * [Catalog][google.cloud.retail.v2beta.Catalog].
      * 
*/ public void listControls( @@ -588,7 +590,7 @@ public com.google.protobuf.Empty deleteControl( * Updates a Control. * [Control][google.cloud.retail.v2beta.Control] cannot be set to a different * oneof field, if so an INVALID_ARGUMENT is returned. If the - * [Control][google.cloud.retail.v2beta.Control] to delete does not exist, a + * [Control][google.cloud.retail.v2beta.Control] to update does not exist, a * NOT_FOUND error is returned. * */ @@ -615,7 +617,8 @@ public com.google.cloud.retail.v2beta.Control getControl( * * *
-     * Lists all Controls linked to this catalog.
+     * Lists all Controls by their parent
+     * [Catalog][google.cloud.retail.v2beta.Catalog].
      * 
*/ public com.google.cloud.retail.v2beta.ListControlsResponse listControls( @@ -682,7 +685,7 @@ protected ControlServiceFutureStub build( * Updates a Control. * [Control][google.cloud.retail.v2beta.Control] cannot be set to a different * oneof field, if so an INVALID_ARGUMENT is returned. If the - * [Control][google.cloud.retail.v2beta.Control] to delete does not exist, a + * [Control][google.cloud.retail.v2beta.Control] to update does not exist, a * NOT_FOUND error is returned. * */ @@ -711,7 +714,8 @@ protected ControlServiceFutureStub build( * * *
-     * Lists all Controls linked to this catalog.
+     * Lists all Controls by their parent
+     * [Catalog][google.cloud.retail.v2beta.Catalog].
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< diff --git a/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelServiceGrpc.java b/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelServiceGrpc.java new file mode 100644 index 00000000..171c2bf4 --- /dev/null +++ b/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelServiceGrpc.java @@ -0,0 +1,1075 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.retail.v2beta; + +import static io.grpc.MethodDescriptor.generateFullMethodName; + +/** + * + * + *
+ * Service for performing CRUD operations on models.
+ * Recommendation models contain all the metadata necessary to generate a set of
+ * models for the `Predict()` API. A model is queried
+ * indirectly via a ServingConfig, which associates a model with a
+ * given Placement (e.g. Frequently Bought Together on Home Page).
+ * This service allows you to do the following:
+ * * Initiate training of a model.
+ * * Pause training of an existing model.
+ * * List all the available models along with their metadata.
+ * * Control their tuning schedule.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/retail/v2beta/model_service.proto") +@io.grpc.stub.annotations.GrpcGenerated +public final class ModelServiceGrpc { + + private ModelServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.retail.v2beta.ModelService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.CreateModelRequest, com.google.longrunning.Operation> + getCreateModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateModel", + requestType = com.google.cloud.retail.v2beta.CreateModelRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.CreateModelRequest, com.google.longrunning.Operation> + getCreateModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.CreateModelRequest, com.google.longrunning.Operation> + getCreateModelMethod; + if ((getCreateModelMethod = ModelServiceGrpc.getCreateModelMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getCreateModelMethod = ModelServiceGrpc.getCreateModelMethod) == null) { + ModelServiceGrpc.getCreateModelMethod = + getCreateModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2beta.CreateModelRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("CreateModel")) + .build(); + } + } + } + return getCreateModelMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.PauseModelRequest, com.google.cloud.retail.v2beta.Model> + getPauseModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "PauseModel", + requestType = com.google.cloud.retail.v2beta.PauseModelRequest.class, + responseType = com.google.cloud.retail.v2beta.Model.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.PauseModelRequest, com.google.cloud.retail.v2beta.Model> + getPauseModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.PauseModelRequest, com.google.cloud.retail.v2beta.Model> + getPauseModelMethod; + if ((getPauseModelMethod = ModelServiceGrpc.getPauseModelMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getPauseModelMethod = ModelServiceGrpc.getPauseModelMethod) == null) { + ModelServiceGrpc.getPauseModelMethod = + getPauseModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "PauseModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2beta.PauseModelRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2beta.Model.getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("PauseModel")) + .build(); + } + } + } + return getPauseModelMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.ResumeModelRequest, com.google.cloud.retail.v2beta.Model> + getResumeModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ResumeModel", + requestType = com.google.cloud.retail.v2beta.ResumeModelRequest.class, + responseType = com.google.cloud.retail.v2beta.Model.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.ResumeModelRequest, com.google.cloud.retail.v2beta.Model> + getResumeModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.ResumeModelRequest, com.google.cloud.retail.v2beta.Model> + getResumeModelMethod; + if ((getResumeModelMethod = ModelServiceGrpc.getResumeModelMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getResumeModelMethod = ModelServiceGrpc.getResumeModelMethod) == null) { + ModelServiceGrpc.getResumeModelMethod = + getResumeModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ResumeModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2beta.ResumeModelRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2beta.Model.getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("ResumeModel")) + .build(); + } + } + } + return getResumeModelMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.DeleteModelRequest, com.google.protobuf.Empty> + getDeleteModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteModel", + requestType = com.google.cloud.retail.v2beta.DeleteModelRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.DeleteModelRequest, com.google.protobuf.Empty> + getDeleteModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.DeleteModelRequest, com.google.protobuf.Empty> + getDeleteModelMethod; + if ((getDeleteModelMethod = ModelServiceGrpc.getDeleteModelMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getDeleteModelMethod = ModelServiceGrpc.getDeleteModelMethod) == null) { + ModelServiceGrpc.getDeleteModelMethod = + getDeleteModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2beta.DeleteModelRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("DeleteModel")) + .build(); + } + } + } + return getDeleteModelMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.ListModelsRequest, + com.google.cloud.retail.v2beta.ListModelsResponse> + getListModelsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListModels", + requestType = com.google.cloud.retail.v2beta.ListModelsRequest.class, + responseType = com.google.cloud.retail.v2beta.ListModelsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.ListModelsRequest, + com.google.cloud.retail.v2beta.ListModelsResponse> + getListModelsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.ListModelsRequest, + com.google.cloud.retail.v2beta.ListModelsResponse> + getListModelsMethod; + if ((getListModelsMethod = ModelServiceGrpc.getListModelsMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getListModelsMethod = ModelServiceGrpc.getListModelsMethod) == null) { + ModelServiceGrpc.getListModelsMethod = + getListModelsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListModels")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2beta.ListModelsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2beta.ListModelsResponse + .getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("ListModels")) + .build(); + } + } + } + return getListModelsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.UpdateModelRequest, com.google.cloud.retail.v2beta.Model> + getUpdateModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateModel", + requestType = com.google.cloud.retail.v2beta.UpdateModelRequest.class, + responseType = com.google.cloud.retail.v2beta.Model.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.UpdateModelRequest, com.google.cloud.retail.v2beta.Model> + getUpdateModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.UpdateModelRequest, com.google.cloud.retail.v2beta.Model> + getUpdateModelMethod; + if ((getUpdateModelMethod = ModelServiceGrpc.getUpdateModelMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getUpdateModelMethod = ModelServiceGrpc.getUpdateModelMethod) == null) { + ModelServiceGrpc.getUpdateModelMethod = + getUpdateModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2beta.UpdateModelRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2beta.Model.getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("UpdateModel")) + .build(); + } + } + } + return getUpdateModelMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.TuneModelRequest, com.google.longrunning.Operation> + getTuneModelMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "TuneModel", + requestType = com.google.cloud.retail.v2beta.TuneModelRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.TuneModelRequest, com.google.longrunning.Operation> + getTuneModelMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.retail.v2beta.TuneModelRequest, com.google.longrunning.Operation> + getTuneModelMethod; + if ((getTuneModelMethod = ModelServiceGrpc.getTuneModelMethod) == null) { + synchronized (ModelServiceGrpc.class) { + if ((getTuneModelMethod = ModelServiceGrpc.getTuneModelMethod) == null) { + ModelServiceGrpc.getTuneModelMethod = + getTuneModelMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "TuneModel")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.retail.v2beta.TuneModelRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor(new ModelServiceMethodDescriptorSupplier("TuneModel")) + .build(); + } + } + } + return getTuneModelMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ModelServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ModelServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ModelServiceStub(channel, callOptions); + } + }; + return ModelServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ModelServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ModelServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ModelServiceBlockingStub(channel, callOptions); + } + }; + return ModelServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ModelServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ModelServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ModelServiceFutureStub(channel, callOptions); + } + }; + return ModelServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * Service for performing CRUD operations on models.
+   * Recommendation models contain all the metadata necessary to generate a set of
+   * models for the `Predict()` API. A model is queried
+   * indirectly via a ServingConfig, which associates a model with a
+   * given Placement (e.g. Frequently Bought Together on Home Page).
+   * This service allows you to do the following:
+   * * Initiate training of a model.
+   * * Pause training of an existing model.
+   * * List all the available models along with their metadata.
+   * * Control their tuning schedule.
+   * 
+ */ + public abstract static class ModelServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Creates a new model.
+     * 
+ */ + public void createModel( + com.google.cloud.retail.v2beta.CreateModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getCreateModelMethod(), responseObserver); + } + + /** + * + * + *
+     * Pauses the training of an existing model.
+     * 
+ */ + public void pauseModel( + com.google.cloud.retail.v2beta.PauseModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getPauseModelMethod(), responseObserver); + } + + /** + * + * + *
+     * Resumes the training of an existing model.
+     * 
+ */ + public void resumeModel( + com.google.cloud.retail.v2beta.ResumeModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getResumeModelMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes an existing model.
+     * 
+ */ + public void deleteModel( + com.google.cloud.retail.v2beta.DeleteModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getDeleteModelMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists all the models linked to this event store.
+     * 
+ */ + public void listModels( + com.google.cloud.retail.v2beta.ListModelsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListModelsMethod(), responseObserver); + } + + /** + * + * + *
+     * Update of model metadata. Only fields that
+     * currently can be updated are: `filtering_option` and
+     * `periodic_tuning_state`.
+     * If other values are provided, this API method ignores them.
+     * 
+ */ + public void updateModel( + com.google.cloud.retail.v2beta.UpdateModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( + getUpdateModelMethod(), responseObserver); + } + + /** + * + * + *
+     * Tunes an existing model.
+     * 
+ */ + public void tuneModel( + com.google.cloud.retail.v2beta.TuneModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getTuneModelMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getCreateModelMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2beta.CreateModelRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_MODEL))) + .addMethod( + getPauseModelMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2beta.PauseModelRequest, + com.google.cloud.retail.v2beta.Model>(this, METHODID_PAUSE_MODEL))) + .addMethod( + getResumeModelMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2beta.ResumeModelRequest, + com.google.cloud.retail.v2beta.Model>(this, METHODID_RESUME_MODEL))) + .addMethod( + getDeleteModelMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2beta.DeleteModelRequest, com.google.protobuf.Empty>( + this, METHODID_DELETE_MODEL))) + .addMethod( + getListModelsMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2beta.ListModelsRequest, + com.google.cloud.retail.v2beta.ListModelsResponse>( + this, METHODID_LIST_MODELS))) + .addMethod( + getUpdateModelMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2beta.UpdateModelRequest, + com.google.cloud.retail.v2beta.Model>(this, METHODID_UPDATE_MODEL))) + .addMethod( + getTuneModelMethod(), + io.grpc.stub.ServerCalls.asyncUnaryCall( + new MethodHandlers< + com.google.cloud.retail.v2beta.TuneModelRequest, + com.google.longrunning.Operation>(this, METHODID_TUNE_MODEL))) + .build(); + } + } + + /** + * + * + *
+   * Service for performing CRUD operations on models.
+   * Recommendation models contain all the metadata necessary to generate a set of
+   * models for the `Predict()` API. A model is queried
+   * indirectly via a ServingConfig, which associates a model with a
+   * given Placement (e.g. Frequently Bought Together on Home Page).
+   * This service allows you to do the following:
+   * * Initiate training of a model.
+   * * Pause training of an existing model.
+   * * List all the available models along with their metadata.
+   * * Control their tuning schedule.
+   * 
+ */ + public static final class ModelServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private ModelServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ModelServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ModelServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new model.
+     * 
+ */ + public void createModel( + com.google.cloud.retail.v2beta.CreateModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getCreateModelMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Pauses the training of an existing model.
+     * 
+ */ + public void pauseModel( + com.google.cloud.retail.v2beta.PauseModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getPauseModelMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Resumes the training of an existing model.
+     * 
+ */ + public void resumeModel( + com.google.cloud.retail.v2beta.ResumeModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getResumeModelMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes an existing model.
+     * 
+ */ + public void deleteModel( + com.google.cloud.retail.v2beta.DeleteModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getDeleteModelMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists all the models linked to this event store.
+     * 
+ */ + public void listModels( + com.google.cloud.retail.v2beta.ListModelsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getListModelsMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Update of model metadata. Only fields that
+     * currently can be updated are: `filtering_option` and
+     * `periodic_tuning_state`.
+     * If other values are provided, this API method ignores them.
+     * 
+ */ + public void updateModel( + com.google.cloud.retail.v2beta.UpdateModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getUpdateModelMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Tunes an existing model.
+     * 
+ */ + public void tuneModel( + com.google.cloud.retail.v2beta.TuneModelRequest request, + io.grpc.stub.StreamObserver responseObserver) { + io.grpc.stub.ClientCalls.asyncUnaryCall( + getChannel().newCall(getTuneModelMethod(), getCallOptions()), request, responseObserver); + } + } + + /** + * + * + *
+   * Service for performing CRUD operations on models.
+   * Recommendation models contain all the metadata necessary to generate a set of
+   * models for the `Predict()` API. A model is queried
+   * indirectly via a ServingConfig, which associates a model with a
+   * given Placement (e.g. Frequently Bought Together on Home Page).
+   * This service allows you to do the following:
+   * * Initiate training of a model.
+   * * Pause training of an existing model.
+   * * List all the available models along with their metadata.
+   * * Control their tuning schedule.
+   * 
+ */ + public static final class ModelServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ModelServiceBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ModelServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ModelServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new model.
+     * 
+ */ + public com.google.longrunning.Operation createModel( + com.google.cloud.retail.v2beta.CreateModelRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getCreateModelMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Pauses the training of an existing model.
+     * 
+ */ + public com.google.cloud.retail.v2beta.Model pauseModel( + com.google.cloud.retail.v2beta.PauseModelRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getPauseModelMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Resumes the training of an existing model.
+     * 
+ */ + public com.google.cloud.retail.v2beta.Model resumeModel( + com.google.cloud.retail.v2beta.ResumeModelRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getResumeModelMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes an existing model.
+     * 
+ */ + public com.google.protobuf.Empty deleteModel( + com.google.cloud.retail.v2beta.DeleteModelRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getDeleteModelMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists all the models linked to this event store.
+     * 
+ */ + public com.google.cloud.retail.v2beta.ListModelsResponse listModels( + com.google.cloud.retail.v2beta.ListModelsRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getListModelsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Update of model metadata. Only fields that
+     * currently can be updated are: `filtering_option` and
+     * `periodic_tuning_state`.
+     * If other values are provided, this API method ignores them.
+     * 
+ */ + public com.google.cloud.retail.v2beta.Model updateModel( + com.google.cloud.retail.v2beta.UpdateModelRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getUpdateModelMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Tunes an existing model.
+     * 
+ */ + public com.google.longrunning.Operation tuneModel( + com.google.cloud.retail.v2beta.TuneModelRequest request) { + return io.grpc.stub.ClientCalls.blockingUnaryCall( + getChannel(), getTuneModelMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * Service for performing CRUD operations on models.
+   * Recommendation models contain all the metadata necessary to generate a set of
+   * models for the `Predict()` API. A model is queried
+   * indirectly via a ServingConfig, which associates a model with a
+   * given Placement (e.g. Frequently Bought Together on Home Page).
+   * This service allows you to do the following:
+   * * Initiate training of a model.
+   * * Pause training of an existing model.
+   * * List all the available models along with their metadata.
+   * * Control their tuning schedule.
+   * 
+ */ + public static final class ModelServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ModelServiceFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ModelServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ModelServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Creates a new model.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createModel(com.google.cloud.retail.v2beta.CreateModelRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getCreateModelMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Pauses the training of an existing model.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + pauseModel(com.google.cloud.retail.v2beta.PauseModelRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getPauseModelMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Resumes the training of an existing model.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + resumeModel(com.google.cloud.retail.v2beta.ResumeModelRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getResumeModelMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes an existing model.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteModel(com.google.cloud.retail.v2beta.DeleteModelRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getDeleteModelMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists all the models linked to this event store.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.retail.v2beta.ListModelsResponse> + listModels(com.google.cloud.retail.v2beta.ListModelsRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getListModelsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Update of model metadata. Only fields that
+     * currently can be updated are: `filtering_option` and
+     * `periodic_tuning_state`.
+     * If other values are provided, this API method ignores them.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateModel(com.google.cloud.retail.v2beta.UpdateModelRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getUpdateModelMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Tunes an existing model.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + tuneModel(com.google.cloud.retail.v2beta.TuneModelRequest request) { + return io.grpc.stub.ClientCalls.futureUnaryCall( + getChannel().newCall(getTuneModelMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_CREATE_MODEL = 0; + private static final int METHODID_PAUSE_MODEL = 1; + private static final int METHODID_RESUME_MODEL = 2; + private static final int METHODID_DELETE_MODEL = 3; + private static final int METHODID_LIST_MODELS = 4; + private static final int METHODID_UPDATE_MODEL = 5; + private static final int METHODID_TUNE_MODEL = 6; + + private static final class MethodHandlers + implements io.grpc.stub.ServerCalls.UnaryMethod, + io.grpc.stub.ServerCalls.ServerStreamingMethod, + io.grpc.stub.ServerCalls.ClientStreamingMethod, + io.grpc.stub.ServerCalls.BidiStreamingMethod { + private final ModelServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ModelServiceImplBase 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_MODEL: + serviceImpl.createModel( + (com.google.cloud.retail.v2beta.CreateModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_PAUSE_MODEL: + serviceImpl.pauseModel( + (com.google.cloud.retail.v2beta.PauseModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_RESUME_MODEL: + serviceImpl.resumeModel( + (com.google.cloud.retail.v2beta.ResumeModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_MODEL: + serviceImpl.deleteModel( + (com.google.cloud.retail.v2beta.DeleteModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_MODELS: + serviceImpl.listModels( + (com.google.cloud.retail.v2beta.ListModelsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_MODEL: + serviceImpl.updateModel( + (com.google.cloud.retail.v2beta.UpdateModelRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_TUNE_MODEL: + serviceImpl.tuneModel( + (com.google.cloud.retail.v2beta.TuneModelRequest) 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(); + } + } + } + + private abstract static class ModelServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ModelServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ModelService"); + } + } + + private static final class ModelServiceFileDescriptorSupplier + extends ModelServiceBaseDescriptorSupplier { + ModelServiceFileDescriptorSupplier() {} + } + + private static final class ModelServiceMethodDescriptorSupplier + extends ModelServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ModelServiceMethodDescriptorSupplier(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 (ModelServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ModelServiceFileDescriptorSupplier()) + .addMethod(getCreateModelMethod()) + .addMethod(getPauseModelMethod()) + .addMethod(getResumeModelMethod()) + .addMethod(getDeleteModelMethod()) + .addMethod(getListModelsMethod()) + .addMethod(getUpdateModelMethod()) + .addMethod(getTuneModelMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductServiceGrpc.java b/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductServiceGrpc.java index 4fb66ba5..51be63d8 100644 --- a/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductServiceGrpc.java +++ b/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductServiceGrpc.java @@ -690,9 +690,9 @@ public void importProducts( * update timestamps of each inventory field. * This process is asynchronous and does not require the * [Product][google.cloud.retail.v2beta.Product] to exist before updating - * fulfillment information. If the request is valid, the update will be - * enqueued and processed downstream. As a consequence, when a response is - * returned, updates are not immediately manifested in the + * fulfillment information. If the request is valid, the update is enqueued + * and processed downstream. As a consequence, when a response is returned, + * updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] * or @@ -701,27 +701,34 @@ public void importProducts( * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] * and * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct], - * the specified inventory field value(s) will overwrite any existing value(s) + * the specified inventory field value(s) overwrite any existing value(s) * while ignoring the last update time for this field. Furthermore, the last - * update time for the specified inventory fields will be overwritten to the - * time of the + * update times for the specified inventory fields are overwritten by the + * times of the * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] * or * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * request. * If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2beta.CreateProductRequest.product], - * then any pre-existing inventory information for this product will be used. + * then any pre-existing inventory information for this product is used. * If no inventory fields are set in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask], - * then any existing inventory information will be preserved. + * then any existing inventory information is preserved. * Pre-existing inventory information can only be updated with * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory], * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces], * and * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. + * The returned [Operation][google.longrunning.Operation]s is obsolete after + * one day, and the [GetOperation][google.longrunning.Operations.GetOperation] + * API returns `NOT_FOUND` afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates are not marked as [done][google.longrunning.Operation.done] until + * they are obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public void setInventory( @@ -746,8 +753,15 @@ public void setInventory( * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] * or * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * The returned [Operation][google.longrunning.Operation]s will be obsolete + * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + * API will return NOT_FOUND afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates will not be marked as [done][google.longrunning.Operation.done] + * until being obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public void addFulfillmentPlaces( @@ -772,8 +786,15 @@ public void addFulfillmentPlaces( * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] * or * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * The returned [Operation][google.longrunning.Operation]s will be obsolete + * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + * API will return NOT_FOUND afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates will not be marked as [done][google.longrunning.Operation.done] + * until being obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public void removeFulfillmentPlaces( @@ -804,8 +825,15 @@ public void removeFulfillmentPlaces( * and * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * has no effect on local inventories. + * The returned [Operation][google.longrunning.Operation]s will be obsolete + * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + * API will return NOT_FOUND afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates will not be marked as [done][google.longrunning.Operation.done] + * until being obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public void addLocalInventories( @@ -834,8 +862,15 @@ public void addLocalInventories( * and * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * has no effect on local inventories. + * The returned [Operation][google.longrunning.Operation]s will be obsolete + * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + * API will return NOT_FOUND afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates will not be marked as [done][google.longrunning.Operation.done] + * until being obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public void removeLocalInventories( @@ -1046,9 +1081,9 @@ public void importProducts( * update timestamps of each inventory field. * This process is asynchronous and does not require the * [Product][google.cloud.retail.v2beta.Product] to exist before updating - * fulfillment information. If the request is valid, the update will be - * enqueued and processed downstream. As a consequence, when a response is - * returned, updates are not immediately manifested in the + * fulfillment information. If the request is valid, the update is enqueued + * and processed downstream. As a consequence, when a response is returned, + * updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] * or @@ -1057,27 +1092,34 @@ public void importProducts( * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] * and * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct], - * the specified inventory field value(s) will overwrite any existing value(s) + * the specified inventory field value(s) overwrite any existing value(s) * while ignoring the last update time for this field. Furthermore, the last - * update time for the specified inventory fields will be overwritten to the - * time of the + * update times for the specified inventory fields are overwritten by the + * times of the * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] * or * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * request. * If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2beta.CreateProductRequest.product], - * then any pre-existing inventory information for this product will be used. + * then any pre-existing inventory information for this product is used. * If no inventory fields are set in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask], - * then any existing inventory information will be preserved. + * then any existing inventory information is preserved. * Pre-existing inventory information can only be updated with * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory], * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces], * and * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. + * The returned [Operation][google.longrunning.Operation]s is obsolete after + * one day, and the [GetOperation][google.longrunning.Operations.GetOperation] + * API returns `NOT_FOUND` afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates are not marked as [done][google.longrunning.Operation.done] until + * they are obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public void setInventory( @@ -1104,8 +1146,15 @@ public void setInventory( * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] * or * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * The returned [Operation][google.longrunning.Operation]s will be obsolete + * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + * API will return NOT_FOUND afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates will not be marked as [done][google.longrunning.Operation.done] + * until being obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public void addFulfillmentPlaces( @@ -1132,8 +1181,15 @@ public void addFulfillmentPlaces( * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] * or * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * The returned [Operation][google.longrunning.Operation]s will be obsolete + * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + * API will return NOT_FOUND afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates will not be marked as [done][google.longrunning.Operation.done] + * until being obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public void removeFulfillmentPlaces( @@ -1166,8 +1222,15 @@ public void removeFulfillmentPlaces( * and * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * has no effect on local inventories. + * The returned [Operation][google.longrunning.Operation]s will be obsolete + * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + * API will return NOT_FOUND afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates will not be marked as [done][google.longrunning.Operation.done] + * until being obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public void addLocalInventories( @@ -1198,8 +1261,15 @@ public void addLocalInventories( * and * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * has no effect on local inventories. + * The returned [Operation][google.longrunning.Operation]s will be obsolete + * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + * API will return NOT_FOUND afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates will not be marked as [done][google.longrunning.Operation.done] + * until being obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public void removeLocalInventories( @@ -1323,9 +1393,9 @@ public com.google.longrunning.Operation importProducts( * update timestamps of each inventory field. * This process is asynchronous and does not require the * [Product][google.cloud.retail.v2beta.Product] to exist before updating - * fulfillment information. If the request is valid, the update will be - * enqueued and processed downstream. As a consequence, when a response is - * returned, updates are not immediately manifested in the + * fulfillment information. If the request is valid, the update is enqueued + * and processed downstream. As a consequence, when a response is returned, + * updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] * or @@ -1334,27 +1404,34 @@ public com.google.longrunning.Operation importProducts( * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] * and * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct], - * the specified inventory field value(s) will overwrite any existing value(s) + * the specified inventory field value(s) overwrite any existing value(s) * while ignoring the last update time for this field. Furthermore, the last - * update time for the specified inventory fields will be overwritten to the - * time of the + * update times for the specified inventory fields are overwritten by the + * times of the * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] * or * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * request. * If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2beta.CreateProductRequest.product], - * then any pre-existing inventory information for this product will be used. + * then any pre-existing inventory information for this product is used. * If no inventory fields are set in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask], - * then any existing inventory information will be preserved. + * then any existing inventory information is preserved. * Pre-existing inventory information can only be updated with * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory], * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces], * and * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. + * The returned [Operation][google.longrunning.Operation]s is obsolete after + * one day, and the [GetOperation][google.longrunning.Operations.GetOperation] + * API returns `NOT_FOUND` afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates are not marked as [done][google.longrunning.Operation.done] until + * they are obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public com.google.longrunning.Operation setInventory( @@ -1378,8 +1455,15 @@ public com.google.longrunning.Operation setInventory( * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] * or * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * The returned [Operation][google.longrunning.Operation]s will be obsolete + * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + * API will return NOT_FOUND afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates will not be marked as [done][google.longrunning.Operation.done] + * until being obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public com.google.longrunning.Operation addFulfillmentPlaces( @@ -1403,8 +1487,15 @@ public com.google.longrunning.Operation addFulfillmentPlaces( * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] * or * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * The returned [Operation][google.longrunning.Operation]s will be obsolete + * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + * API will return NOT_FOUND afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates will not be marked as [done][google.longrunning.Operation.done] + * until being obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public com.google.longrunning.Operation removeFulfillmentPlaces( @@ -1434,8 +1525,15 @@ public com.google.longrunning.Operation removeFulfillmentPlaces( * and * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * has no effect on local inventories. + * The returned [Operation][google.longrunning.Operation]s will be obsolete + * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + * API will return NOT_FOUND afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates will not be marked as [done][google.longrunning.Operation.done] + * until being obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public com.google.longrunning.Operation addLocalInventories( @@ -1463,8 +1561,15 @@ public com.google.longrunning.Operation addLocalInventories( * and * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * has no effect on local inventories. + * The returned [Operation][google.longrunning.Operation]s will be obsolete + * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + * API will return NOT_FOUND afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates will not be marked as [done][google.longrunning.Operation.done] + * until being obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public com.google.longrunning.Operation removeLocalInventories( @@ -1589,9 +1694,9 @@ protected ProductServiceFutureStub build( * update timestamps of each inventory field. * This process is asynchronous and does not require the * [Product][google.cloud.retail.v2beta.Product] to exist before updating - * fulfillment information. If the request is valid, the update will be - * enqueued and processed downstream. As a consequence, when a response is - * returned, updates are not immediately manifested in the + * fulfillment information. If the request is valid, the update is enqueued + * and processed downstream. As a consequence, when a response is returned, + * updates are not immediately manifested in the * [Product][google.cloud.retail.v2beta.Product] queried by * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] * or @@ -1600,27 +1705,34 @@ protected ProductServiceFutureStub build( * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] * and * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct], - * the specified inventory field value(s) will overwrite any existing value(s) + * the specified inventory field value(s) overwrite any existing value(s) * while ignoring the last update time for this field. Furthermore, the last - * update time for the specified inventory fields will be overwritten to the - * time of the + * update times for the specified inventory fields are overwritten by the + * times of the * [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct] * or * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * request. * If no inventory fields are set in * [CreateProductRequest.product][google.cloud.retail.v2beta.CreateProductRequest.product], - * then any pre-existing inventory information for this product will be used. + * then any pre-existing inventory information for this product is used. * If no inventory fields are set in * [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask], - * then any existing inventory information will be preserved. + * then any existing inventory information is preserved. * Pre-existing inventory information can only be updated with * [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory], * [ProductService.AddFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.AddFulfillmentPlaces], * and * [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces]. + * The returned [Operation][google.longrunning.Operation]s is obsolete after + * one day, and the [GetOperation][google.longrunning.Operations.GetOperation] + * API returns `NOT_FOUND` afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates are not marked as [done][google.longrunning.Operation.done] until + * they are obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public com.google.common.util.concurrent.ListenableFuture @@ -1644,8 +1756,15 @@ protected ProductServiceFutureStub build( * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] * or * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * The returned [Operation][google.longrunning.Operation]s will be obsolete + * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + * API will return NOT_FOUND afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates will not be marked as [done][google.longrunning.Operation.done] + * until being obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public com.google.common.util.concurrent.ListenableFuture @@ -1669,8 +1788,15 @@ protected ProductServiceFutureStub build( * [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct] * or * [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts]. + * The returned [Operation][google.longrunning.Operation]s will be obsolete + * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + * API will return NOT_FOUND afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates will not be marked as [done][google.longrunning.Operation.done] + * until being obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public com.google.common.util.concurrent.ListenableFuture @@ -1701,8 +1827,15 @@ protected ProductServiceFutureStub build( * and * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * has no effect on local inventories. + * The returned [Operation][google.longrunning.Operation]s will be obsolete + * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + * API will return NOT_FOUND afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates will not be marked as [done][google.longrunning.Operation.done] + * until being obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public com.google.common.util.concurrent.ListenableFuture @@ -1730,8 +1863,15 @@ protected ProductServiceFutureStub build( * and * [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct] * has no effect on local inventories. + * The returned [Operation][google.longrunning.Operation]s will be obsolete + * after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation] + * API will return NOT_FOUND afterwards. + * If conflicting updates are issued, the + * [Operation][google.longrunning.Operation]s associated with the stale + * updates will not be marked as [done][google.longrunning.Operation.done] + * until being obsolete. * This feature is only available for users who have Retail Search enabled. - * Please enable Retail Search on Cloud Console before using this feature. + * Enable Retail Search on Cloud Console before using this feature. * */ public com.google.common.util.concurrent.ListenableFuture diff --git a/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchServiceGrpc.java b/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchServiceGrpc.java index e6b9f41d..76d64885 100644 --- a/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchServiceGrpc.java +++ b/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchServiceGrpc.java @@ -23,7 +23,7 @@ *
  * Service for search.
  * This feature is only available for users who have Retail Search enabled.
- * Please enable Retail Search on Cloud Console before using this feature.
+ * Enable Retail Search on Cloud Console before using this feature.
  * 
*/ @javax.annotation.Generated( @@ -128,7 +128,7 @@ public SearchServiceFutureStub newStub( *
    * Service for search.
    * This feature is only available for users who have Retail Search enabled.
-   * Please enable Retail Search on Cloud Console before using this feature.
+   * Enable Retail Search on Cloud Console before using this feature.
    * 
*/ public abstract static class SearchServiceImplBase implements io.grpc.BindableService { @@ -139,7 +139,7 @@ public abstract static class SearchServiceImplBase implements io.grpc.BindableSe *
      * Performs a search.
      * This feature is only available for users who have Retail Search enabled.
-     * Please enable Retail Search on Cloud Console before using this feature.
+     * Enable Retail Search on Cloud Console before using this feature.
      * 
*/ public void search( @@ -168,7 +168,7 @@ public final io.grpc.ServerServiceDefinition bindService() { *
    * Service for search.
    * This feature is only available for users who have Retail Search enabled.
-   * Please enable Retail Search on Cloud Console before using this feature.
+   * Enable Retail Search on Cloud Console before using this feature.
    * 
*/ public static final class SearchServiceStub @@ -188,7 +188,7 @@ protected SearchServiceStub build(io.grpc.Channel channel, io.grpc.CallOptions c *
      * Performs a search.
      * This feature is only available for users who have Retail Search enabled.
-     * Please enable Retail Search on Cloud Console before using this feature.
+     * Enable Retail Search on Cloud Console before using this feature.
      * 
*/ public void search( @@ -206,7 +206,7 @@ public void search( *
    * Service for search.
    * This feature is only available for users who have Retail Search enabled.
-   * Please enable Retail Search on Cloud Console before using this feature.
+   * Enable Retail Search on Cloud Console before using this feature.
    * 
*/ public static final class SearchServiceBlockingStub @@ -227,7 +227,7 @@ protected SearchServiceBlockingStub build( *
      * Performs a search.
      * This feature is only available for users who have Retail Search enabled.
-     * Please enable Retail Search on Cloud Console before using this feature.
+     * Enable Retail Search on Cloud Console before using this feature.
      * 
*/ public com.google.cloud.retail.v2beta.SearchResponse search( @@ -243,7 +243,7 @@ public com.google.cloud.retail.v2beta.SearchResponse search( *
    * Service for search.
    * This feature is only available for users who have Retail Search enabled.
-   * Please enable Retail Search on Cloud Console before using this feature.
+   * Enable Retail Search on Cloud Console before using this feature.
    * 
*/ public static final class SearchServiceFutureStub @@ -264,7 +264,7 @@ protected SearchServiceFutureStub build( *
      * Performs a search.
      * This feature is only available for users who have Retail Search enabled.
-     * Please enable Retail Search on Cloud Console before using this feature.
+     * Enable Retail Search on Cloud Console before using this feature.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture< diff --git a/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceGrpc.java b/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceGrpc.java index 167aaef8..19433585 100644 --- a/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceGrpc.java +++ b/grpc-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceGrpc.java @@ -360,9 +360,9 @@ public void purgeUserEvents( * Bulk import of User events. Request processing might be * synchronous. Events that already exist are skipped. * Use this method for backfilling historical user events. - * Operation.response is of type ImportResponse. Note that it is + * `Operation.response` is of type `ImportResponse`. Note that it is * possible for a subset of the items to be successfully inserted. - * Operation.metadata is of type ImportMetadata. + * `Operation.metadata` is of type `ImportMetadata`. * */ public void importUserEvents( @@ -376,14 +376,14 @@ public void importUserEvents( * * *
-     * Starts a user event rejoin operation with latest product catalog. Events
-     * will not be annotated with detailed product information if product is
-     * missing from the catalog at the time the user event is ingested, and these
-     * events are stored as unjoined events with a limited usage on training and
-     * serving. This method can be used to start a join operation on specified
-     * events with latest version of product catalog. It can also be used to
-     * correct events joined with the wrong product catalog. A rejoin operation
-     * can take hours or days to complete.
+     * Starts a user-event rejoin operation with latest product catalog. Events
+     * are not annotated with detailed product information for products that are
+     * missing from the catalog when the user event is ingested. These
+     * events are stored as unjoined events with limited usage on training and
+     * serving. You can use this method to start a join operation on specified
+     * events with the latest version of product catalog. You can also use this
+     * method to correct events joined with the wrong product catalog. A rejoin
+     * operation can take hours or days to complete.
      * 
*/ public void rejoinUserEvents( @@ -509,9 +509,9 @@ public void purgeUserEvents( * Bulk import of User events. Request processing might be * synchronous. Events that already exist are skipped. * Use this method for backfilling historical user events. - * Operation.response is of type ImportResponse. Note that it is + * `Operation.response` is of type `ImportResponse`. Note that it is * possible for a subset of the items to be successfully inserted. - * Operation.metadata is of type ImportMetadata. + * `Operation.metadata` is of type `ImportMetadata`. * */ public void importUserEvents( @@ -527,14 +527,14 @@ public void importUserEvents( * * *
-     * Starts a user event rejoin operation with latest product catalog. Events
-     * will not be annotated with detailed product information if product is
-     * missing from the catalog at the time the user event is ingested, and these
-     * events are stored as unjoined events with a limited usage on training and
-     * serving. This method can be used to start a join operation on specified
-     * events with latest version of product catalog. It can also be used to
-     * correct events joined with the wrong product catalog. A rejoin operation
-     * can take hours or days to complete.
+     * Starts a user-event rejoin operation with latest product catalog. Events
+     * are not annotated with detailed product information for products that are
+     * missing from the catalog when the user event is ingested. These
+     * events are stored as unjoined events with limited usage on training and
+     * serving. You can use this method to start a join operation on specified
+     * events with the latest version of product catalog. You can also use this
+     * method to correct events joined with the wrong product catalog. A rejoin
+     * operation can take hours or days to complete.
      * 
*/ public void rejoinUserEvents( @@ -618,9 +618,9 @@ public com.google.longrunning.Operation purgeUserEvents( * Bulk import of User events. Request processing might be * synchronous. Events that already exist are skipped. * Use this method for backfilling historical user events. - * Operation.response is of type ImportResponse. Note that it is + * `Operation.response` is of type `ImportResponse`. Note that it is * possible for a subset of the items to be successfully inserted. - * Operation.metadata is of type ImportMetadata. + * `Operation.metadata` is of type `ImportMetadata`. * */ public com.google.longrunning.Operation importUserEvents( @@ -633,14 +633,14 @@ public com.google.longrunning.Operation importUserEvents( * * *
-     * Starts a user event rejoin operation with latest product catalog. Events
-     * will not be annotated with detailed product information if product is
-     * missing from the catalog at the time the user event is ingested, and these
-     * events are stored as unjoined events with a limited usage on training and
-     * serving. This method can be used to start a join operation on specified
-     * events with latest version of product catalog. It can also be used to
-     * correct events joined with the wrong product catalog. A rejoin operation
-     * can take hours or days to complete.
+     * Starts a user-event rejoin operation with latest product catalog. Events
+     * are not annotated with detailed product information for products that are
+     * missing from the catalog when the user event is ingested. These
+     * events are stored as unjoined events with limited usage on training and
+     * serving. You can use this method to start a join operation on specified
+     * events with the latest version of product catalog. You can also use this
+     * method to correct events joined with the wrong product catalog. A rejoin
+     * operation can take hours or days to complete.
      * 
*/ public com.google.longrunning.Operation rejoinUserEvents( @@ -722,9 +722,9 @@ protected UserEventServiceFutureStub build( * Bulk import of User events. Request processing might be * synchronous. Events that already exist are skipped. * Use this method for backfilling historical user events. - * Operation.response is of type ImportResponse. Note that it is + * `Operation.response` is of type `ImportResponse`. Note that it is * possible for a subset of the items to be successfully inserted. - * Operation.metadata is of type ImportMetadata. + * `Operation.metadata` is of type `ImportMetadata`. * */ public com.google.common.util.concurrent.ListenableFuture @@ -737,14 +737,14 @@ protected UserEventServiceFutureStub build( * * *
-     * Starts a user event rejoin operation with latest product catalog. Events
-     * will not be annotated with detailed product information if product is
-     * missing from the catalog at the time the user event is ingested, and these
-     * events are stored as unjoined events with a limited usage on training and
-     * serving. This method can be used to start a join operation on specified
-     * events with latest version of product catalog. It can also be used to
-     * correct events joined with the wrong product catalog. A rejoin operation
-     * can take hours or days to complete.
+     * Starts a user-event rejoin operation with latest product catalog. Events
+     * are not annotated with detailed product information for products that are
+     * missing from the catalog when the user event is ingested. These
+     * events are stored as unjoined events with limited usage on training and
+     * serving. You can use this method to start a join operation on specified
+     * events with the latest version of product catalog. You can also use this
+     * method to correct events joined with the wrong product catalog. A rejoin
+     * operation can take hours or days to complete.
      * 
*/ public com.google.common.util.concurrent.ListenableFuture diff --git a/pom.xml b/pom.xml index 92b87b8c..4f074d6e 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-cloud-retail-parent pom - 2.5.0 + 2.5.1 Google Cloud Retail Parent https://github.com/googleapis/java- @@ -61,43 +61,43 @@ com.google.cloud google-cloud-retail - 2.5.0 + 2.5.1 com.google.api.grpc proto-google-cloud-retail-v2beta - 2.5.0 + 2.5.1 com.google.api.grpc proto-google-cloud-retail-v2alpha - 2.5.0 + 2.5.1 com.google.api.grpc grpc-google-cloud-retail-v2beta - 2.5.0 + 2.5.1 com.google.api.grpc grpc-google-cloud-retail-v2alpha - 2.5.0 + 2.5.1 com.google.api.grpc proto-google-cloud-retail-v2 - 2.5.0 + 2.5.1 com.google.api.grpc grpc-google-cloud-retail-v2 - 2.5.0 + 2.5.1 com.google.cloud google-cloud-shared-dependencies - 3.0.3 + 3.0.4 pom import diff --git a/proto-google-cloud-retail-v2/pom.xml b/proto-google-cloud-retail-v2/pom.xml index 38690c03..4720247f 100644 --- a/proto-google-cloud-retail-v2/pom.xml +++ b/proto-google-cloud-retail-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-retail-v2 - 2.5.0 + 2.5.1 proto-google-cloud-retail-v2 Proto library for google-cloud-retail com.google.cloud google-cloud-retail-parent - 2.5.0 + 2.5.1 diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddCatalogAttributeRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddCatalogAttributeRequest.java index 8ed2a86c..2f004166 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddCatalogAttributeRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddCatalogAttributeRequest.java @@ -54,68 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddCatalogAttributeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - attributesConfig_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2.CatalogAttribute.Builder subBuilder = null; - if (catalogAttribute_ != null) { - subBuilder = catalogAttribute_.toBuilder(); - } - catalogAttribute_ = - input.readMessage( - com.google.cloud.retail.v2.CatalogAttribute.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(catalogAttribute_); - catalogAttribute_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CatalogServiceProto .internal_static_google_cloud_retail_v2_AddCatalogAttributeRequest_descriptor; @@ -263,7 +201,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (catalogAttribute_ != null) { output.writeMessage(2, getCatalogAttribute()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -278,7 +216,7 @@ public int getSerializedSize() { if (catalogAttribute_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCatalogAttribute()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -299,7 +237,7 @@ public boolean equals(final java.lang.Object obj) { if (hasCatalogAttribute()) { if (!getCatalogAttribute().equals(other.getCatalogAttribute())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -316,7 +254,7 @@ public int hashCode() { hash = (37 * hash) + CATALOG_ATTRIBUTE_FIELD_NUMBER; hash = (53 * hash) + getCatalogAttribute().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -448,17 +386,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.AddCatalogAttributeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -562,7 +493,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.AddCatalogAttributeRequest o if (other.hasCatalogAttribute()) { mergeCatalogAttribute(other.getCatalogAttribute()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -577,18 +508,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.AddCatalogAttributeRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attributesConfig_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage( + getCatalogAttributeFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.AddCatalogAttributeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -958,7 +915,18 @@ public AddCatalogAttributeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddCatalogAttributeRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddControlRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddControlRequest.java index 01dbf7a3..33325706 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddControlRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddControlRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddControlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - servingConfig_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - controlId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ServingConfigServiceProto .internal_static_google_cloud_retail_v2_AddControlRequest_descriptor; @@ -247,7 +194,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controlId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, controlId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -262,7 +209,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controlId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, controlId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -280,7 +227,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServingConfig().equals(other.getServingConfig())) return false; if (!getControlId().equals(other.getControlId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -295,7 +242,7 @@ public int hashCode() { hash = (53 * hash) + getServingConfig().hashCode(); hash = (37 * hash) + CONTROL_ID_FIELD_NUMBER; hash = (53 * hash) + getControlId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -424,17 +371,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.AddControlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -530,7 +470,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.AddControlRequest other) { controlId_ = other.controlId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -545,17 +485,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.AddControlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + servingConfig_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + controlId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.AddControlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -823,7 +789,18 @@ public AddControlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddControlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesMetadata.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesMetadata.java index 4f8a02f8..cb766976 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesMetadata.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesMetadata.java @@ -53,45 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddFulfillmentPlacesMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_AddFulfillmentPlacesMetadata_descriptor; @@ -121,7 +82,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -130,7 +91,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -146,7 +107,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2.AddFulfillmentPlacesMetadata other = (com.google.cloud.retail.v2.AddFulfillmentPlacesMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -157,7 +118,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -290,17 +251,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.AddFulfillmentPlacesMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -383,7 +337,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2.AddFulfillmentPlacesMetadata other) { if (other == com.google.cloud.retail.v2.AddFulfillmentPlacesMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -398,18 +352,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.AddFulfillmentPlacesMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2.AddFulfillmentPlacesMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -445,7 +412,18 @@ public AddFulfillmentPlacesMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddFulfillmentPlacesMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesRequest.java index 17798996..6c0e8819 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddFulfillmentPlacesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - product_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - placeIds_.add(s); - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (addTime_ != null) { - subBuilder = addTime_.toBuilder(); - } - addTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(addTime_); - addTime_ = subBuilder.buildPartial(); - } - - break; - } - case 40: - { - allowMissing_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = placeIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_AddFulfillmentPlacesRequest_descriptor; @@ -513,7 +426,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (allowMissing_ != false) { output.writeBool(5, allowMissing_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -542,7 +455,7 @@ public int getSerializedSize() { if (allowMissing_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, allowMissing_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -566,7 +479,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAddTime().equals(other.getAddTime())) return false; } if (getAllowMissing() != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -591,7 +504,7 @@ public int hashCode() { } hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -723,17 +636,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.AddFulfillmentPlacesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -868,7 +774,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.AddFulfillmentPlacesRequest if (other.getAllowMissing() != false) { setAllowMissing(other.getAllowMissing()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -883,18 +789,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.AddFulfillmentPlacesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + product_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + type_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePlaceIdsIsMutable(); + placeIds_.add(s); + break; + } // case 26 + case 34: + { + input.readMessage(getAddTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 40: + { + allowMissing_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.AddFulfillmentPlacesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1794,7 +1744,18 @@ public AddFulfillmentPlacesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddFulfillmentPlacesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesResponse.java index bd50791f..f3abc281 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddFulfillmentPlacesResponse.java @@ -53,45 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddFulfillmentPlacesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_AddFulfillmentPlacesResponse_descriptor; @@ -121,7 +82,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -130,7 +91,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -146,7 +107,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2.AddFulfillmentPlacesResponse other = (com.google.cloud.retail.v2.AddFulfillmentPlacesResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -157,7 +118,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -290,17 +251,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.AddFulfillmentPlacesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -383,7 +337,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2.AddFulfillmentPlacesResponse other) { if (other == com.google.cloud.retail.v2.AddFulfillmentPlacesResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -398,18 +352,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.AddFulfillmentPlacesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2.AddFulfillmentPlacesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -445,7 +412,18 @@ public AddFulfillmentPlacesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddFulfillmentPlacesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddLocalInventoriesMetadata.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddLocalInventoriesMetadata.java index 65f696c9..face0438 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddLocalInventoriesMetadata.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddLocalInventoriesMetadata.java @@ -53,45 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddLocalInventoriesMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_AddLocalInventoriesMetadata_descriptor; @@ -121,7 +82,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -130,7 +91,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -146,7 +107,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2.AddLocalInventoriesMetadata other = (com.google.cloud.retail.v2.AddLocalInventoriesMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -157,7 +118,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -290,17 +251,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.AddLocalInventoriesMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -383,7 +337,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2.AddLocalInventoriesMetadata other) { if (other == com.google.cloud.retail.v2.AddLocalInventoriesMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -398,18 +352,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.AddLocalInventoriesMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2.AddLocalInventoriesMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -445,7 +412,18 @@ public AddLocalInventoriesMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddLocalInventoriesMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddLocalInventoriesRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddLocalInventoriesRequest.java index 0fc16dc2..6e2f0f8c 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddLocalInventoriesRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddLocalInventoriesRequest.java @@ -55,103 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddLocalInventoriesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - product_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - localInventories_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - localInventories_.add( - input.readMessage( - com.google.cloud.retail.v2.LocalInventory.parser(), extensionRegistry)); - break; - } - case 34: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (addMask_ != null) { - subBuilder = addMask_.toBuilder(); - } - addMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(addMask_); - addMask_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (addTime_ != null) { - subBuilder = addTime_.toBuilder(); - } - addTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(addTime_); - addTime_ = subBuilder.buildPartial(); - } - - break; - } - case 48: - { - allowMissing_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - localInventories_ = java.util.Collections.unmodifiableList(localInventories_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_AddLocalInventoriesRequest_descriptor; @@ -499,7 +402,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (allowMissing_ != false) { output.writeBool(6, allowMissing_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -523,7 +426,7 @@ public int getSerializedSize() { if (allowMissing_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, allowMissing_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -550,7 +453,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAddTime().equals(other.getAddTime())) return false; } if (getAllowMissing() != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -577,7 +480,7 @@ public int hashCode() { } hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -709,19 +612,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.AddLocalInventoriesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getLocalInventoriesFieldBuilder(); - } } @java.lang.Override @@ -731,10 +625,11 @@ public Builder clear() { if (localInventoriesBuilder_ == null) { localInventories_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + localInventories_ = null; localInventoriesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (addMaskBuilder_ == null) { addMask_ = null; } else { @@ -888,7 +783,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.AddLocalInventoriesRequest o if (other.getAllowMissing() != false) { setAllowMissing(other.getAllowMissing()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -903,18 +798,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.AddLocalInventoriesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + product_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.cloud.retail.v2.LocalInventory m = + input.readMessage( + com.google.cloud.retail.v2.LocalInventory.parser(), extensionRegistry); + if (localInventoriesBuilder_ == null) { + ensureLocalInventoriesIsMutable(); + localInventories_.add(m); + } else { + localInventoriesBuilder_.addMessage(m); + } + break; + } // case 18 + case 34: + { + input.readMessage(getAddMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getAddTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 48: + { + allowMissing_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.AddLocalInventoriesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2050,7 +1995,18 @@ public AddLocalInventoriesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddLocalInventoriesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddLocalInventoriesResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddLocalInventoriesResponse.java index 1a83cd1b..cc3d75e6 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddLocalInventoriesResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AddLocalInventoriesResponse.java @@ -55,45 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddLocalInventoriesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_AddLocalInventoriesResponse_descriptor; @@ -123,7 +84,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -132,7 +93,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -148,7 +109,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2.AddLocalInventoriesResponse other = (com.google.cloud.retail.v2.AddLocalInventoriesResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -159,7 +120,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -294,17 +255,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.AddLocalInventoriesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -387,7 +341,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2.AddLocalInventoriesResponse other) { if (other == com.google.cloud.retail.v2.AddLocalInventoriesResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -402,18 +356,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.AddLocalInventoriesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2.AddLocalInventoriesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -449,7 +416,18 @@ public AddLocalInventoriesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddLocalInventoriesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AttributesConfig.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AttributesConfig.java index f8d4320c..152d1930 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AttributesConfig.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/AttributesConfig.java @@ -53,79 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AttributesConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - catalogAttributes_ = - com.google.protobuf.MapField.newMapField( - CatalogAttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.retail.v2.CatalogAttribute> - catalogAttributes__ = - input.readMessage( - CatalogAttributesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - catalogAttributes_ - .getMutableMap() - .put(catalogAttributes__.getKey(), catalogAttributes__.getValue()); - break; - } - case 24: - { - int rawValue = input.readEnum(); - - attributeConfigLevel_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CatalogProto .internal_static_google_cloud_retail_v2_AttributesConfig_descriptor; @@ -418,7 +345,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(3, attributeConfigLevel_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -446,7 +373,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, attributeConfigLevel_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -465,7 +392,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!internalGetCatalogAttributes().equals(other.internalGetCatalogAttributes())) return false; if (attributeConfigLevel_ != other.attributeConfigLevel_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -484,7 +411,7 @@ public int hashCode() { } hash = (37 * hash) + ATTRIBUTE_CONFIG_LEVEL_FIELD_NUMBER; hash = (53 * hash) + attributeConfigLevel_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -633,17 +560,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.retail.v2.AttributesConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -743,7 +663,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.AttributesConfig other) { if (other.attributeConfigLevel_ != 0) { setAttributeConfigLevelValue(other.getAttributeConfigLevelValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -758,17 +678,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.AttributesConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.retail.v2.CatalogAttribute> + catalogAttributes__ = + input.readMessage( + CatalogAttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableCatalogAttributes() + .getMutableMap() + .put(catalogAttributes__.getKey(), catalogAttributes__.getValue()); + break; + } // case 18 + case 24: + { + attributeConfigLevel_ = input.readEnum(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.AttributesConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1261,7 +1220,18 @@ public AttributesConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AttributesConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Audience.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Audience.java index e1b6babe..eae42439 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Audience.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Audience.java @@ -54,72 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Audience( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - genders_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - genders_.add(s); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - ageGroups_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - ageGroups_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - genders_ = genders_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - ageGroups_ = ageGroups_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_Audience_descriptor; @@ -353,7 +287,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < ageGroups_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ageGroups_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -378,7 +312,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getAgeGroupsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -395,7 +329,7 @@ public boolean equals(final java.lang.Object obj) { if (!getGendersList().equals(other.getGendersList())) return false; if (!getAgeGroupsList().equals(other.getAgeGroupsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -414,7 +348,7 @@ public int hashCode() { hash = (37 * hash) + AGE_GROUPS_FIELD_NUMBER; hash = (53 * hash) + getAgeGroupsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -543,17 +477,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.Audience.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -669,7 +596,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Audience other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -684,17 +611,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Audience parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureGendersIsMutable(); + genders_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAgeGroupsIsMutable(); + ageGroups_.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) { - parsedMessage = (com.google.cloud.retail.v2.Audience) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1239,7 +1194,18 @@ public Audience parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Audience(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/BigQuerySource.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/BigQuerySource.java index 0dc93035..4e9bf3e2 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/BigQuerySource.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/BigQuerySource.java @@ -56,94 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BigQuerySource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - datasetId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - tableId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - gcsStagingDir_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - dataSchema_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - projectId_ = s; - break; - } - case 50: - { - com.google.type.Date.Builder subBuilder = null; - if (partitionCase_ == 6) { - subBuilder = ((com.google.type.Date) partition_).toBuilder(); - } - partition_ = input.readMessage(com.google.type.Date.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.type.Date) partition_); - partition_ = subBuilder.buildPartial(); - } - partitionCase_ = 6; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ImportConfigProto .internal_static_google_cloud_retail_v2_BigQuerySource_descriptor; @@ -587,7 +499,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (partitionCase_ == 6) { output.writeMessage(6, (com.google.type.Date) partition_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -616,7 +528,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 6, (com.google.type.Date) partition_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -645,7 +557,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -674,7 +586,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -803,22 +715,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.BigQuerySource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (partitionDateBuilder_ != null) { + partitionDateBuilder_.clear(); + } projectId_ = ""; datasetId_ = ""; @@ -951,7 +859,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.BigQuerySource other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -966,17 +874,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.BigQuerySource parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + datasetId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + tableId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + gcsStagingDir_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + dataSchema_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + projectId_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + input.readMessage(getPartitionDateFieldBuilder().getBuilder(), extensionRegistry); + partitionCase_ = 6; + 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) { - parsedMessage = (com.google.cloud.retail.v2.BigQuerySource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1898,7 +1856,18 @@ public BigQuerySource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BigQuerySource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Catalog.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Catalog.java index e8acbadd..b8a2a6a5 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Catalog.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Catalog.java @@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Catalog( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 34: - { - com.google.cloud.retail.v2.ProductLevelConfig.Builder subBuilder = null; - if (productLevelConfig_ != null) { - subBuilder = productLevelConfig_.toBuilder(); - } - productLevelConfig_ = - input.readMessage( - com.google.cloud.retail.v2.ProductLevelConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(productLevelConfig_); - productLevelConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CatalogProto .internal_static_google_cloud_retail_v2_Catalog_descriptor; @@ -324,7 +255,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (productLevelConfig_ != null) { output.writeMessage(4, getProductLevelConfig()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -342,7 +273,7 @@ public int getSerializedSize() { if (productLevelConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getProductLevelConfig()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -363,7 +294,7 @@ public boolean equals(final java.lang.Object obj) { if (hasProductLevelConfig()) { if (!getProductLevelConfig().equals(other.getProductLevelConfig())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -382,7 +313,7 @@ public int hashCode() { hash = (37 * hash) + PRODUCT_LEVEL_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getProductLevelConfig().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -510,17 +441,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.Catalog.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -629,7 +553,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Catalog other) { if (other.hasProductLevelConfig()) { mergeProductLevelConfig(other.getProductLevelConfig()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -644,17 +568,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Catalog parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 34: + { + input.readMessage( + getProductLevelConfigFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.Catalog) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1136,7 +1093,18 @@ public Catalog parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Catalog(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CatalogAttribute.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CatalogAttribute.java index 09f06e0f..0beb18f6 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CatalogAttribute.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CatalogAttribute.java @@ -57,85 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CatalogAttribute( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - key_ = s; - break; - } - case 40: - { - int rawValue = input.readEnum(); - - indexableOption_ = rawValue; - break; - } - case 48: - { - int rawValue = input.readEnum(); - - dynamicFacetableOption_ = rawValue; - break; - } - case 56: - { - int rawValue = input.readEnum(); - - searchableOption_ = rawValue; - break; - } - case 72: - { - inUse_ = input.readBool(); - break; - } - case 80: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CatalogProto .internal_static_google_cloud_retail_v2_CatalogAttribute_descriptor; @@ -1128,7 +1049,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (type_ != com.google.cloud.retail.v2.CatalogAttribute.AttributeType.UNKNOWN.getNumber()) { output.writeEnum(10, type_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1163,7 +1084,7 @@ public int getSerializedSize() { if (type_ != com.google.cloud.retail.v2.CatalogAttribute.AttributeType.UNKNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, type_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1185,7 +1106,7 @@ public boolean equals(final java.lang.Object obj) { if (indexableOption_ != other.indexableOption_) return false; if (dynamicFacetableOption_ != other.dynamicFacetableOption_) return false; if (searchableOption_ != other.searchableOption_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1208,7 +1129,7 @@ public int hashCode() { hash = (53 * hash) + dynamicFacetableOption_; hash = (37 * hash) + SEARCHABLE_OPTION_FIELD_NUMBER; hash = (53 * hash) + searchableOption_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1338,17 +1259,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.CatalogAttribute.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1467,7 +1381,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.CatalogAttribute other) { if (other.searchableOption_ != 0) { setSearchableOptionValue(other.getSearchableOptionValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1482,17 +1396,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.CatalogAttribute parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 40: + { + indexableOption_ = input.readEnum(); + + break; + } // case 40 + case 48: + { + dynamicFacetableOption_ = input.readEnum(); + + break; + } // case 48 + case 56: + { + searchableOption_ = input.readEnum(); + + break; + } // case 56 + case 72: + { + inUse_ = input.readBool(); + + break; + } // case 72 + case 80: + { + type_ = input.readEnum(); + + break; + } // case 80 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2.CatalogAttribute) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2250,7 +2214,18 @@ public CatalogAttribute parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CatalogAttribute(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CollectUserEventRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CollectUserEventRequest.java index 9fd7bf5e..198436e0 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CollectUserEventRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CollectUserEventRequest.java @@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CollectUserEventRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - userEvent_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 32: - { - ets_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.UserEventServiceProto .internal_static_google_cloud_retail_v2_CollectUserEventRequest_descriptor; @@ -337,7 +272,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (ets_ != 0L) { output.writeInt64(4, ets_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -358,7 +293,7 @@ public int getSerializedSize() { if (ets_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, ets_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -378,7 +313,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUserEvent().equals(other.getUserEvent())) return false; if (!getUri().equals(other.getUri())) return false; if (getEts() != other.getEts()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -397,7 +332,7 @@ public int hashCode() { hash = (53 * hash) + getUri().hashCode(); hash = (37 * hash) + ETS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEts()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -526,17 +461,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.CollectUserEventRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -646,7 +574,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.CollectUserEventRequest othe if (other.getEts() != 0L) { setEts(other.getEts()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -661,18 +589,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.CollectUserEventRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + userEvent_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + uri_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: + { + ets_ = input.readInt64(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.CollectUserEventRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1109,7 +1074,18 @@ public CollectUserEventRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CollectUserEventRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ColorInfo.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ColorInfo.java index d0dd7342..1f35f160 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ColorInfo.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ColorInfo.java @@ -53,72 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ColorInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - colorFamilies_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - colorFamilies_.add(s); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - colors_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - colors_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - colorFamilies_ = colorFamilies_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - colors_ = colors_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_ColorInfo_descriptor; @@ -352,7 +286,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < colors_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, colors_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -377,7 +311,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getColorsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -394,7 +328,7 @@ public boolean equals(final java.lang.Object obj) { if (!getColorFamiliesList().equals(other.getColorFamiliesList())) return false; if (!getColorsList().equals(other.getColorsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -413,7 +347,7 @@ public int hashCode() { hash = (37 * hash) + COLORS_FIELD_NUMBER; hash = (53 * hash) + getColorsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -541,17 +475,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ColorInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -667,7 +594,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ColorInfo other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -682,17 +609,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ColorInfo parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureColorFamiliesIsMutable(); + colorFamilies_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureColorsIsMutable(); + colors_.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) { - parsedMessage = (com.google.cloud.retail.v2.ColorInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1237,7 +1192,18 @@ public ColorInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ColorInfo(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequest.java index 307c49b2..fb47d508 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryRequest.java @@ -57,99 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CompleteQueryRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - catalog_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - query_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - languageCodes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - languageCodes_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - deviceType_ = s; - break; - } - case 40: - { - maxSuggestions_ = input.readInt32(); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - dataset_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - visitorId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - languageCodes_ = languageCodes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CompletionServiceProto .internal_static_google_cloud_retail_v2_CompleteQueryRequest_descriptor; @@ -610,7 +517,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(visitorId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, visitorId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -645,7 +552,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(visitorId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, visitorId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -668,7 +575,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDeviceType().equals(other.getDeviceType())) return false; if (!getDataset().equals(other.getDataset())) return false; if (getMaxSuggestions() != other.getMaxSuggestions()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -695,7 +602,7 @@ public int hashCode() { hash = (53 * hash) + getDataset().hashCode(); hash = (37 * hash) + MAX_SUGGESTIONS_FIELD_NUMBER; hash = (53 * hash) + getMaxSuggestions(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,17 +731,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.CompleteQueryRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -976,7 +876,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.CompleteQueryRequest other) if (other.getMaxSuggestions() != 0) { setMaxSuggestions(other.getMaxSuggestions()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -991,17 +891,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.CompleteQueryRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + catalog_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + query_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLanguageCodesIsMutable(); + languageCodes_.add(s); + break; + } // case 26 + case 34: + { + deviceType_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 40: + { + maxSuggestions_ = input.readInt32(); + + break; + } // case 40 + case 50: + { + dataset_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + visitorId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.CompleteQueryRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1999,7 +1956,18 @@ public CompleteQueryRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CompleteQueryRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponse.java index 7f49f10a..48cf3d93 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompleteQueryResponse.java @@ -54,87 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CompleteQueryResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - completionResults_ = - new java.util.ArrayList< - com.google.cloud.retail.v2.CompleteQueryResponse.CompletionResult>(); - mutable_bitField0_ |= 0x00000001; - } - completionResults_.add( - input.readMessage( - com.google.cloud.retail.v2.CompleteQueryResponse.CompletionResult.parser(), - extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - attributionToken_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - recentSearchResults_ = - new java.util.ArrayList< - com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult>(); - mutable_bitField0_ |= 0x00000002; - } - recentSearchResults_.add( - input.readMessage( - com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult.parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - completionResults_ = java.util.Collections.unmodifiableList(completionResults_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - recentSearchResults_ = java.util.Collections.unmodifiableList(recentSearchResults_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CompletionServiceProto .internal_static_google_cloud_retail_v2_CompleteQueryResponse_descriptor; @@ -303,70 +222,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CompletionResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - suggestion_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - attributes_ = - com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.retail.v2.CustomAttribute> - attributes__ = - input.readMessage( - AttributesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - attributes_.getMutableMap().put(attributes__.getKey(), attributes__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CompletionServiceProto .internal_static_google_cloud_retail_v2_CompleteQueryResponse_CompletionResult_descriptor; @@ -596,7 +451,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 2); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -619,7 +474,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, attributes__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -637,7 +492,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSuggestion().equals(other.getSuggestion())) return false; if (!internalGetAttributes().equals(other.internalGetAttributes())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -654,7 +509,7 @@ public int hashCode() { hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; hash = (53 * hash) + internalGetAttributes().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -808,17 +663,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { // Construct using // com.google.cloud.retail.v2.CompleteQueryResponse.CompletionResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -920,7 +768,7 @@ public Builder mergeFrom( onChanged(); } internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -935,19 +783,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.CompleteQueryResponse.CompletionResult parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + suggestion_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.retail.v2.CustomAttribute> + attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .getMutableMap() + .put(attributes__.getKey(), attributes__.getValue()); + 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) { - parsedMessage = - (com.google.cloud.retail.v2.CompleteQueryResponse.CompletionResult) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1308,7 +1187,19 @@ public CompletionResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CompletionResult(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1392,52 +1283,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RecentSearchResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - recentSearch_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CompletionServiceProto .internal_static_google_cloud_retail_v2_CompleteQueryResponse_RecentSearchResult_descriptor; @@ -1519,7 +1364,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recentSearch_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, recentSearch_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1531,7 +1376,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recentSearch_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, recentSearch_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1548,7 +1393,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult) obj; if (!getRecentSearch().equals(other.getRecentSearch())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1561,7 +1406,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + RECENT_SEARCH_FIELD_NUMBER; hash = (53 * hash) + getRecentSearch().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1695,17 +1540,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1802,7 +1640,7 @@ public Builder mergeFrom( recentSearch_ = other.recentSearch_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1817,19 +1655,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + recentSearch_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1974,7 +1830,19 @@ public RecentSearchResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RecentSearchResult(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2315,7 +2183,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < recentSearchResults_.size(); i++) { output.writeMessage(3, recentSearchResults_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2335,7 +2203,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, recentSearchResults_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2354,7 +2222,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCompletionResultsList().equals(other.getCompletionResultsList())) return false; if (!getAttributionToken().equals(other.getAttributionToken())) return false; if (!getRecentSearchResultsList().equals(other.getRecentSearchResultsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2375,7 +2243,7 @@ public int hashCode() { hash = (37 * hash) + RECENT_SEARCH_RESULTS_FIELD_NUMBER; hash = (53 * hash) + getRecentSearchResultsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2504,20 +2372,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.CompleteQueryResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCompletionResultsFieldBuilder(); - getRecentSearchResultsFieldBuilder(); - } } @java.lang.Override @@ -2525,18 +2383,20 @@ public Builder clear() { super.clear(); if (completionResultsBuilder_ == null) { completionResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + completionResults_ = null; completionResultsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); attributionToken_ = ""; if (recentSearchResultsBuilder_ == null) { recentSearchResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + recentSearchResults_ = null; recentSearchResultsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -2692,7 +2552,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.CompleteQueryResponse other) } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2707,17 +2567,66 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.CompleteQueryResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2.CompleteQueryResponse.CompletionResult m = + input.readMessage( + com.google.cloud.retail.v2.CompleteQueryResponse.CompletionResult.parser(), + extensionRegistry); + if (completionResultsBuilder_ == null) { + ensureCompletionResultsIsMutable(); + completionResults_.add(m); + } else { + completionResultsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + attributionToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult m = + input.readMessage( + com.google.cloud.retail.v2.CompleteQueryResponse.RecentSearchResult + .parser(), + extensionRegistry); + if (recentSearchResultsBuilder_ == null) { + ensureRecentSearchResultsIsMutable(); + recentSearchResults_.add(m); + } else { + recentSearchResultsBuilder_.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) { - parsedMessage = (com.google.cloud.retail.v2.CompleteQueryResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3972,7 +3881,18 @@ public CompleteQueryResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CompleteQueryResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionConfig.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionConfig.java index 61b77926..f0099790 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionConfig.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionConfig.java @@ -57,146 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CompletionConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - matchingOrder_ = s; - break; - } - case 24: - { - maxSuggestions_ = input.readInt32(); - break; - } - case 32: - { - minPrefixLength_ = input.readInt32(); - break; - } - case 42: - { - com.google.cloud.retail.v2.CompletionDataInputConfig.Builder subBuilder = null; - if (suggestionsInputConfig_ != null) { - subBuilder = suggestionsInputConfig_.toBuilder(); - } - suggestionsInputConfig_ = - input.readMessage( - com.google.cloud.retail.v2.CompletionDataInputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(suggestionsInputConfig_); - suggestionsInputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - lastSuggestionsImportOperation_ = s; - break; - } - case 58: - { - com.google.cloud.retail.v2.CompletionDataInputConfig.Builder subBuilder = null; - if (denylistInputConfig_ != null) { - subBuilder = denylistInputConfig_.toBuilder(); - } - denylistInputConfig_ = - input.readMessage( - com.google.cloud.retail.v2.CompletionDataInputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(denylistInputConfig_); - denylistInputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - lastDenylistImportOperation_ = s; - break; - } - case 74: - { - com.google.cloud.retail.v2.CompletionDataInputConfig.Builder subBuilder = null; - if (allowlistInputConfig_ != null) { - subBuilder = allowlistInputConfig_.toBuilder(); - } - allowlistInputConfig_ = - input.readMessage( - com.google.cloud.retail.v2.CompletionDataInputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(allowlistInputConfig_); - allowlistInputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - lastAllowlistImportOperation_ = s; - break; - } - case 88: - { - autoLearning_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CatalogProto .internal_static_google_cloud_retail_v2_CompletionConfig_descriptor; @@ -783,7 +643,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (autoLearning_ != false) { output.writeBool(11, autoLearning_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -832,7 +692,7 @@ public int getSerializedSize() { if (autoLearning_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, autoLearning_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -871,7 +731,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getLastAllowlistImportOperation().equals(other.getLastAllowlistImportOperation())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -910,7 +770,7 @@ public int hashCode() { } hash = (37 * hash) + LAST_ALLOWLIST_IMPORT_OPERATION_FIELD_NUMBER; hash = (53 * hash) + getLastAllowlistImportOperation().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1040,17 +900,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.CompletionConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1227,7 +1080,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.CompletionConfig other) { lastAllowlistImportOperation_ = other.lastAllowlistImportOperation_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1242,17 +1095,100 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.CompletionConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + matchingOrder_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + maxSuggestions_ = input.readInt32(); + + break; + } // case 24 + case 32: + { + minPrefixLength_ = input.readInt32(); + + break; + } // case 32 + case 42: + { + input.readMessage( + getSuggestionsInputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + lastSuggestionsImportOperation_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + input.readMessage( + getDenylistInputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 66: + { + lastDenylistImportOperation_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 74: + { + input.readMessage( + getAllowlistInputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 74 + case 82: + { + lastAllowlistImportOperation_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 88: + { + autoLearning_ = input.readBool(); + + break; + } // case 88 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2.CompletionConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2761,7 +2697,18 @@ public CompletionConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CompletionConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionDataInputConfig.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionDataInputConfig.java index 9ef160a1..dc5bbc33 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionDataInputConfig.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionDataInputConfig.java @@ -50,61 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CompletionDataInputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2.BigQuerySource.Builder subBuilder = null; - if (sourceCase_ == 1) { - subBuilder = ((com.google.cloud.retail.v2.BigQuerySource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.retail.v2.BigQuerySource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2.BigQuerySource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 1; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ImportConfigProto .internal_static_google_cloud_retail_v2_CompletionDataInputConfig_descriptor; @@ -247,7 +192,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceCase_ == 1) { output.writeMessage(1, (com.google.cloud.retail.v2.BigQuerySource) source_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -261,7 +206,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 1, (com.google.cloud.retail.v2.BigQuerySource) source_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -285,7 +230,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -304,7 +249,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -433,22 +378,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.CompletionDataInputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (bigQuerySourceBuilder_ != null) { + bigQuerySourceBuilder_.clear(); + } sourceCase_ = 0; source_ = null; return this; @@ -547,7 +488,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.CompletionDataInputConfig ot break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -562,18 +503,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.CompletionDataInputConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getBigQuerySourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 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) { - parsedMessage = - (com.google.cloud.retail.v2.CompletionDataInputConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -878,7 +838,18 @@ public CompletionDataInputConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CompletionDataInputConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionDetail.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionDetail.java index 3d18c33b..8c5a17a3 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionDetail.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CompletionDetail.java @@ -54,64 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CompletionDetail( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - completionAttributionToken_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - selectedSuggestion_ = s; - break; - } - case 24: - { - selectedPosition_ = input.readInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.UserEventProto .internal_static_google_cloud_retail_v2_CompletionDetail_descriptor; @@ -272,7 +214,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (selectedPosition_ != 0) { output.writeInt32(3, selectedPosition_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -291,7 +233,7 @@ public int getSerializedSize() { if (selectedPosition_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, selectedPosition_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -311,7 +253,7 @@ public boolean equals(final java.lang.Object obj) { return false; if (!getSelectedSuggestion().equals(other.getSelectedSuggestion())) return false; if (getSelectedPosition() != other.getSelectedPosition()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +270,7 @@ public int hashCode() { hash = (53 * hash) + getSelectedSuggestion().hashCode(); hash = (37 * hash) + SELECTED_POSITION_FIELD_NUMBER; hash = (53 * hash) + getSelectedPosition(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -458,17 +400,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.CompletionDetail.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -570,7 +505,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.CompletionDetail other) { if (other.getSelectedPosition() != 0) { setSelectedPosition(other.getSelectedPosition()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -585,17 +520,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.CompletionDetail parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + completionAttributionToken_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + selectedSuggestion_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + selectedPosition_ = input.readInt32(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.CompletionDetail) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -911,7 +878,18 @@ public CompletionDetail parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CompletionDetail(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Condition.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Condition.java index 0c04714f..53cf2262 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Condition.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Condition.java @@ -58,76 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Condition( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - queryTerms_.add( - input.readMessage( - com.google.cloud.retail.v2.Condition.QueryTerm.parser(), extensionRegistry)); - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - activeTimeRange_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - activeTimeRange_.add( - input.readMessage( - com.google.cloud.retail.v2.Condition.TimeRange.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = java.util.Collections.unmodifiableList(queryTerms_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - activeTimeRange_ = java.util.Collections.unmodifiableList(activeTimeRange_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_Condition_descriptor; @@ -230,57 +160,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private QueryTerm( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - value_ = s; - break; - } - case 16: - { - fullMatch_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_Condition_QueryTerm_descriptor; @@ -393,7 +272,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (fullMatch_ != false) { output.writeBool(2, fullMatch_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -408,7 +287,7 @@ public int getSerializedSize() { if (fullMatch_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, fullMatch_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -426,7 +305,7 @@ public boolean equals(final java.lang.Object obj) { if (!getValue().equals(other.getValue())) return false; if (getFullMatch() != other.getFullMatch()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -441,7 +320,7 @@ public int hashCode() { hash = (53 * hash) + getValue().hashCode(); hash = (37 * hash) + FULL_MATCH_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFullMatch()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -572,17 +451,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.Condition.QueryTerm.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -680,7 +552,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Condition.QueryTerm other) { if (other.getFullMatch() != false) { setFullMatch(other.getFullMatch()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -695,17 +567,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Condition.QueryTerm parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + value_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + fullMatch_ = input.readBool(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.Condition.QueryTerm) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -925,7 +823,19 @@ public QueryTerm parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryTerm(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1052,75 +962,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TimeRange( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_Condition_TimeRange_descriptor; @@ -1248,7 +1089,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (endTime_ != null) { output.writeMessage(2, getEndTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1263,7 +1104,7 @@ public int getSerializedSize() { if (endTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1287,7 +1128,7 @@ public boolean equals(final java.lang.Object obj) { if (hasEndTime()) { if (!getEndTime().equals(other.getEndTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1306,7 +1147,7 @@ public int hashCode() { hash = (37 * hash) + END_TIME_FIELD_NUMBER; hash = (53 * hash) + getEndTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1438,17 +1279,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.Condition.TimeRange.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1561,7 +1395,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Condition.TimeRange other) { if (other.hasEndTime()) { mergeEndTime(other.getEndTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1576,17 +1410,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Condition.TimeRange parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.Condition.TimeRange) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1987,7 +1847,19 @@ public TimeRange parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TimeRange(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2185,7 +2057,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < activeTimeRange_.size(); i++) { output.writeMessage(3, activeTimeRange_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2200,7 +2072,7 @@ public int getSerializedSize() { for (int i = 0; i < activeTimeRange_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, activeTimeRange_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2217,7 +2089,7 @@ public boolean equals(final java.lang.Object obj) { if (!getQueryTermsList().equals(other.getQueryTermsList())) return false; if (!getActiveTimeRangeList().equals(other.getActiveTimeRangeList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2236,7 +2108,7 @@ public int hashCode() { hash = (37 * hash) + ACTIVE_TIME_RANGE_FIELD_NUMBER; hash = (53 * hash) + getActiveTimeRangeList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2369,20 +2241,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.Condition.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getQueryTermsFieldBuilder(); - getActiveTimeRangeFieldBuilder(); - } } @java.lang.Override @@ -2390,16 +2252,18 @@ public Builder clear() { super.clear(); if (queryTermsBuilder_ == null) { queryTerms_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + queryTerms_ = null; queryTermsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (activeTimeRangeBuilder_ == null) { activeTimeRange_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + activeTimeRange_ = null; activeTimeRangeBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -2548,7 +2412,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Condition other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2563,17 +2427,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Condition parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2.Condition.QueryTerm m = + input.readMessage( + com.google.cloud.retail.v2.Condition.QueryTerm.parser(), extensionRegistry); + if (queryTermsBuilder_ == null) { + ensureQueryTermsIsMutable(); + queryTerms_.add(m); + } else { + queryTermsBuilder_.addMessage(m); + } + break; + } // case 10 + case 26: + { + com.google.cloud.retail.v2.Condition.TimeRange m = + input.readMessage( + com.google.cloud.retail.v2.Condition.TimeRange.parser(), extensionRegistry); + if (activeTimeRangeBuilder_ == null) { + ensureActiveTimeRangeIsMutable(); + activeTimeRange_.add(m); + } else { + activeTimeRangeBuilder_.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) { - parsedMessage = (com.google.cloud.retail.v2.Condition) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3395,7 +3299,18 @@ public Condition parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Condition(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Control.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Control.java index 234038ed..7556538e 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Control.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Control.java @@ -58,144 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Control( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 34: - { - com.google.cloud.retail.v2.Rule.Builder subBuilder = null; - if (controlCase_ == 4) { - subBuilder = ((com.google.cloud.retail.v2.Rule) control_).toBuilder(); - } - control_ = - input.readMessage(com.google.cloud.retail.v2.Rule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2.Rule) control_); - control_ = subBuilder.buildPartial(); - } - controlCase_ = 4; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - associatedServingConfigIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - associatedServingConfigIds_.add(s); - break; - } - case 48: - { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - solutionTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - solutionTypes_.add(rawValue); - break; - } - case 50: - { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while (input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - solutionTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - solutionTypes_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 56: - { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - searchSolutionUseCase_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - searchSolutionUseCase_.add(rawValue); - break; - } - case 58: - { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while (input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - searchSolutionUseCase_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - searchSolutionUseCase_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - associatedServingConfigIds_ = associatedServingConfigIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - solutionTypes_ = java.util.Collections.unmodifiableList(solutionTypes_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - searchSolutionUseCase_ = java.util.Collections.unmodifiableList(searchSolutionUseCase_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ControlProto .internal_static_google_cloud_retail_v2_Control_descriptor; @@ -812,7 +674,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < searchSolutionUseCase_.size(); i++) { output.writeEnumNoTag(searchSolutionUseCase_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -867,7 +729,7 @@ public int getSerializedSize() { } searchSolutionUseCaseMemoizedSerializedSize = dataSize; } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -896,7 +758,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -931,7 +793,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1061,22 +923,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.Control.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (ruleBuilder_ != null) { + ruleBuilder_.clear(); + } name_ = ""; displayName_ = ""; @@ -1239,7 +1097,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Control other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1254,17 +1112,94 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Control parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 34: + { + input.readMessage(getRuleFieldBuilder().getBuilder(), extensionRegistry); + controlCase_ = 4; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAssociatedServingConfigIdsIsMutable(); + associatedServingConfigIds_.add(s); + break; + } // case 42 + case 48: + { + int tmpRaw = input.readEnum(); + ensureSolutionTypesIsMutable(); + solutionTypes_.add(tmpRaw); + break; + } // case 48 + case 50: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureSolutionTypesIsMutable(); + solutionTypes_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 50 + case 56: + { + int tmpRaw = input.readEnum(); + ensureSearchSolutionUseCaseIsMutable(); + searchSolutionUseCase_.add(tmpRaw); + break; + } // case 56 + case 58: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureSearchSolutionUseCaseIsMutable(); + searchSolutionUseCase_.add(tmpRaw); + } + input.popLimit(oldLimit); + 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) { - parsedMessage = (com.google.cloud.retail.v2.Control) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2609,7 +2544,18 @@ public Control parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Control(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateControlRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateControlRequest.java index 8033ec9e..c0cd80ef 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateControlRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateControlRequest.java @@ -53,74 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateControlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2.Control.Builder subBuilder = null; - if (control_ != null) { - subBuilder = control_.toBuilder(); - } - control_ = - input.readMessage(com.google.cloud.retail.v2.Control.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(control_); - control_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - controlId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ControlServiceProto .internal_static_google_cloud_retail_v2_CreateControlRequest_descriptor; @@ -318,7 +250,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controlId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, controlId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -336,7 +268,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controlId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, controlId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -358,7 +290,7 @@ public boolean equals(final java.lang.Object obj) { if (!getControl().equals(other.getControl())) return false; } if (!getControlId().equals(other.getControlId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -377,7 +309,7 @@ public int hashCode() { } hash = (37 * hash) + CONTROL_ID_FIELD_NUMBER; hash = (53 * hash) + getControlId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -506,17 +438,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.CreateControlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -627,7 +552,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.CreateControlRequest other) controlId_ = other.controlId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -642,17 +567,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.CreateControlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getControlFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + controlId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.CreateControlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1124,7 +1081,18 @@ public CreateControlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateControlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateProductRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateProductRequest.java index a99dba33..3e5020ae 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateProductRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateProductRequest.java @@ -55,74 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = - input.readMessage(com.google.cloud.retail.v2.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - productId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_CreateProductRequest_descriptor; @@ -336,7 +268,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -354,7 +286,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -376,7 +308,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProduct().equals(other.getProduct())) return false; } if (!getProductId().equals(other.getProductId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -395,7 +327,7 @@ public int hashCode() { } hash = (37 * hash) + PRODUCT_ID_FIELD_NUMBER; hash = (53 * hash) + getProductId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -526,17 +458,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.CreateProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -647,7 +572,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.CreateProductRequest other) productId_ = other.productId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -662,17 +587,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.CreateProductRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getProductFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + productId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.CreateProductRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1184,7 +1141,18 @@ public CreateProductRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateProductRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateServingConfigRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateServingConfigRequest.java index 0a3d9e2c..69aacbca 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateServingConfigRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CreateServingConfigRequest.java @@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateServingConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2.ServingConfig.Builder subBuilder = null; - if (servingConfig_ != null) { - subBuilder = servingConfig_.toBuilder(); - } - servingConfig_ = - input.readMessage( - com.google.cloud.retail.v2.ServingConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(servingConfig_); - servingConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - servingConfigId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ServingConfigServiceProto .internal_static_google_cloud_retail_v2_CreateServingConfigRequest_descriptor; @@ -324,7 +255,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servingConfigId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, servingConfigId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -342,7 +273,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servingConfigId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, servingConfigId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -364,7 +295,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServingConfig().equals(other.getServingConfig())) return false; } if (!getServingConfigId().equals(other.getServingConfigId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -383,7 +314,7 @@ public int hashCode() { } hash = (37 * hash) + SERVING_CONFIG_ID_FIELD_NUMBER; hash = (53 * hash) + getServingConfigId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -513,17 +444,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.CreateServingConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -634,7 +558,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.CreateServingConfigRequest o servingConfigId_ = other.servingConfigId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -649,18 +573,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.CreateServingConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getServingConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + servingConfigId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.CreateServingConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1142,7 +1097,18 @@ public CreateServingConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateServingConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CustomAttribute.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CustomAttribute.java index 4dfb69fb..8eed3450 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CustomAttribute.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/CustomAttribute.java @@ -54,97 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CustomAttribute( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - text_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - text_.add(s); - break; - } - case 17: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - numbers_ = newDoubleList(); - mutable_bitField0_ |= 0x00000002; - } - numbers_.addDouble(input.readDouble()); - break; - } - case 18: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { - numbers_ = newDoubleList(); - mutable_bitField0_ |= 0x00000002; - } - while (input.getBytesUntilLimit() > 0) { - numbers_.addDouble(input.readDouble()); - } - input.popLimit(limit); - break; - } - case 24: - { - bitField0_ |= 0x00000001; - searchable_ = input.readBool(); - break; - } - case 32: - { - bitField0_ |= 0x00000002; - indexable_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - text_ = text_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - numbers_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_CustomAttribute_descriptor; @@ -464,7 +373,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeBool(4, indexable_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -497,7 +406,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, indexable_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -523,7 +432,7 @@ public boolean equals(final java.lang.Object obj) { if (hasIndexable()) { if (getIndexable() != other.getIndexable()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -550,7 +459,7 @@ public int hashCode() { hash = (37 * hash) + INDEXABLE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIndexable()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -680,17 +589,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.CustomAttribute.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -827,7 +729,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.CustomAttribute other) { if (other.hasIndexable()) { setIndexable(other.getIndexable()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -842,17 +744,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.CustomAttribute parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTextIsMutable(); + text_.add(s); + break; + } // case 10 + case 17: + { + double v = input.readDouble(); + ensureNumbersIsMutable(); + numbers_.addDouble(v); + break; + } // case 17 + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureNumbersIsMutable(); + while (input.getBytesUntilLimit() > 0) { + numbers_.addDouble(input.readDouble()); + } + input.popLimit(limit); + break; + } // case 18 + case 24: + { + searchable_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + indexable_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2.CustomAttribute) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1520,7 +1473,18 @@ public CustomAttribute parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CustomAttribute(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteControlRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteControlRequest.java index cebd7f85..1fdce998 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteControlRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteControlRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteControlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ControlServiceProto .internal_static_google_cloud_retail_v2_DeleteControlRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.DeleteControlRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.DeleteControlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -456,7 +403,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.DeleteControlRequest other) name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -471,17 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.DeleteControlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.DeleteControlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -638,7 +605,18 @@ public DeleteControlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteControlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteProductRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteProductRequest.java index ce447a68..ff785649 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteProductRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteProductRequest.java @@ -54,52 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_DeleteProductRequest_descriptor; @@ -217,7 +171,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -229,7 +183,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -246,7 +200,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.DeleteProductRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -259,7 +213,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -390,17 +344,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.DeleteProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -490,7 +437,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.DeleteProductRequest other) name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -505,17 +452,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.DeleteProductRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.DeleteProductRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -747,7 +714,18 @@ public DeleteProductRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteProductRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteServingConfigRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteServingConfigRequest.java index 9f088a44..ffe8658d 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteServingConfigRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/DeleteServingConfigRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteServingConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ServingConfigServiceProto .internal_static_google_cloud_retail_v2_DeleteServingConfigRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.DeleteServingConfigRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.DeleteServingConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -457,7 +404,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.DeleteServingConfigRequest o name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -472,18 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.DeleteServingConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.DeleteServingConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -640,7 +606,18 @@ public DeleteServingConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteServingConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/FulfillmentInfo.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/FulfillmentInfo.java index 4e28f015..7115174b 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/FulfillmentInfo.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/FulfillmentInfo.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FulfillmentInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - type_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - placeIds_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = placeIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_FulfillmentInfo_descriptor; @@ -319,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < placeIds_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, placeIds_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -339,7 +279,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getPlaceIdsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -357,7 +297,7 @@ public boolean equals(final java.lang.Object obj) { if (!getType().equals(other.getType())) return false; if (!getPlaceIdsList().equals(other.getPlaceIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -374,7 +314,7 @@ public int hashCode() { hash = (37 * hash) + PLACE_IDS_FIELD_NUMBER; hash = (53 * hash) + getPlaceIdsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -504,17 +444,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.FulfillmentInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -621,7 +554,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.FulfillmentInfo other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -636,17 +569,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.FulfillmentInfo parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + type_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePlaceIdsIsMutable(); + placeIds_.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) { - parsedMessage = (com.google.cloud.retail.v2.FulfillmentInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1100,7 +1060,18 @@ public FulfillmentInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FulfillmentInfo(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GcsSource.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GcsSource.java index 4c116b64..2a239637 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GcsSource.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GcsSource.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GcsSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - inputUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - inputUris_.add(s); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - dataSchema_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - inputUris_ = inputUris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ImportConfigProto .internal_static_google_cloud_retail_v2_GcsSource_descriptor; @@ -320,7 +260,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataSchema_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dataSchema_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -340,7 +280,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataSchema_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dataSchema_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -357,7 +297,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInputUrisList().equals(other.getInputUrisList())) return false; if (!getDataSchema().equals(other.getDataSchema())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -374,7 +314,7 @@ public int hashCode() { } hash = (37 * hash) + DATA_SCHEMA_FIELD_NUMBER; hash = (53 * hash) + getDataSchema().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -502,17 +442,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.GcsSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -618,7 +551,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.GcsSource other) { dataSchema_ = other.dataSchema_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -633,17 +566,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.GcsSource parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInputUrisIsMutable(); + inputUris_.add(s); + break; + } // case 10 + case 18: + { + dataSchema_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.GcsSource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1103,7 +1063,18 @@ public GcsSource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsSource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetAttributesConfigRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetAttributesConfigRequest.java index 8d5e77f0..2e386ae1 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetAttributesConfigRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetAttributesConfigRequest.java @@ -54,52 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetAttributesConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CatalogServiceProto .internal_static_google_cloud_retail_v2_GetAttributesConfigRequest_descriptor; @@ -187,7 +141,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -199,7 +153,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -216,7 +170,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.GetAttributesConfigRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -229,7 +183,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -361,17 +315,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.GetAttributesConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -461,7 +408,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.GetAttributesConfigRequest o name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -476,18 +423,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.GetAttributesConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.GetAttributesConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -644,7 +610,18 @@ public GetAttributesConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetAttributesConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetCompletionConfigRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetCompletionConfigRequest.java index f8bea6fc..f4f21e02 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetCompletionConfigRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetCompletionConfigRequest.java @@ -54,52 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetCompletionConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CatalogServiceProto .internal_static_google_cloud_retail_v2_GetCompletionConfigRequest_descriptor; @@ -187,7 +141,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -199,7 +153,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -216,7 +170,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.GetCompletionConfigRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -229,7 +183,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -361,17 +315,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.GetCompletionConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -461,7 +408,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.GetCompletionConfigRequest o name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -476,18 +423,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.GetCompletionConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.GetCompletionConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -644,7 +610,18 @@ public GetCompletionConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetCompletionConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetControlRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetControlRequest.java index 253829c8..f3c4b017 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetControlRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetControlRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetControlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ControlServiceProto .internal_static_google_cloud_retail_v2_GetControlRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.GetControlRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.GetControlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +402,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.GetControlRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,17 +417,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.GetControlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.GetControlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -637,7 +604,18 @@ public GetControlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetControlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetDefaultBranchRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetDefaultBranchRequest.java index 3a681d26..09d1d4e9 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetDefaultBranchRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetDefaultBranchRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetDefaultBranchRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - catalog_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CatalogServiceProto .internal_static_google_cloud_retail_v2_GetDefaultBranchRequest_descriptor; @@ -181,7 +135,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalog_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, catalog_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -193,7 +147,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalog_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, catalog_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -210,7 +164,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.GetDefaultBranchRequest) obj; if (!getCatalog().equals(other.getCatalog())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -223,7 +177,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CATALOG_FIELD_NUMBER; hash = (53 * hash) + getCatalog().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -352,17 +306,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.GetDefaultBranchRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -452,7 +399,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.GetDefaultBranchRequest othe catalog_ = other.catalog_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -467,18 +414,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.GetDefaultBranchRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + catalog_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.GetDefaultBranchRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -625,7 +591,18 @@ public GetDefaultBranchRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetDefaultBranchRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetDefaultBranchResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetDefaultBranchResponse.java index 0aac43af..c6bc1110 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetDefaultBranchResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetDefaultBranchResponse.java @@ -54,74 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetDefaultBranchResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - branch_ = s; - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (setTime_ != null) { - subBuilder = setTime_.toBuilder(); - } - setTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(setTime_); - setTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - note_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CatalogServiceProto .internal_static_google_cloud_retail_v2_GetDefaultBranchResponse_descriptor; @@ -308,7 +240,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(note_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, note_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -326,7 +258,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(note_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, note_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -348,7 +280,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSetTime().equals(other.getSetTime())) return false; } if (!getNote().equals(other.getNote())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -367,7 +299,7 @@ public int hashCode() { } hash = (37 * hash) + NOTE_FIELD_NUMBER; hash = (53 * hash) + getNote().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -497,17 +429,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.GetDefaultBranchResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -618,7 +543,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.GetDefaultBranchResponse oth note_ = other.note_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -633,18 +558,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.GetDefaultBranchResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + branch_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getSetTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + note_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.GetDefaultBranchResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1081,7 +1037,18 @@ public GetDefaultBranchResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetDefaultBranchResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetProductRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetProductRequest.java index 9c6d09c5..58fb31e1 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetProductRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetProductRequest.java @@ -54,52 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_GetProductRequest_descriptor; @@ -199,7 +153,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -211,7 +165,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -228,7 +182,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.GetProductRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -241,7 +195,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -372,17 +326,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.GetProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -471,7 +418,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.GetProductRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -486,17 +433,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.GetProductRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.GetProductRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -683,7 +650,18 @@ public GetProductRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetProductRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetServingConfigRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetServingConfigRequest.java index 49a02a9c..2ad37105 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetServingConfigRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/GetServingConfigRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetServingConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ServingConfigServiceProto .internal_static_google_cloud_retail_v2_GetServingConfigRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.GetServingConfigRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.GetServingConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -456,7 +403,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.GetServingConfigRequest othe name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -471,18 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.GetServingConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.GetServingConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -639,7 +605,18 @@ public GetServingConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetServingConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Image.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Image.java index 7b0ca253..208bc7f9 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Image.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Image.java @@ -55,62 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Image( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - uri_ = s; - break; - } - case 16: - { - height_ = input.readInt32(); - break; - } - case 24: - { - width_ = input.readInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_Image_descriptor; @@ -247,7 +191,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (width_ != 0) { output.writeInt32(3, width_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -265,7 +209,7 @@ public int getSerializedSize() { if (width_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, width_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -283,7 +227,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUri().equals(other.getUri())) return false; if (getHeight() != other.getHeight()) return false; if (getWidth() != other.getWidth()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -300,7 +244,7 @@ public int hashCode() { hash = (53 * hash) + getHeight(); hash = (37 * hash) + WIDTH_FIELD_NUMBER; hash = (53 * hash) + getWidth(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -431,17 +375,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.Image.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -541,7 +478,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Image other) { if (other.getWidth() != 0) { setWidth(other.getWidth()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -556,17 +493,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Image parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uri_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + height_ = input.readInt32(); + + break; + } // case 16 + case 24: + { + width_ = input.readInt32(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.Image) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -849,7 +818,18 @@ public Image parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Image(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportCompletionDataRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportCompletionDataRequest.java index 4ee9d179..dd6f7114 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportCompletionDataRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportCompletionDataRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportCompletionDataRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2.CompletionDataInputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = - input.readMessage( - com.google.cloud.retail.v2.CompletionDataInputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - notificationPubsubTopic_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ImportConfigProto .internal_static_google_cloud_retail_v2_ImportCompletionDataRequest_descriptor; @@ -327,7 +257,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationPubsubTopic_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, notificationPubsubTopic_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -345,7 +275,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationPubsubTopic_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, notificationPubsubTopic_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -367,7 +297,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInputConfig().equals(other.getInputConfig())) return false; } if (!getNotificationPubsubTopic().equals(other.getNotificationPubsubTopic())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -386,7 +316,7 @@ public int hashCode() { } hash = (37 * hash) + NOTIFICATION_PUBSUB_TOPIC_FIELD_NUMBER; hash = (53 * hash) + getNotificationPubsubTopic().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -516,17 +446,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ImportCompletionDataRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -637,7 +560,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ImportCompletionDataRequest notificationPubsubTopic_ = other.notificationPubsubTopic_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -652,18 +575,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ImportCompletionDataRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getInputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + notificationPubsubTopic_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.ImportCompletionDataRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1150,7 +1104,18 @@ public ImportCompletionDataRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportCompletionDataRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportCompletionDataResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportCompletionDataResponse.java index e91b81a5..482e98d8 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportCompletionDataResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportCompletionDataResponse.java @@ -55,59 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportCompletionDataResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - errorSamples_.add( - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = java.util.Collections.unmodifiableList(errorSamples_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ImportConfigProto .internal_static_google_cloud_retail_v2_ImportCompletionDataResponse_descriptor; @@ -208,7 +155,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < errorSamples_.size(); i++) { output.writeMessage(1, errorSamples_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -220,7 +167,7 @@ public int getSerializedSize() { for (int i = 0; i < errorSamples_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, errorSamples_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -237,7 +184,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.ImportCompletionDataResponse) obj; if (!getErrorSamplesList().equals(other.getErrorSamplesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -252,7 +199,7 @@ public int hashCode() { hash = (37 * hash) + ERROR_SAMPLES_FIELD_NUMBER; hash = (53 * hash) + getErrorSamplesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -385,19 +332,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ImportCompletionDataResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getErrorSamplesFieldBuilder(); - } } @java.lang.Override @@ -405,10 +343,11 @@ public Builder clear() { super.clear(); if (errorSamplesBuilder_ == null) { errorSamples_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + errorSamples_ = null; errorSamplesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -523,7 +462,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ImportCompletionDataResponse } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -538,18 +477,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ImportCompletionDataResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(m); + } else { + errorSamplesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2.ImportCompletionDataResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -925,7 +889,18 @@ public ImportCompletionDataResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportCompletionDataResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportErrorsConfig.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportErrorsConfig.java index 4ea059f6..b488012a 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportErrorsConfig.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportErrorsConfig.java @@ -50,52 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportErrorsConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - destinationCase_ = 1; - destination_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ImportConfigProto .internal_static_google_cloud_retail_v2_ImportErrorsConfig_descriptor; @@ -251,7 +205,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (destinationCase_ == 1) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destination_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -263,7 +217,7 @@ public int getSerializedSize() { if (destinationCase_ == 1) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destination_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -287,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -306,7 +260,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -435,17 +389,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ImportErrorsConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -546,7 +493,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ImportErrorsConfig other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -561,17 +508,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ImportErrorsConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 1; + destination_ = s; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2.ImportErrorsConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -773,7 +741,18 @@ public ImportErrorsConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportErrorsConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportMetadata.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportMetadata.java index f80a9d47..39c8c404 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportMetadata.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportMetadata.java @@ -54,99 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - successCount_ = input.readInt64(); - break; - } - case 32: - { - failureCount_ = input.readInt64(); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - notificationPubsubTopic_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ImportConfigProto .internal_static_google_cloud_retail_v2_ImportMetadata_descriptor; @@ -437,7 +344,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationPubsubTopic_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, notificationPubsubTopic_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -464,7 +371,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationPubsubTopic_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, notificationPubsubTopic_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -492,7 +399,7 @@ public boolean equals(final java.lang.Object obj) { if (getFailureCount() != other.getFailureCount()) return false; if (!getRequestId().equals(other.getRequestId())) return false; if (!getNotificationPubsubTopic().equals(other.getNotificationPubsubTopic())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -519,7 +426,7 @@ public int hashCode() { hash = (53 * hash) + getRequestId().hashCode(); hash = (37 * hash) + NOTIFICATION_PUBSUB_TOPIC_FIELD_NUMBER; hash = (53 * hash) + getNotificationPubsubTopic().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -649,17 +556,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ImportMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -795,7 +695,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ImportMetadata other) { notificationPubsubTopic_ = other.notificationPubsubTopic_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -810,17 +710,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ImportMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + successCount_ = input.readInt64(); + + break; + } // case 24 + case 32: + { + failureCount_ = input.readInt64(); + + break; + } // case 32 + case 42: + { + requestId_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + notificationPubsubTopic_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.ImportMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1582,7 +1532,18 @@ public ImportMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportProductsRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportProductsRequest.java index a1d3d54c..b22147e4 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportProductsRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportProductsRequest.java @@ -55,120 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportProductsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2.ProductInputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = - input.readMessage( - com.google.cloud.retail.v2.ProductInputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.retail.v2.ImportErrorsConfig.Builder subBuilder = null; - if (errorsConfig_ != null) { - subBuilder = errorsConfig_.toBuilder(); - } - errorsConfig_ = - input.readMessage( - com.google.cloud.retail.v2.ImportErrorsConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(errorsConfig_); - errorsConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - case 40: - { - int rawValue = input.readEnum(); - - reconciliationMode_ = rawValue; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - notificationPubsubTopic_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ImportConfigProto .internal_static_google_cloud_retail_v2_ImportProductsRequest_descriptor; @@ -763,7 +649,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationPubsubTopic_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, notificationPubsubTopic_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -796,7 +682,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationPubsubTopic_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, notificationPubsubTopic_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -828,7 +714,7 @@ public boolean equals(final java.lang.Object obj) { } if (reconciliationMode_ != other.reconciliationMode_) return false; if (!getNotificationPubsubTopic().equals(other.getNotificationPubsubTopic())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -859,7 +745,7 @@ public int hashCode() { hash = (53 * hash) + reconciliationMode_; hash = (37 * hash) + NOTIFICATION_PUBSUB_TOPIC_FIELD_NUMBER; hash = (53 * hash) + getNotificationPubsubTopic().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -988,17 +874,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ImportProductsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1150,7 +1029,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ImportProductsRequest other) notificationPubsubTopic_ = other.notificationPubsubTopic_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1165,17 +1044,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ImportProductsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getInputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getErrorsConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 40: + { + reconciliationMode_ = input.readEnum(); + + break; + } // case 40 + case 50: + { + requestId_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + notificationPubsubTopic_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.ImportProductsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2312,7 +2247,18 @@ public ImportProductsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportProductsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportProductsResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportProductsResponse.java index 7587eba5..da3abb34 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportProductsResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportProductsResponse.java @@ -55,75 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportProductsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - errorSamples_.add( - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); - break; - } - case 18: - { - com.google.cloud.retail.v2.ImportErrorsConfig.Builder subBuilder = null; - if (errorsConfig_ != null) { - subBuilder = errorsConfig_.toBuilder(); - } - errorsConfig_ = - input.readMessage( - com.google.cloud.retail.v2.ImportErrorsConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(errorsConfig_); - errorsConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = java.util.Collections.unmodifiableList(errorSamples_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ImportConfigProto .internal_static_google_cloud_retail_v2_ImportProductsResponse_descriptor; @@ -275,7 +206,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (errorsConfig_ != null) { output.writeMessage(2, getErrorsConfig()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -290,7 +221,7 @@ public int getSerializedSize() { if (errorsConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getErrorsConfig()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -311,7 +242,7 @@ public boolean equals(final java.lang.Object obj) { if (hasErrorsConfig()) { if (!getErrorsConfig().equals(other.getErrorsConfig())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -330,7 +261,7 @@ public int hashCode() { hash = (37 * hash) + ERRORS_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getErrorsConfig().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -462,19 +393,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ImportProductsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getErrorSamplesFieldBuilder(); - } } @java.lang.Override @@ -482,10 +404,11 @@ public Builder clear() { super.clear(); if (errorSamplesBuilder_ == null) { errorSamples_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + errorSamples_ = null; errorSamplesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (errorsConfigBuilder_ == null) { errorsConfig_ = null; } else { @@ -614,7 +537,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ImportProductsResponse other if (other.hasErrorsConfig()) { mergeErrorsConfig(other.getErrorsConfig()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -629,18 +552,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ImportProductsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(m); + } else { + errorSamplesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage(getErrorsConfigFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.ImportProductsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1202,7 +1156,18 @@ public ImportProductsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportProductsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportUserEventsRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportUserEventsRequest.java index 9723809f..4a6131b7 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportUserEventsRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportUserEventsRequest.java @@ -52,84 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportUserEventsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2.UserEventInputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = - input.readMessage( - com.google.cloud.retail.v2.UserEventInputConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.retail.v2.ImportErrorsConfig.Builder subBuilder = null; - if (errorsConfig_ != null) { - subBuilder = errorsConfig_.toBuilder(); - } - errorsConfig_ = - input.readMessage( - com.google.cloud.retail.v2.ImportErrorsConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(errorsConfig_); - errorsConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ImportConfigProto .internal_static_google_cloud_retail_v2_ImportUserEventsRequest_descriptor; @@ -326,7 +248,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (errorsConfig_ != null) { output.writeMessage(3, getErrorsConfig()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -344,7 +266,7 @@ public int getSerializedSize() { if (errorsConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getErrorsConfig()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -369,7 +291,7 @@ public boolean equals(final java.lang.Object obj) { if (hasErrorsConfig()) { if (!getErrorsConfig().equals(other.getErrorsConfig())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -390,7 +312,7 @@ public int hashCode() { hash = (37 * hash) + ERRORS_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getErrorsConfig().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -519,17 +441,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ImportUserEventsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -647,7 +562,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ImportUserEventsRequest othe if (other.hasErrorsConfig()) { mergeErrorsConfig(other.getErrorsConfig()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -662,18 +577,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ImportUserEventsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getInputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getErrorsConfigFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.ImportUserEventsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1224,7 +1170,18 @@ public ImportUserEventsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportUserEventsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportUserEventsResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportUserEventsResponse.java index 99bb8ebf..94dc74b5 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportUserEventsResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ImportUserEventsResponse.java @@ -54,92 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportUserEventsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - errorSamples_.add( - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); - break; - } - case 18: - { - com.google.cloud.retail.v2.ImportErrorsConfig.Builder subBuilder = null; - if (errorsConfig_ != null) { - subBuilder = errorsConfig_.toBuilder(); - } - errorsConfig_ = - input.readMessage( - com.google.cloud.retail.v2.ImportErrorsConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(errorsConfig_); - errorsConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.retail.v2.UserEventImportSummary.Builder subBuilder = null; - if (importSummary_ != null) { - subBuilder = importSummary_.toBuilder(); - } - importSummary_ = - input.readMessage( - com.google.cloud.retail.v2.UserEventImportSummary.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(importSummary_); - importSummary_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = java.util.Collections.unmodifiableList(errorSamples_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ImportConfigProto .internal_static_google_cloud_retail_v2_ImportUserEventsResponse_descriptor; @@ -345,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (importSummary_ != null) { output.writeMessage(3, getImportSummary()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -363,7 +277,7 @@ public int getSerializedSize() { if (importSummary_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getImportSummary()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -388,7 +302,7 @@ public boolean equals(final java.lang.Object obj) { if (hasImportSummary()) { if (!getImportSummary().equals(other.getImportSummary())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -411,7 +325,7 @@ public int hashCode() { hash = (37 * hash) + IMPORT_SUMMARY_FIELD_NUMBER; hash = (53 * hash) + getImportSummary().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -542,19 +456,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ImportUserEventsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getErrorSamplesFieldBuilder(); - } } @java.lang.Override @@ -562,10 +467,11 @@ public Builder clear() { super.clear(); if (errorSamplesBuilder_ == null) { errorSamples_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + errorSamples_ = null; errorSamplesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (errorsConfigBuilder_ == null) { errorsConfig_ = null; } else { @@ -708,7 +614,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ImportUserEventsResponse oth if (other.hasImportSummary()) { mergeImportSummary(other.getImportSummary()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -723,18 +629,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ImportUserEventsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(m); + } else { + errorSamplesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage(getErrorsConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getImportSummaryFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.ImportUserEventsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1491,7 +1434,18 @@ public ImportUserEventsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportUserEventsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Interval.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Interval.java index c393839d..04514089 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Interval.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Interval.java @@ -50,69 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Interval( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 9: - { - min_ = input.readDouble(); - minCase_ = 1; - break; - } - case 17: - { - min_ = input.readDouble(); - minCase_ = 2; - break; - } - case 25: - { - max_ = input.readDouble(); - maxCase_ = 3; - break; - } - case 33: - { - max_ = input.readDouble(); - maxCase_ = 4; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_Interval_descriptor; @@ -388,7 +325,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (maxCase_ == 4) { output.writeDouble(4, (double) ((java.lang.Double) max_)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -417,7 +354,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeDoubleSize( 4, (double) ((java.lang.Double) max_)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -458,7 +395,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -505,7 +442,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -633,17 +570,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.Interval.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -774,7 +704,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Interval other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -789,17 +719,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Interval parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + min_ = input.readDouble(); + minCase_ = 1; + break; + } // case 9 + case 17: + { + min_ = input.readDouble(); + minCase_ = 2; + break; + } // case 17 + case 25: + { + max_ = input.readDouble(); + maxCase_ = 3; + break; + } // case 25 + case 33: + { + max_ = input.readDouble(); + maxCase_ = 4; + break; + } // case 33 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2.Interval) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1139,7 +1107,18 @@ public Interval parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Interval(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListCatalogsRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListCatalogsRequest.java index eb506b89..f501adf8 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListCatalogsRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListCatalogsRequest.java @@ -55,64 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListCatalogsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CatalogServiceProto .internal_static_google_cloud_retail_v2_ListCatalogsRequest_descriptor; @@ -298,7 +240,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -316,7 +258,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -335,7 +277,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -352,7 +294,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -483,17 +425,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ListCatalogsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -595,7 +530,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ListCatalogsRequest other) { pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -610,17 +545,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ListCatalogsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.ListCatalogsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -999,7 +966,18 @@ public ListCatalogsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListCatalogsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListCatalogsResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListCatalogsResponse.java index 37a0607e..bea7eb5f 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListCatalogsResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListCatalogsResponse.java @@ -55,67 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListCatalogsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - catalogs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - catalogs_.add( - input.readMessage( - com.google.cloud.retail.v2.Catalog.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - catalogs_ = java.util.Collections.unmodifiableList(catalogs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CatalogServiceProto .internal_static_google_cloud_retail_v2_ListCatalogsResponse_descriptor; @@ -275,7 +214,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -290,7 +229,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -308,7 +247,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCatalogsList().equals(other.getCatalogsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -325,7 +264,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -456,19 +395,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ListCatalogsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCatalogsFieldBuilder(); - } } @java.lang.Override @@ -476,10 +406,11 @@ public Builder clear() { super.clear(); if (catalogsBuilder_ == null) { catalogs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + catalogs_ = null; catalogsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -601,7 +532,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ListCatalogsResponse other) nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -616,17 +547,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ListCatalogsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2.Catalog m = + input.readMessage( + com.google.cloud.retail.v2.Catalog.parser(), extensionRegistry); + if (catalogsBuilder_ == null) { + ensureCatalogsIsMutable(); + catalogs_.add(m); + } else { + catalogsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.ListCatalogsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1133,7 +1097,18 @@ public ListCatalogsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListCatalogsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListControlsRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListControlsRequest.java index c58e8370..b5747fd4 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListControlsRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListControlsRequest.java @@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListControlsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ControlServiceProto .internal_static_google_cloud_retail_v2_ListControlsRequest_descriptor; @@ -342,7 +277,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -363,7 +298,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -383,7 +318,7 @@ public boolean equals(final java.lang.Object obj) { if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -402,7 +337,7 @@ public int hashCode() { hash = (53 * hash) + getPageToken().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -531,17 +466,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ListControlsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -650,7 +578,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ListControlsRequest other) { filter_ = other.filter_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -665,17 +593,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ListControlsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.ListControlsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1124,7 +1090,18 @@ public ListControlsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListControlsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListControlsResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListControlsResponse.java index 39a107a4..c9994744 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListControlsResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListControlsResponse.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListControlsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - controls_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - controls_.add( - input.readMessage( - com.google.cloud.retail.v2.Control.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - controls_ = java.util.Collections.unmodifiableList(controls_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ControlServiceProto .internal_static_google_cloud_retail_v2_ListControlsResponse_descriptor; @@ -267,7 +206,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -282,7 +221,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -300,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (!getControlsList().equals(other.getControlsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -317,7 +256,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -446,19 +385,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ListControlsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getControlsFieldBuilder(); - } } @java.lang.Override @@ -466,10 +396,11 @@ public Builder clear() { super.clear(); if (controlsBuilder_ == null) { controls_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + controls_ = null; controlsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -591,7 +522,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ListControlsResponse other) nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -606,17 +537,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ListControlsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2.Control m = + input.readMessage( + com.google.cloud.retail.v2.Control.parser(), extensionRegistry); + if (controlsBuilder_ == null) { + ensureControlsIsMutable(); + controls_.add(m); + } else { + controlsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.ListControlsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1108,7 +1072,18 @@ public ListControlsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListControlsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListProductsRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListProductsRequest.java index be2620a5..5a017622 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListProductsRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListProductsRequest.java @@ -56,86 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListProductsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 42: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (readMask_ != null) { - subBuilder = readMask_.toBuilder(); - } - readMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readMask_); - readMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_ListProductsRequest_descriptor; @@ -513,7 +433,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (readMask_ != null) { output.writeMessage(5, getReadMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -537,7 +457,7 @@ public int getSerializedSize() { if (readMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -561,7 +481,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReadMask()) { if (!getReadMask().equals(other.getReadMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -584,7 +504,7 @@ public int hashCode() { hash = (37 * hash) + READ_MASK_FIELD_NUMBER; hash = (53 * hash) + getReadMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -715,17 +635,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ListProductsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -848,7 +761,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ListProductsRequest other) { if (other.hasReadMask()) { mergeReadMask(other.getReadMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -863,17 +776,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ListProductsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + input.readMessage(getReadMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.ListProductsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1784,7 +1741,18 @@ public ListProductsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListProductsResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListProductsResponse.java index aac41e6f..b33dbc5e 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListProductsResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListProductsResponse.java @@ -55,67 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListProductsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - products_.add( - input.readMessage( - com.google.cloud.retail.v2.Product.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = java.util.Collections.unmodifiableList(products_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_ListProductsResponse_descriptor; @@ -275,7 +214,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -290,7 +229,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -308,7 +247,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProductsList().equals(other.getProductsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -325,7 +264,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -456,19 +395,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ListProductsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getProductsFieldBuilder(); - } } @java.lang.Override @@ -476,10 +406,11 @@ public Builder clear() { super.clear(); if (productsBuilder_ == null) { products_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + products_ = null; productsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -601,7 +532,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ListProductsResponse other) nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -616,17 +547,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ListProductsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2.Product m = + input.readMessage( + com.google.cloud.retail.v2.Product.parser(), extensionRegistry); + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(m); + } else { + productsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.ListProductsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1133,7 +1097,18 @@ public ListProductsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListServingConfigsRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListServingConfigsRequest.java index 18534031..9334ba6d 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListServingConfigsRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListServingConfigsRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListServingConfigsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ServingConfigServiceProto .internal_static_google_cloud_retail_v2_ListServingConfigsRequest_descriptor; @@ -275,7 +217,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -293,7 +235,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -312,7 +254,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -329,7 +271,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -458,17 +400,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ListServingConfigsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -571,7 +506,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ListServingConfigsRequest ot pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -586,18 +521,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ListServingConfigsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.ListServingConfigsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -923,7 +889,18 @@ public ListServingConfigsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListServingConfigsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListServingConfigsResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListServingConfigsResponse.java index 468e2966..859e69d1 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListServingConfigsResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ListServingConfigsResponse.java @@ -53,68 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListServingConfigsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - servingConfigs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - servingConfigs_.add( - input.readMessage( - com.google.cloud.retail.v2.ServingConfig.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - servingConfigs_ = java.util.Collections.unmodifiableList(servingConfigs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ServingConfigServiceProto .internal_static_google_cloud_retail_v2_ListServingConfigsResponse_descriptor; @@ -268,7 +206,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -283,7 +221,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -301,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServingConfigsList().equals(other.getServingConfigsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -318,7 +256,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -448,19 +386,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ListServingConfigsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getServingConfigsFieldBuilder(); - } } @java.lang.Override @@ -468,10 +397,11 @@ public Builder clear() { super.clear(); if (servingConfigsBuilder_ == null) { servingConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + servingConfigs_ = null; servingConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -593,7 +523,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ListServingConfigsResponse o nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -608,18 +538,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ListServingConfigsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2.ServingConfig m = + input.readMessage( + com.google.cloud.retail.v2.ServingConfig.parser(), extensionRegistry); + if (servingConfigsBuilder_ == null) { + ensureServingConfigsIsMutable(); + servingConfigs_.add(m); + } else { + servingConfigsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.ListServingConfigsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1117,7 +1079,18 @@ public ListServingConfigsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListServingConfigsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/LocalInventory.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/LocalInventory.java index 20ff0503..d8bcfaee 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/LocalInventory.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/LocalInventory.java @@ -54,99 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LocalInventory( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - placeId_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2.PriceInfo.Builder subBuilder = null; - if (priceInfo_ != null) { - subBuilder = priceInfo_.toBuilder(); - } - priceInfo_ = - input.readMessage( - com.google.cloud.retail.v2.PriceInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(priceInfo_); - priceInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - attributes_ = - com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.retail.v2.CustomAttribute> - attributes__ = - input.readMessage( - AttributesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - attributes_.getMutableMap().put(attributes__.getKey(), attributes__.getValue()); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - fulfillmentTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - fulfillmentTypes_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - fulfillmentTypes_ = fulfillmentTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_LocalInventory_descriptor; @@ -598,7 +505,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < fulfillmentTypes_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, fulfillmentTypes_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -632,7 +539,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getFulfillmentTypesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -655,7 +562,7 @@ public boolean equals(final java.lang.Object obj) { } if (!internalGetAttributes().equals(other.internalGetAttributes())) return false; if (!getFulfillmentTypesList().equals(other.getFulfillmentTypesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -680,7 +587,7 @@ public int hashCode() { hash = (37 * hash) + FULFILLMENT_TYPES_FIELD_NUMBER; hash = (53 * hash) + getFulfillmentTypesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -830,17 +737,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.retail.v2.LocalInventory.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -965,7 +865,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.LocalInventory other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -980,17 +880,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.LocalInventory parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + placeId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getPriceInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.retail.v2.CustomAttribute> + attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .getMutableMap() + .put(attributes__.getKey(), attributes__.getValue()); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFulfillmentTypesIsMutable(); + fulfillmentTypes_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2.LocalInventory) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1944,7 +1890,18 @@ public LocalInventory parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LocalInventory(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictRequest.java index 278cca32..30369f0b 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictRequest.java @@ -54,119 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PredictRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - placement_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2.UserEvent.Builder subBuilder = null; - if (userEvent_ != null) { - subBuilder = userEvent_.toBuilder(); - } - userEvent_ = - input.readMessage( - com.google.cloud.retail.v2.UserEvent.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(userEvent_); - userEvent_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - pageSize_ = input.readInt32(); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 48: - { - validateOnly_ = input.readBool(); - break; - } - case 58: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - params_ = - com.google.protobuf.MapField.newMapField(ParamsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry params__ = - input.readMessage( - ParamsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - params_.getMutableMap().put(params__.getKey(), params__.getValue()); - break; - } - case 66: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.PredictionServiceProto .internal_static_google_cloud_retail_v2_PredictRequest_descriptor; @@ -948,7 +835,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output, internalGetParams(), ParamsDefaultEntryHolder.defaultEntry, 7); com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 8); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -995,7 +882,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, labels__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1022,7 +909,7 @@ public boolean equals(final java.lang.Object obj) { if (getValidateOnly() != other.getValidateOnly()) return false; if (!internalGetParams().equals(other.internalGetParams())) return false; if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1055,7 +942,7 @@ public int hashCode() { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1208,17 +1095,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.retail.v2.PredictRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1356,7 +1236,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.PredictRequest other) { } internalGetMutableParams().mergeFrom(other.internalGetParams()); internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1371,17 +1251,89 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.PredictRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + placement_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getUserEventFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 48: + { + validateOnly_ = input.readBool(); + + break; + } // case 48 + case 58: + { + com.google.protobuf.MapEntry params__ = + input.readMessage( + ParamsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableParams() + .getMutableMap() + .put(params__.getKey(), params__.getValue()); + break; + } // case 58 + case 66: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2.PredictRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2968,7 +2920,18 @@ public PredictRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PredictRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictResponse.java index 96746b82..085e9335 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PredictResponse.java @@ -54,88 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PredictResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = - new java.util.ArrayList< - com.google.cloud.retail.v2.PredictResponse.PredictionResult>(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage( - com.google.cloud.retail.v2.PredictResponse.PredictionResult.parser(), - extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - attributionToken_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - missingIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - missingIds_.add(s); - break; - } - case 32: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - missingIds_ = missingIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.PredictionServiceProto .internal_static_google_cloud_retail_v2_PredictResponse_descriptor; @@ -299,69 +217,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PredictionResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - id_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - metadata_ = - com.google.protobuf.MapField.newMapField( - MetadataDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - metadata__ = - input.readMessage( - MetadataDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - metadata_.getMutableMap().put(metadata__.getKey(), metadata__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.PredictionServiceProto .internal_static_google_cloud_retail_v2_PredictResponse_PredictionResult_descriptor; @@ -580,7 +435,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 2); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -602,7 +457,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, metadata__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -620,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (!getId().equals(other.getId())) return false; if (!internalGetMetadata().equals(other.internalGetMetadata())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -637,7 +492,7 @@ public int hashCode() { hash = (37 * hash) + METADATA_FIELD_NUMBER; hash = (53 * hash) + internalGetMetadata().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -789,17 +644,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.retail.v2.PredictResponse.PredictionResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -898,7 +746,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.PredictResponse.PredictionRe onChanged(); } internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -913,19 +761,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.PredictResponse.PredictionResult parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry + metadata__ = + input.readMessage( + MetadataDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableMetadata() + .getMutableMap() + .put(metadata__.getKey(), metadata__.getValue()); + 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) { - parsedMessage = - (com.google.cloud.retail.v2.PredictResponse.PredictionResult) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1270,7 +1148,19 @@ public PredictionResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PredictionResult(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1526,7 +1416,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(4, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1552,7 +1442,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1572,7 +1462,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAttributionToken().equals(other.getAttributionToken())) return false; if (!getMissingIdsList().equals(other.getMissingIdsList())) return false; if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1595,7 +1485,7 @@ public int hashCode() { } hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1724,19 +1614,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.PredictResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - } } @java.lang.Override @@ -1744,10 +1625,11 @@ public Builder clear() { super.clear(); if (resultsBuilder_ == null) { results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + results_ = null; resultsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); attributionToken_ = ""; missingIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -1891,7 +1773,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.PredictResponse other) { if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1906,17 +1788,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.PredictResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2.PredictResponse.PredictionResult m = + input.readMessage( + com.google.cloud.retail.v2.PredictResponse.PredictionResult.parser(), + extensionRegistry); + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(m); + } else { + resultsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + attributionToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureMissingIdsIsMutable(); + missingIds_.add(s); + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.PredictResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2678,7 +2607,18 @@ public PredictResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PredictResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PriceInfo.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PriceInfo.java index 352c01e2..161d07c4 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PriceInfo.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PriceInfo.java @@ -52,113 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PriceInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - currencyCode_ = s; - break; - } - case 21: - { - price_ = input.readFloat(); - break; - } - case 29: - { - originalPrice_ = input.readFloat(); - break; - } - case 37: - { - cost_ = input.readFloat(); - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (priceEffectiveTime_ != null) { - subBuilder = priceEffectiveTime_.toBuilder(); - } - priceEffectiveTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(priceEffectiveTime_); - priceEffectiveTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (priceExpireTime_ != null) { - subBuilder = priceExpireTime_.toBuilder(); - } - priceExpireTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(priceExpireTime_); - priceExpireTime_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - com.google.cloud.retail.v2.PriceInfo.PriceRange.Builder subBuilder = null; - if (priceRange_ != null) { - subBuilder = priceRange_.toBuilder(); - } - priceRange_ = - input.readMessage( - com.google.cloud.retail.v2.PriceInfo.PriceRange.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(priceRange_); - priceRange_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_PriceInfo_descriptor; @@ -308,77 +201,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PriceRange( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2.Interval.Builder subBuilder = null; - if (price_ != null) { - subBuilder = price_.toBuilder(); - } - price_ = - input.readMessage( - com.google.cloud.retail.v2.Interval.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(price_); - price_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.retail.v2.Interval.Builder subBuilder = null; - if (originalPrice_ != null) { - subBuilder = originalPrice_.toBuilder(); - } - originalPrice_ = - input.readMessage( - com.google.cloud.retail.v2.Interval.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(originalPrice_); - originalPrice_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_PriceInfo_PriceRange_descriptor; @@ -532,7 +354,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (originalPrice_ != null) { output.writeMessage(2, getOriginalPrice()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -547,7 +369,7 @@ public int getSerializedSize() { if (originalPrice_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOriginalPrice()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -571,7 +393,7 @@ public boolean equals(final java.lang.Object obj) { if (hasOriginalPrice()) { if (!getOriginalPrice().equals(other.getOriginalPrice())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -590,7 +412,7 @@ public int hashCode() { hash = (37 * hash) + ORIGINAL_PRICE_FIELD_NUMBER; hash = (53 * hash) + getOriginalPrice().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -724,17 +546,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.PriceInfo.PriceRange.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -847,7 +662,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.PriceInfo.PriceRange other) if (other.hasOriginalPrice()) { mergeOriginalPrice(other.getOriginalPrice()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -862,18 +677,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.PriceInfo.PriceRange parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPriceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getOriginalPriceFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.PriceInfo.PriceRange) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1348,7 +1188,19 @@ public PriceRange parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PriceRange(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1775,7 +1627,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (priceRange_ != null) { output.writeMessage(7, getPriceRange()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1805,7 +1657,7 @@ public int getSerializedSize() { if (priceRange_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getPriceRange()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1839,7 +1691,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPriceRange()) { if (!getPriceRange().equals(other.getPriceRange())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1870,7 +1722,7 @@ public int hashCode() { hash = (37 * hash) + PRICE_RANGE_FIELD_NUMBER; hash = (53 * hash) + getPriceRange().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1998,17 +1850,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.PriceInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2156,7 +2001,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.PriceInfo other) { if (other.hasPriceRange()) { mergePriceRange(other.getPriceRange()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2171,17 +2016,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.PriceInfo parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + currencyCode_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 21: + { + price_ = input.readFloat(); + + break; + } // case 21 + case 29: + { + originalPrice_ = input.readFloat(); + + break; + } // case 29 + case 37: + { + cost_ = input.readFloat(); + + break; + } // case 37 + case 42: + { + input.readMessage( + getPriceEffectiveTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + input.readMessage(getPriceExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + input.readMessage(getPriceRangeFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.PriceInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3404,7 +3306,18 @@ public PriceInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PriceInfo(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Product.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Product.java index db08a999..7fb3fadf 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Product.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Product.java @@ -75,461 +75,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Product( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - id_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - primaryProductId_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - collectionMemberIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - collectionMemberIds_.add(s); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - gtin_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - categories_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - categories_.add(s); - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - title_ = s; - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - brands_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - brands_.add(s); - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 90: - { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - case 98: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - attributes_ = - com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000008; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.retail.v2.CustomAttribute> - attributes__ = - input.readMessage( - AttributesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - attributes_.getMutableMap().put(attributes__.getKey(), attributes__.getValue()); - break; - } - case 106: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - tags_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000010; - } - tags_.add(s); - break; - } - case 114: - { - com.google.cloud.retail.v2.PriceInfo.Builder subBuilder = null; - if (priceInfo_ != null) { - subBuilder = priceInfo_.toBuilder(); - } - priceInfo_ = - input.readMessage( - com.google.cloud.retail.v2.PriceInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(priceInfo_); - priceInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 122: - { - com.google.cloud.retail.v2.Rating.Builder subBuilder = null; - if (rating_ != null) { - subBuilder = rating_.toBuilder(); - } - rating_ = - input.readMessage(com.google.cloud.retail.v2.Rating.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(rating_); - rating_ = subBuilder.buildPartial(); - } - - break; - } - case 130: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (expirationCase_ == 16) { - subBuilder = ((com.google.protobuf.Timestamp) expiration_).toBuilder(); - } - expiration_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.protobuf.Timestamp) expiration_); - expiration_ = subBuilder.buildPartial(); - } - expirationCase_ = 16; - break; - } - case 138: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (expirationCase_ == 17) { - subBuilder = ((com.google.protobuf.Duration) expiration_).toBuilder(); - } - expiration_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.protobuf.Duration) expiration_); - expiration_ = subBuilder.buildPartial(); - } - expirationCase_ = 17; - break; - } - case 146: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (availableTime_ != null) { - subBuilder = availableTime_.toBuilder(); - } - availableTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(availableTime_); - availableTime_ = subBuilder.buildPartial(); - } - - break; - } - case 152: - { - int rawValue = input.readEnum(); - - availability_ = rawValue; - break; - } - case 162: - { - com.google.protobuf.Int32Value.Builder subBuilder = null; - if (availableQuantity_ != null) { - subBuilder = availableQuantity_.toBuilder(); - } - availableQuantity_ = - input.readMessage(com.google.protobuf.Int32Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(availableQuantity_); - availableQuantity_ = subBuilder.buildPartial(); - } - - break; - } - case 170: - { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - fulfillmentInfo_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - fulfillmentInfo_.add( - input.readMessage( - com.google.cloud.retail.v2.FulfillmentInfo.parser(), extensionRegistry)); - break; - } - case 178: - { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 186: - { - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - images_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - images_.add( - input.readMessage(com.google.cloud.retail.v2.Image.parser(), extensionRegistry)); - break; - } - case 194: - { - com.google.cloud.retail.v2.Audience.Builder subBuilder = null; - if (audience_ != null) { - subBuilder = audience_.toBuilder(); - } - audience_ = - input.readMessage( - com.google.cloud.retail.v2.Audience.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(audience_); - audience_ = subBuilder.buildPartial(); - } - - break; - } - case 202: - { - com.google.cloud.retail.v2.ColorInfo.Builder subBuilder = null; - if (colorInfo_ != null) { - subBuilder = colorInfo_.toBuilder(); - } - colorInfo_ = - input.readMessage( - com.google.cloud.retail.v2.ColorInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(colorInfo_); - colorInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 210: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - sizes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000080; - } - sizes_.add(s); - break; - } - case 218: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000100) != 0)) { - materials_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000100; - } - materials_.add(s); - break; - } - case 226: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000200) != 0)) { - patterns_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000200; - } - patterns_.add(s); - break; - } - case 234: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000400) != 0)) { - conditions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000400; - } - conditions_.add(s); - break; - } - case 242: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (retrievableFields_ != null) { - subBuilder = retrievableFields_.toBuilder(); - } - retrievableFields_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(retrievableFields_); - retrievableFields_ = subBuilder.buildPartial(); - } - - break; - } - case 250: - { - if (!((mutable_bitField0_ & 0x00001000) != 0)) { - variants_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00001000; - } - variants_.add( - input.readMessage( - com.google.cloud.retail.v2.Product.parser(), extensionRegistry)); - break; - } - case 266: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (publishTime_ != null) { - subBuilder = publishTime_.toBuilder(); - } - publishTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(publishTime_); - publishTime_ = subBuilder.buildPartial(); - } - - break; - } - case 274: - { - if (!((mutable_bitField0_ & 0x00000800) != 0)) { - promotions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000800; - } - promotions_.add( - input.readMessage( - com.google.cloud.retail.v2.Promotion.parser(), extensionRegistry)); - break; - } - case 282: - { - if (!((mutable_bitField0_ & 0x00002000) != 0)) { - localInventories_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00002000; - } - localInventories_.add( - input.readMessage( - com.google.cloud.retail.v2.LocalInventory.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - collectionMemberIds_ = collectionMemberIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - categories_ = categories_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - brands_ = brands_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - tags_ = tags_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - fulfillmentInfo_ = java.util.Collections.unmodifiableList(fulfillmentInfo_); - } - if (((mutable_bitField0_ & 0x00000040) != 0)) { - images_ = java.util.Collections.unmodifiableList(images_); - } - if (((mutable_bitField0_ & 0x00000080) != 0)) { - sizes_ = sizes_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000100) != 0)) { - materials_ = materials_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000200) != 0)) { - patterns_ = patterns_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000400) != 0)) { - conditions_ = conditions_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00001000) != 0)) { - variants_ = java.util.Collections.unmodifiableList(variants_); - } - if (((mutable_bitField0_ & 0x00000800) != 0)) { - promotions_ = java.util.Collections.unmodifiableList(promotions_); - } - if (((mutable_bitField0_ & 0x00002000) != 0)) { - localInventories_ = java.util.Collections.unmodifiableList(localInventories_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductProto .internal_static_google_cloud_retail_v2_Product_descriptor; @@ -3983,7 +3528,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < localInventories_.size(); i++) { output.writeMessage(35, localInventories_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4148,7 +3693,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(35, localInventories_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4230,7 +3775,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4361,7 +3906,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4510,28 +4055,21 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.retail.v2.Product.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getFulfillmentInfoFieldBuilder(); - getImagesFieldBuilder(); - getPromotionsFieldBuilder(); - getVariantsFieldBuilder(); - getLocalInventoriesFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.clear(); + } + if (ttlBuilder_ != null) { + ttlBuilder_.clear(); + } name_ = ""; id_ = ""; @@ -4585,18 +4123,20 @@ public Builder clear() { } if (fulfillmentInfoBuilder_ == null) { fulfillmentInfo_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); } else { + fulfillmentInfo_ = null; fulfillmentInfoBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000020); uri_ = ""; if (imagesBuilder_ == null) { images_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); } else { + images_ = null; imagesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000040); if (audienceBuilder_ == null) { audience_ = null; } else { @@ -4619,10 +4159,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000400); if (promotionsBuilder_ == null) { promotions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); } else { + promotions_ = null; promotionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000800); if (publishTimeBuilder_ == null) { publishTime_ = null; } else { @@ -4637,16 +4178,18 @@ public Builder clear() { } if (variantsBuilder_ == null) { variants_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00001000); } else { + variants_ = null; variantsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00001000); if (localInventoriesBuilder_ == null) { localInventories_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00002000); } else { + localInventories_ = null; localInventoriesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00002000); expirationCase_ = 0; expiration_ = null; return this; @@ -5171,7 +4714,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Product other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5186,17 +4729,286 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Product parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + id_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + type_ = input.readEnum(); + + break; + } // case 24 + case 34: + { + primaryProductId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCollectionMemberIdsIsMutable(); + collectionMemberIds_.add(s); + break; + } // case 42 + case 50: + { + gtin_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCategoriesIsMutable(); + categories_.add(s); + break; + } // case 58 + case 66: + { + title_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureBrandsIsMutable(); + brands_.add(s); + break; + } // case 74 + case 82: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 90: + { + languageCode_ = input.readStringRequireUtf8(); + + break; + } // case 90 + case 98: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.retail.v2.CustomAttribute> + attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .getMutableMap() + .put(attributes__.getKey(), attributes__.getValue()); + break; + } // case 98 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagsIsMutable(); + tags_.add(s); + break; + } // case 106 + case 114: + { + input.readMessage(getPriceInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 114 + case 122: + { + input.readMessage(getRatingFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 122 + case 130: + { + input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + expirationCase_ = 16; + break; + } // case 130 + case 138: + { + input.readMessage(getTtlFieldBuilder().getBuilder(), extensionRegistry); + expirationCase_ = 17; + break; + } // case 138 + case 146: + { + input.readMessage(getAvailableTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 146 + case 152: + { + availability_ = input.readEnum(); + + break; + } // case 152 + case 162: + { + input.readMessage( + getAvailableQuantityFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 162 + case 170: + { + com.google.cloud.retail.v2.FulfillmentInfo m = + input.readMessage( + com.google.cloud.retail.v2.FulfillmentInfo.parser(), extensionRegistry); + if (fulfillmentInfoBuilder_ == null) { + ensureFulfillmentInfoIsMutable(); + fulfillmentInfo_.add(m); + } else { + fulfillmentInfoBuilder_.addMessage(m); + } + break; + } // case 170 + case 178: + { + uri_ = input.readStringRequireUtf8(); + + break; + } // case 178 + case 186: + { + com.google.cloud.retail.v2.Image m = + input.readMessage(com.google.cloud.retail.v2.Image.parser(), extensionRegistry); + if (imagesBuilder_ == null) { + ensureImagesIsMutable(); + images_.add(m); + } else { + imagesBuilder_.addMessage(m); + } + break; + } // case 186 + case 194: + { + input.readMessage(getAudienceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 194 + case 202: + { + input.readMessage(getColorInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 202 + case 210: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSizesIsMutable(); + sizes_.add(s); + break; + } // case 210 + case 218: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureMaterialsIsMutable(); + materials_.add(s); + break; + } // case 218 + case 226: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePatternsIsMutable(); + patterns_.add(s); + break; + } // case 226 + case 234: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureConditionsIsMutable(); + conditions_.add(s); + break; + } // case 234 + case 242: + { + input.readMessage( + getRetrievableFieldsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 242 + case 250: + { + com.google.cloud.retail.v2.Product m = + input.readMessage( + com.google.cloud.retail.v2.Product.parser(), extensionRegistry); + if (variantsBuilder_ == null) { + ensureVariantsIsMutable(); + variants_.add(m); + } else { + variantsBuilder_.addMessage(m); + } + break; + } // case 250 + case 266: + { + input.readMessage(getPublishTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 266 + case 274: + { + com.google.cloud.retail.v2.Promotion m = + input.readMessage( + com.google.cloud.retail.v2.Promotion.parser(), extensionRegistry); + if (promotionsBuilder_ == null) { + ensurePromotionsIsMutable(); + promotions_.add(m); + } else { + promotionsBuilder_.addMessage(m); + } + break; + } // case 274 + case 282: + { + com.google.cloud.retail.v2.LocalInventory m = + input.readMessage( + com.google.cloud.retail.v2.LocalInventory.parser(), extensionRegistry); + if (localInventoriesBuilder_ == null) { + ensureLocalInventoriesIsMutable(); + localInventories_.add(m); + } else { + localInventoriesBuilder_.addMessage(m); + } + break; + } // case 282 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2.Product) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -13941,7 +13753,18 @@ public Product parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Product(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductDetail.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductDetail.java index 4ae516dc..7e63d6fc 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductDetail.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductDetail.java @@ -50,75 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ProductDetail( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = - input.readMessage(com.google.cloud.retail.v2.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Int32Value.Builder subBuilder = null; - if (quantity_ != null) { - subBuilder = quantity_.toBuilder(); - } - quantity_ = - input.readMessage(com.google.protobuf.Int32Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(quantity_); - quantity_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.UserEventProto .internal_static_google_cloud_retail_v2_ProductDetail_descriptor; @@ -288,7 +219,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (quantity_ != null) { output.writeMessage(2, getQuantity()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -303,7 +234,7 @@ public int getSerializedSize() { if (quantity_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getQuantity()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -326,7 +257,7 @@ public boolean equals(final java.lang.Object obj) { if (hasQuantity()) { if (!getQuantity().equals(other.getQuantity())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -345,7 +276,7 @@ public int hashCode() { hash = (37 * hash) + QUANTITY_FIELD_NUMBER; hash = (53 * hash) + getQuantity().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -474,17 +405,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ProductDetail.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -594,7 +518,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ProductDetail other) { if (other.hasQuantity()) { mergeQuantity(other.getQuantity()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -609,17 +533,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ProductDetail parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getProductFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getQuantityFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.ProductDetail) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1145,7 +1095,18 @@ public ProductDetail parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductDetail(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductInlineSource.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductInlineSource.java index d59b087d..049ef4be 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductInlineSource.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductInlineSource.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ProductInlineSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - products_.add( - input.readMessage( - com.google.cloud.retail.v2.Product.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = java.util.Collections.unmodifiableList(products_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ImportConfigProto .internal_static_google_cloud_retail_v2_ProductInlineSource_descriptor; @@ -227,7 +173,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < products_.size(); i++) { output.writeMessage(1, products_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -239,7 +185,7 @@ public int getSerializedSize() { for (int i = 0; i < products_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, products_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -256,7 +202,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.ProductInlineSource) obj; if (!getProductsList().equals(other.getProductsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -271,7 +217,7 @@ public int hashCode() { hash = (37 * hash) + PRODUCTS_FIELD_NUMBER; hash = (53 * hash) + getProductsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -400,19 +346,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ProductInlineSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getProductsFieldBuilder(); - } } @java.lang.Override @@ -420,10 +357,11 @@ public Builder clear() { super.clear(); if (productsBuilder_ == null) { products_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + products_ = null; productsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -537,7 +475,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ProductInlineSource other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -552,17 +490,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ProductInlineSource parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2.Product m = + input.readMessage( + com.google.cloud.retail.v2.Product.parser(), extensionRegistry); + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(m); + } else { + productsBuilder_.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) { - parsedMessage = (com.google.cloud.retail.v2.ProductInlineSource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1020,7 +985,18 @@ public ProductInlineSource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductInlineSource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductInputConfig.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductInputConfig.java index 3f101684..f32bc3c6 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductInputConfig.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductInputConfig.java @@ -50,93 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ProductInputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2.ProductInlineSource.Builder subBuilder = null; - if (sourceCase_ == 1) { - subBuilder = ((com.google.cloud.retail.v2.ProductInlineSource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.retail.v2.ProductInlineSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2.ProductInlineSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 1; - break; - } - case 18: - { - com.google.cloud.retail.v2.GcsSource.Builder subBuilder = null; - if (sourceCase_ == 2) { - subBuilder = ((com.google.cloud.retail.v2.GcsSource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.retail.v2.GcsSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2.GcsSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 2; - break; - } - case 26: - { - com.google.cloud.retail.v2.BigQuerySource.Builder subBuilder = null; - if (sourceCase_ == 3) { - subBuilder = ((com.google.cloud.retail.v2.BigQuerySource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.retail.v2.BigQuerySource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2.BigQuerySource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 3; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ImportConfigProto .internal_static_google_cloud_retail_v2_ProductInputConfig_descriptor; @@ -378,7 +291,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceCase_ == 3) { output.writeMessage(3, (com.google.cloud.retail.v2.BigQuerySource) source_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -402,7 +315,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 3, (com.google.cloud.retail.v2.BigQuerySource) source_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -432,7 +345,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -459,7 +372,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -588,22 +501,24 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ProductInputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (productInlineSourceBuilder_ != null) { + productInlineSourceBuilder_.clear(); + } + if (gcsSourceBuilder_ != null) { + gcsSourceBuilder_.clear(); + } + if (bigQuerySourceBuilder_ != null) { + bigQuerySourceBuilder_.clear(); + } sourceCase_ = 0; source_ = null; return this; @@ -725,7 +640,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ProductInputConfig other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -740,17 +655,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ProductInputConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getProductInlineSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getGcsSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getBigQuerySourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 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) { - parsedMessage = (com.google.cloud.retail.v2.ProductInputConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1428,7 +1376,18 @@ public ProductInputConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductInputConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductLevelConfig.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductLevelConfig.java index a966fcb3..0a0dcaf8 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductLevelConfig.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ProductLevelConfig.java @@ -54,59 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ProductLevelConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - ingestionProductType_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - merchantCenterProductIdField_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CatalogProto .internal_static_google_cloud_retail_v2_ProductLevelConfig_descriptor; @@ -312,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(merchantCenterProductIdField_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, merchantCenterProductIdField_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -329,7 +276,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 2, merchantCenterProductIdField_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -348,7 +295,7 @@ public boolean equals(final java.lang.Object obj) { if (!getIngestionProductType().equals(other.getIngestionProductType())) return false; if (!getMerchantCenterProductIdField().equals(other.getMerchantCenterProductIdField())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -363,7 +310,7 @@ public int hashCode() { hash = (53 * hash) + getIngestionProductType().hashCode(); hash = (37 * hash) + MERCHANT_CENTER_PRODUCT_ID_FIELD_FIELD_NUMBER; hash = (53 * hash) + getMerchantCenterProductIdField().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -493,17 +440,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ProductLevelConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -599,7 +539,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ProductLevelConfig other) { merchantCenterProductIdField_ = other.merchantCenterProductIdField_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -614,17 +554,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ProductLevelConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + ingestionProductType_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + merchantCenterProductIdField_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.ProductLevelConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1052,7 +1018,18 @@ public ProductLevelConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductLevelConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Promotion.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Promotion.java index c8505f3e..9b6954af 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Promotion.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Promotion.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Promotion( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - promotionId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.PromotionProto .internal_static_google_cloud_retail_v2_Promotion_descriptor; @@ -191,7 +145,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promotionId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, promotionId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -203,7 +157,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promotionId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, promotionId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -219,7 +173,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2.Promotion other = (com.google.cloud.retail.v2.Promotion) obj; if (!getPromotionId().equals(other.getPromotionId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -232,7 +186,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PROMOTION_ID_FIELD_NUMBER; hash = (53 * hash) + getPromotionId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -360,17 +314,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.Promotion.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -458,7 +405,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Promotion other) { promotionId_ = other.promotionId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -473,17 +420,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Promotion parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + promotionId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.Promotion) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -655,7 +622,18 @@ public Promotion parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Promotion(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurchaseTransaction.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurchaseTransaction.java index fb51aec6..d6880786 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurchaseTransaction.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurchaseTransaction.java @@ -53,74 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PurchaseTransaction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - id_ = s; - break; - } - case 21: - { - revenue_ = input.readFloat(); - break; - } - case 29: - { - tax_ = input.readFloat(); - break; - } - case 37: - { - cost_ = input.readFloat(); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - currencyCode_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.UserEventProto .internal_static_google_cloud_retail_v2_PurchaseTransaction_descriptor; @@ -325,7 +257,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currencyCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, currencyCode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -349,7 +281,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currencyCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, currencyCode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -373,7 +305,7 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Float.floatToIntBits(getCost()) != java.lang.Float.floatToIntBits(other.getCost())) return false; if (!getCurrencyCode().equals(other.getCurrencyCode())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -394,7 +326,7 @@ public int hashCode() { hash = (53 * hash) + java.lang.Float.floatToIntBits(getCost()); hash = (37 * hash) + CURRENCY_CODE_FIELD_NUMBER; hash = (53 * hash) + getCurrencyCode().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -523,17 +455,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.PurchaseTransaction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -647,7 +572,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.PurchaseTransaction other) { currencyCode_ = other.currencyCode_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -662,17 +587,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.PurchaseTransaction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 21: + { + revenue_ = input.readFloat(); + + break; + } // case 21 + case 29: + { + tax_ = input.readFloat(); + + break; + } // case 29 + case 37: + { + cost_ = input.readFloat(); + + break; + } // case 37 + case 42: + { + currencyCode_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.PurchaseTransaction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1100,7 +1069,18 @@ public PurchaseTransaction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PurchaseTransaction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeMetadata.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeMetadata.java index f108f560..5e9c88d6 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeMetadata.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeMetadata.java @@ -51,45 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PurgeMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.PurgeConfigProto .internal_static_google_cloud_retail_v2_PurgeMetadata_descriptor; @@ -119,7 +80,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -128,7 +89,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -143,7 +104,7 @@ public boolean equals(final java.lang.Object obj) { } com.google.cloud.retail.v2.PurgeMetadata other = (com.google.cloud.retail.v2.PurgeMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -154,7 +115,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -284,17 +245,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.PurgeMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -376,7 +330,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2.PurgeMetadata other) { if (other == com.google.cloud.retail.v2.PurgeMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -391,17 +345,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.PurgeMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = (com.google.cloud.retail.v2.PurgeMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -437,7 +405,18 @@ public PurgeMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PurgeMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeUserEventsRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeUserEventsRequest.java index 878d5b18..99087c7e 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeUserEventsRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeUserEventsRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PurgeUserEventsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 24: - { - force_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.PurgeConfigProto .internal_static_google_cloud_retail_v2_PurgeUserEventsRequest_descriptor; @@ -311,7 +253,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (force_ != false) { output.writeBool(3, force_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -329,7 +271,7 @@ public int getSerializedSize() { if (force_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -348,7 +290,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (!getFilter().equals(other.getFilter())) return false; if (getForce() != other.getForce()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -365,7 +307,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + FORCE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -494,17 +436,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.PurgeUserEventsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -607,7 +542,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.PurgeUserEventsRequest other if (other.getForce() != false) { setForce(other.getForce()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -622,18 +557,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.PurgeUserEventsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + force_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.PurgeUserEventsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1049,7 +1015,18 @@ public PurgeUserEventsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PurgeUserEventsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeUserEventsResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeUserEventsResponse.java index d27f78b8..d836a476 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeUserEventsResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/PurgeUserEventsResponse.java @@ -52,50 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PurgeUserEventsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - purgedEventsCount_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.PurgeConfigProto .internal_static_google_cloud_retail_v2_PurgeUserEventsResponse_descriptor; @@ -146,7 +102,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (purgedEventsCount_ != 0L) { output.writeInt64(1, purgedEventsCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -158,7 +114,7 @@ public int getSerializedSize() { if (purgedEventsCount_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, purgedEventsCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -175,7 +131,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.PurgeUserEventsResponse) obj; if (getPurgedEventsCount() != other.getPurgedEventsCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -188,7 +144,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PURGED_EVENTS_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPurgedEventsCount()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -319,17 +275,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.PurgeUserEventsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -418,7 +367,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.PurgeUserEventsResponse othe if (other.getPurgedEventsCount() != 0L) { setPurgedEventsCount(other.getPurgedEventsCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -433,18 +382,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.PurgeUserEventsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + purgedEventsCount_ = input.readInt64(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.PurgeUserEventsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -532,7 +500,18 @@ public PurgeUserEventsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PurgeUserEventsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Rating.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Rating.java index a441ca04..2867c78d 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Rating.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Rating.java @@ -52,82 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Rating( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - ratingCount_ = input.readInt32(); - break; - } - case 21: - { - averageRating_ = input.readFloat(); - break; - } - case 24: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - ratingHistogram_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - ratingHistogram_.addInt(input.readInt32()); - break; - } - case 26: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - ratingHistogram_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - ratingHistogram_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - ratingHistogram_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_Rating_descriptor; @@ -276,7 +200,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < ratingHistogram_.size(); i++) { output.writeInt32NoTag(ratingHistogram_.getInt(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -304,7 +228,7 @@ public int getSerializedSize() { } ratingHistogramMemoizedSerializedSize = dataSize; } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -323,7 +247,7 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Float.floatToIntBits(getAverageRating()) != java.lang.Float.floatToIntBits(other.getAverageRating())) return false; if (!getRatingHistogramList().equals(other.getRatingHistogramList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -342,7 +266,7 @@ public int hashCode() { hash = (37 * hash) + RATING_HISTOGRAM_FIELD_NUMBER; hash = (53 * hash) + getRatingHistogramList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -470,17 +394,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.Rating.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -591,7 +508,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Rating other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -606,17 +523,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Rating parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + ratingCount_ = input.readInt32(); + + break; + } // case 8 + case 21: + { + averageRating_ = input.readFloat(); + + break; + } // case 21 + case 24: + { + int v = input.readInt32(); + ensureRatingHistogramIsMutable(); + ratingHistogram_.addInt(v); + break; + } // case 24 + case 26: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureRatingHistogramIsMutable(); + while (input.getBytesUntilLimit() > 0) { + ratingHistogram_.addInt(input.readInt32()); + } + 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) { - parsedMessage = (com.google.cloud.retail.v2.Rating) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -934,7 +895,18 @@ public Rating parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Rating(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RejoinUserEventsMetadata.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RejoinUserEventsMetadata.java index 0c0d7587..b0a98cad 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RejoinUserEventsMetadata.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RejoinUserEventsMetadata.java @@ -50,45 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RejoinUserEventsMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.UserEventServiceProto .internal_static_google_cloud_retail_v2_RejoinUserEventsMetadata_descriptor; @@ -118,7 +79,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -127,7 +88,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -143,7 +104,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2.RejoinUserEventsMetadata other = (com.google.cloud.retail.v2.RejoinUserEventsMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -154,7 +115,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -283,17 +244,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.RejoinUserEventsMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -376,7 +330,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2.RejoinUserEventsMetadata other) { if (other == com.google.cloud.retail.v2.RejoinUserEventsMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -391,18 +345,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.RejoinUserEventsMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2.RejoinUserEventsMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -438,7 +405,18 @@ public RejoinUserEventsMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RejoinUserEventsMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RejoinUserEventsRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RejoinUserEventsRequest.java index b0948ee4..cb61e65a 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RejoinUserEventsRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RejoinUserEventsRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RejoinUserEventsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - userEventRejoinScope_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.UserEventServiceProto .internal_static_google_cloud_retail_v2_RejoinUserEventsRequest_descriptor; @@ -415,7 +362,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(2, userEventRejoinScope_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -433,7 +380,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, userEventRejoinScope_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -451,7 +398,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (userEventRejoinScope_ != other.userEventRejoinScope_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -466,7 +413,7 @@ public int hashCode() { hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + USER_EVENT_REJOIN_SCOPE_FIELD_NUMBER; hash = (53 * hash) + userEventRejoinScope_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -595,17 +542,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.RejoinUserEventsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -701,7 +641,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.RejoinUserEventsRequest othe if (other.userEventRejoinScope_ != 0) { setUserEventRejoinScopeValue(other.getUserEventRejoinScopeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -716,18 +656,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.RejoinUserEventsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + userEventRejoinScope_ = input.readEnum(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.RejoinUserEventsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -995,7 +960,18 @@ public RejoinUserEventsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RejoinUserEventsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RejoinUserEventsResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RejoinUserEventsResponse.java index 1499659a..b8ef6471 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RejoinUserEventsResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RejoinUserEventsResponse.java @@ -50,50 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RejoinUserEventsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - rejoinedUserEventsCount_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.UserEventServiceProto .internal_static_google_cloud_retail_v2_RejoinUserEventsResponse_descriptor; @@ -144,7 +100,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (rejoinedUserEventsCount_ != 0L) { output.writeInt64(1, rejoinedUserEventsCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -156,7 +112,7 @@ public int getSerializedSize() { if (rejoinedUserEventsCount_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, rejoinedUserEventsCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -173,7 +129,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.RejoinUserEventsResponse) obj; if (getRejoinedUserEventsCount() != other.getRejoinedUserEventsCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -186,7 +142,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + REJOINED_USER_EVENTS_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRejoinedUserEventsCount()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -315,17 +271,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.RejoinUserEventsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -414,7 +363,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.RejoinUserEventsResponse oth if (other.getRejoinedUserEventsCount() != 0L) { setRejoinedUserEventsCount(other.getRejoinedUserEventsCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -429,18 +378,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.RejoinUserEventsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + rejoinedUserEventsCount_ = input.readInt64(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.RejoinUserEventsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -528,7 +496,18 @@ public RejoinUserEventsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RejoinUserEventsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveCatalogAttributeRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveCatalogAttributeRequest.java index d5246d75..2f2b0728 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveCatalogAttributeRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveCatalogAttributeRequest.java @@ -55,59 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveCatalogAttributeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - attributesConfig_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - key_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CatalogServiceProto .internal_static_google_cloud_retail_v2_RemoveCatalogAttributeRequest_descriptor; @@ -249,7 +196,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, key_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -264,7 +211,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, key_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -282,7 +229,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAttributesConfig().equals(other.getAttributesConfig())) return false; if (!getKey().equals(other.getKey())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -297,7 +244,7 @@ public int hashCode() { hash = (53 * hash) + getAttributesConfig().hashCode(); hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -429,17 +376,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.RemoveCatalogAttributeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -536,7 +476,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.RemoveCatalogAttributeReques key_ = other.key_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -551,18 +491,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.RemoveCatalogAttributeRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attributesConfig_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + key_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.RemoveCatalogAttributeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -830,7 +795,18 @@ public RemoveCatalogAttributeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveCatalogAttributeRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveControlRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveControlRequest.java index 1ca0cd0c..32eea19d 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveControlRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveControlRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveControlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - servingConfig_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - controlId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ServingConfigServiceProto .internal_static_google_cloud_retail_v2_RemoveControlRequest_descriptor; @@ -247,7 +194,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controlId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, controlId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -262,7 +209,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controlId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, controlId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -280,7 +227,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServingConfig().equals(other.getServingConfig())) return false; if (!getControlId().equals(other.getControlId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -295,7 +242,7 @@ public int hashCode() { hash = (53 * hash) + getServingConfig().hashCode(); hash = (37 * hash) + CONTROL_ID_FIELD_NUMBER; hash = (53 * hash) + getControlId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -424,17 +371,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.RemoveControlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -531,7 +471,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.RemoveControlRequest other) controlId_ = other.controlId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -546,17 +486,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.RemoveControlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + servingConfig_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + controlId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.RemoveControlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -824,7 +790,18 @@ public RemoveControlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveControlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesMetadata.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesMetadata.java index bd8d134d..d9534432 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesMetadata.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesMetadata.java @@ -54,45 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveFulfillmentPlacesMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_RemoveFulfillmentPlacesMetadata_descriptor; @@ -122,7 +83,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -131,7 +92,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -147,7 +108,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2.RemoveFulfillmentPlacesMetadata other = (com.google.cloud.retail.v2.RemoveFulfillmentPlacesMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -158,7 +119,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -291,17 +252,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.RemoveFulfillmentPlacesMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -384,7 +338,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2.RemoveFulfillmentPlacesMetadata other) { if (other == com.google.cloud.retail.v2.RemoveFulfillmentPlacesMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -399,18 +353,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.RemoveFulfillmentPlacesMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2.RemoveFulfillmentPlacesMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -446,7 +413,18 @@ public RemoveFulfillmentPlacesMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveFulfillmentPlacesMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesRequest.java index f10822cb..90317982 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveFulfillmentPlacesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - product_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - placeIds_.add(s); - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (removeTime_ != null) { - subBuilder = removeTime_.toBuilder(); - } - removeTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(removeTime_); - removeTime_ = subBuilder.buildPartial(); - } - - break; - } - case 40: - { - allowMissing_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = placeIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_RemoveFulfillmentPlacesRequest_descriptor; @@ -498,7 +411,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (allowMissing_ != false) { output.writeBool(5, allowMissing_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -527,7 +440,7 @@ public int getSerializedSize() { if (allowMissing_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, allowMissing_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -551,7 +464,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRemoveTime().equals(other.getRemoveTime())) return false; } if (getAllowMissing() != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -576,7 +489,7 @@ public int hashCode() { } hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -708,17 +621,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.RemoveFulfillmentPlacesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -853,7 +759,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.RemoveFulfillmentPlacesReque if (other.getAllowMissing() != false) { setAllowMissing(other.getAllowMissing()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -868,18 +774,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.RemoveFulfillmentPlacesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + product_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + type_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePlaceIdsIsMutable(); + placeIds_.add(s); + break; + } // case 26 + case 34: + { + input.readMessage(getRemoveTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 40: + { + allowMissing_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.RemoveFulfillmentPlacesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1747,7 +1697,18 @@ public RemoveFulfillmentPlacesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveFulfillmentPlacesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesResponse.java index 39c5a24d..ceaf4db6 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveFulfillmentPlacesResponse.java @@ -54,45 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveFulfillmentPlacesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_RemoveFulfillmentPlacesResponse_descriptor; @@ -122,7 +83,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -131,7 +92,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -147,7 +108,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2.RemoveFulfillmentPlacesResponse other = (com.google.cloud.retail.v2.RemoveFulfillmentPlacesResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -158,7 +119,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -291,17 +252,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.RemoveFulfillmentPlacesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -384,7 +338,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2.RemoveFulfillmentPlacesResponse other) { if (other == com.google.cloud.retail.v2.RemoveFulfillmentPlacesResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -399,18 +353,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.RemoveFulfillmentPlacesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2.RemoveFulfillmentPlacesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -446,7 +413,18 @@ public RemoveFulfillmentPlacesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveFulfillmentPlacesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesMetadata.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesMetadata.java index 8d500920..4248f403 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesMetadata.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesMetadata.java @@ -54,45 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveLocalInventoriesMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_RemoveLocalInventoriesMetadata_descriptor; @@ -122,7 +83,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -131,7 +92,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -147,7 +108,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2.RemoveLocalInventoriesMetadata other = (com.google.cloud.retail.v2.RemoveLocalInventoriesMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -158,7 +119,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -291,17 +252,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.RemoveLocalInventoriesMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -384,7 +338,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2.RemoveLocalInventoriesMetadata other) { if (other == com.google.cloud.retail.v2.RemoveLocalInventoriesMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -399,18 +353,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.RemoveLocalInventoriesMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2.RemoveLocalInventoriesMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -446,7 +413,18 @@ public RemoveLocalInventoriesMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveLocalInventoriesMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesRequest.java index 9d1e064f..0e93e34e 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveLocalInventoriesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - product_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - placeIds_.add(s); - break; - } - case 24: - { - allowMissing_ = input.readBool(); - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (removeTime_ != null) { - subBuilder = removeTime_.toBuilder(); - } - removeTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(removeTime_); - removeTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = placeIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_RemoveLocalInventoriesRequest_descriptor; @@ -379,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (removeTime_ != null) { output.writeMessage(5, getRemoveTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +325,7 @@ public int getSerializedSize() { if (removeTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRemoveTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +348,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRemoveTime().equals(other.getRemoveTime())) return false; } if (getAllowMissing() != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -451,7 +371,7 @@ public int hashCode() { } hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -583,17 +503,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.RemoveLocalInventoriesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -721,7 +634,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.RemoveLocalInventoriesReques if (other.getAllowMissing() != false) { setAllowMissing(other.getAllowMissing()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -736,18 +649,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.RemoveLocalInventoriesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + product_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePlaceIdsIsMutable(); + placeIds_.add(s); + break; + } // case 18 + case 24: + { + allowMissing_ = input.readBool(); + + break; + } // case 24 + case 42: + { + input.readMessage(getRemoveTimeFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.RemoveLocalInventoriesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1371,7 +1322,18 @@ public RemoveLocalInventoriesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveLocalInventoriesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesResponse.java index 5b035e9b..a0097f2d 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/RemoveLocalInventoriesResponse.java @@ -56,45 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveLocalInventoriesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_RemoveLocalInventoriesResponse_descriptor; @@ -124,7 +85,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -133,7 +94,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -149,7 +110,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2.RemoveLocalInventoriesResponse other = (com.google.cloud.retail.v2.RemoveLocalInventoriesResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -160,7 +121,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -295,17 +256,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.RemoveLocalInventoriesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -388,7 +342,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2.RemoveLocalInventoriesResponse other) { if (other == com.google.cloud.retail.v2.RemoveLocalInventoriesResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -403,18 +357,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.RemoveLocalInventoriesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2.RemoveLocalInventoriesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -450,7 +417,18 @@ public RemoveLocalInventoriesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveLocalInventoriesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ReplaceCatalogAttributeRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ReplaceCatalogAttributeRequest.java index b6bd5926..2e7fe03e 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ReplaceCatalogAttributeRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ReplaceCatalogAttributeRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReplaceCatalogAttributeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - attributesConfig_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2.CatalogAttribute.Builder subBuilder = null; - if (catalogAttribute_ != null) { - subBuilder = catalogAttribute_.toBuilder(); - } - catalogAttribute_ = - input.readMessage( - com.google.cloud.retail.v2.CatalogAttribute.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(catalogAttribute_); - catalogAttribute_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CatalogServiceProto .internal_static_google_cloud_retail_v2_ReplaceCatalogAttributeRequest_descriptor; @@ -340,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(3, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -358,7 +281,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -383,7 +306,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -404,7 +327,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -536,17 +459,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ReplaceCatalogAttributeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -664,7 +580,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ReplaceCatalogAttributeReque if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -679,18 +595,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ReplaceCatalogAttributeRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attributesConfig_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage( + getCatalogAttributeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.ReplaceCatalogAttributeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1279,7 +1227,18 @@ public ReplaceCatalogAttributeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReplaceCatalogAttributeRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Rule.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Rule.java index 9a1fa3c5..29ff918d 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Rule.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/Rule.java @@ -54,200 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Rule( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2.Condition.Builder subBuilder = null; - if (condition_ != null) { - subBuilder = condition_.toBuilder(); - } - condition_ = - input.readMessage( - com.google.cloud.retail.v2.Condition.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(condition_); - condition_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.retail.v2.Rule.BoostAction.Builder subBuilder = null; - if (actionCase_ == 2) { - subBuilder = ((com.google.cloud.retail.v2.Rule.BoostAction) action_).toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2.Rule.BoostAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2.Rule.BoostAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 2; - break; - } - case 26: - { - com.google.cloud.retail.v2.Rule.RedirectAction.Builder subBuilder = null; - if (actionCase_ == 3) { - subBuilder = ((com.google.cloud.retail.v2.Rule.RedirectAction) action_).toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2.Rule.RedirectAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2.Rule.RedirectAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 3; - break; - } - case 50: - { - com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.Builder subBuilder = null; - if (actionCase_ == 6) { - subBuilder = - ((com.google.cloud.retail.v2.Rule.OnewaySynonymsAction) action_).toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.retail.v2.Rule.OnewaySynonymsAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 6; - break; - } - case 58: - { - com.google.cloud.retail.v2.Rule.DoNotAssociateAction.Builder subBuilder = null; - if (actionCase_ == 7) { - subBuilder = - ((com.google.cloud.retail.v2.Rule.DoNotAssociateAction) action_).toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2.Rule.DoNotAssociateAction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.retail.v2.Rule.DoNotAssociateAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 7; - break; - } - case 66: - { - com.google.cloud.retail.v2.Rule.ReplacementAction.Builder subBuilder = null; - if (actionCase_ == 8) { - subBuilder = - ((com.google.cloud.retail.v2.Rule.ReplacementAction) action_).toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2.Rule.ReplacementAction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2.Rule.ReplacementAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 8; - break; - } - case 74: - { - com.google.cloud.retail.v2.Rule.IgnoreAction.Builder subBuilder = null; - if (actionCase_ == 9) { - subBuilder = ((com.google.cloud.retail.v2.Rule.IgnoreAction) action_).toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2.Rule.IgnoreAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2.Rule.IgnoreAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 9; - break; - } - case 82: - { - com.google.cloud.retail.v2.Rule.FilterAction.Builder subBuilder = null; - if (actionCase_ == 10) { - subBuilder = ((com.google.cloud.retail.v2.Rule.FilterAction) action_).toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2.Rule.FilterAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2.Rule.FilterAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 10; - break; - } - case 90: - { - com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.Builder subBuilder = null; - if (actionCase_ == 11) { - subBuilder = - ((com.google.cloud.retail.v2.Rule.TwowaySynonymsAction) action_).toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.retail.v2.Rule.TwowaySynonymsAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 11; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_Rule_descriptor; @@ -374,57 +180,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BoostAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: - { - boost_ = input.readFloat(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - productsFilter_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_Rule_BoostAction_descriptor; @@ -562,7 +317,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productsFilter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, productsFilter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -577,7 +332,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productsFilter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, productsFilter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -596,7 +351,7 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Float.floatToIntBits(getBoost()) != java.lang.Float.floatToIntBits(other.getBoost())) return false; if (!getProductsFilter().equals(other.getProductsFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -611,7 +366,7 @@ public int hashCode() { hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoost()); hash = (37 * hash) + PRODUCTS_FILTER_FIELD_NUMBER; hash = (53 * hash) + getProductsFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -742,17 +497,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.Rule.BoostAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -849,7 +597,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Rule.BoostAction other) { productsFilter_ = other.productsFilter_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -864,17 +612,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Rule.BoostAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + boost_ = input.readFloat(); + + break; + } // case 13 + case 18: + { + productsFilter_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.Rule.BoostAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1163,7 +937,19 @@ public BoostAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BoostAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1283,52 +1069,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FilterAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - filter_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_Rule_FilterAction_descriptor; @@ -1434,7 +1174,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1446,7 +1186,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1463,7 +1203,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.Rule.FilterAction) obj; if (!getFilter().equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1476,7 +1216,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1620,17 +1360,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.Rule.FilterAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1721,7 +1454,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Rule.FilterAction other) { filter_ = other.filter_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1736,17 +1469,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Rule.FilterAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + filter_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.Rule.FilterAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1949,7 +1702,19 @@ public FilterAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FilterAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2037,52 +1802,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RedirectAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - redirectUri_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_Rule_RedirectAction_descriptor; @@ -2164,7 +1883,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirectUri_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, redirectUri_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2176,7 +1895,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirectUri_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, redirectUri_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2193,7 +1912,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.Rule.RedirectAction) obj; if (!getRedirectUri().equals(other.getRedirectUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2206,7 +1925,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + REDIRECT_URI_FIELD_NUMBER; hash = (53 * hash) + getRedirectUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2342,17 +2061,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.Rule.RedirectAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2444,7 +2156,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Rule.RedirectAction other) { redirectUri_ = other.redirectUri_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2459,17 +2171,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Rule.RedirectAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + redirectUri_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.Rule.RedirectAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2612,7 +2344,19 @@ public RedirectAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RedirectAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2732,59 +2476,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TwowaySynonymsAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - synonyms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - synonyms_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - synonyms_ = synonyms_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_Rule_TwowaySynonymsAction_descriptor; @@ -2886,7 +2577,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < synonyms_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, synonyms_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2903,7 +2594,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getSynonymsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2920,7 +2611,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.Rule.TwowaySynonymsAction) obj; if (!getSynonymsList().equals(other.getSynonymsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2935,7 +2626,7 @@ public int hashCode() { hash = (37 * hash) + SYNONYMS_FIELD_NUMBER; hash = (53 * hash) + getSynonymsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3070,17 +2761,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.Rule.TwowaySynonymsAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -3183,7 +2867,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Rule.TwowaySynonymsAction ot } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3198,18 +2882,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Rule.TwowaySynonymsAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSynonymsIsMutable(); + synonyms_.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) { - parsedMessage = - (com.google.cloud.retail.v2.Rule.TwowaySynonymsAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3434,7 +3138,19 @@ public TwowaySynonymsAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TwowaySynonymsAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3671,85 +3387,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OnewaySynonymsAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - onewayTerms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - onewayTerms_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - queryTerms_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - synonyms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - synonyms_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) != 0)) { - onewayTerms_ = onewayTerms_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = queryTerms_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - synonyms_ = synonyms_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_Rule_OnewaySynonymsAction_descriptor; @@ -3991,7 +3628,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < synonyms_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, synonyms_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4024,7 +3661,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getSynonymsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4043,7 +3680,7 @@ public boolean equals(final java.lang.Object obj) { if (!getQueryTermsList().equals(other.getQueryTermsList())) return false; if (!getSynonymsList().equals(other.getSynonymsList())) return false; if (!getOnewayTermsList().equals(other.getOnewayTermsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4066,7 +3703,7 @@ public int hashCode() { hash = (37 * hash) + ONEWAY_TERMS_FIELD_NUMBER; hash = (53 * hash) + getOnewayTermsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4202,17 +3839,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.Rule.OnewaySynonymsAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -4349,7 +3979,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Rule.OnewaySynonymsAction ot } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4364,18 +3994,52 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Rule.OnewaySynonymsAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureOnewayTermsIsMutable(); + onewayTerms_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureQueryTermsIsMutable(); + queryTerms_.add(s); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSynonymsIsMutable(); + synonyms_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2.Rule.OnewaySynonymsAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4963,7 +4627,19 @@ public OnewaySynonymsAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OnewaySynonymsAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5190,85 +4866,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DoNotAssociateAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - terms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - terms_.add(s); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - queryTerms_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - doNotAssociateTerms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - doNotAssociateTerms_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) != 0)) { - terms_ = terms_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = queryTerms_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - doNotAssociateTerms_ = doNotAssociateTerms_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_Rule_DoNotAssociateAction_descriptor; @@ -5503,7 +5100,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 3, doNotAssociateTerms_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5536,7 +5133,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getDoNotAssociateTermsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5555,7 +5152,7 @@ public boolean equals(final java.lang.Object obj) { if (!getQueryTermsList().equals(other.getQueryTermsList())) return false; if (!getDoNotAssociateTermsList().equals(other.getDoNotAssociateTermsList())) return false; if (!getTermsList().equals(other.getTermsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5578,7 +5175,7 @@ public int hashCode() { hash = (37 * hash) + TERMS_FIELD_NUMBER; hash = (53 * hash) + getTermsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5712,17 +5309,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.Rule.DoNotAssociateAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -5859,7 +5449,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Rule.DoNotAssociateAction ot } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5874,18 +5464,52 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Rule.DoNotAssociateAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTermsIsMutable(); + terms_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureQueryTermsIsMutable(); + queryTerms_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDoNotAssociateTermsIsMutable(); + doNotAssociateTerms_.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) { - parsedMessage = - (com.google.cloud.retail.v2.Rule.DoNotAssociateAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6455,7 +6079,19 @@ public DoNotAssociateAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DoNotAssociateAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6626,73 +6262,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReplacementAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - term_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - queryTerms_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - replacementTerm_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = queryTerms_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_Rule_ReplacementAction_descriptor; @@ -6898,7 +6467,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(replacementTerm_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, replacementTerm_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6921,7 +6490,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(replacementTerm_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, replacementTerm_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6940,7 +6509,7 @@ public boolean equals(final java.lang.Object obj) { if (!getQueryTermsList().equals(other.getQueryTermsList())) return false; if (!getReplacementTerm().equals(other.getReplacementTerm())) return false; if (!getTerm().equals(other.getTerm())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6959,7 +6528,7 @@ public int hashCode() { hash = (53 * hash) + getReplacementTerm().hashCode(); hash = (37 * hash) + TERM_FIELD_NUMBER; hash = (53 * hash) + getTerm().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7092,17 +6661,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.Rule.ReplacementAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -7219,7 +6781,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Rule.ReplacementAction other term_ = other.term_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -7234,18 +6796,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Rule.ReplacementAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + term_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureQueryTermsIsMutable(); + queryTerms_.add(s); + break; + } // case 18 + case 26: + { + replacementTerm_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.Rule.ReplacementAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -7682,7 +7276,19 @@ public ReplacementAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReplacementAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7792,59 +7398,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private IgnoreAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - ignoreTerms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - ignoreTerms_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - ignoreTerms_ = ignoreTerms_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_Rule_IgnoreAction_descriptor; @@ -7938,7 +7491,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < ignoreTerms_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ignoreTerms_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7955,7 +7508,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getIgnoreTermsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7972,7 +7525,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.Rule.IgnoreAction) obj; if (!getIgnoreTermsList().equals(other.getIgnoreTermsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7987,7 +7540,7 @@ public int hashCode() { hash = (37 * hash) + IGNORE_TERMS_FIELD_NUMBER; hash = (53 * hash) + getIgnoreTermsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8119,17 +7672,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.Rule.IgnoreAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -8231,7 +7777,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Rule.IgnoreAction other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8246,17 +7792,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Rule.IgnoreAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIgnoreTermsIsMutable(); + ignoreTerms_.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) { - parsedMessage = (com.google.cloud.retail.v2.Rule.IgnoreAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -8463,7 +8030,19 @@ public IgnoreAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new IgnoreAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -9060,7 +8639,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (actionCase_ == 11) { output.writeMessage(11, (com.google.cloud.retail.v2.Rule.TwowaySynonymsAction) action_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -9112,7 +8691,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 11, (com.google.cloud.retail.v2.Rule.TwowaySynonymsAction) action_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -9160,7 +8739,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -9211,7 +8790,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -9342,22 +8921,39 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.Rule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (boostActionBuilder_ != null) { + boostActionBuilder_.clear(); + } + if (redirectActionBuilder_ != null) { + redirectActionBuilder_.clear(); + } + if (onewaySynonymsActionBuilder_ != null) { + onewaySynonymsActionBuilder_.clear(); + } + if (doNotAssociateActionBuilder_ != null) { + doNotAssociateActionBuilder_.clear(); + } + if (replacementActionBuilder_ != null) { + replacementActionBuilder_.clear(); + } + if (ignoreActionBuilder_ != null) { + ignoreActionBuilder_.clear(); + } + if (filterActionBuilder_ != null) { + filterActionBuilder_.clear(); + } + if (twowaySynonymsActionBuilder_ != null) { + twowaySynonymsActionBuilder_.clear(); + } if (conditionBuilder_ == null) { condition_ = null; } else { @@ -9552,7 +9148,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.Rule other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -9567,17 +9163,89 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.Rule parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getBoostActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getRedirectActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 3; + break; + } // case 26 + case 50: + { + input.readMessage( + getOnewaySynonymsActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + getDoNotAssociateActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage( + getReplacementActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage(getIgnoreActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage(getFilterActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage( + getTwowaySynonymsActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 11; + 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) { - parsedMessage = (com.google.cloud.retail.v2.Rule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -11544,7 +11212,18 @@ public Rule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Rule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequest.java index 91558b48..f1ba3782 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchRequest.java @@ -64,277 +64,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SearchRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - placement_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - branch_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - query_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - visitorId_ = s; - break; - } - case 42: - { - com.google.cloud.retail.v2.UserInfo.Builder subBuilder = null; - if (userInfo_ != null) { - subBuilder = userInfo_.toBuilder(); - } - userInfo_ = - input.readMessage( - com.google.cloud.retail.v2.UserInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(userInfo_); - userInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 56: - { - pageSize_ = input.readInt32(); - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 72: - { - offset_ = input.readInt32(); - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 90: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 98: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - facetSpecs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - facetSpecs_.add( - input.readMessage( - com.google.cloud.retail.v2.SearchRequest.FacetSpec.parser(), - extensionRegistry)); - break; - } - case 106: - { - com.google.cloud.retail.v2.SearchRequest.BoostSpec.Builder subBuilder = null; - if (boostSpec_ != null) { - subBuilder = boostSpec_.toBuilder(); - } - boostSpec_ = - input.readMessage( - com.google.cloud.retail.v2.SearchRequest.BoostSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boostSpec_); - boostSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 114: - { - com.google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.Builder subBuilder = null; - if (queryExpansionSpec_ != null) { - subBuilder = queryExpansionSpec_.toBuilder(); - } - queryExpansionSpec_ = - input.readMessage( - com.google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(queryExpansionSpec_); - queryExpansionSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 138: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - variantRollupKeys_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - variantRollupKeys_.add(s); - break; - } - case 170: - { - com.google.cloud.retail.v2.SearchRequest.DynamicFacetSpec.Builder subBuilder = null; - if (dynamicFacetSpec_ != null) { - subBuilder = dynamicFacetSpec_.toBuilder(); - } - dynamicFacetSpec_ = - input.readMessage( - com.google.cloud.retail.v2.SearchRequest.DynamicFacetSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dynamicFacetSpec_); - dynamicFacetSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 186: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - pageCategories_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - pageCategories_.add(s); - break; - } - case 226: - { - java.lang.String s = input.readStringRequireUtf8(); - - canonicalFilter_ = s; - break; - } - case 248: - { - int rawValue = input.readEnum(); - - searchMode_ = rawValue; - break; - } - case 258: - { - com.google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Builder subBuilder = - null; - if (personalizationSpec_ != null) { - subBuilder = personalizationSpec_.toBuilder(); - } - personalizationSpec_ = - input.readMessage( - com.google.cloud.retail.v2.SearchRequest.PersonalizationSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(personalizationSpec_); - personalizationSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 274: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000008; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 282: - { - com.google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.Builder subBuilder = - null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = spellCorrectionSpec_.toBuilder(); - } - spellCorrectionSpec_ = - input.readMessage( - com.google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(spellCorrectionSpec_); - spellCorrectionSpec_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - facetSpecs_ = java.util.Collections.unmodifiableList(facetSpecs_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - variantRollupKeys_ = variantRollupKeys_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - pageCategories_ = pageCategories_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.SearchServiceProto .internal_static_google_cloud_retail_v2_SearchRequest_descriptor; @@ -817,87 +546,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FacetSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.Builder subBuilder = - null; - if (facetKey_ != null) { - subBuilder = facetKey_.toBuilder(); - } - facetKey_ = - input.readMessage( - com.google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(facetKey_); - facetKey_ = subBuilder.buildPartial(); - } - - break; - } - case 16: - { - limit_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - excludedFilterKeys_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - excludedFilterKeys_.add(s); - break; - } - case 32: - { - enableDynamicPosition_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - excludedFilterKeys_ = excludedFilterKeys_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.SearchServiceProto .internal_static_google_cloud_retail_v2_SearchRequest_FacetSpec_descriptor; @@ -1510,131 +1158,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FacetKey( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - key_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - intervals_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - intervals_.add( - input.readMessage( - com.google.cloud.retail.v2.Interval.parser(), extensionRegistry)); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - restrictedValues_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - restrictedValues_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - query_ = s; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - prefixes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - prefixes_.add(s); - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - contains_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - contains_.add(s); - break; - } - case 80: - { - caseInsensitive_ = input.readBool(); - break; - } - case 88: - { - returnMinMax_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - intervals_ = java.util.Collections.unmodifiableList(intervals_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - restrictedValues_ = restrictedValues_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - prefixes_ = prefixes_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - contains_ = contains_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.SearchServiceProto .internal_static_google_cloud_retail_v2_SearchRequest_FacetSpec_FacetKey_descriptor; @@ -2373,7 +1896,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (returnMinMax_ != false) { output.writeBool(11, returnMinMax_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2424,7 +1947,7 @@ public int getSerializedSize() { if (returnMinMax_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, returnMinMax_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2449,7 +1972,7 @@ public boolean equals(final java.lang.Object obj) { if (!getOrderBy().equals(other.getOrderBy())) return false; if (!getQuery().equals(other.getQuery())) return false; if (getReturnMinMax() != other.getReturnMinMax()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2486,7 +2009,7 @@ public int hashCode() { hash = (53 * hash) + getQuery().hashCode(); hash = (37 * hash) + RETURN_MIN_MAX_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnMinMax()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2618,19 +2141,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getIntervalsFieldBuilder(); - } } @java.lang.Override @@ -2640,10 +2154,11 @@ public Builder clear() { if (intervalsBuilder_ == null) { intervals_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + intervals_ = null; intervalsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); restrictedValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); prefixes_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -2845,7 +2360,7 @@ public Builder mergeFrom( if (other.getReturnMinMax() != false) { setReturnMinMax(other.getReturnMinMax()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2860,19 +2375,95 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.cloud.retail.v2.Interval m = + input.readMessage( + com.google.cloud.retail.v2.Interval.parser(), extensionRegistry); + if (intervalsBuilder_ == null) { + ensureIntervalsIsMutable(); + intervals_.add(m); + } else { + intervalsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRestrictedValuesIsMutable(); + restrictedValues_.add(s); + break; + } // case 26 + case 34: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + query_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePrefixesIsMutable(); + prefixes_.add(s); + break; + } // case 66 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureContainsIsMutable(); + contains_.add(s); + break; + } // case 74 + case 80: + { + caseInsensitive_ = input.readBool(); + + break; + } // case 80 + case 88: + { + returnMinMax_ = input.readBool(); + + break; + } // case 88 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2.SearchRequest.FacetSpec.FacetKey) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4796,7 +4387,19 @@ public FacetKey parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FacetKey(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5103,7 +4706,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (enableDynamicPosition_ != false) { output.writeBool(4, enableDynamicPosition_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5129,7 +4732,7 @@ public int getSerializedSize() { if (enableDynamicPosition_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, enableDynamicPosition_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5152,7 +4755,7 @@ public boolean equals(final java.lang.Object obj) { if (getLimit() != other.getLimit()) return false; if (!getExcludedFilterKeysList().equals(other.getExcludedFilterKeysList())) return false; if (getEnableDynamicPosition() != other.getEnableDynamicPosition()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5175,7 +4778,7 @@ public int hashCode() { } hash = (37 * hash) + ENABLE_DYNAMIC_POSITION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableDynamicPosition()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5306,17 +4909,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.SearchRequest.FacetSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -5445,7 +5041,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.SearchRequest.FacetSpec othe if (other.getEnableDynamicPosition() != false) { setEnableDynamicPosition(other.getEnableDynamicPosition()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5460,18 +5056,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.SearchRequest.FacetSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getFacetKeyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 16: + { + limit_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExcludedFilterKeysIsMutable(); + excludedFilterKeys_.add(s); + break; + } // case 26 + case 32: + { + enableDynamicPosition_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.SearchRequest.FacetSpec) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6251,7 +5885,19 @@ public FacetSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FacetSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6340,52 +5986,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DynamicFacetSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - mode_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.SearchServiceProto .internal_static_google_cloud_retail_v2_SearchRequest_DynamicFacetSpec_descriptor; @@ -6623,7 +6223,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, mode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6637,7 +6237,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6654,7 +6254,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.SearchRequest.DynamicFacetSpec) obj; if (mode_ != other.mode_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6667,7 +6267,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + MODE_FIELD_NUMBER; hash = (53 * hash) + mode_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6799,17 +6399,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.SearchRequest.DynamicFacetSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -6900,7 +6493,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.SearchRequest.DynamicFacetSp if (other.mode_ != 0) { setModeValue(other.getModeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6915,18 +6508,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.SearchRequest.DynamicFacetSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + mode_ = input.readEnum(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.SearchRequest.DynamicFacetSpec) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -7071,7 +6683,19 @@ public DynamicFacetSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DynamicFacetSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7246,70 +6870,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BoostSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - conditionBoostSpecs_ = - new java.util.ArrayList< - com.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec>(); - mutable_bitField0_ |= 0x00000001; - } - conditionBoostSpecs_.add( - input.readMessage( - com.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec - .parser(), - extensionRegistry)); - break; - } - case 16: - { - bitField0_ |= 0x00000001; - skipBoostSpecValidation_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - conditionBoostSpecs_ = java.util.Collections.unmodifiableList(conditionBoostSpecs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.SearchServiceProto .internal_static_google_cloud_retail_v2_SearchRequest_BoostSpec_descriptor; @@ -7433,58 +6993,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ConditionBoostSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - condition_ = s; - break; - } - case 21: - { - boost_ = input.readFloat(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.SearchServiceProto .internal_static_google_cloud_retail_v2_SearchRequest_BoostSpec_ConditionBoostSpec_descriptor; @@ -7619,7 +7127,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (java.lang.Float.floatToRawIntBits(boost_) != 0) { output.writeFloat(2, boost_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7634,7 +7142,7 @@ public int getSerializedSize() { if (java.lang.Float.floatToRawIntBits(boost_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, boost_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7654,7 +7162,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCondition().equals(other.getCondition())) return false; if (java.lang.Float.floatToIntBits(getBoost()) != java.lang.Float.floatToIntBits(other.getBoost())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7669,7 +7177,7 @@ public int hashCode() { hash = (53 * hash) + getCondition().hashCode(); hash = (37 * hash) + BOOST_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoost()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7805,17 +7313,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -7921,7 +7422,7 @@ public Builder mergeFrom( if (other.getBoost() != 0F) { setBoost(other.getBoost()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -7936,20 +7437,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec parsedMessage = - null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + condition_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 21: + { + boost_ = input.readFloat(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -8231,7 +7755,19 @@ public ConditionBoostSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConditionBoostSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -8415,7 +7951,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(2, skipBoostSpecValidation_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -8432,7 +7968,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, skipBoostSpecValidation_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -8453,7 +7989,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSkipBoostSpecValidation()) { if (getSkipBoostSpecValidation() != other.getSkipBoostSpecValidation()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -8472,7 +8008,7 @@ public int hashCode() { hash = (37 * hash) + SKIP_BOOST_SPEC_VALIDATION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSkipBoostSpecValidation()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8603,19 +8139,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.SearchRequest.BoostSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getConditionBoostSpecsFieldBuilder(); - } } @java.lang.Override @@ -8623,10 +8150,11 @@ public Builder clear() { super.clear(); if (conditionBoostSpecsBuilder_ == null) { conditionBoostSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + conditionBoostSpecs_ = null; conditionBoostSpecsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); skipBoostSpecValidation_ = false; bitField0_ = (bitField0_ & ~0x00000002); return this; @@ -8754,7 +8282,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.SearchRequest.BoostSpec othe if (other.hasSkipBoostSpecValidation()) { setSkipBoostSpecValidation(other.getSkipBoostSpecValidation()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8769,18 +8297,52 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.SearchRequest.BoostSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec m = + input.readMessage( + com.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec + .parser(), + extensionRegistry); + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(m); + } else { + conditionBoostSpecsBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: + { + skipBoostSpecValidation_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2.SearchRequest.BoostSpec) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -9376,7 +8938,19 @@ public BoostSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BoostSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -9462,72 +9036,21 @@ public static final class QueryExpansionSpec extends com.google.protobuf.Generat // Use QueryExpansionSpec.newBuilder() to construct. private QueryExpansionSpec(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); - } - - private QueryExpansionSpec() { - condition_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new QueryExpansionSpec(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private QueryExpansionSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); + } - condition_ = rawValue; - break; - } - case 16: - { - pinUnexpandedResults_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + private QueryExpansionSpec() { + condition_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new QueryExpansionSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -9797,7 +9320,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (pinUnexpandedResults_ != false) { output.writeBool(2, pinUnexpandedResults_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -9815,7 +9338,7 @@ public int getSerializedSize() { if (pinUnexpandedResults_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, pinUnexpandedResults_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -9833,7 +9356,7 @@ public boolean equals(final java.lang.Object obj) { if (condition_ != other.condition_) return false; if (getPinUnexpandedResults() != other.getPinUnexpandedResults()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -9848,7 +9371,7 @@ public int hashCode() { hash = (53 * hash) + condition_; hash = (37 * hash) + PIN_UNEXPANDED_RESULTS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPinUnexpandedResults()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -9981,17 +9504,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.SearchRequest.QueryExpansionSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -10090,7 +9606,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.SearchRequest.QueryExpansion if (other.getPinUnexpandedResults() != false) { setPinUnexpandedResults(other.getPinUnexpandedResults()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -10105,19 +9621,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.SearchRequest.QueryExpansionSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + condition_ = input.readEnum(); + + break; + } // case 8 + case 16: + { + pinUnexpandedResults_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.SearchRequest.QueryExpansionSpec) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -10318,7 +9858,19 @@ public QueryExpansionSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryExpansionSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -10403,52 +9955,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PersonalizationSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - mode_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.SearchServiceProto .internal_static_google_cloud_retail_v2_SearchRequest_PersonalizationSpec_descriptor; @@ -10686,7 +10192,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, mode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -10700,7 +10206,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -10717,7 +10223,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.SearchRequest.PersonalizationSpec) obj; if (mode_ != other.mode_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -10730,7 +10236,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + MODE_FIELD_NUMBER; hash = (53 * hash) + mode_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -10862,17 +10368,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.SearchRequest.PersonalizationSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -10965,7 +10464,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.SearchRequest.Personalizatio if (other.mode_ != 0) { setModeValue(other.getModeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -10980,19 +10479,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.SearchRequest.PersonalizationSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + mode_ = input.readEnum(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.SearchRequest.PersonalizationSpec) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -11130,7 +10647,19 @@ public PersonalizationSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PersonalizationSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -11218,52 +10747,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SpellCorrectionSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - mode_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.SearchServiceProto .internal_static_google_cloud_retail_v2_SearchRequest_SpellCorrectionSpec_descriptor; @@ -11511,7 +10994,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, mode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -11525,7 +11008,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -11542,7 +11025,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec) obj; if (mode_ != other.mode_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -11555,7 +11038,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + MODE_FIELD_NUMBER; hash = (53 * hash) + mode_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -11687,17 +11170,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -11790,7 +11266,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.SearchRequest.SpellCorrectio if (other.mode_ != 0) { setModeValue(other.getModeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -11805,19 +11281,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + mode_ = input.readEnum(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.SearchRequest.SpellCorrectionSpec) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -11960,7 +11454,19 @@ public SpellCorrectionSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SpellCorrectionSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -13660,7 +13166,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(35, getSpellCorrectionSpec()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -13753,7 +13259,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(35, getSpellCorrectionSpec()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -13807,7 +13313,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSpellCorrectionSpec()) { if (!getSpellCorrectionSpec().equals(other.getSpellCorrectionSpec())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -13880,7 +13386,7 @@ public int hashCode() { hash = (37 * hash) + SPELL_CORRECTION_SPEC_FIELD_NUMBER; hash = (53 * hash) + getSpellCorrectionSpec().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -14077,10 +13583,11 @@ public Builder clear() { if (facetSpecsBuilder_ == null) { facetSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + facetSpecs_ = null; facetSpecsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (dynamicFacetSpecBuilder_ == null) { dynamicFacetSpec_ = null; } else { @@ -14369,7 +13876,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.SearchRequest other) { if (other.hasSpellCorrectionSpec()) { mergeSpellCorrectionSpec(other.getSpellCorrectionSpec()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -14384,17 +13891,176 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.SearchRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + placement_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + branch_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + query_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + visitorId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + input.readMessage(getUserInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 56: + { + pageSize_ = input.readInt32(); + + break; + } // case 56 + case 66: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 72: + { + offset_ = input.readInt32(); + + break; + } // case 72 + case 82: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 90: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 90 + case 98: + { + com.google.cloud.retail.v2.SearchRequest.FacetSpec m = + input.readMessage( + com.google.cloud.retail.v2.SearchRequest.FacetSpec.parser(), + extensionRegistry); + if (facetSpecsBuilder_ == null) { + ensureFacetSpecsIsMutable(); + facetSpecs_.add(m); + } else { + facetSpecsBuilder_.addMessage(m); + } + break; + } // case 98 + case 106: + { + input.readMessage(getBoostSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 106 + case 114: + { + input.readMessage( + getQueryExpansionSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 114 + case 138: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureVariantRollupKeysIsMutable(); + variantRollupKeys_.add(s); + break; + } // case 138 + case 170: + { + input.readMessage( + getDynamicFacetSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 170 + case 186: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePageCategoriesIsMutable(); + pageCategories_.add(s); + break; + } // case 186 + case 226: + { + canonicalFilter_ = input.readStringRequireUtf8(); + + break; + } // case 226 + case 248: + { + searchMode_ = input.readEnum(); + + break; + } // case 248 + case 258: + { + input.readMessage( + getPersonalizationSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 258 + case 274: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 274 + case 282: + { + input.readMessage( + getSpellCorrectionSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 282 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2.SearchRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -18785,7 +18451,18 @@ public SearchRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchResponse.java index 6dc61cd6..15132bc3 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SearchResponse.java @@ -60,161 +60,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SearchResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = - new java.util.ArrayList< - com.google.cloud.retail.v2.SearchResponse.SearchResult>(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage( - com.google.cloud.retail.v2.SearchResponse.SearchResult.parser(), - extensionRegistry)); - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - facets_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - facets_.add( - input.readMessage( - com.google.cloud.retail.v2.SearchResponse.Facet.parser(), extensionRegistry)); - break; - } - case 24: - { - totalSize_ = input.readInt32(); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - correctedQuery_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - attributionToken_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 58: - { - com.google.cloud.retail.v2.SearchResponse.QueryExpansionInfo.Builder subBuilder = - null; - if (queryExpansionInfo_ != null) { - subBuilder = queryExpansionInfo_.toBuilder(); - } - queryExpansionInfo_ = - input.readMessage( - com.google.cloud.retail.v2.SearchResponse.QueryExpansionInfo.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(queryExpansionInfo_); - queryExpansionInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - redirectUri_ = s; - break; - } - case 98: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - appliedControls_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - appliedControls_.add(s); - break; - } - case 114: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - invalidConditionBoostSpecs_ = - new java.util.ArrayList< - com.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec>(); - mutable_bitField0_ |= 0x00000008; - } - invalidConditionBoostSpecs_.add( - input.readMessage( - com.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec - .parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - facets_ = java.util.Collections.unmodifiableList(facets_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - appliedControls_ = appliedControls_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - invalidConditionBoostSpecs_ = - java.util.Collections.unmodifiableList(invalidConditionBoostSpecs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.SearchServiceProto .internal_static_google_cloud_retail_v2_SearchResponse_descriptor; @@ -765,123 +610,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SearchResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - id_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = - input.readMessage( - com.google.cloud.retail.v2.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - matchingVariantCount_ = input.readInt32(); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - matchingVariantFields_ = - com.google.protobuf.MapField.newMapField( - MatchingVariantFieldsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - matchingVariantFields__ = - input.readMessage( - MatchingVariantFieldsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - matchingVariantFields_ - .getMutableMap() - .put(matchingVariantFields__.getKey(), matchingVariantFields__.getValue()); - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - variantRollupValues_ = - com.google.protobuf.MapField.newMapField( - VariantRollupValuesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry - variantRollupValues__ = - input.readMessage( - VariantRollupValuesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - variantRollupValues_ - .getMutableMap() - .put(variantRollupValues__.getKey(), variantRollupValues__.getValue()); - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - personalLabels_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - personalLabels_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) != 0)) { - personalLabels_ = personalLabels_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.SearchServiceProto .internal_static_google_cloud_retail_v2_SearchResponse_SearchResult_descriptor; @@ -1551,7 +1279,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < personalLabels_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, personalLabels_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1600,7 +1328,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getPersonalLabelsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1627,7 +1355,7 @@ public boolean equals(final java.lang.Object obj) { if (!internalGetVariantRollupValues().equals(other.internalGetVariantRollupValues())) return false; if (!getPersonalLabelsList().equals(other.getPersonalLabelsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1658,7 +1386,7 @@ public int hashCode() { hash = (37 * hash) + PERSONAL_LABELS_FIELD_NUMBER; hash = (53 * hash) + getPersonalLabelsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1814,17 +1542,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.retail.v2.SearchResponse.SearchResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1963,7 +1684,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.SearchResponse.SearchResult } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1978,18 +1699,81 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.SearchResponse.SearchResult parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getProductFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + matchingVariantCount_ = input.readInt32(); + + break; + } // case 24 + case 34: + { + com.google.protobuf.MapEntry + matchingVariantFields__ = + input.readMessage( + MatchingVariantFieldsDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + internalGetMutableMatchingVariantFields() + .getMutableMap() + .put(matchingVariantFields__.getKey(), matchingVariantFields__.getValue()); + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry + variantRollupValues__ = + input.readMessage( + VariantRollupValuesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableVariantRollupValues() + .getMutableMap() + .put(variantRollupValues__.getKey(), variantRollupValues__.getValue()); + break; + } // case 42 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePersonalLabelsIsMutable(); + personalLabels_.add(s); + 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) { - parsedMessage = - (com.google.cloud.retail.v2.SearchResponse.SearchResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3320,7 +3104,19 @@ public SearchResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchResult(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3472,75 +3268,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Facet( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - key_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - values_ = - new java.util.ArrayList< - com.google.cloud.retail.v2.SearchResponse.Facet.FacetValue>(); - mutable_bitField0_ |= 0x00000001; - } - values_.add( - input.readMessage( - com.google.cloud.retail.v2.SearchResponse.Facet.FacetValue.parser(), - extensionRegistry)); - break; - } - case 24: - { - dynamicFacet_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - values_ = java.util.Collections.unmodifiableList(values_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.SearchServiceProto .internal_static_google_cloud_retail_v2_SearchResponse_Facet_descriptor; @@ -3715,84 +3442,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FacetValue( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - facetValueCase_ = 1; - facetValue_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2.Interval.Builder subBuilder = null; - if (facetValueCase_ == 2) { - subBuilder = ((com.google.cloud.retail.v2.Interval) facetValue_).toBuilder(); - } - facetValue_ = - input.readMessage( - com.google.cloud.retail.v2.Interval.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2.Interval) facetValue_); - facetValue_ = subBuilder.buildPartial(); - } - facetValueCase_ = 2; - break; - } - case 24: - { - count_ = input.readInt64(); - break; - } - case 41: - { - minValue_ = input.readDouble(); - break; - } - case 49: - { - maxValue_ = input.readDouble(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.SearchServiceProto .internal_static_google_cloud_retail_v2_SearchResponse_Facet_FacetValue_descriptor; @@ -4067,7 +3716,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (java.lang.Double.doubleToRawLongBits(maxValue_) != 0) { output.writeDouble(6, maxValue_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4093,7 +3742,7 @@ public int getSerializedSize() { if (java.lang.Double.doubleToRawLongBits(maxValue_) != 0) { size += com.google.protobuf.CodedOutputStream.computeDoubleSize(6, maxValue_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4125,7 +3774,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4160,7 +3809,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4292,22 +3941,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.SearchResponse.Facet.FacetValue.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (intervalBuilder_ != null) { + intervalBuilder_.clear(); + } count_ = 0L; minValue_ = 0D; @@ -4438,7 +4083,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.SearchResponse.Facet.FacetVa break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4453,19 +4098,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.SearchResponse.Facet.FacetValue parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + facetValueCase_ = 1; + facetValue_ = s; + break; + } // case 10 + case 18: + { + input.readMessage(getIntervalFieldBuilder().getBuilder(), extensionRegistry); + facetValueCase_ = 2; + break; + } // case 18 + case 24: + { + count_ = input.readInt64(); + + break; + } // case 24 + case 41: + { + minValue_ = input.readDouble(); + + break; + } // case 41 + case 49: + { + maxValue_ = input.readDouble(); + + break; + } // case 49 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2.SearchResponse.Facet.FacetValue) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5041,7 +4729,19 @@ public FacetValue parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FacetValue(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5225,7 +4925,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (dynamicFacet_ != false) { output.writeBool(3, dynamicFacet_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5243,7 +4943,7 @@ public int getSerializedSize() { if (dynamicFacet_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, dynamicFacet_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5262,7 +4962,7 @@ public boolean equals(final java.lang.Object obj) { if (!getKey().equals(other.getKey())) return false; if (!getValuesList().equals(other.getValuesList())) return false; if (getDynamicFacet() != other.getDynamicFacet()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5281,7 +4981,7 @@ public int hashCode() { } hash = (37 * hash) + DYNAMIC_FACET_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDynamicFacet()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5412,19 +5112,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.SearchResponse.Facet.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getValuesFieldBuilder(); - } } @java.lang.Override @@ -5434,10 +5125,11 @@ public Builder clear() { if (valuesBuilder_ == null) { values_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + values_ = null; valuesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); dynamicFacet_ = false; return this; @@ -5565,7 +5257,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.SearchResponse.Facet other) if (other.getDynamicFacet() != false) { setDynamicFacet(other.getDynamicFacet()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5580,18 +5272,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.SearchResponse.Facet parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.cloud.retail.v2.SearchResponse.Facet.FacetValue m = + input.readMessage( + com.google.cloud.retail.v2.SearchResponse.Facet.FacetValue.parser(), + extensionRegistry); + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(m); + } else { + valuesBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + dynamicFacet_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.SearchResponse.Facet) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6158,7 +5889,19 @@ public Facet parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Facet(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6244,55 +5987,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private QueryExpansionInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - expandedQuery_ = input.readBool(); - break; - } - case 16: - { - pinnedResultCount_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.SearchServiceProto .internal_static_google_cloud_retail_v2_SearchResponse_QueryExpansionInfo_descriptor; @@ -6367,7 +6061,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (pinnedResultCount_ != 0L) { output.writeInt64(2, pinnedResultCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6382,7 +6076,7 @@ public int getSerializedSize() { if (pinnedResultCount_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, pinnedResultCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6400,7 +6094,7 @@ public boolean equals(final java.lang.Object obj) { if (getExpandedQuery() != other.getExpandedQuery()) return false; if (getPinnedResultCount() != other.getPinnedResultCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6415,7 +6109,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExpandedQuery()); hash = (37 * hash) + PINNED_RESULT_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPinnedResultCount()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6548,17 +6242,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.SearchResponse.QueryExpansionInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -6657,7 +6344,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.SearchResponse.QueryExpansio if (other.getPinnedResultCount() != 0L) { setPinnedResultCount(other.getPinnedResultCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6672,19 +6359,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.SearchResponse.QueryExpansionInfo parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + expandedQuery_ = input.readBool(); + + break; + } // case 8 + case 16: + { + pinnedResultCount_ = input.readInt64(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.SearchResponse.QueryExpansionInfo) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6836,7 +6547,19 @@ public QueryExpansionInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryExpansionInfo(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7490,7 +7213,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < invalidConditionBoostSpecs_.size(); i++) { output.writeMessage(14, invalidConditionBoostSpecs_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7536,7 +7259,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 14, invalidConditionBoostSpecs_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7566,7 +7289,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAppliedControlsList().equals(other.getAppliedControlsList())) return false; if (!getInvalidConditionBoostSpecsList().equals(other.getInvalidConditionBoostSpecsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7607,7 +7330,7 @@ public int hashCode() { hash = (37 * hash) + INVALID_CONDITION_BOOST_SPECS_FIELD_NUMBER; hash = (53 * hash) + getInvalidConditionBoostSpecsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7737,21 +7460,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.SearchResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - getFacetsFieldBuilder(); - getInvalidConditionBoostSpecsFieldBuilder(); - } } @java.lang.Override @@ -7759,16 +7471,18 @@ public Builder clear() { super.clear(); if (resultsBuilder_ == null) { results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + results_ = null; resultsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (facetsBuilder_ == null) { facets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + facets_ = null; facetsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); totalSize_ = 0; correctedQuery_ = ""; @@ -7789,10 +7503,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000004); if (invalidConditionBoostSpecsBuilder_ == null) { invalidConditionBoostSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + invalidConditionBoostSpecs_ = null; invalidConditionBoostSpecsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -8026,7 +7741,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.SearchResponse other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8041,17 +7756,118 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.SearchResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2.SearchResponse.SearchResult m = + input.readMessage( + com.google.cloud.retail.v2.SearchResponse.SearchResult.parser(), + extensionRegistry); + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(m); + } else { + resultsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.retail.v2.SearchResponse.Facet m = + input.readMessage( + com.google.cloud.retail.v2.SearchResponse.Facet.parser(), + extensionRegistry); + if (facetsBuilder_ == null) { + ensureFacetsIsMutable(); + facets_.add(m); + } else { + facetsBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + totalSize_ = input.readInt32(); + + break; + } // case 24 + case 34: + { + correctedQuery_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + attributionToken_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + input.readMessage( + getQueryExpansionInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 82: + { + redirectUri_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAppliedControlsIsMutable(); + appliedControls_.add(s); + break; + } // case 98 + case 114: + { + com.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec m = + input.readMessage( + com.google.cloud.retail.v2.SearchRequest.BoostSpec.ConditionBoostSpec + .parser(), + extensionRegistry); + if (invalidConditionBoostSpecsBuilder_ == null) { + ensureInvalidConditionBoostSpecsIsMutable(); + invalidConditionBoostSpecs_.add(m); + } else { + invalidConditionBoostSpecsBuilder_.addMessage(m); + } + 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) { - parsedMessage = (com.google.cloud.retail.v2.SearchResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -10170,7 +9986,18 @@ public SearchResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfig.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfig.java index 8b052b6c..7d0a906d 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfig.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/ServingConfig.java @@ -68,268 +68,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ServingConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - modelId_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - priceRerankingLevel_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - facetControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - facetControlIds_.add(s); - break; - } - case 50: - { - com.google.cloud.retail.v2.SearchRequest.DynamicFacetSpec.Builder subBuilder = null; - if (dynamicFacetSpec_ != null) { - subBuilder = dynamicFacetSpec_.toBuilder(); - } - dynamicFacetSpec_ = - input.readMessage( - com.google.cloud.retail.v2.SearchRequest.DynamicFacetSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dynamicFacetSpec_); - dynamicFacetSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - boostControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - boostControlIds_.add(s); - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - diversityLevel_ = s; - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - filterControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - filterControlIds_.add(s); - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - redirectControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - redirectControlIds_.add(s); - break; - } - case 98: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - onewaySynonymsControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - onewaySynonymsControlIds_.add(s); - break; - } - case 106: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - doNotAssociateControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000040; - } - doNotAssociateControlIds_.add(s); - break; - } - case 114: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - replacementControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000080; - } - replacementControlIds_.add(s); - break; - } - case 122: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000100) != 0)) { - ignoreControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000100; - } - ignoreControlIds_.add(s); - break; - } - case 130: - { - java.lang.String s = input.readStringRequireUtf8(); - - enableCategoryFilterLevel_ = s; - break; - } - case 146: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - twowaySynonymsControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000010; - } - twowaySynonymsControlIds_.add(s); - break; - } - case 152: - { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000200) != 0)) { - solutionTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; - } - solutionTypes_.add(rawValue); - break; - } - case 154: - { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while (input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000200) != 0)) { - solutionTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; - } - solutionTypes_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 170: - { - com.google.cloud.retail.v2.SearchRequest.PersonalizationSpec.Builder subBuilder = - null; - if (personalizationSpec_ != null) { - subBuilder = personalizationSpec_.toBuilder(); - } - personalizationSpec_ = - input.readMessage( - com.google.cloud.retail.v2.SearchRequest.PersonalizationSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(personalizationSpec_); - personalizationSpec_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - facetControlIds_ = facetControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - boostControlIds_ = boostControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - filterControlIds_ = filterControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - redirectControlIds_ = redirectControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - onewaySynonymsControlIds_ = onewaySynonymsControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000040) != 0)) { - doNotAssociateControlIds_ = doNotAssociateControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000080) != 0)) { - replacementControlIds_ = replacementControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000100) != 0)) { - ignoreControlIds_ = ignoreControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - twowaySynonymsControlIds_ = twowaySynonymsControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000200) != 0)) { - solutionTypes_ = java.util.Collections.unmodifiableList(solutionTypes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ServingConfigProto .internal_static_google_cloud_retail_v2_ServingConfig_descriptor; @@ -1876,7 +1614,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (personalizationSpec_ != null) { output.writeMessage(21, getPersonalizationSpec()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1996,7 +1734,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getPersonalizationSpec()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2038,7 +1776,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPersonalizationSpec().equals(other.getPersonalizationSpec())) return false; } if (!solutionTypes_.equals(other.solutionTypes_)) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2109,7 +1847,7 @@ public int hashCode() { hash = (37 * hash) + SOLUTION_TYPES_FIELD_NUMBER; hash = (53 * hash) + solutionTypes_.hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2239,17 +1977,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.ServingConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2572,7 +2303,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.ServingConfig other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2587,17 +2318,163 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.ServingConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + modelId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + priceRerankingLevel_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFacetControlIdsIsMutable(); + facetControlIds_.add(s); + break; + } // case 42 + case 50: + { + input.readMessage( + getDynamicFacetSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureBoostControlIdsIsMutable(); + boostControlIds_.add(s); + break; + } // case 58 + case 66: + { + diversityLevel_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFilterControlIdsIsMutable(); + filterControlIds_.add(s); + break; + } // case 74 + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRedirectControlIdsIsMutable(); + redirectControlIds_.add(s); + break; + } // case 82 + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureOnewaySynonymsControlIdsIsMutable(); + onewaySynonymsControlIds_.add(s); + break; + } // case 98 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDoNotAssociateControlIdsIsMutable(); + doNotAssociateControlIds_.add(s); + break; + } // case 106 + case 114: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReplacementControlIdsIsMutable(); + replacementControlIds_.add(s); + break; + } // case 114 + case 122: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIgnoreControlIdsIsMutable(); + ignoreControlIds_.add(s); + break; + } // case 122 + case 130: + { + enableCategoryFilterLevel_ = input.readStringRequireUtf8(); + + break; + } // case 130 + case 146: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTwowaySynonymsControlIdsIsMutable(); + twowaySynonymsControlIds_.add(s); + break; + } // case 146 + case 152: + { + int tmpRaw = input.readEnum(); + ensureSolutionTypesIsMutable(); + solutionTypes_.add(tmpRaw); + break; + } // case 152 + case 154: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureSolutionTypesIsMutable(); + solutionTypes_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 154 + case 170: + { + input.readMessage( + getPersonalizationSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 170 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2.ServingConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6390,7 +6267,18 @@ public ServingConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServingConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetDefaultBranchRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetDefaultBranchRequest.java index 0f6fb8eb..eba88853 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetDefaultBranchRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetDefaultBranchRequest.java @@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetDefaultBranchRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - catalog_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - branchId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - note_ = s; - break; - } - case 32: - { - force_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CatalogServiceProto .internal_static_google_cloud_retail_v2_SetDefaultBranchRequest_descriptor; @@ -347,7 +282,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (force_ != false) { output.writeBool(4, force_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -368,7 +303,7 @@ public int getSerializedSize() { if (force_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, force_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -388,7 +323,7 @@ public boolean equals(final java.lang.Object obj) { if (!getBranchId().equals(other.getBranchId())) return false; if (!getNote().equals(other.getNote())) return false; if (getForce() != other.getForce()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -407,7 +342,7 @@ public int hashCode() { hash = (53 * hash) + getNote().hashCode(); hash = (37 * hash) + FORCE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -536,17 +471,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.SetDefaultBranchRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -656,7 +584,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.SetDefaultBranchRequest othe if (other.getForce() != false) { setForce(other.getForce()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -671,18 +599,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.SetDefaultBranchRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + catalog_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + branchId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + note_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: + { + force_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.SetDefaultBranchRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1144,7 +1109,18 @@ public SetDefaultBranchRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetDefaultBranchRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryMetadata.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryMetadata.java index e8ba7d6d..4c2ab95a 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryMetadata.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryMetadata.java @@ -53,45 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetInventoryMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_SetInventoryMetadata_descriptor; @@ -121,7 +82,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -130,7 +91,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -146,7 +107,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2.SetInventoryMetadata other = (com.google.cloud.retail.v2.SetInventoryMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -157,7 +118,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -289,17 +250,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.SetInventoryMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -382,7 +336,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2.SetInventoryMetadata other) { if (other == com.google.cloud.retail.v2.SetInventoryMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -397,17 +351,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.SetInventoryMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = (com.google.cloud.retail.v2.SetInventoryMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -443,7 +411,18 @@ public SetInventoryMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetInventoryMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryRequest.java index b3fe7dc5..06567dfa 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryRequest.java @@ -52,95 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetInventoryRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2.Product.Builder subBuilder = null; - if (inventory_ != null) { - subBuilder = inventory_.toBuilder(); - } - inventory_ = - input.readMessage(com.google.cloud.retail.v2.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inventory_); - inventory_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (setMask_ != null) { - subBuilder = setMask_.toBuilder(); - } - setMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(setMask_); - setMask_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (setTime_ != null) { - subBuilder = setTime_.toBuilder(); - } - setTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(setTime_); - setTime_ = subBuilder.buildPartial(); - } - - break; - } - case 32: - { - allowMissing_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_SetInventoryRequest_descriptor; @@ -504,7 +415,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (allowMissing_ != false) { output.writeBool(4, allowMissing_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -525,7 +436,7 @@ public int getSerializedSize() { if (allowMissing_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, allowMissing_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -554,7 +465,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSetTime().equals(other.getSetTime())) return false; } if (getAllowMissing() != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -579,7 +490,7 @@ public int hashCode() { } hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -710,17 +621,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.SetInventoryRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -850,7 +754,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.SetInventoryRequest other) { if (other.getAllowMissing() != false) { setAllowMissing(other.getAllowMissing()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -865,17 +769,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.SetInventoryRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getInventoryFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getSetMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getSetTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + allowMissing_ = input.readBool(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.SetInventoryRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2007,7 +1949,18 @@ public SetInventoryRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetInventoryRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryResponse.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryResponse.java index 4ba09040..8a0d08e6 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryResponse.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/SetInventoryResponse.java @@ -53,45 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetInventoryResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_SetInventoryResponse_descriptor; @@ -121,7 +82,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -130,7 +91,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -146,7 +107,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2.SetInventoryResponse other = (com.google.cloud.retail.v2.SetInventoryResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -157,7 +118,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -289,17 +250,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.SetInventoryResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -382,7 +336,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2.SetInventoryResponse other) { if (other == com.google.cloud.retail.v2.SetInventoryResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -397,17 +351,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.SetInventoryResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = (com.google.cloud.retail.v2.SetInventoryResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -443,7 +411,18 @@ public SetInventoryResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetInventoryResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateAttributesConfigRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateAttributesConfigRequest.java index 439e5a00..0e5532f7 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateAttributesConfigRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateAttributesConfigRequest.java @@ -52,76 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateAttributesConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2.AttributesConfig.Builder subBuilder = null; - if (attributesConfig_ != null) { - subBuilder = attributesConfig_.toBuilder(); - } - attributesConfig_ = - input.readMessage( - com.google.cloud.retail.v2.AttributesConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(attributesConfig_); - attributesConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CatalogServiceProto .internal_static_google_cloud_retail_v2_UpdateAttributesConfigRequest_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -287,7 +217,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -311,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -330,7 +260,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -462,17 +392,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.UpdateAttributesConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -583,7 +506,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.UpdateAttributesConfigReques if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -598,18 +521,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.UpdateAttributesConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getAttributesConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.UpdateAttributesConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1077,7 +1026,18 @@ public UpdateAttributesConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateAttributesConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateCatalogRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateCatalogRequest.java index 122e0af8..78354804 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateCatalogRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateCatalogRequest.java @@ -52,75 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateCatalogRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2.Catalog.Builder subBuilder = null; - if (catalog_ != null) { - subBuilder = catalog_.toBuilder(); - } - catalog_ = - input.readMessage(com.google.cloud.retail.v2.Catalog.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(catalog_); - catalog_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CatalogServiceProto .internal_static_google_cloud_retail_v2_UpdateCatalogRequest_descriptor; @@ -275,7 +206,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -290,7 +221,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -314,7 +245,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -333,7 +264,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -464,17 +395,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.UpdateCatalogRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -585,7 +509,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.UpdateCatalogRequest other) if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -600,17 +524,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.UpdateCatalogRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCatalogFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.UpdateCatalogRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1095,7 +1045,18 @@ public UpdateCatalogRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateCatalogRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateCompletionConfigRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateCompletionConfigRequest.java index 07ee6369..36f53c84 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateCompletionConfigRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateCompletionConfigRequest.java @@ -52,76 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateCompletionConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2.CompletionConfig.Builder subBuilder = null; - if (completionConfig_ != null) { - subBuilder = completionConfig_.toBuilder(); - } - completionConfig_ = - input.readMessage( - com.google.cloud.retail.v2.CompletionConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(completionConfig_); - completionConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CatalogServiceProto .internal_static_google_cloud_retail_v2_UpdateCompletionConfigRequest_descriptor; @@ -296,7 +226,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -311,7 +241,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -335,7 +265,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -354,7 +284,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -486,17 +416,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.UpdateCompletionConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -607,7 +530,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.UpdateCompletionConfigReques if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -622,18 +545,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.UpdateCompletionConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getCompletionConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.UpdateCompletionConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1173,7 +1122,18 @@ public UpdateCompletionConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateCompletionConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateControlRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateControlRequest.java index cecbfe8f..85413449 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateControlRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateControlRequest.java @@ -50,75 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateControlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2.Control.Builder subBuilder = null; - if (control_ != null) { - subBuilder = control_.toBuilder(); - } - control_ = - input.readMessage(com.google.cloud.retail.v2.Control.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(control_); - control_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ControlServiceProto .internal_static_google_cloud_retail_v2_UpdateControlRequest_descriptor; @@ -261,7 +192,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -276,7 +207,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -300,7 +231,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -319,7 +250,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -448,17 +379,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.UpdateControlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -569,7 +493,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.UpdateControlRequest other) if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -584,17 +508,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.UpdateControlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getControlFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.UpdateControlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1043,7 +993,18 @@ public UpdateControlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateControlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateProductRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateProductRequest.java index 666c184e..80e12201 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateProductRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateProductRequest.java @@ -52,80 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = - input.readMessage(com.google.cloud.retail.v2.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - allowMissing_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ProductServiceProto .internal_static_google_cloud_retail_v2_UpdateProductRequest_descriptor; @@ -327,7 +253,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (allowMissing_ != false) { output.writeBool(3, allowMissing_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -345,7 +271,7 @@ public int getSerializedSize() { if (allowMissing_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowMissing_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -370,7 +296,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } if (getAllowMissing() != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -391,7 +317,7 @@ public int hashCode() { } hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -522,17 +448,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.UpdateProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -649,7 +568,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.UpdateProductRequest other) if (other.getAllowMissing() != false) { setAllowMissing(other.getAllowMissing()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -664,17 +583,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.UpdateProductRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getProductFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + allowMissing_ = input.readBool(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.UpdateProductRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1289,7 +1240,18 @@ public UpdateProductRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateProductRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateServingConfigRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateServingConfigRequest.java index a7df8c58..b95426b4 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateServingConfigRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UpdateServingConfigRequest.java @@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateServingConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2.ServingConfig.Builder subBuilder = null; - if (servingConfig_ != null) { - subBuilder = servingConfig_.toBuilder(); - } - servingConfig_ = - input.readMessage( - com.google.cloud.retail.v2.ServingConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(servingConfig_); - servingConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ServingConfigServiceProto .internal_static_google_cloud_retail_v2_UpdateServingConfigRequest_descriptor; @@ -267,7 +197,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -282,7 +212,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -306,7 +236,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -325,7 +255,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -455,17 +385,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.UpdateServingConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -576,7 +499,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.UpdateServingConfigRequest o if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -591,18 +514,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.UpdateServingConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getServingConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.UpdateServingConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1061,7 +1009,18 @@ public UpdateServingConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateServingConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEvent.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEvent.java index 0f55ac45..f0b013ad 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEvent.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEvent.java @@ -66,249 +66,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UserEvent( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - eventType_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - visitorId_ = s; - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (eventTime_ != null) { - subBuilder = eventTime_.toBuilder(); - } - eventTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(eventTime_); - eventTime_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - experimentIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - experimentIds_.add(s); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - attributionToken_ = s; - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - productDetails_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - productDetails_.add( - input.readMessage( - com.google.cloud.retail.v2.ProductDetail.parser(), extensionRegistry)); - break; - } - case 58: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - attributes_ = - com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000004; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.retail.v2.CustomAttribute> - attributes__ = - input.readMessage( - AttributesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - attributes_.getMutableMap().put(attributes__.getKey(), attributes__.getValue()); - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - cartId_ = s; - break; - } - case 74: - { - com.google.cloud.retail.v2.PurchaseTransaction.Builder subBuilder = null; - if (purchaseTransaction_ != null) { - subBuilder = purchaseTransaction_.toBuilder(); - } - purchaseTransaction_ = - input.readMessage( - com.google.cloud.retail.v2.PurchaseTransaction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(purchaseTransaction_); - purchaseTransaction_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - searchQuery_ = s; - break; - } - case 90: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - pageCategories_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - pageCategories_.add(s); - break; - } - case 98: - { - com.google.cloud.retail.v2.UserInfo.Builder subBuilder = null; - if (userInfo_ != null) { - subBuilder = userInfo_.toBuilder(); - } - userInfo_ = - input.readMessage( - com.google.cloud.retail.v2.UserInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(userInfo_); - userInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 106: - { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 114: - { - java.lang.String s = input.readStringRequireUtf8(); - - referrerUri_ = s; - break; - } - case 122: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageViewId_ = s; - break; - } - case 130: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 138: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 144: - { - offset_ = input.readInt32(); - break; - } - case 170: - { - java.lang.String s = input.readStringRequireUtf8(); - - sessionId_ = s; - break; - } - case 178: - { - com.google.cloud.retail.v2.CompletionDetail.Builder subBuilder = null; - if (completionDetail_ != null) { - subBuilder = completionDetail_.toBuilder(); - } - completionDetail_ = - input.readMessage( - com.google.cloud.retail.v2.CompletionDetail.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(completionDetail_); - completionDetail_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - experimentIds_ = experimentIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - productDetails_ = java.util.Collections.unmodifiableList(productDetails_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - pageCategories_ = pageCategories_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.UserEventProto .internal_static_google_cloud_retail_v2_UserEvent_descriptor; @@ -1825,7 +1582,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (completionDetail_ != null) { output.writeMessage(22, getCompletionDetail()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1912,7 +1669,7 @@ public int getSerializedSize() { if (completionDetail_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, getCompletionDetail()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1959,7 +1716,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUri().equals(other.getUri())) return false; if (!getReferrerUri().equals(other.getReferrerUri())) return false; if (!getPageViewId().equals(other.getPageViewId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2026,7 +1783,7 @@ public int hashCode() { hash = (53 * hash) + getReferrerUri().hashCode(); hash = (37 * hash) + PAGE_VIEW_ID_FIELD_NUMBER; hash = (53 * hash) + getPageViewId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2175,19 +1932,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.retail.v2.UserEvent.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getProductDetailsFieldBuilder(); - } } @java.lang.Override @@ -2211,10 +1959,11 @@ public Builder clear() { if (productDetailsBuilder_ == null) { productDetails_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + productDetails_ = null; productDetailsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); if (completionDetailBuilder_ == null) { completionDetail_ = null; } else { @@ -2488,7 +2237,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.UserEvent other) { pageViewId_ = other.pageViewId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2503,17 +2252,169 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.UserEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + eventType_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + visitorId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getEventTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExperimentIdsIsMutable(); + experimentIds_.add(s); + break; + } // case 34 + case 42: + { + attributionToken_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + com.google.cloud.retail.v2.ProductDetail m = + input.readMessage( + com.google.cloud.retail.v2.ProductDetail.parser(), extensionRegistry); + if (productDetailsBuilder_ == null) { + ensureProductDetailsIsMutable(); + productDetails_.add(m); + } else { + productDetailsBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.retail.v2.CustomAttribute> + attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .getMutableMap() + .put(attributes__.getKey(), attributes__.getValue()); + break; + } // case 58 + case 66: + { + cartId_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 74: + { + input.readMessage( + getPurchaseTransactionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 74 + case 82: + { + searchQuery_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePageCategoriesIsMutable(); + pageCategories_.add(s); + break; + } // case 90 + case 98: + { + input.readMessage(getUserInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 98 + case 106: + { + uri_ = input.readStringRequireUtf8(); + + break; + } // case 106 + case 114: + { + referrerUri_ = input.readStringRequireUtf8(); + + break; + } // case 114 + case 122: + { + pageViewId_ = input.readStringRequireUtf8(); + + break; + } // case 122 + case 130: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 130 + case 138: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 138 + case 144: + { + offset_ = input.readInt32(); + + break; + } // case 144 + case 170: + { + sessionId_ = input.readStringRequireUtf8(); + + break; + } // case 170 + case 178: + { + input.readMessage( + getCompletionDetailFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 178 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2.UserEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6305,7 +6206,18 @@ public UserEvent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UserEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEventImportSummary.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEventImportSummary.java index cf7e1679..ed9eb700 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEventImportSummary.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEventImportSummary.java @@ -51,55 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UserEventImportSummary( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - joinedEventsCount_ = input.readInt64(); - break; - } - case 16: - { - unjoinedEventsCount_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ImportConfigProto .internal_static_google_cloud_retail_v2_UserEventImportSummary_descriptor; @@ -172,7 +123,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (unjoinedEventsCount_ != 0L) { output.writeInt64(2, unjoinedEventsCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -187,7 +138,7 @@ public int getSerializedSize() { if (unjoinedEventsCount_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, unjoinedEventsCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -205,7 +156,7 @@ public boolean equals(final java.lang.Object obj) { if (getJoinedEventsCount() != other.getJoinedEventsCount()) return false; if (getUnjoinedEventsCount() != other.getUnjoinedEventsCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -220,7 +171,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getJoinedEventsCount()); hash = (37 * hash) + UNJOINED_EVENTS_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getUnjoinedEventsCount()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -350,17 +301,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.UserEventImportSummary.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -455,7 +399,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.UserEventImportSummary other if (other.getUnjoinedEventsCount() != 0L) { setUnjoinedEventsCount(other.getUnjoinedEventsCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -470,18 +414,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.UserEventImportSummary parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + joinedEventsCount_ = input.readInt64(); + + break; + } // case 8 + case 16: + { + unjoinedEventsCount_ = input.readInt64(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2.UserEventImportSummary) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -624,7 +593,18 @@ public UserEventImportSummary parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UserEventImportSummary(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEventInlineSource.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEventInlineSource.java index 6c0e5348..12d5d2af 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEventInlineSource.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEventInlineSource.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UserEventInlineSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - userEvents_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - userEvents_.add( - input.readMessage( - com.google.cloud.retail.v2.UserEvent.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - userEvents_ = java.util.Collections.unmodifiableList(userEvents_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ImportConfigProto .internal_static_google_cloud_retail_v2_UserEventInlineSource_descriptor; @@ -217,7 +163,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < userEvents_.size(); i++) { output.writeMessage(1, userEvents_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -229,7 +175,7 @@ public int getSerializedSize() { for (int i = 0; i < userEvents_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, userEvents_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -246,7 +192,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2.UserEventInlineSource) obj; if (!getUserEventsList().equals(other.getUserEventsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -261,7 +207,7 @@ public int hashCode() { hash = (37 * hash) + USER_EVENTS_FIELD_NUMBER; hash = (53 * hash) + getUserEventsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -390,19 +336,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.UserEventInlineSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getUserEventsFieldBuilder(); - } } @java.lang.Override @@ -410,10 +347,11 @@ public Builder clear() { super.clear(); if (userEventsBuilder_ == null) { userEvents_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + userEvents_ = null; userEventsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -528,7 +466,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.UserEventInlineSource other) } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -543,17 +481,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.UserEventInlineSource parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2.UserEvent m = + input.readMessage( + com.google.cloud.retail.v2.UserEvent.parser(), extensionRegistry); + if (userEventsBuilder_ == null) { + ensureUserEventsIsMutable(); + userEvents_.add(m); + } else { + userEventsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2.UserEventInlineSource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -975,7 +940,18 @@ public UserEventInlineSource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UserEventInlineSource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEventInputConfig.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEventInputConfig.java index 295d8ae5..2af45e0c 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEventInputConfig.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserEventInputConfig.java @@ -50,94 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UserEventInputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2.UserEventInlineSource.Builder subBuilder = null; - if (sourceCase_ == 1) { - subBuilder = - ((com.google.cloud.retail.v2.UserEventInlineSource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.retail.v2.UserEventInlineSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2.UserEventInlineSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 1; - break; - } - case 18: - { - com.google.cloud.retail.v2.GcsSource.Builder subBuilder = null; - if (sourceCase_ == 2) { - subBuilder = ((com.google.cloud.retail.v2.GcsSource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.retail.v2.GcsSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2.GcsSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 2; - break; - } - case 26: - { - com.google.cloud.retail.v2.BigQuerySource.Builder subBuilder = null; - if (sourceCase_ == 3) { - subBuilder = ((com.google.cloud.retail.v2.BigQuerySource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.retail.v2.BigQuerySource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2.BigQuerySource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 3; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.ImportConfigProto .internal_static_google_cloud_retail_v2_UserEventInputConfig_descriptor; @@ -398,7 +310,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceCase_ == 3) { output.writeMessage(3, (com.google.cloud.retail.v2.BigQuerySource) source_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -422,7 +334,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 3, (com.google.cloud.retail.v2.BigQuerySource) source_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -452,7 +364,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -479,7 +391,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -608,22 +520,24 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.UserEventInputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (userEventInlineSourceBuilder_ != null) { + userEventInlineSourceBuilder_.clear(); + } + if (gcsSourceBuilder_ != null) { + gcsSourceBuilder_.clear(); + } + if (bigQuerySourceBuilder_ != null) { + bigQuerySourceBuilder_.clear(); + } sourceCase_ = 0; source_ = null; return this; @@ -746,7 +660,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.UserEventInputConfig other) break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -761,17 +675,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.UserEventInputConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getUserEventInlineSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getGcsSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getBigQuerySourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 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) { - parsedMessage = (com.google.cloud.retail.v2.UserEventInputConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1506,7 +1453,18 @@ public UserEventInputConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UserEventInputConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserInfo.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserInfo.java index c4ee9c5f..0203b14e 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserInfo.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/UserInfo.java @@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UserInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - userId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - ipAddress_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - userAgent_ = s; - break; - } - case 32: - { - directUserRequest_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.CommonProto .internal_static_google_cloud_retail_v2_UserInfo_descriptor; @@ -388,7 +323,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (directUserRequest_ != false) { output.writeBool(4, directUserRequest_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -409,7 +344,7 @@ public int getSerializedSize() { if (directUserRequest_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, directUserRequest_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +363,7 @@ public boolean equals(final java.lang.Object obj) { if (!getIpAddress().equals(other.getIpAddress())) return false; if (!getUserAgent().equals(other.getUserAgent())) return false; if (getDirectUserRequest() != other.getDirectUserRequest()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -447,7 +382,7 @@ public int hashCode() { hash = (53 * hash) + getUserAgent().hashCode(); hash = (37 * hash) + DIRECT_USER_REQUEST_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDirectUserRequest()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -575,17 +510,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.UserInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -693,7 +621,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.UserInfo other) { if (other.getDirectUserRequest() != false) { setDirectUserRequest(other.getDirectUserRequest()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -708,17 +636,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.UserInfo parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + userId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + ipAddress_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + userAgent_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: + { + directUserRequest_ = input.readBool(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.UserInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1285,7 +1251,18 @@ public UserInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UserInfo(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/WriteUserEventRequest.java b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/WriteUserEventRequest.java index ae5bce7d..774af893 100644 --- a/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/WriteUserEventRequest.java +++ b/proto-google-cloud-retail-v2/src/main/java/com/google/cloud/retail/v2/WriteUserEventRequest.java @@ -52,68 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private WriteUserEventRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2.UserEvent.Builder subBuilder = null; - if (userEvent_ != null) { - subBuilder = userEvent_.toBuilder(); - } - userEvent_ = - input.readMessage( - com.google.cloud.retail.v2.UserEvent.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(userEvent_); - userEvent_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2.UserEventServiceProto .internal_static_google_cloud_retail_v2_WriteUserEventRequest_descriptor; @@ -254,7 +192,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (userEvent_ != null) { output.writeMessage(2, getUserEvent()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -269,7 +207,7 @@ public int getSerializedSize() { if (userEvent_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUserEvent()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -290,7 +228,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUserEvent()) { if (!getUserEvent().equals(other.getUserEvent())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -307,7 +245,7 @@ public int hashCode() { hash = (37 * hash) + USER_EVENT_FIELD_NUMBER; hash = (53 * hash) + getUserEvent().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -436,17 +374,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2.WriteUserEventRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -550,7 +481,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2.WriteUserEventRequest other) if (other.hasUserEvent()) { mergeUserEvent(other.getUserEvent()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -565,17 +496,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2.WriteUserEventRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getUserEventFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = (com.google.cloud.retail.v2.WriteUserEventRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -925,7 +882,18 @@ public WriteUserEventRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new WriteUserEventRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/pom.xml b/proto-google-cloud-retail-v2alpha/pom.xml index c0f4aeaf..cb2be25e 100644 --- a/proto-google-cloud-retail-v2alpha/pom.xml +++ b/proto-google-cloud-retail-v2alpha/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-retail-v2alpha - 2.5.0 + 2.5.1 proto-google-cloud-retail-v2alpha Proto library for google-cloud-retail com.google.cloud google-cloud-retail-parent - 2.5.0 + 2.5.1 diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddCatalogAttributeRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddCatalogAttributeRequest.java index eaa65b5e..df5eb318 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddCatalogAttributeRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddCatalogAttributeRequest.java @@ -54,68 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddCatalogAttributeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - attributesConfig_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.CatalogAttribute.Builder subBuilder = null; - if (catalogAttribute_ != null) { - subBuilder = catalogAttribute_.toBuilder(); - } - catalogAttribute_ = - input.readMessage( - com.google.cloud.retail.v2alpha.CatalogAttribute.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(catalogAttribute_); - catalogAttribute_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogServiceProto .internal_static_google_cloud_retail_v2alpha_AddCatalogAttributeRequest_descriptor; @@ -263,7 +201,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (catalogAttribute_ != null) { output.writeMessage(2, getCatalogAttribute()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -278,7 +216,7 @@ public int getSerializedSize() { if (catalogAttribute_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCatalogAttribute()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -299,7 +237,7 @@ public boolean equals(final java.lang.Object obj) { if (hasCatalogAttribute()) { if (!getCatalogAttribute().equals(other.getCatalogAttribute())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -316,7 +254,7 @@ public int hashCode() { hash = (37 * hash) + CATALOG_ATTRIBUTE_FIELD_NUMBER; hash = (53 * hash) + getCatalogAttribute().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -448,17 +386,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.AddCatalogAttributeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -562,7 +493,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.AddCatalogAttributeRequ if (other.hasCatalogAttribute()) { mergeCatalogAttribute(other.getCatalogAttribute()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -577,18 +508,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.AddCatalogAttributeRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attributesConfig_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage( + getCatalogAttributeFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.AddCatalogAttributeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -959,7 +916,18 @@ public AddCatalogAttributeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddCatalogAttributeRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddControlRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddControlRequest.java index d3f2d9cd..af5fc096 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddControlRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddControlRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddControlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - servingConfig_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - controlId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ServingConfigServiceProto .internal_static_google_cloud_retail_v2alpha_AddControlRequest_descriptor; @@ -247,7 +194,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controlId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, controlId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -262,7 +209,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controlId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, controlId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -280,7 +227,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServingConfig().equals(other.getServingConfig())) return false; if (!getControlId().equals(other.getControlId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -295,7 +242,7 @@ public int hashCode() { hash = (53 * hash) + getServingConfig().hashCode(); hash = (37 * hash) + CONTROL_ID_FIELD_NUMBER; hash = (53 * hash) + getControlId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -424,17 +371,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.AddControlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -531,7 +471,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.AddControlRequest other controlId_ = other.controlId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -546,18 +486,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.AddControlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + servingConfig_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + controlId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.AddControlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -825,7 +790,18 @@ public AddControlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddControlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesMetadata.java index 1f087cf5..2e224411 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesMetadata.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesMetadata.java @@ -53,45 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddFulfillmentPlacesMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_AddFulfillmentPlacesMetadata_descriptor; @@ -121,7 +82,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -130,7 +91,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -146,7 +107,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2alpha.AddFulfillmentPlacesMetadata other = (com.google.cloud.retail.v2alpha.AddFulfillmentPlacesMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -157,7 +118,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -290,17 +251,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.AddFulfillmentPlacesMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -385,7 +339,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.AddFulfillmentPlacesMet if (other == com.google.cloud.retail.v2alpha.AddFulfillmentPlacesMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -400,18 +354,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.AddFulfillmentPlacesMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.AddFulfillmentPlacesMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -448,7 +415,18 @@ public AddFulfillmentPlacesMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddFulfillmentPlacesMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesRequest.java index 0ba58428..ec023d48 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddFulfillmentPlacesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - product_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - placeIds_.add(s); - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (addTime_ != null) { - subBuilder = addTime_.toBuilder(); - } - addTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(addTime_); - addTime_ = subBuilder.buildPartial(); - } - - break; - } - case 40: - { - allowMissing_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = placeIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_AddFulfillmentPlacesRequest_descriptor; @@ -513,7 +426,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (allowMissing_ != false) { output.writeBool(5, allowMissing_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -542,7 +455,7 @@ public int getSerializedSize() { if (allowMissing_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, allowMissing_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -566,7 +479,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAddTime().equals(other.getAddTime())) return false; } if (getAllowMissing() != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -591,7 +504,7 @@ public int hashCode() { } hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -723,17 +636,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.AddFulfillmentPlacesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -868,7 +774,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.AddFulfillmentPlacesReq if (other.getAllowMissing() != false) { setAllowMissing(other.getAllowMissing()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -883,18 +789,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.AddFulfillmentPlacesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + product_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + type_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePlaceIdsIsMutable(); + placeIds_.add(s); + break; + } // case 26 + case 34: + { + input.readMessage(getAddTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 40: + { + allowMissing_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.AddFulfillmentPlacesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1794,7 +1744,18 @@ public AddFulfillmentPlacesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddFulfillmentPlacesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesResponse.java index 8a973b23..a874e8de 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddFulfillmentPlacesResponse.java @@ -53,45 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddFulfillmentPlacesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_AddFulfillmentPlacesResponse_descriptor; @@ -121,7 +82,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -130,7 +91,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -146,7 +107,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2alpha.AddFulfillmentPlacesResponse other = (com.google.cloud.retail.v2alpha.AddFulfillmentPlacesResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -157,7 +118,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -290,17 +251,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.AddFulfillmentPlacesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -385,7 +339,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.AddFulfillmentPlacesRes if (other == com.google.cloud.retail.v2alpha.AddFulfillmentPlacesResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -400,18 +354,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.AddFulfillmentPlacesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.AddFulfillmentPlacesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -448,7 +415,18 @@ public AddFulfillmentPlacesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddFulfillmentPlacesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesMetadata.java index 8fe940af..b2613cae 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesMetadata.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesMetadata.java @@ -53,45 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddLocalInventoriesMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_AddLocalInventoriesMetadata_descriptor; @@ -121,7 +82,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -130,7 +91,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -146,7 +107,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2alpha.AddLocalInventoriesMetadata other = (com.google.cloud.retail.v2alpha.AddLocalInventoriesMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -157,7 +118,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -290,17 +251,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.AddLocalInventoriesMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -383,7 +337,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2alpha.AddLocalInventoriesMetadata other) { if (other == com.google.cloud.retail.v2alpha.AddLocalInventoriesMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -398,18 +352,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.AddLocalInventoriesMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.AddLocalInventoriesMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -445,7 +412,18 @@ public AddLocalInventoriesMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddLocalInventoriesMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesRequest.java index 724814d8..8a9af13a 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesRequest.java @@ -55,103 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddLocalInventoriesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - product_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - localInventories_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - localInventories_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.LocalInventory.parser(), extensionRegistry)); - break; - } - case 34: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (addMask_ != null) { - subBuilder = addMask_.toBuilder(); - } - addMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(addMask_); - addMask_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (addTime_ != null) { - subBuilder = addTime_.toBuilder(); - } - addTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(addTime_); - addTime_ = subBuilder.buildPartial(); - } - - break; - } - case 48: - { - allowMissing_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - localInventories_ = java.util.Collections.unmodifiableList(localInventories_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_AddLocalInventoriesRequest_descriptor; @@ -500,7 +403,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (allowMissing_ != false) { output.writeBool(6, allowMissing_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -524,7 +427,7 @@ public int getSerializedSize() { if (allowMissing_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, allowMissing_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -551,7 +454,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAddTime().equals(other.getAddTime())) return false; } if (getAllowMissing() != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -578,7 +481,7 @@ public int hashCode() { } hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -710,19 +613,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.AddLocalInventoriesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getLocalInventoriesFieldBuilder(); - } } @java.lang.Override @@ -732,10 +626,11 @@ public Builder clear() { if (localInventoriesBuilder_ == null) { localInventories_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + localInventories_ = null; localInventoriesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (addMaskBuilder_ == null) { addMask_ = null; } else { @@ -889,7 +784,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.AddLocalInventoriesRequ if (other.getAllowMissing() != false) { setAllowMissing(other.getAllowMissing()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -904,18 +799,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.AddLocalInventoriesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + product_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.cloud.retail.v2alpha.LocalInventory m = + input.readMessage( + com.google.cloud.retail.v2alpha.LocalInventory.parser(), extensionRegistry); + if (localInventoriesBuilder_ == null) { + ensureLocalInventoriesIsMutable(); + localInventories_.add(m); + } else { + localInventoriesBuilder_.addMessage(m); + } + break; + } // case 18 + case 34: + { + input.readMessage(getAddMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getAddTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 48: + { + allowMissing_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.AddLocalInventoriesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2060,7 +2005,18 @@ public AddLocalInventoriesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddLocalInventoriesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesResponse.java index 57679e19..d1a94b5b 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AddLocalInventoriesResponse.java @@ -55,45 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddLocalInventoriesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_AddLocalInventoriesResponse_descriptor; @@ -123,7 +84,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -132,7 +93,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -148,7 +109,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2alpha.AddLocalInventoriesResponse other = (com.google.cloud.retail.v2alpha.AddLocalInventoriesResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -159,7 +120,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -294,17 +255,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.AddLocalInventoriesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -387,7 +341,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2alpha.AddLocalInventoriesResponse other) { if (other == com.google.cloud.retail.v2alpha.AddLocalInventoriesResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -402,18 +356,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.AddLocalInventoriesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.AddLocalInventoriesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -449,7 +416,18 @@ public AddLocalInventoriesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddLocalInventoriesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AttributesConfig.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AttributesConfig.java index ae2370a3..b57656b6 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AttributesConfig.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/AttributesConfig.java @@ -53,79 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AttributesConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - catalogAttributes_ = - com.google.protobuf.MapField.newMapField( - CatalogAttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.retail.v2alpha.CatalogAttribute> - catalogAttributes__ = - input.readMessage( - CatalogAttributesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - catalogAttributes_ - .getMutableMap() - .put(catalogAttributes__.getKey(), catalogAttributes__.getValue()); - break; - } - case 24: - { - int rawValue = input.readEnum(); - - attributeConfigLevel_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogProto .internal_static_google_cloud_retail_v2alpha_AttributesConfig_descriptor; @@ -421,7 +348,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(3, attributeConfigLevel_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -450,7 +377,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, attributeConfigLevel_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -469,7 +396,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!internalGetCatalogAttributes().equals(other.internalGetCatalogAttributes())) return false; if (attributeConfigLevel_ != other.attributeConfigLevel_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -488,7 +415,7 @@ public int hashCode() { } hash = (37 * hash) + ATTRIBUTE_CONFIG_LEVEL_FIELD_NUMBER; hash = (53 * hash) + attributeConfigLevel_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -637,17 +564,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.retail.v2alpha.AttributesConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -748,7 +668,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.AttributesConfig other) if (other.attributeConfigLevel_ != 0) { setAttributeConfigLevelValue(other.getAttributeConfigLevelValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -763,17 +683,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.AttributesConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.retail.v2alpha.CatalogAttribute> + catalogAttributes__ = + input.readMessage( + CatalogAttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableCatalogAttributes() + .getMutableMap() + .put(catalogAttributes__.getKey(), catalogAttributes__.getValue()); + break; + } // case 18 + case 24: + { + attributeConfigLevel_ = input.readEnum(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2alpha.AttributesConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1276,7 +1235,18 @@ public AttributesConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AttributesConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Audience.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Audience.java index b13da185..26fbe68b 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Audience.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Audience.java @@ -54,72 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Audience( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - genders_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - genders_.add(s); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - ageGroups_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - ageGroups_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - genders_ = genders_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - ageGroups_ = ageGroups_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_Audience_descriptor; @@ -353,7 +287,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < ageGroups_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ageGroups_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -378,7 +312,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getAgeGroupsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -395,7 +329,7 @@ public boolean equals(final java.lang.Object obj) { if (!getGendersList().equals(other.getGendersList())) return false; if (!getAgeGroupsList().equals(other.getAgeGroupsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -414,7 +348,7 @@ public int hashCode() { hash = (37 * hash) + AGE_GROUPS_FIELD_NUMBER; hash = (53 * hash) + getAgeGroupsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -544,17 +478,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Audience.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -671,7 +598,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Audience other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -686,17 +613,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Audience parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureGendersIsMutable(); + genders_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAgeGroupsIsMutable(); + ageGroups_.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) { - parsedMessage = (com.google.cloud.retail.v2alpha.Audience) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1241,7 +1196,18 @@ public Audience parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Audience(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BigQueryOutputResult.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BigQueryOutputResult.java index 47fded68..932d284f 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BigQueryOutputResult.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BigQueryOutputResult.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BigQueryOutputResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - datasetId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - tableId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ExportConfigProto .internal_static_google_cloud_retail_v2alpha_BigQueryOutputResult_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tableId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tableId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDatasetId().equals(other.getDatasetId())) return false; if (!getTableId().equals(other.getTableId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getDatasetId().hashCode(); hash = (37 * hash) + TABLE_ID_FIELD_NUMBER; hash = (53 * hash) + getTableId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.BigQueryOutputResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -523,7 +463,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.BigQueryOutputResult ot tableId_ = other.tableId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -538,18 +478,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.BigQueryOutputResult parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + datasetId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + tableId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.BigQueryOutputResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -797,7 +762,18 @@ public BigQueryOutputResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BigQueryOutputResult(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BigQuerySource.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BigQuerySource.java index 0f4d3c0e..6591cdd3 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BigQuerySource.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/BigQuerySource.java @@ -56,94 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BigQuerySource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - datasetId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - tableId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - gcsStagingDir_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - dataSchema_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - projectId_ = s; - break; - } - case 50: - { - com.google.type.Date.Builder subBuilder = null; - if (partitionCase_ == 6) { - subBuilder = ((com.google.type.Date) partition_).toBuilder(); - } - partition_ = input.readMessage(com.google.type.Date.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.type.Date) partition_); - partition_ = subBuilder.buildPartial(); - } - partitionCase_ = 6; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ImportConfigProto .internal_static_google_cloud_retail_v2alpha_BigQuerySource_descriptor; @@ -592,7 +504,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (partitionCase_ == 6) { output.writeMessage(6, (com.google.type.Date) partition_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -621,7 +533,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 6, (com.google.type.Date) partition_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -650,7 +562,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -679,7 +591,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -808,22 +720,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.BigQuerySource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (partitionDateBuilder_ != null) { + partitionDateBuilder_.clear(); + } projectId_ = ""; datasetId_ = ""; @@ -956,7 +864,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.BigQuerySource other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -971,17 +879,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.BigQuerySource parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + datasetId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + tableId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + gcsStagingDir_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + dataSchema_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + projectId_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + input.readMessage(getPartitionDateFieldBuilder().getBuilder(), extensionRegistry); + partitionCase_ = 6; + 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) { - parsedMessage = (com.google.cloud.retail.v2alpha.BigQuerySource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1917,7 +1875,18 @@ public BigQuerySource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BigQuerySource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Catalog.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Catalog.java index 1705011d..c24adbfa 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Catalog.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Catalog.java @@ -53,93 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Catalog( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 34: - { - com.google.cloud.retail.v2alpha.ProductLevelConfig.Builder subBuilder = null; - if (productLevelConfig_ != null) { - subBuilder = productLevelConfig_.toBuilder(); - } - productLevelConfig_ = - input.readMessage( - com.google.cloud.retail.v2alpha.ProductLevelConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(productLevelConfig_); - productLevelConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - com.google.cloud.retail.v2alpha.MerchantCenterLinkingConfig.Builder subBuilder = null; - if (merchantCenterLinkingConfig_ != null) { - subBuilder = merchantCenterLinkingConfig_.toBuilder(); - } - merchantCenterLinkingConfig_ = - input.readMessage( - com.google.cloud.retail.v2alpha.MerchantCenterLinkingConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(merchantCenterLinkingConfig_); - merchantCenterLinkingConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogProto .internal_static_google_cloud_retail_v2alpha_Catalog_descriptor; @@ -411,7 +324,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (merchantCenterLinkingConfig_ != null) { output.writeMessage(6, getMerchantCenterLinkingConfig()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -434,7 +347,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 6, getMerchantCenterLinkingConfig()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -460,7 +373,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMerchantCenterLinkingConfig().equals(other.getMerchantCenterLinkingConfig())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -483,7 +396,7 @@ public int hashCode() { hash = (37 * hash) + MERCHANT_CENTER_LINKING_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getMerchantCenterLinkingConfig().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -612,17 +525,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Catalog.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -746,7 +652,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Catalog other) { if (other.hasMerchantCenterLinkingConfig()) { mergeMerchantCenterLinkingConfig(other.getMerchantCenterLinkingConfig()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -761,17 +667,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Catalog parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 34: + { + input.readMessage( + getProductLevelConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 50: + { + input.readMessage( + getMerchantCenterLinkingConfigFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = (com.google.cloud.retail.v2alpha.Catalog) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1494,7 +1440,18 @@ public Catalog parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Catalog(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttribute.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttribute.java index acbb6d32..8c69f612 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttribute.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CatalogAttribute.java @@ -58,92 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CatalogAttribute( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - key_ = s; - break; - } - case 40: - { - int rawValue = input.readEnum(); - - indexableOption_ = rawValue; - break; - } - case 48: - { - int rawValue = input.readEnum(); - - dynamicFacetableOption_ = rawValue; - break; - } - case 56: - { - int rawValue = input.readEnum(); - - searchableOption_ = rawValue; - break; - } - case 64: - { - int rawValue = input.readEnum(); - - recommendationsFilteringOption_ = rawValue; - break; - } - case 72: - { - inUse_ = input.readBool(); - break; - } - case 80: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogProto .internal_static_google_cloud_retail_v2alpha_CatalogAttribute_descriptor; @@ -1204,7 +1118,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io != com.google.cloud.retail.v2alpha.CatalogAttribute.AttributeType.UNKNOWN.getNumber()) { output.writeEnum(10, type_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1248,7 +1162,7 @@ public int getSerializedSize() { != com.google.cloud.retail.v2alpha.CatalogAttribute.AttributeType.UNKNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, type_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1271,7 +1185,7 @@ public boolean equals(final java.lang.Object obj) { if (dynamicFacetableOption_ != other.dynamicFacetableOption_) return false; if (searchableOption_ != other.searchableOption_) return false; if (recommendationsFilteringOption_ != other.recommendationsFilteringOption_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1296,7 +1210,7 @@ public int hashCode() { hash = (53 * hash) + searchableOption_; hash = (37 * hash) + RECOMMENDATIONS_FILTERING_OPTION_FIELD_NUMBER; hash = (53 * hash) + recommendationsFilteringOption_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1426,17 +1340,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.CatalogAttribute.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1562,7 +1469,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.CatalogAttribute other) if (other.recommendationsFilteringOption_ != 0) { setRecommendationsFilteringOptionValue(other.getRecommendationsFilteringOptionValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1577,17 +1484,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.CatalogAttribute parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 40: + { + indexableOption_ = input.readEnum(); + + break; + } // case 40 + case 48: + { + dynamicFacetableOption_ = input.readEnum(); + + break; + } // case 48 + case 56: + { + searchableOption_ = input.readEnum(); + + break; + } // case 56 + case 64: + { + recommendationsFilteringOption_ = input.readEnum(); + + break; + } // case 64 + case 72: + { + inUse_ = input.readBool(); + + break; + } // case 72 + case 80: + { + type_ = input.readEnum(); + + break; + } // case 80 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2alpha.CatalogAttribute) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2491,7 +2454,18 @@ public CatalogAttribute parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CatalogAttribute(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CollectUserEventRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CollectUserEventRequest.java index 452f6247..f96c2fc0 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CollectUserEventRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CollectUserEventRequest.java @@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CollectUserEventRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - userEvent_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 32: - { - ets_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.UserEventServiceProto .internal_static_google_cloud_retail_v2alpha_CollectUserEventRequest_descriptor; @@ -337,7 +272,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (ets_ != 0L) { output.writeInt64(4, ets_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -358,7 +293,7 @@ public int getSerializedSize() { if (ets_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, ets_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -378,7 +313,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUserEvent().equals(other.getUserEvent())) return false; if (!getUri().equals(other.getUri())) return false; if (getEts() != other.getEts()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -397,7 +332,7 @@ public int hashCode() { hash = (53 * hash) + getUri().hashCode(); hash = (37 * hash) + ETS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEts()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -527,17 +462,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.CollectUserEventRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -647,7 +575,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.CollectUserEventRequest if (other.getEts() != 0L) { setEts(other.getEts()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -662,18 +590,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.CollectUserEventRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + userEvent_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + uri_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: + { + ets_ = input.readInt64(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.CollectUserEventRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1110,7 +1075,18 @@ public CollectUserEventRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CollectUserEventRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ColorInfo.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ColorInfo.java index ecb78fe3..b9c6181d 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ColorInfo.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ColorInfo.java @@ -53,72 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ColorInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - colorFamilies_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - colorFamilies_.add(s); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - colors_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - colors_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - colorFamilies_ = colorFamilies_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - colors_ = colors_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_ColorInfo_descriptor; @@ -352,7 +286,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < colors_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, colors_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -377,7 +311,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getColorsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -395,7 +329,7 @@ public boolean equals(final java.lang.Object obj) { if (!getColorFamiliesList().equals(other.getColorFamiliesList())) return false; if (!getColorsList().equals(other.getColorsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -414,7 +348,7 @@ public int hashCode() { hash = (37 * hash) + COLORS_FIELD_NUMBER; hash = (53 * hash) + getColorsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -543,17 +477,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ColorInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -670,7 +597,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ColorInfo other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -685,17 +612,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ColorInfo parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureColorFamiliesIsMutable(); + colorFamilies_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureColorsIsMutable(); + colors_.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) { - parsedMessage = (com.google.cloud.retail.v2alpha.ColorInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1240,7 +1195,18 @@ public ColorInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ColorInfo(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequest.java index ebd6d727..3d788e9e 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryRequest.java @@ -57,99 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CompleteQueryRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - catalog_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - query_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - languageCodes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - languageCodes_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - deviceType_ = s; - break; - } - case 40: - { - maxSuggestions_ = input.readInt32(); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - dataset_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - visitorId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - languageCodes_ = languageCodes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CompletionServiceProto .internal_static_google_cloud_retail_v2alpha_CompleteQueryRequest_descriptor; @@ -610,7 +517,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(visitorId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, visitorId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -645,7 +552,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(visitorId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, visitorId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -668,7 +575,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDeviceType().equals(other.getDeviceType())) return false; if (!getDataset().equals(other.getDataset())) return false; if (getMaxSuggestions() != other.getMaxSuggestions()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -695,7 +602,7 @@ public int hashCode() { hash = (53 * hash) + getDataset().hashCode(); hash = (37 * hash) + MAX_SUGGESTIONS_FIELD_NUMBER; hash = (53 * hash) + getMaxSuggestions(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,17 +731,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.CompleteQueryRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -976,7 +876,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.CompleteQueryRequest ot if (other.getMaxSuggestions() != 0) { setMaxSuggestions(other.getMaxSuggestions()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -991,18 +891,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.CompleteQueryRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + catalog_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + query_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLanguageCodesIsMutable(); + languageCodes_.add(s); + break; + } // case 26 + case 34: + { + deviceType_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 40: + { + maxSuggestions_ = input.readInt32(); + + break; + } // case 40 + case 50: + { + dataset_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + visitorId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.CompleteQueryRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2000,7 +1956,18 @@ public CompleteQueryRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CompleteQueryRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponse.java index 07a067ab..7da6edc2 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompleteQueryResponse.java @@ -54,89 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CompleteQueryResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - completionResults_ = - new java.util.ArrayList< - com.google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult>(); - mutable_bitField0_ |= 0x00000001; - } - completionResults_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult - .parser(), - extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - attributionToken_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - recentSearchResults_ = - new java.util.ArrayList< - com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult>(); - mutable_bitField0_ |= 0x00000002; - } - recentSearchResults_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult - .parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - completionResults_ = java.util.Collections.unmodifiableList(completionResults_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - recentSearchResults_ = java.util.Collections.unmodifiableList(recentSearchResults_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CompletionServiceProto .internal_static_google_cloud_retail_v2alpha_CompleteQueryResponse_descriptor; @@ -307,70 +224,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CompletionResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - suggestion_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - attributes_ = - com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.retail.v2alpha.CustomAttribute> - attributes__ = - input.readMessage( - AttributesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - attributes_.getMutableMap().put(attributes__.getKey(), attributes__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CompletionServiceProto .internal_static_google_cloud_retail_v2alpha_CompleteQueryResponse_CompletionResult_descriptor; @@ -602,7 +455,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 2); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -626,7 +479,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, attributes__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -645,7 +498,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSuggestion().equals(other.getSuggestion())) return false; if (!internalGetAttributes().equals(other.internalGetAttributes())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -662,7 +515,7 @@ public int hashCode() { hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; hash = (53 * hash) + internalGetAttributes().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -817,17 +670,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { // Construct using // com.google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -931,7 +777,7 @@ public Builder mergeFrom( onChanged(); } internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -946,19 +792,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + suggestion_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.retail.v2alpha.CustomAttribute> + attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .getMutableMap() + .put(attributes__.getKey(), attributes__.getValue()); + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1328,7 +1205,19 @@ public CompletionResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CompletionResult(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1412,52 +1301,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RecentSearchResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - recentSearch_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CompletionServiceProto .internal_static_google_cloud_retail_v2alpha_CompleteQueryResponse_RecentSearchResult_descriptor; @@ -1540,7 +1383,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recentSearch_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, recentSearch_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1552,7 +1395,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recentSearch_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, recentSearch_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1570,7 +1413,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult) obj; if (!getRecentSearch().equals(other.getRecentSearch())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1583,7 +1426,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + RECENT_SEARCH_FIELD_NUMBER; hash = (53 * hash) + getRecentSearch().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1723,17 +1566,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1833,7 +1669,7 @@ public Builder mergeFrom( recentSearch_ = other.recentSearch_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1848,20 +1684,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult parsedMessage = - null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + recentSearch_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2007,7 +1860,19 @@ public RecentSearchResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RecentSearchResult(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2349,7 +2214,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < recentSearchResults_.size(); i++) { output.writeMessage(3, recentSearchResults_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2369,7 +2234,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, recentSearchResults_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2388,7 +2253,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCompletionResultsList().equals(other.getCompletionResultsList())) return false; if (!getAttributionToken().equals(other.getAttributionToken())) return false; if (!getRecentSearchResultsList().equals(other.getRecentSearchResultsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2409,7 +2274,7 @@ public int hashCode() { hash = (37 * hash) + RECENT_SEARCH_RESULTS_FIELD_NUMBER; hash = (53 * hash) + getRecentSearchResultsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2539,20 +2404,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.CompleteQueryResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCompletionResultsFieldBuilder(); - getRecentSearchResultsFieldBuilder(); - } } @java.lang.Override @@ -2560,18 +2415,20 @@ public Builder clear() { super.clear(); if (completionResultsBuilder_ == null) { completionResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + completionResults_ = null; completionResultsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); attributionToken_ = ""; if (recentSearchResultsBuilder_ == null) { recentSearchResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + recentSearchResults_ = null; recentSearchResultsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -2727,7 +2584,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.CompleteQueryResponse o } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2742,18 +2599,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.CompleteQueryResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult m = + input.readMessage( + com.google.cloud.retail.v2alpha.CompleteQueryResponse.CompletionResult + .parser(), + extensionRegistry); + if (completionResultsBuilder_ == null) { + ensureCompletionResultsIsMutable(); + completionResults_.add(m); + } else { + completionResultsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + attributionToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult m = + input.readMessage( + com.google.cloud.retail.v2alpha.CompleteQueryResponse.RecentSearchResult + .parser(), + extensionRegistry); + if (recentSearchResultsBuilder_ == null) { + ensureRecentSearchResultsIsMutable(); + recentSearchResults_.add(m); + } else { + recentSearchResultsBuilder_.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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.CompleteQueryResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4014,7 +3920,18 @@ public CompleteQueryResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CompleteQueryResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfig.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfig.java index f807a0be..5b959f7a 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfig.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionConfig.java @@ -57,146 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CompletionConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - matchingOrder_ = s; - break; - } - case 24: - { - maxSuggestions_ = input.readInt32(); - break; - } - case 32: - { - minPrefixLength_ = input.readInt32(); - break; - } - case 42: - { - com.google.cloud.retail.v2alpha.CompletionDataInputConfig.Builder subBuilder = null; - if (suggestionsInputConfig_ != null) { - subBuilder = suggestionsInputConfig_.toBuilder(); - } - suggestionsInputConfig_ = - input.readMessage( - com.google.cloud.retail.v2alpha.CompletionDataInputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(suggestionsInputConfig_); - suggestionsInputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - lastSuggestionsImportOperation_ = s; - break; - } - case 58: - { - com.google.cloud.retail.v2alpha.CompletionDataInputConfig.Builder subBuilder = null; - if (denylistInputConfig_ != null) { - subBuilder = denylistInputConfig_.toBuilder(); - } - denylistInputConfig_ = - input.readMessage( - com.google.cloud.retail.v2alpha.CompletionDataInputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(denylistInputConfig_); - denylistInputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - lastDenylistImportOperation_ = s; - break; - } - case 74: - { - com.google.cloud.retail.v2alpha.CompletionDataInputConfig.Builder subBuilder = null; - if (allowlistInputConfig_ != null) { - subBuilder = allowlistInputConfig_.toBuilder(); - } - allowlistInputConfig_ = - input.readMessage( - com.google.cloud.retail.v2alpha.CompletionDataInputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(allowlistInputConfig_); - allowlistInputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - lastAllowlistImportOperation_ = s; - break; - } - case 88: - { - autoLearning_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogProto .internal_static_google_cloud_retail_v2alpha_CompletionConfig_descriptor; @@ -783,7 +643,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (autoLearning_ != false) { output.writeBool(11, autoLearning_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -832,7 +692,7 @@ public int getSerializedSize() { if (autoLearning_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, autoLearning_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -871,7 +731,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getLastAllowlistImportOperation().equals(other.getLastAllowlistImportOperation())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -910,7 +770,7 @@ public int hashCode() { } hash = (37 * hash) + LAST_ALLOWLIST_IMPORT_OPERATION_FIELD_NUMBER; hash = (53 * hash) + getLastAllowlistImportOperation().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1040,17 +900,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.CompletionConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1228,7 +1081,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.CompletionConfig other) lastAllowlistImportOperation_ = other.lastAllowlistImportOperation_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1243,17 +1096,100 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.CompletionConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + matchingOrder_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + maxSuggestions_ = input.readInt32(); + + break; + } // case 24 + case 32: + { + minPrefixLength_ = input.readInt32(); + + break; + } // case 32 + case 42: + { + input.readMessage( + getSuggestionsInputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + lastSuggestionsImportOperation_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + input.readMessage( + getDenylistInputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 66: + { + lastDenylistImportOperation_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 74: + { + input.readMessage( + getAllowlistInputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 74 + case 82: + { + lastAllowlistImportOperation_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 88: + { + autoLearning_ = input.readBool(); + + break; + } // case 88 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2alpha.CompletionConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2764,7 +2700,18 @@ public CompletionConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CompletionConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionDataInputConfig.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionDataInputConfig.java index 5947ba72..092a9727 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionDataInputConfig.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionDataInputConfig.java @@ -50,61 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CompletionDataInputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2alpha.BigQuerySource.Builder subBuilder = null; - if (sourceCase_ == 1) { - subBuilder = ((com.google.cloud.retail.v2alpha.BigQuerySource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.retail.v2alpha.BigQuerySource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2alpha.BigQuerySource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 1; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ImportConfigProto .internal_static_google_cloud_retail_v2alpha_CompletionDataInputConfig_descriptor; @@ -247,7 +192,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceCase_ == 1) { output.writeMessage(1, (com.google.cloud.retail.v2alpha.BigQuerySource) source_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -261,7 +206,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 1, (com.google.cloud.retail.v2alpha.BigQuerySource) source_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -285,7 +230,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -304,7 +249,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -434,22 +379,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.CompletionDataInputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (bigQuerySourceBuilder_ != null) { + bigQuerySourceBuilder_.clear(); + } sourceCase_ = 0; source_ = null; return this; @@ -548,7 +489,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.CompletionDataInputConf break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -563,18 +504,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.CompletionDataInputConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getBigQuerySourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.CompletionDataInputConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -879,7 +839,18 @@ public CompletionDataInputConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CompletionDataInputConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionDetail.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionDetail.java index a14ebe51..0d03cb4d 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionDetail.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CompletionDetail.java @@ -54,64 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CompletionDetail( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - completionAttributionToken_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - selectedSuggestion_ = s; - break; - } - case 24: - { - selectedPosition_ = input.readInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.UserEventProto .internal_static_google_cloud_retail_v2alpha_CompletionDetail_descriptor; @@ -272,7 +214,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (selectedPosition_ != 0) { output.writeInt32(3, selectedPosition_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -291,7 +233,7 @@ public int getSerializedSize() { if (selectedPosition_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, selectedPosition_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -311,7 +253,7 @@ public boolean equals(final java.lang.Object obj) { return false; if (!getSelectedSuggestion().equals(other.getSelectedSuggestion())) return false; if (getSelectedPosition() != other.getSelectedPosition()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +270,7 @@ public int hashCode() { hash = (53 * hash) + getSelectedSuggestion().hashCode(); hash = (37 * hash) + SELECTED_POSITION_FIELD_NUMBER; hash = (53 * hash) + getSelectedPosition(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -458,17 +400,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.CompletionDetail.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -571,7 +506,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.CompletionDetail other) if (other.getSelectedPosition() != 0) { setSelectedPosition(other.getSelectedPosition()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -586,17 +521,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.CompletionDetail parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + completionAttributionToken_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + selectedSuggestion_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + selectedPosition_ = input.readInt32(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2alpha.CompletionDetail) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -912,7 +879,18 @@ public CompletionDetail parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CompletionDetail(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Condition.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Condition.java index 881623ae..f2f7426b 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Condition.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Condition.java @@ -58,78 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Condition( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - queryTerms_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.Condition.QueryTerm.parser(), - extensionRegistry)); - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - activeTimeRange_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - activeTimeRange_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.Condition.TimeRange.parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = java.util.Collections.unmodifiableList(queryTerms_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - activeTimeRange_ = java.util.Collections.unmodifiableList(activeTimeRange_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_Condition_descriptor; @@ -232,57 +160,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private QueryTerm( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - value_ = s; - break; - } - case 16: - { - fullMatch_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_Condition_QueryTerm_descriptor; @@ -395,7 +272,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (fullMatch_ != false) { output.writeBool(2, fullMatch_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -410,7 +287,7 @@ public int getSerializedSize() { if (fullMatch_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, fullMatch_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +305,7 @@ public boolean equals(final java.lang.Object obj) { if (!getValue().equals(other.getValue())) return false; if (getFullMatch() != other.getFullMatch()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -443,7 +320,7 @@ public int hashCode() { hash = (53 * hash) + getValue().hashCode(); hash = (37 * hash) + FULL_MATCH_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFullMatch()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -575,17 +452,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Condition.QueryTerm.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -683,7 +553,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Condition.QueryTerm oth if (other.getFullMatch() != false) { setFullMatch(other.getFullMatch()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -698,18 +568,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Condition.QueryTerm parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + value_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + fullMatch_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.Condition.QueryTerm) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -929,7 +824,19 @@ public QueryTerm parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryTerm(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1056,75 +963,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TimeRange( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_Condition_TimeRange_descriptor; @@ -1252,7 +1090,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (endTime_ != null) { output.writeMessage(2, getEndTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1267,7 +1105,7 @@ public int getSerializedSize() { if (endTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1291,7 +1129,7 @@ public boolean equals(final java.lang.Object obj) { if (hasEndTime()) { if (!getEndTime().equals(other.getEndTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1310,7 +1148,7 @@ public int hashCode() { hash = (37 * hash) + END_TIME_FIELD_NUMBER; hash = (53 * hash) + getEndTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1443,17 +1281,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Condition.TimeRange.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1566,7 +1397,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Condition.TimeRange oth if (other.hasEndTime()) { mergeEndTime(other.getEndTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1581,18 +1412,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Condition.TimeRange parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.Condition.TimeRange) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1993,7 +1849,19 @@ public TimeRange parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TimeRange(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2193,7 +2061,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < activeTimeRange_.size(); i++) { output.writeMessage(3, activeTimeRange_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2208,7 +2076,7 @@ public int getSerializedSize() { for (int i = 0; i < activeTimeRange_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, activeTimeRange_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2226,7 +2094,7 @@ public boolean equals(final java.lang.Object obj) { if (!getQueryTermsList().equals(other.getQueryTermsList())) return false; if (!getActiveTimeRangeList().equals(other.getActiveTimeRangeList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2245,7 +2113,7 @@ public int hashCode() { hash = (37 * hash) + ACTIVE_TIME_RANGE_FIELD_NUMBER; hash = (53 * hash) + getActiveTimeRangeList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2379,20 +2247,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Condition.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getQueryTermsFieldBuilder(); - getActiveTimeRangeFieldBuilder(); - } } @java.lang.Override @@ -2400,16 +2258,18 @@ public Builder clear() { super.clear(); if (queryTermsBuilder_ == null) { queryTerms_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + queryTerms_ = null; queryTermsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (activeTimeRangeBuilder_ == null) { activeTimeRange_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + activeTimeRange_ = null; activeTimeRangeBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -2559,7 +2419,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Condition other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2574,17 +2434,59 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Condition parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2alpha.Condition.QueryTerm m = + input.readMessage( + com.google.cloud.retail.v2alpha.Condition.QueryTerm.parser(), + extensionRegistry); + if (queryTermsBuilder_ == null) { + ensureQueryTermsIsMutable(); + queryTerms_.add(m); + } else { + queryTermsBuilder_.addMessage(m); + } + break; + } // case 10 + case 26: + { + com.google.cloud.retail.v2alpha.Condition.TimeRange m = + input.readMessage( + com.google.cloud.retail.v2alpha.Condition.TimeRange.parser(), + extensionRegistry); + if (activeTimeRangeBuilder_ == null) { + ensureActiveTimeRangeIsMutable(); + activeTimeRange_.add(m); + } else { + activeTimeRangeBuilder_.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) { - parsedMessage = (com.google.cloud.retail.v2alpha.Condition) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3414,7 +3316,18 @@ public Condition parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Condition(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Control.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Control.java index 0eb3a721..ad1a92b1 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Control.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Control.java @@ -57,165 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Control( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: - { - com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec.Builder subBuilder = null; - if (controlCase_ == 3) { - subBuilder = - ((com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec) control_) - .toBuilder(); - } - control_ = - input.readMessage( - com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec) control_); - control_ = subBuilder.buildPartial(); - } - controlCase_ = 3; - break; - } - case 34: - { - com.google.cloud.retail.v2alpha.Rule.Builder subBuilder = null; - if (controlCase_ == 4) { - subBuilder = ((com.google.cloud.retail.v2alpha.Rule) control_).toBuilder(); - } - control_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Rule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2alpha.Rule) control_); - control_ = subBuilder.buildPartial(); - } - controlCase_ = 4; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - associatedServingConfigIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - associatedServingConfigIds_.add(s); - break; - } - case 48: - { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - solutionTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - solutionTypes_.add(rawValue); - break; - } - case 50: - { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while (input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - solutionTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - solutionTypes_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - case 56: - { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - searchSolutionUseCase_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - searchSolutionUseCase_.add(rawValue); - break; - } - case 58: - { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while (input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - searchSolutionUseCase_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000004; - } - searchSolutionUseCase_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - associatedServingConfigIds_ = associatedServingConfigIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - solutionTypes_ = java.util.Collections.unmodifiableList(solutionTypes_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - searchSolutionUseCase_ = java.util.Collections.unmodifiableList(searchSolutionUseCase_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ControlProto .internal_static_google_cloud_retail_v2alpha_Control_descriptor; @@ -879,7 +720,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < searchSolutionUseCase_.size(); i++) { output.writeEnumNoTag(searchSolutionUseCase_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -939,7 +780,7 @@ public int getSerializedSize() { } searchSolutionUseCaseMemoizedSerializedSize = dataSize; } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -971,7 +812,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1010,7 +851,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1140,22 +981,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Control.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (facetSpecBuilder_ != null) { + facetSpecBuilder_.clear(); + } + if (ruleBuilder_ != null) { + ruleBuilder_.clear(); + } name_ = ""; displayName_ = ""; @@ -1331,7 +1171,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Control other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1346,17 +1186,100 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Control parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getFacetSpecFieldBuilder().getBuilder(), extensionRegistry); + controlCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(getRuleFieldBuilder().getBuilder(), extensionRegistry); + controlCase_ = 4; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAssociatedServingConfigIdsIsMutable(); + associatedServingConfigIds_.add(s); + break; + } // case 42 + case 48: + { + int tmpRaw = input.readEnum(); + ensureSolutionTypesIsMutable(); + solutionTypes_.add(tmpRaw); + break; + } // case 48 + case 50: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureSolutionTypesIsMutable(); + solutionTypes_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 50 + case 56: + { + int tmpRaw = input.readEnum(); + ensureSearchSolutionUseCaseIsMutable(); + searchSolutionUseCase_.add(tmpRaw); + break; + } // case 56 + case 58: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureSearchSolutionUseCaseIsMutable(); + searchSolutionUseCase_.add(tmpRaw); + } + input.popLimit(oldLimit); + 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) { - parsedMessage = (com.google.cloud.retail.v2alpha.Control) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2890,7 +2813,18 @@ public Control parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Control(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateControlRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateControlRequest.java index 091beafc..f75bdded 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateControlRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateControlRequest.java @@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateControlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.Control.Builder subBuilder = null; - if (control_ != null) { - subBuilder = control_.toBuilder(); - } - control_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Control.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(control_); - control_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - controlId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ControlServiceProto .internal_static_google_cloud_retail_v2alpha_CreateControlRequest_descriptor; @@ -324,7 +255,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controlId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, controlId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -342,7 +273,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controlId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, controlId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -364,7 +295,7 @@ public boolean equals(final java.lang.Object obj) { if (!getControl().equals(other.getControl())) return false; } if (!getControlId().equals(other.getControlId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -383,7 +314,7 @@ public int hashCode() { } hash = (37 * hash) + CONTROL_ID_FIELD_NUMBER; hash = (53 * hash) + getControlId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -512,17 +443,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.CreateControlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -633,7 +557,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.CreateControlRequest ot controlId_ = other.controlId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -648,18 +572,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.CreateControlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getControlFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + controlId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.CreateControlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1140,7 +1095,18 @@ public CreateControlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateControlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelMetadata.java index f8ae1c64..bf727b60 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelMetadata.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelMetadata.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateModelMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - model_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ModelServiceProto .internal_static_google_cloud_retail_v2alpha_CreateModelMetadata_descriptor; @@ -183,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +149,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -212,7 +166,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.CreateModelMetadata) obj; if (!getModel().equals(other.getModel())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -225,7 +179,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + MODEL_FIELD_NUMBER; hash = (53 * hash) + getModel().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -354,17 +308,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.CreateModelMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -454,7 +401,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.CreateModelMetadata oth model_ = other.model_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -469,18 +416,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.CreateModelMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + model_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.CreateModelMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -632,7 +598,18 @@ public CreateModelMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateModelMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelRequest.java index 002ba140..be664bd4 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateModelRequest.java @@ -52,73 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateModelRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.Model.Builder subBuilder = null; - if (model_ != null) { - subBuilder = model_.toBuilder(); - } - model_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Model.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(model_); - model_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - dryRun_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ModelServiceProto .internal_static_google_cloud_retail_v2alpha_CreateModelRequest_descriptor; @@ -280,7 +213,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (dryRun_ != false) { output.writeBool(3, dryRun_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -298,7 +231,7 @@ public int getSerializedSize() { if (dryRun_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, dryRun_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -320,7 +253,7 @@ public boolean equals(final java.lang.Object obj) { if (!getModel().equals(other.getModel())) return false; } if (getDryRun() != other.getDryRun()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -339,7 +272,7 @@ public int hashCode() { } hash = (37 * hash) + DRY_RUN_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDryRun()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -468,17 +401,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.CreateModelRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -588,7 +514,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.CreateModelRequest othe if (other.getDryRun() != false) { setDryRun(other.getDryRun()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -603,18 +529,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.CreateModelRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getModelFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + dryRun_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.CreateModelRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1016,7 +973,18 @@ public CreateModelRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateModelRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateProductRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateProductRequest.java index fc88dc07..06f0dc7f 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateProductRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateProductRequest.java @@ -55,75 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - productId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_CreateProductRequest_descriptor; @@ -342,7 +273,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -360,7 +291,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -382,7 +313,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProduct().equals(other.getProduct())) return false; } if (!getProductId().equals(other.getProductId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -401,7 +332,7 @@ public int hashCode() { } hash = (37 * hash) + PRODUCT_ID_FIELD_NUMBER; hash = (53 * hash) + getProductId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -532,17 +463,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.CreateProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -653,7 +577,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.CreateProductRequest ot productId_ = other.productId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -668,18 +592,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.CreateProductRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getProductFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + productId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.CreateProductRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1200,7 +1155,18 @@ public CreateProductRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateProductRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateServingConfigRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateServingConfigRequest.java index 3b85a1ed..3ba109de 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateServingConfigRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CreateServingConfigRequest.java @@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateServingConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.ServingConfig.Builder subBuilder = null; - if (servingConfig_ != null) { - subBuilder = servingConfig_.toBuilder(); - } - servingConfig_ = - input.readMessage( - com.google.cloud.retail.v2alpha.ServingConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(servingConfig_); - servingConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - servingConfigId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ServingConfigServiceProto .internal_static_google_cloud_retail_v2alpha_CreateServingConfigRequest_descriptor; @@ -324,7 +255,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servingConfigId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, servingConfigId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -342,7 +273,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servingConfigId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, servingConfigId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -364,7 +295,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServingConfig().equals(other.getServingConfig())) return false; } if (!getServingConfigId().equals(other.getServingConfigId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -383,7 +314,7 @@ public int hashCode() { } hash = (37 * hash) + SERVING_CONFIG_ID_FIELD_NUMBER; hash = (53 * hash) + getServingConfigId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -513,17 +444,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.CreateServingConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -634,7 +558,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.CreateServingConfigRequ servingConfigId_ = other.servingConfigId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -649,18 +573,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.CreateServingConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getServingConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + servingConfigId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.CreateServingConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1142,7 +1097,18 @@ public CreateServingConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateServingConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttribute.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttribute.java index 810165b5..4ab3baa6 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttribute.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/CustomAttribute.java @@ -54,97 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CustomAttribute( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - text_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - text_.add(s); - break; - } - case 17: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - numbers_ = newDoubleList(); - mutable_bitField0_ |= 0x00000002; - } - numbers_.addDouble(input.readDouble()); - break; - } - case 18: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { - numbers_ = newDoubleList(); - mutable_bitField0_ |= 0x00000002; - } - while (input.getBytesUntilLimit() > 0) { - numbers_.addDouble(input.readDouble()); - } - input.popLimit(limit); - break; - } - case 24: - { - bitField0_ |= 0x00000001; - searchable_ = input.readBool(); - break; - } - case 32: - { - bitField0_ |= 0x00000002; - indexable_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - text_ = text_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - numbers_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_CustomAttribute_descriptor; @@ -470,7 +379,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeBool(4, indexable_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -503,7 +412,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, indexable_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -529,7 +438,7 @@ public boolean equals(final java.lang.Object obj) { if (hasIndexable()) { if (getIndexable() != other.getIndexable()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -556,7 +465,7 @@ public int hashCode() { hash = (37 * hash) + INDEXABLE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIndexable()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -686,17 +595,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.CustomAttribute.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -834,7 +736,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.CustomAttribute other) if (other.hasIndexable()) { setIndexable(other.getIndexable()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -849,17 +751,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.CustomAttribute parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTextIsMutable(); + text_.add(s); + break; + } // case 10 + case 17: + { + double v = input.readDouble(); + ensureNumbersIsMutable(); + numbers_.addDouble(v); + break; + } // case 17 + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureNumbersIsMutable(); + while (input.getBytesUntilLimit() > 0) { + numbers_.addDouble(input.readDouble()); + } + input.popLimit(limit); + break; + } // case 18 + case 24: + { + searchable_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + indexable_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2alpha.CustomAttribute) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1539,7 +1492,18 @@ public CustomAttribute parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CustomAttribute(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteControlRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteControlRequest.java index a238b1f5..cb318bcb 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteControlRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteControlRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteControlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ControlServiceProto .internal_static_google_cloud_retail_v2alpha_DeleteControlRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.DeleteControlRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.DeleteControlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -456,7 +403,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.DeleteControlRequest ot name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -471,18 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.DeleteControlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.DeleteControlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -639,7 +605,18 @@ public DeleteControlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteControlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteModelRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteModelRequest.java index 89bbdef7..008d654d 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteModelRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteModelRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteModelRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ModelServiceProto .internal_static_google_cloud_retail_v2alpha_DeleteModelRequest_descriptor; @@ -187,7 +141,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -199,7 +153,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -216,7 +170,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.DeleteModelRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -229,7 +183,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -358,17 +312,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.DeleteModelRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -458,7 +405,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.DeleteModelRequest othe name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -473,18 +420,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.DeleteModelRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.DeleteModelRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -646,7 +612,18 @@ public DeleteModelRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteModelRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteProductRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteProductRequest.java index e5d3337d..5f8ff0eb 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteProductRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteProductRequest.java @@ -54,52 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_DeleteProductRequest_descriptor; @@ -219,7 +173,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -231,7 +185,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -248,7 +202,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.DeleteProductRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -261,7 +215,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -392,17 +346,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.DeleteProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -492,7 +439,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.DeleteProductRequest ot name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -507,18 +454,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.DeleteProductRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.DeleteProductRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -755,7 +721,18 @@ public DeleteProductRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteProductRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteServingConfigRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteServingConfigRequest.java index 5b9db0ec..7ea1af23 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteServingConfigRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/DeleteServingConfigRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteServingConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ServingConfigServiceProto .internal_static_google_cloud_retail_v2alpha_DeleteServingConfigRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.DeleteServingConfigRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.DeleteServingConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -457,7 +404,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.DeleteServingConfigRequ name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -472,18 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.DeleteServingConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.DeleteServingConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -640,7 +606,18 @@ public DeleteServingConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteServingConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportErrorsConfig.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportErrorsConfig.java index 87ef20d4..4cf9a49b 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportErrorsConfig.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportErrorsConfig.java @@ -50,52 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExportErrorsConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - destinationCase_ = 1; - destination_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ExportConfigProto .internal_static_google_cloud_retail_v2alpha_ExportErrorsConfig_descriptor; @@ -251,7 +205,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (destinationCase_ == 1) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destination_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -263,7 +217,7 @@ public int getSerializedSize() { if (destinationCase_ == 1) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destination_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -287,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -306,7 +260,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -435,17 +389,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ExportErrorsConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -547,7 +494,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ExportErrorsConfig othe break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -562,18 +509,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ExportErrorsConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 1; + destination_ = s; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ExportErrorsConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -775,7 +742,18 @@ public ExportErrorsConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportErrorsConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportMetadata.java index 43649d8c..f692e583 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportMetadata.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportMetadata.java @@ -51,75 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExportMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ExportConfigProto .internal_static_google_cloud_retail_v2alpha_ExportMetadata_descriptor; @@ -250,7 +181,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateTime_ != null) { output.writeMessage(2, getUpdateTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -265,7 +196,7 @@ public int getSerializedSize() { if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -289,7 +220,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateTime()) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -308,7 +239,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getUpdateTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -438,17 +369,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ExportMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -558,7 +482,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ExportMetadata other) { if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -573,17 +497,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ExportMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = (com.google.cloud.retail.v2alpha.ExportMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -994,7 +944,18 @@ public ExportMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportProductsResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportProductsResponse.java index fd13a28f..1d09c217 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportProductsResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportProductsResponse.java @@ -54,92 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExportProductsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - errorSamples_.add( - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.ExportErrorsConfig.Builder subBuilder = null; - if (errorsConfig_ != null) { - subBuilder = errorsConfig_.toBuilder(); - } - errorsConfig_ = - input.readMessage( - com.google.cloud.retail.v2alpha.ExportErrorsConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(errorsConfig_); - errorsConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.retail.v2alpha.OutputResult.Builder subBuilder = null; - if (outputResult_ != null) { - subBuilder = outputResult_.toBuilder(); - } - outputResult_ = - input.readMessage( - com.google.cloud.retail.v2alpha.OutputResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputResult_); - outputResult_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = java.util.Collections.unmodifiableList(errorSamples_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ExportConfigProto .internal_static_google_cloud_retail_v2alpha_ExportProductsResponse_descriptor; @@ -342,7 +256,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (outputResult_ != null) { output.writeMessage(3, getOutputResult()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -360,7 +274,7 @@ public int getSerializedSize() { if (outputResult_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOutputResult()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -385,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasOutputResult()) { if (!getOutputResult().equals(other.getOutputResult())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -408,7 +322,7 @@ public int hashCode() { hash = (37 * hash) + OUTPUT_RESULT_FIELD_NUMBER; hash = (53 * hash) + getOutputResult().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -540,19 +454,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ExportProductsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getErrorSamplesFieldBuilder(); - } } @java.lang.Override @@ -560,10 +465,11 @@ public Builder clear() { super.clear(); if (errorSamplesBuilder_ == null) { errorSamples_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + errorSamples_ = null; errorSamplesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (errorsConfigBuilder_ == null) { errorsConfig_ = null; } else { @@ -706,7 +612,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ExportProductsResponse if (other.hasOutputResult()) { mergeOutputResult(other.getOutputResult()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,18 +627,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ExportProductsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(m); + } else { + errorSamplesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage(getErrorsConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getOutputResultFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ExportProductsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1480,7 +1423,18 @@ public ExportProductsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportProductsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportUserEventsResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportUserEventsResponse.java index 0fc634f3..756324f4 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportUserEventsResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ExportUserEventsResponse.java @@ -54,92 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExportUserEventsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - errorSamples_.add( - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.ExportErrorsConfig.Builder subBuilder = null; - if (errorsConfig_ != null) { - subBuilder = errorsConfig_.toBuilder(); - } - errorsConfig_ = - input.readMessage( - com.google.cloud.retail.v2alpha.ExportErrorsConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(errorsConfig_); - errorsConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.retail.v2alpha.OutputResult.Builder subBuilder = null; - if (outputResult_ != null) { - subBuilder = outputResult_.toBuilder(); - } - outputResult_ = - input.readMessage( - com.google.cloud.retail.v2alpha.OutputResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputResult_); - outputResult_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = java.util.Collections.unmodifiableList(errorSamples_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ExportConfigProto .internal_static_google_cloud_retail_v2alpha_ExportUserEventsResponse_descriptor; @@ -342,7 +256,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (outputResult_ != null) { output.writeMessage(3, getOutputResult()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -360,7 +274,7 @@ public int getSerializedSize() { if (outputResult_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOutputResult()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -385,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasOutputResult()) { if (!getOutputResult().equals(other.getOutputResult())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -408,7 +322,7 @@ public int hashCode() { hash = (37 * hash) + OUTPUT_RESULT_FIELD_NUMBER; hash = (53 * hash) + getOutputResult().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -540,19 +454,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ExportUserEventsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getErrorSamplesFieldBuilder(); - } } @java.lang.Override @@ -560,10 +465,11 @@ public Builder clear() { super.clear(); if (errorSamplesBuilder_ == null) { errorSamples_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + errorSamples_ = null; errorSamplesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (errorsConfigBuilder_ == null) { errorsConfig_ = null; } else { @@ -706,7 +612,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ExportUserEventsRespons if (other.hasOutputResult()) { mergeOutputResult(other.getOutputResult()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,18 +627,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ExportUserEventsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(m); + } else { + errorSamplesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage(getErrorsConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getOutputResultFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ExportUserEventsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1480,7 +1423,18 @@ public ExportUserEventsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportUserEventsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/FulfillmentInfo.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/FulfillmentInfo.java index 930f9c47..192ccc11 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/FulfillmentInfo.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/FulfillmentInfo.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FulfillmentInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - type_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - placeIds_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = placeIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_FulfillmentInfo_descriptor; @@ -319,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < placeIds_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, placeIds_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -339,7 +279,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getPlaceIdsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -357,7 +297,7 @@ public boolean equals(final java.lang.Object obj) { if (!getType().equals(other.getType())) return false; if (!getPlaceIdsList().equals(other.getPlaceIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -374,7 +314,7 @@ public int hashCode() { hash = (37 * hash) + PLACE_IDS_FIELD_NUMBER; hash = (53 * hash) + getPlaceIdsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -504,17 +444,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.FulfillmentInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -622,7 +555,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.FulfillmentInfo other) } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -637,17 +570,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.FulfillmentInfo parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + type_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePlaceIdsIsMutable(); + placeIds_.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) { - parsedMessage = (com.google.cloud.retail.v2alpha.FulfillmentInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1101,7 +1061,18 @@ public FulfillmentInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FulfillmentInfo(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GcsSource.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GcsSource.java index 90e67350..b547a3ea 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GcsSource.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GcsSource.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GcsSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - inputUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - inputUris_.add(s); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - dataSchema_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - inputUris_ = inputUris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ImportConfigProto .internal_static_google_cloud_retail_v2alpha_GcsSource_descriptor; @@ -321,7 +261,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataSchema_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dataSchema_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -341,7 +281,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataSchema_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dataSchema_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -359,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInputUrisList().equals(other.getInputUrisList())) return false; if (!getDataSchema().equals(other.getDataSchema())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -376,7 +316,7 @@ public int hashCode() { } hash = (37 * hash) + DATA_SCHEMA_FIELD_NUMBER; hash = (53 * hash) + getDataSchema().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -506,17 +446,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.GcsSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -623,7 +556,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.GcsSource other) { dataSchema_ = other.dataSchema_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -638,17 +571,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.GcsSource parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInputUrisIsMutable(); + inputUris_.add(s); + break; + } // case 10 + case 18: + { + dataSchema_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2alpha.GcsSource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1108,7 +1068,18 @@ public GcsSource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsSource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetAttributesConfigRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetAttributesConfigRequest.java index 7fad3c8c..dd47ac04 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetAttributesConfigRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetAttributesConfigRequest.java @@ -54,52 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetAttributesConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogServiceProto .internal_static_google_cloud_retail_v2alpha_GetAttributesConfigRequest_descriptor; @@ -187,7 +141,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -199,7 +153,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -216,7 +170,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.GetAttributesConfigRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -229,7 +183,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -361,17 +315,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.GetAttributesConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -461,7 +408,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.GetAttributesConfigRequ name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -476,18 +423,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.GetAttributesConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.GetAttributesConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -644,7 +610,18 @@ public GetAttributesConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetAttributesConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetCompletionConfigRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetCompletionConfigRequest.java index 46fc99d2..0625cbb4 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetCompletionConfigRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetCompletionConfigRequest.java @@ -54,52 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetCompletionConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogServiceProto .internal_static_google_cloud_retail_v2alpha_GetCompletionConfigRequest_descriptor; @@ -187,7 +141,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -199,7 +153,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -216,7 +170,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.GetCompletionConfigRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -229,7 +183,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -361,17 +315,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.GetCompletionConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -461,7 +408,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.GetCompletionConfigRequ name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -476,18 +423,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.GetCompletionConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.GetCompletionConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -644,7 +610,18 @@ public GetCompletionConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetCompletionConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetControlRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetControlRequest.java index ce81dd0d..8e557ef1 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetControlRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetControlRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetControlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ControlServiceProto .internal_static_google_cloud_retail_v2alpha_GetControlRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.GetControlRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.GetControlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -456,7 +403,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.GetControlRequest other name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -471,18 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.GetControlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.GetControlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -639,7 +605,18 @@ public GetControlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetControlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetDefaultBranchRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetDefaultBranchRequest.java index c0bc9502..e48d35ab 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetDefaultBranchRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetDefaultBranchRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetDefaultBranchRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - catalog_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogServiceProto .internal_static_google_cloud_retail_v2alpha_GetDefaultBranchRequest_descriptor; @@ -181,7 +135,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalog_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, catalog_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -193,7 +147,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalog_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, catalog_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -210,7 +164,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.GetDefaultBranchRequest) obj; if (!getCatalog().equals(other.getCatalog())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -223,7 +177,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CATALOG_FIELD_NUMBER; hash = (53 * hash) + getCatalog().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -353,17 +307,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.GetDefaultBranchRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -453,7 +400,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.GetDefaultBranchRequest catalog_ = other.catalog_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -468,18 +415,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.GetDefaultBranchRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + catalog_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.GetDefaultBranchRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -626,7 +592,18 @@ public GetDefaultBranchRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetDefaultBranchRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetDefaultBranchResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetDefaultBranchResponse.java index 31447796..1f936412 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetDefaultBranchResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetDefaultBranchResponse.java @@ -54,74 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetDefaultBranchResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - branch_ = s; - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (setTime_ != null) { - subBuilder = setTime_.toBuilder(); - } - setTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(setTime_); - setTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - note_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogServiceProto .internal_static_google_cloud_retail_v2alpha_GetDefaultBranchResponse_descriptor; @@ -308,7 +240,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(note_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, note_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -326,7 +258,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(note_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, note_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -348,7 +280,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSetTime().equals(other.getSetTime())) return false; } if (!getNote().equals(other.getNote())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -367,7 +299,7 @@ public int hashCode() { } hash = (37 * hash) + NOTE_FIELD_NUMBER; hash = (53 * hash) + getNote().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -498,17 +430,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.GetDefaultBranchResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -619,7 +544,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.GetDefaultBranchRespons note_ = other.note_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -634,18 +559,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.GetDefaultBranchResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + branch_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getSetTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + note_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.GetDefaultBranchResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1082,7 +1038,18 @@ public GetDefaultBranchResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetDefaultBranchResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetProductRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetProductRequest.java index df6b8a5c..b4eb84b9 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetProductRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetProductRequest.java @@ -54,52 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_GetProductRequest_descriptor; @@ -199,7 +153,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -211,7 +165,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -228,7 +182,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.GetProductRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -241,7 +195,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -372,17 +326,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.GetProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -472,7 +419,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.GetProductRequest other name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -487,18 +434,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.GetProductRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.GetProductRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -685,7 +651,18 @@ public GetProductRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetProductRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetServingConfigRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetServingConfigRequest.java index c4274f3f..60bff1c3 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetServingConfigRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/GetServingConfigRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetServingConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ServingConfigServiceProto .internal_static_google_cloud_retail_v2alpha_GetServingConfigRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.GetServingConfigRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.GetServingConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -457,7 +404,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.GetServingConfigRequest name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -472,18 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.GetServingConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.GetServingConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -640,7 +606,18 @@ public GetServingConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetServingConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Image.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Image.java index 4bcc0031..b7cc1a15 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Image.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Image.java @@ -55,62 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Image( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - uri_ = s; - break; - } - case 16: - { - height_ = input.readInt32(); - break; - } - case 24: - { - width_ = input.readInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_Image_descriptor; @@ -248,7 +192,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (width_ != 0) { output.writeInt32(3, width_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -266,7 +210,7 @@ public int getSerializedSize() { if (width_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, width_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -284,7 +228,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUri().equals(other.getUri())) return false; if (getHeight() != other.getHeight()) return false; if (getWidth() != other.getWidth()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -301,7 +245,7 @@ public int hashCode() { hash = (53 * hash) + getHeight(); hash = (37 * hash) + WIDTH_FIELD_NUMBER; hash = (53 * hash) + getWidth(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -432,17 +376,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Image.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -543,7 +480,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Image other) { if (other.getWidth() != 0) { setWidth(other.getWidth()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -558,17 +495,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Image parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uri_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + height_ = input.readInt32(); + + break; + } // case 16 + case 24: + { + width_ = input.readInt32(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2alpha.Image) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -851,7 +820,18 @@ public Image parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Image(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportCompletionDataRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportCompletionDataRequest.java index fc5408e6..ab931c10 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportCompletionDataRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportCompletionDataRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportCompletionDataRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.CompletionDataInputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = - input.readMessage( - com.google.cloud.retail.v2alpha.CompletionDataInputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - notificationPubsubTopic_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ImportConfigProto .internal_static_google_cloud_retail_v2alpha_ImportCompletionDataRequest_descriptor; @@ -328,7 +258,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationPubsubTopic_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, notificationPubsubTopic_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -346,7 +276,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationPubsubTopic_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, notificationPubsubTopic_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -368,7 +298,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInputConfig().equals(other.getInputConfig())) return false; } if (!getNotificationPubsubTopic().equals(other.getNotificationPubsubTopic())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -387,7 +317,7 @@ public int hashCode() { } hash = (37 * hash) + NOTIFICATION_PUBSUB_TOPIC_FIELD_NUMBER; hash = (53 * hash) + getNotificationPubsubTopic().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -517,17 +447,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ImportCompletionDataRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -638,7 +561,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ImportCompletionDataReq notificationPubsubTopic_ = other.notificationPubsubTopic_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -653,18 +576,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ImportCompletionDataRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getInputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + notificationPubsubTopic_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ImportCompletionDataRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1154,7 +1108,18 @@ public ImportCompletionDataRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportCompletionDataRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportCompletionDataResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportCompletionDataResponse.java index 1cf4975b..7cb45662 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportCompletionDataResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportCompletionDataResponse.java @@ -55,59 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportCompletionDataResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - errorSamples_.add( - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = java.util.Collections.unmodifiableList(errorSamples_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ImportConfigProto .internal_static_google_cloud_retail_v2alpha_ImportCompletionDataResponse_descriptor; @@ -208,7 +155,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < errorSamples_.size(); i++) { output.writeMessage(1, errorSamples_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -220,7 +167,7 @@ public int getSerializedSize() { for (int i = 0; i < errorSamples_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, errorSamples_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -237,7 +184,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.ImportCompletionDataResponse) obj; if (!getErrorSamplesList().equals(other.getErrorSamplesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -252,7 +199,7 @@ public int hashCode() { hash = (37 * hash) + ERROR_SAMPLES_FIELD_NUMBER; hash = (53 * hash) + getErrorSamplesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -385,19 +332,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ImportCompletionDataResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getErrorSamplesFieldBuilder(); - } } @java.lang.Override @@ -405,10 +343,11 @@ public Builder clear() { super.clear(); if (errorSamplesBuilder_ == null) { errorSamples_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + errorSamples_ = null; errorSamplesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -525,7 +464,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ImportCompletionDataRes } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -540,18 +479,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ImportCompletionDataResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(m); + } else { + errorSamplesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ImportCompletionDataResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -928,7 +892,18 @@ public ImportCompletionDataResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportCompletionDataResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportErrorsConfig.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportErrorsConfig.java index 8988ba78..ec7b39b1 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportErrorsConfig.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportErrorsConfig.java @@ -50,52 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportErrorsConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - destinationCase_ = 1; - destination_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ImportConfigProto .internal_static_google_cloud_retail_v2alpha_ImportErrorsConfig_descriptor; @@ -251,7 +205,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (destinationCase_ == 1) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destination_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -263,7 +217,7 @@ public int getSerializedSize() { if (destinationCase_ == 1) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destination_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -287,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -306,7 +260,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -435,17 +389,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ImportErrorsConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -547,7 +494,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ImportErrorsConfig othe break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -562,18 +509,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ImportErrorsConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 1; + destination_ = s; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ImportErrorsConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -775,7 +742,18 @@ public ImportErrorsConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportErrorsConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadata.java index 957da541..ba77869e 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadata.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportMetadata.java @@ -54,99 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - successCount_ = input.readInt64(); - break; - } - case 32: - { - failureCount_ = input.readInt64(); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - notificationPubsubTopic_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ImportConfigProto .internal_static_google_cloud_retail_v2alpha_ImportMetadata_descriptor; @@ -437,7 +344,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationPubsubTopic_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, notificationPubsubTopic_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -464,7 +371,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationPubsubTopic_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, notificationPubsubTopic_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -492,7 +399,7 @@ public boolean equals(final java.lang.Object obj) { if (getFailureCount() != other.getFailureCount()) return false; if (!getRequestId().equals(other.getRequestId())) return false; if (!getNotificationPubsubTopic().equals(other.getNotificationPubsubTopic())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -519,7 +426,7 @@ public int hashCode() { hash = (53 * hash) + getRequestId().hashCode(); hash = (37 * hash) + NOTIFICATION_PUBSUB_TOPIC_FIELD_NUMBER; hash = (53 * hash) + getNotificationPubsubTopic().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -649,17 +556,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ImportMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -795,7 +695,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ImportMetadata other) { notificationPubsubTopic_ = other.notificationPubsubTopic_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -810,17 +710,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ImportMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + successCount_ = input.readInt64(); + + break; + } // case 24 + case 32: + { + failureCount_ = input.readInt64(); + + break; + } // case 32 + case 42: + { + requestId_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + notificationPubsubTopic_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2alpha.ImportMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1582,7 +1532,18 @@ public ImportMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequest.java index 39b4b769..3e8119c3 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsRequest.java @@ -55,127 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportProductsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.ProductInputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = - input.readMessage( - com.google.cloud.retail.v2alpha.ProductInputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.retail.v2alpha.ImportErrorsConfig.Builder subBuilder = null; - if (errorsConfig_ != null) { - subBuilder = errorsConfig_.toBuilder(); - } - errorsConfig_ = - input.readMessage( - com.google.cloud.retail.v2alpha.ImportErrorsConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(errorsConfig_); - errorsConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - case 40: - { - int rawValue = input.readEnum(); - - reconciliationMode_ = rawValue; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - notificationPubsubTopic_ = s; - break; - } - case 64: - { - skipDefaultBranchProtection_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ImportConfigProto .internal_static_google_cloud_retail_v2alpha_ImportProductsRequest_descriptor; @@ -824,7 +703,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (skipDefaultBranchProtection_ != false) { output.writeBool(8, skipDefaultBranchProtection_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -861,7 +740,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeBoolSize(8, skipDefaultBranchProtection_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -894,7 +773,7 @@ public boolean equals(final java.lang.Object obj) { if (reconciliationMode_ != other.reconciliationMode_) return false; if (!getNotificationPubsubTopic().equals(other.getNotificationPubsubTopic())) return false; if (getSkipDefaultBranchProtection() != other.getSkipDefaultBranchProtection()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -927,7 +806,7 @@ public int hashCode() { hash = (53 * hash) + getNotificationPubsubTopic().hashCode(); hash = (37 * hash) + SKIP_DEFAULT_BRANCH_PROTECTION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSkipDefaultBranchProtection()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1057,17 +936,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ImportProductsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1225,7 +1097,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ImportProductsRequest o if (other.getSkipDefaultBranchProtection() != false) { setSkipDefaultBranchProtection(other.getSkipDefaultBranchProtection()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1240,18 +1112,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ImportProductsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getInputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getErrorsConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 40: + { + reconciliationMode_ = input.readEnum(); + + break; + } // case 40 + case 50: + { + requestId_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + notificationPubsubTopic_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 64: + { + skipDefaultBranchProtection_ = input.readBool(); + + break; + } // case 64 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ImportProductsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2475,7 +2408,18 @@ public ImportProductsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportProductsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsResponse.java index b72174a3..8576fa50 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportProductsResponse.java @@ -55,76 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportProductsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - errorSamples_.add( - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.ImportErrorsConfig.Builder subBuilder = null; - if (errorsConfig_ != null) { - subBuilder = errorsConfig_.toBuilder(); - } - errorsConfig_ = - input.readMessage( - com.google.cloud.retail.v2alpha.ImportErrorsConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(errorsConfig_); - errorsConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = java.util.Collections.unmodifiableList(errorSamples_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ImportConfigProto .internal_static_google_cloud_retail_v2alpha_ImportProductsResponse_descriptor; @@ -276,7 +206,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (errorsConfig_ != null) { output.writeMessage(2, getErrorsConfig()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -291,7 +221,7 @@ public int getSerializedSize() { if (errorsConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getErrorsConfig()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -312,7 +242,7 @@ public boolean equals(final java.lang.Object obj) { if (hasErrorsConfig()) { if (!getErrorsConfig().equals(other.getErrorsConfig())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -331,7 +261,7 @@ public int hashCode() { hash = (37 * hash) + ERRORS_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getErrorsConfig().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -464,19 +394,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ImportProductsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getErrorSamplesFieldBuilder(); - } } @java.lang.Override @@ -484,10 +405,11 @@ public Builder clear() { super.clear(); if (errorSamplesBuilder_ == null) { errorSamples_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + errorSamples_ = null; errorSamplesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (errorsConfigBuilder_ == null) { errorsConfig_ = null; } else { @@ -616,7 +538,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ImportProductsResponse if (other.hasErrorsConfig()) { mergeErrorsConfig(other.getErrorsConfig()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -631,18 +553,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ImportProductsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(m); + } else { + errorSamplesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage(getErrorsConfigFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ImportProductsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1204,7 +1157,18 @@ public ImportProductsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportProductsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportUserEventsRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportUserEventsRequest.java index de96b884..6ef5473a 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportUserEventsRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportUserEventsRequest.java @@ -52,86 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportUserEventsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.UserEventInputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = - input.readMessage( - com.google.cloud.retail.v2alpha.UserEventInputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.retail.v2alpha.ImportErrorsConfig.Builder subBuilder = null; - if (errorsConfig_ != null) { - subBuilder = errorsConfig_.toBuilder(); - } - errorsConfig_ = - input.readMessage( - com.google.cloud.retail.v2alpha.ImportErrorsConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(errorsConfig_); - errorsConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ImportConfigProto .internal_static_google_cloud_retail_v2alpha_ImportUserEventsRequest_descriptor; @@ -328,7 +248,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (errorsConfig_ != null) { output.writeMessage(3, getErrorsConfig()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -346,7 +266,7 @@ public int getSerializedSize() { if (errorsConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getErrorsConfig()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -371,7 +291,7 @@ public boolean equals(final java.lang.Object obj) { if (hasErrorsConfig()) { if (!getErrorsConfig().equals(other.getErrorsConfig())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -392,7 +312,7 @@ public int hashCode() { hash = (37 * hash) + ERRORS_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getErrorsConfig().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -522,17 +442,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ImportUserEventsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -650,7 +563,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ImportUserEventsRequest if (other.hasErrorsConfig()) { mergeErrorsConfig(other.getErrorsConfig()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -665,18 +578,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ImportUserEventsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getInputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getErrorsConfigFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ImportUserEventsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1227,7 +1171,18 @@ public ImportUserEventsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportUserEventsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportUserEventsResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportUserEventsResponse.java index 8ac31264..0f33ff20 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportUserEventsResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ImportUserEventsResponse.java @@ -54,93 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportUserEventsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - errorSamples_.add( - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.ImportErrorsConfig.Builder subBuilder = null; - if (errorsConfig_ != null) { - subBuilder = errorsConfig_.toBuilder(); - } - errorsConfig_ = - input.readMessage( - com.google.cloud.retail.v2alpha.ImportErrorsConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(errorsConfig_); - errorsConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.retail.v2alpha.UserEventImportSummary.Builder subBuilder = null; - if (importSummary_ != null) { - subBuilder = importSummary_.toBuilder(); - } - importSummary_ = - input.readMessage( - com.google.cloud.retail.v2alpha.UserEventImportSummary.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(importSummary_); - importSummary_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = java.util.Collections.unmodifiableList(errorSamples_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ImportConfigProto .internal_static_google_cloud_retail_v2alpha_ImportUserEventsResponse_descriptor; @@ -347,7 +260,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (importSummary_ != null) { output.writeMessage(3, getImportSummary()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -365,7 +278,7 @@ public int getSerializedSize() { if (importSummary_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getImportSummary()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -390,7 +303,7 @@ public boolean equals(final java.lang.Object obj) { if (hasImportSummary()) { if (!getImportSummary().equals(other.getImportSummary())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -413,7 +326,7 @@ public int hashCode() { hash = (37 * hash) + IMPORT_SUMMARY_FIELD_NUMBER; hash = (53 * hash) + getImportSummary().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -545,19 +458,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ImportUserEventsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getErrorSamplesFieldBuilder(); - } } @java.lang.Override @@ -565,10 +469,11 @@ public Builder clear() { super.clear(); if (errorSamplesBuilder_ == null) { errorSamples_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + errorSamples_ = null; errorSamplesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (errorsConfigBuilder_ == null) { errorsConfig_ = null; } else { @@ -711,7 +616,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ImportUserEventsRespons if (other.hasImportSummary()) { mergeImportSummary(other.getImportSummary()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -726,18 +631,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ImportUserEventsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(m); + } else { + errorSamplesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage(getErrorsConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getImportSummaryFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ImportUserEventsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1497,7 +1439,18 @@ public ImportUserEventsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportUserEventsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Interval.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Interval.java index 74da6b24..d5763253 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Interval.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Interval.java @@ -50,69 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Interval( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 9: - { - min_ = input.readDouble(); - minCase_ = 1; - break; - } - case 17: - { - min_ = input.readDouble(); - minCase_ = 2; - break; - } - case 25: - { - max_ = input.readDouble(); - maxCase_ = 3; - break; - } - case 33: - { - max_ = input.readDouble(); - maxCase_ = 4; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_Interval_descriptor; @@ -388,7 +325,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (maxCase_ == 4) { output.writeDouble(4, (double) ((java.lang.Double) max_)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -417,7 +354,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeDoubleSize( 4, (double) ((java.lang.Double) max_)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -458,7 +395,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -505,7 +442,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -634,17 +571,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Interval.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -776,7 +706,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Interval other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -791,17 +721,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Interval parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + min_ = input.readDouble(); + minCase_ = 1; + break; + } // case 9 + case 17: + { + min_ = input.readDouble(); + minCase_ = 2; + break; + } // case 17 + case 25: + { + max_ = input.readDouble(); + maxCase_ = 3; + break; + } // case 25 + case 33: + { + max_ = input.readDouble(); + maxCase_ = 4; + break; + } // case 33 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2alpha.Interval) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1141,7 +1109,18 @@ public Interval parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Interval(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListCatalogsRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListCatalogsRequest.java index ad36d891..ed6e51d4 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListCatalogsRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListCatalogsRequest.java @@ -55,64 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListCatalogsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogServiceProto .internal_static_google_cloud_retail_v2alpha_ListCatalogsRequest_descriptor; @@ -298,7 +240,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -316,7 +258,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -335,7 +277,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -352,7 +294,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -483,17 +425,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ListCatalogsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -596,7 +531,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ListCatalogsRequest oth pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,18 +546,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ListCatalogsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ListCatalogsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1001,7 +967,18 @@ public ListCatalogsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListCatalogsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListCatalogsResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListCatalogsResponse.java index 7e4cf32f..8d2208db 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListCatalogsResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListCatalogsResponse.java @@ -55,67 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListCatalogsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - catalogs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - catalogs_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.Catalog.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - catalogs_ = java.util.Collections.unmodifiableList(catalogs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogServiceProto .internal_static_google_cloud_retail_v2alpha_ListCatalogsResponse_descriptor; @@ -275,7 +214,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -290,7 +229,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -308,7 +247,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCatalogsList().equals(other.getCatalogsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -325,7 +264,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -456,19 +395,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ListCatalogsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCatalogsFieldBuilder(); - } } @java.lang.Override @@ -476,10 +406,11 @@ public Builder clear() { super.clear(); if (catalogsBuilder_ == null) { catalogs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + catalogs_ = null; catalogsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -601,7 +532,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ListCatalogsResponse ot nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -616,18 +547,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ListCatalogsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2alpha.Catalog m = + input.readMessage( + com.google.cloud.retail.v2alpha.Catalog.parser(), extensionRegistry); + if (catalogsBuilder_ == null) { + ensureCatalogsIsMutable(); + catalogs_.add(m); + } else { + catalogsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ListCatalogsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1135,7 +1098,18 @@ public ListCatalogsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListCatalogsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListControlsRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListControlsRequest.java index ebd3b007..6d0a4ded 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListControlsRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListControlsRequest.java @@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListControlsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ControlServiceProto .internal_static_google_cloud_retail_v2alpha_ListControlsRequest_descriptor; @@ -342,7 +277,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -363,7 +298,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -383,7 +318,7 @@ public boolean equals(final java.lang.Object obj) { if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -402,7 +337,7 @@ public int hashCode() { hash = (53 * hash) + getPageToken().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -531,17 +466,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ListControlsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -651,7 +579,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ListControlsRequest oth filter_ = other.filter_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -666,18 +594,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ListControlsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ListControlsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1126,7 +1091,18 @@ public ListControlsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListControlsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListControlsResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListControlsResponse.java index 81bf6440..890d291c 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListControlsResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListControlsResponse.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListControlsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - controls_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - controls_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.Control.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - controls_ = java.util.Collections.unmodifiableList(controls_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ControlServiceProto .internal_static_google_cloud_retail_v2alpha_ListControlsResponse_descriptor; @@ -267,7 +206,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -282,7 +221,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -300,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (!getControlsList().equals(other.getControlsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -317,7 +256,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -446,19 +385,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ListControlsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getControlsFieldBuilder(); - } } @java.lang.Override @@ -466,10 +396,11 @@ public Builder clear() { super.clear(); if (controlsBuilder_ == null) { controls_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + controls_ = null; controlsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -591,7 +522,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ListControlsResponse ot nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -606,18 +537,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ListControlsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2alpha.Control m = + input.readMessage( + com.google.cloud.retail.v2alpha.Control.parser(), extensionRegistry); + if (controlsBuilder_ == null) { + ensureControlsIsMutable(); + controls_.add(m); + } else { + controlsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ListControlsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1110,7 +1073,18 @@ public ListControlsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListControlsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsRequest.java index 3404d2b6..943cb945 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListModelsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ModelServiceProto .internal_static_google_cloud_retail_v2alpha_ListModelsRequest_descriptor; @@ -276,7 +218,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -294,7 +236,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -313,7 +255,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -330,7 +272,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -459,17 +401,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ListModelsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -572,7 +507,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ListModelsRequest other pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -587,18 +522,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ListModelsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ListModelsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -926,7 +892,18 @@ public ListModelsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListModelsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsResponse.java index a979f1ca..5a873439 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListModelsResponse.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListModelsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - models_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - models_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.Model.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - models_ = java.util.Collections.unmodifiableList(models_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ModelServiceProto .internal_static_google_cloud_retail_v2alpha_ListModelsResponse_descriptor; @@ -267,7 +206,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -282,7 +221,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -300,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (!getModelsList().equals(other.getModelsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -317,7 +256,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -446,19 +385,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ListModelsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getModelsFieldBuilder(); - } } @java.lang.Override @@ -466,10 +396,11 @@ public Builder clear() { super.clear(); if (modelsBuilder_ == null) { models_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + models_ = null; modelsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -591,7 +522,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ListModelsResponse othe nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -606,18 +537,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ListModelsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2alpha.Model m = + input.readMessage( + com.google.cloud.retail.v2alpha.Model.parser(), extensionRegistry); + if (modelsBuilder_ == null) { + ensureModelsIsMutable(); + models_.add(m); + } else { + modelsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ListModelsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1109,7 +1072,18 @@ public ListModelsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListModelsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListProductsRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListProductsRequest.java index 3549b3f5..ea253b4d 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListProductsRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListProductsRequest.java @@ -56,91 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListProductsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 42: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (readMask_ != null) { - subBuilder = readMask_.toBuilder(); - } - readMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readMask_); - readMask_ = subBuilder.buildPartial(); - } - - break; - } - case 48: - { - requireTotalSize_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_ListProductsRequest_descriptor; @@ -548,7 +463,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (requireTotalSize_ != false) { output.writeBool(6, requireTotalSize_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -575,7 +490,7 @@ public int getSerializedSize() { if (requireTotalSize_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, requireTotalSize_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -600,7 +515,7 @@ public boolean equals(final java.lang.Object obj) { if (!getReadMask().equals(other.getReadMask())) return false; } if (getRequireTotalSize() != other.getRequireTotalSize()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -625,7 +540,7 @@ public int hashCode() { } hash = (37 * hash) + REQUIRE_TOTAL_SIZE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getRequireTotalSize()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -756,17 +671,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ListProductsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -896,7 +804,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ListProductsRequest oth if (other.getRequireTotalSize() != false) { setRequireTotalSize(other.getRequireTotalSize()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -911,18 +819,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ListProductsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + input.readMessage(getReadMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 48: + { + requireTotalSize_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ListProductsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1910,7 +1867,18 @@ public ListProductsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListProductsResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListProductsResponse.java index 79d624d5..c6f6e9ca 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListProductsResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListProductsResponse.java @@ -55,72 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListProductsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - products_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.Product.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 24: - { - totalSize_ = input.readInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = java.util.Collections.unmodifiableList(products_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_ListProductsResponse_descriptor; @@ -311,7 +245,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (totalSize_ != 0) { output.writeInt32(3, totalSize_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -329,7 +263,7 @@ public int getSerializedSize() { if (totalSize_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, totalSize_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -348,7 +282,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProductsList().equals(other.getProductsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; if (getTotalSize() != other.getTotalSize()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -367,7 +301,7 @@ public int hashCode() { hash = (53 * hash) + getNextPageToken().hashCode(); hash = (37 * hash) + TOTAL_SIZE_FIELD_NUMBER; hash = (53 * hash) + getTotalSize(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -498,19 +432,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ListProductsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getProductsFieldBuilder(); - } } @java.lang.Override @@ -518,10 +443,11 @@ public Builder clear() { super.clear(); if (productsBuilder_ == null) { products_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + products_ = null; productsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; totalSize_ = 0; @@ -649,7 +575,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ListProductsResponse ot if (other.getTotalSize() != 0) { setTotalSize(other.getTotalSize()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -664,18 +590,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ListProductsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2alpha.Product m = + input.readMessage( + com.google.cloud.retail.v2alpha.Product.parser(), extensionRegistry); + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(m); + } else { + productsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + totalSize_ = input.readInt32(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ListProductsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1265,7 +1229,18 @@ public ListProductsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListServingConfigsRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListServingConfigsRequest.java index b2c1f100..17fe443a 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListServingConfigsRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListServingConfigsRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListServingConfigsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ServingConfigServiceProto .internal_static_google_cloud_retail_v2alpha_ListServingConfigsRequest_descriptor; @@ -275,7 +217,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -293,7 +235,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -312,7 +254,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -329,7 +271,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -459,17 +401,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ListServingConfigsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -572,7 +507,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ListServingConfigsReque pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -587,18 +522,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ListServingConfigsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ListServingConfigsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -924,7 +890,18 @@ public ListServingConfigsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListServingConfigsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListServingConfigsResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListServingConfigsResponse.java index b0912ad3..f9405474 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListServingConfigsResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ListServingConfigsResponse.java @@ -53,68 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListServingConfigsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - servingConfigs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - servingConfigs_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.ServingConfig.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - servingConfigs_ = java.util.Collections.unmodifiableList(servingConfigs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ServingConfigServiceProto .internal_static_google_cloud_retail_v2alpha_ListServingConfigsResponse_descriptor; @@ -269,7 +207,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -284,7 +222,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -302,7 +240,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServingConfigsList().equals(other.getServingConfigsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -319,7 +257,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -449,19 +387,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ListServingConfigsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getServingConfigsFieldBuilder(); - } } @java.lang.Override @@ -469,10 +398,11 @@ public Builder clear() { super.clear(); if (servingConfigsBuilder_ == null) { servingConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + servingConfigs_ = null; servingConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -594,7 +524,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ListServingConfigsRespo nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -609,18 +539,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ListServingConfigsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2alpha.ServingConfig m = + input.readMessage( + com.google.cloud.retail.v2alpha.ServingConfig.parser(), extensionRegistry); + if (servingConfigsBuilder_ == null) { + ensureServingConfigsIsMutable(); + servingConfigs_.add(m); + } else { + servingConfigsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ListServingConfigsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1123,7 +1085,18 @@ public ListServingConfigsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListServingConfigsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/LocalInventory.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/LocalInventory.java index e60ebd3b..6deb0878 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/LocalInventory.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/LocalInventory.java @@ -54,99 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LocalInventory( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - placeId_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.PriceInfo.Builder subBuilder = null; - if (priceInfo_ != null) { - subBuilder = priceInfo_.toBuilder(); - } - priceInfo_ = - input.readMessage( - com.google.cloud.retail.v2alpha.PriceInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(priceInfo_); - priceInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - attributes_ = - com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.retail.v2alpha.CustomAttribute> - attributes__ = - input.readMessage( - AttributesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - attributes_.getMutableMap().put(attributes__.getKey(), attributes__.getValue()); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - fulfillmentTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - fulfillmentTypes_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - fulfillmentTypes_ = fulfillmentTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_LocalInventory_descriptor; @@ -602,7 +509,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < fulfillmentTypes_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, fulfillmentTypes_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -637,7 +544,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getFulfillmentTypesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -660,7 +567,7 @@ public boolean equals(final java.lang.Object obj) { } if (!internalGetAttributes().equals(other.internalGetAttributes())) return false; if (!getFulfillmentTypesList().equals(other.getFulfillmentTypesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -685,7 +592,7 @@ public int hashCode() { hash = (37 * hash) + FULFILLMENT_TYPES_FIELD_NUMBER; hash = (53 * hash) + getFulfillmentTypesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -835,17 +742,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.retail.v2alpha.LocalInventory.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -970,7 +870,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.LocalInventory other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -985,17 +885,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.LocalInventory parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + placeId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getPriceInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.retail.v2alpha.CustomAttribute> + attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .getMutableMap() + .put(attributes__.getKey(), attributes__.getValue()); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFulfillmentTypesIsMutable(); + fulfillmentTypes_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2alpha.LocalInventory) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1950,7 +1896,18 @@ public LocalInventory parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LocalInventory(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterLink.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterLink.java index f72b49ca..aa45a318 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterLink.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterLink.java @@ -57,85 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MerchantCenterLink( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - merchantCenterAccountId_ = input.readInt64(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - branchId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - destinations_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - destinations_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - regionCode_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - destinations_ = destinations_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogProto .internal_static_google_cloud_retail_v2alpha_MerchantCenterLink_descriptor; @@ -460,7 +381,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, languageCode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -489,7 +410,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, languageCode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -510,7 +431,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDestinationsList().equals(other.getDestinationsList())) return false; if (!getRegionCode().equals(other.getRegionCode())) return false; if (!getLanguageCode().equals(other.getLanguageCode())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -533,7 +454,7 @@ public int hashCode() { hash = (53 * hash) + getRegionCode().hashCode(); hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; hash = (53 * hash) + getLanguageCode().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -664,17 +585,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.MerchantCenterLink.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -802,7 +716,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.MerchantCenterLink othe languageCode_ = other.languageCode_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -817,18 +731,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.MerchantCenterLink parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + merchantCenterAccountId_ = input.readInt64(); + + break; + } // case 8 + case 18: + { + branchId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDestinationsIsMutable(); + destinations_.add(s); + break; + } // case 26 + case 34: + { + regionCode_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + languageCode_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.MerchantCenterLink) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1534,7 +1492,18 @@ public MerchantCenterLink parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MerchantCenterLink(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterLinkingConfig.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterLinkingConfig.java index be5dc561..bc4d78b9 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterLinkingConfig.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/MerchantCenterLinkingConfig.java @@ -54,62 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MerchantCenterLinkingConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - links_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - links_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.MerchantCenterLink.parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - links_ = java.util.Collections.unmodifiableList(links_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogProto .internal_static_google_cloud_retail_v2alpha_MerchantCenterLinkingConfig_descriptor; @@ -211,7 +155,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < links_.size(); i++) { output.writeMessage(1, links_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -223,7 +167,7 @@ public int getSerializedSize() { for (int i = 0; i < links_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, links_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -240,7 +184,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.MerchantCenterLinkingConfig) obj; if (!getLinksList().equals(other.getLinksList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -255,7 +199,7 @@ public int hashCode() { hash = (37 * hash) + LINKS_FIELD_NUMBER; hash = (53 * hash) + getLinksList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -387,19 +331,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.MerchantCenterLinkingConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getLinksFieldBuilder(); - } } @java.lang.Override @@ -407,10 +342,11 @@ public Builder clear() { super.clear(); if (linksBuilder_ == null) { links_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + links_ = null; linksBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -525,7 +461,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.MerchantCenterLinkingCo } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -540,18 +476,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.MerchantCenterLinkingConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2alpha.MerchantCenterLink m = + input.readMessage( + com.google.cloud.retail.v2alpha.MerchantCenterLink.parser(), + extensionRegistry); + if (linksBuilder_ == null) { + ensureLinksIsMutable(); + links_.add(m); + } else { + linksBuilder_.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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.MerchantCenterLinkingConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -942,7 +905,18 @@ public MerchantCenterLinkingConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new MerchantCenterLinkingConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Model.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Model.java index df06cf0a..94416410 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Model.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Model.java @@ -66,199 +66,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Model( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - trainingState_ = rawValue; - break; - } - case 32: - { - int rawValue = input.readEnum(); - - servingState_ = rawValue; - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = s; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - optimizationObjective_ = s; - break; - } - case 88: - { - int rawValue = input.readEnum(); - - periodicTuningState_ = rawValue; - break; - } - case 98: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (lastTuneTime_ != null) { - subBuilder = lastTuneTime_.toBuilder(); - } - lastTuneTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(lastTuneTime_); - lastTuneTime_ = subBuilder.buildPartial(); - } - - break; - } - case 122: - { - java.lang.String s = input.readStringRequireUtf8(); - - tuningOperation_ = s; - break; - } - case 128: - { - int rawValue = input.readEnum(); - - dataState_ = rawValue; - break; - } - case 138: - { - com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Builder subBuilder = - null; - if (trainingConfigCase_ == 17) { - subBuilder = - ((com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) trainingConfig_) - .toBuilder(); - } - trainingConfig_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) trainingConfig_); - trainingConfig_ = subBuilder.buildPartial(); - } - trainingConfigCase_ = 17; - break; - } - case 144: - { - int rawValue = input.readEnum(); - - filteringOption_ = rawValue; - break; - } - case 154: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - servingConfigLists_ = - new java.util.ArrayList< - com.google.cloud.retail.v2alpha.Model.ServingConfigList>(); - mutable_bitField0_ |= 0x00000001; - } - servingConfigLists_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.Model.ServingConfigList.parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - servingConfigLists_ = java.util.Collections.unmodifiableList(servingConfigLists_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ModelProto .internal_static_google_cloud_retail_v2alpha_Model_descriptor; @@ -1175,77 +982,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PageOptimizationConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - pageOptimizationEventType_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - panels_ = - new java.util.ArrayList< - com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel>(); - mutable_bitField0_ |= 0x00000001; - } - panels_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel.parser(), - extensionRegistry)); - break; - } - case 24: - { - int rawValue = input.readEnum(); - - restriction_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - panels_ = java.util.Collections.unmodifiableList(panels_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ModelProto .internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_descriptor; @@ -1719,53 +1455,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Candidate( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - candidateCase_ = 1; - candidate_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ModelProto .internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Candidate_descriptor; @@ -1925,7 +1614,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (candidateCase_ == 1) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, candidate_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1937,7 +1626,7 @@ public int getSerializedSize() { if (candidateCase_ == 1) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, candidate_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1962,7 +1651,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1981,7 +1670,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2125,17 +1814,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2247,7 +1929,7 @@ public Builder mergeFrom( break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2262,20 +1944,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate parsedMessage = - null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + candidateCase_ = 1; + candidate_ = 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2487,7 +2187,19 @@ public Candidate parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Candidate(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2691,92 +2403,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Panel( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - displayName_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - candidates_ = - new java.util.ArrayList< - com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig - .Candidate>(); - mutable_bitField0_ |= 0x00000001; - } - candidates_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate - .parser(), - extensionRegistry)); - break; - } - case 26: - { - com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate.Builder - subBuilder = null; - if (defaultCandidate_ != null) { - subBuilder = defaultCandidate_.toBuilder(); - } - defaultCandidate_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate - .parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(defaultCandidate_); - defaultCandidate_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - candidates_ = java.util.Collections.unmodifiableList(candidates_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ModelProto .internal_static_google_cloud_retail_v2alpha_Model_PageOptimizationConfig_Panel_descriptor; @@ -3015,7 +2641,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (defaultCandidate_ != null) { output.writeMessage(3, getDefaultCandidate()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3034,7 +2660,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDefaultCandidate()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3056,7 +2682,7 @@ public boolean equals(final java.lang.Object obj) { if (hasDefaultCandidate()) { if (!getDefaultCandidate().equals(other.getDefaultCandidate())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3077,7 +2703,7 @@ public int hashCode() { hash = (37 * hash) + DEFAULT_CANDIDATE_FIELD_NUMBER; hash = (53 * hash) + getDefaultCandidate().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3214,19 +2840,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCandidatesFieldBuilder(); - } } @java.lang.Override @@ -3236,10 +2853,11 @@ public Builder clear() { if (candidatesBuilder_ == null) { candidates_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + candidates_ = null; candidatesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (defaultCandidateBuilder_ == null) { defaultCandidate_ = null; } else { @@ -3381,7 +2999,7 @@ public Builder mergeFrom( if (other.hasDefaultCandidate()) { mergeDefaultCandidate(other.getDefaultCandidate()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3396,19 +3014,59 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate m = + input.readMessage( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Candidate + .parser(), + extensionRegistry); + if (candidatesBuilder_ == null) { + ensureCandidatesIsMutable(); + candidates_.add(m); + } else { + candidatesBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + input.readMessage( + getDefaultCandidateFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4219,7 +3877,19 @@ public Panel parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Panel(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4480,7 +4150,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(3, restriction_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4502,7 +4172,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, restriction_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4522,7 +4192,7 @@ public boolean equals(final java.lang.Object obj) { return false; if (!getPanelsList().equals(other.getPanelsList())) return false; if (restriction_ != other.restriction_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4541,7 +4211,7 @@ public int hashCode() { } hash = (37 * hash) + RESTRICTION_FIELD_NUMBER; hash = (53 * hash) + restriction_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4678,19 +4348,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPanelsFieldBuilder(); - } } @java.lang.Override @@ -4700,10 +4361,11 @@ public Builder clear() { if (panelsBuilder_ == null) { panels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + panels_ = null; panelsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); restriction_ = 0; return this; @@ -4833,7 +4495,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Model.PageOptimizationC if (other.restriction_ != 0) { setRestrictionValue(other.getRestrictionValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4848,19 +4510,58 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + pageOptimizationEventType_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel m = + input.readMessage( + com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig.Panel + .parser(), + extensionRegistry); + if (panelsBuilder_ == null) { + ensurePanelsIsMutable(); + panels_.add(m); + } else { + panelsBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + restriction_ = input.readEnum(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.Model.PageOptimizationConfig) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5627,7 +5328,19 @@ public PageOptimizationConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PageOptimizationConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5746,59 +5459,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ServingConfigList( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - servingConfigIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - servingConfigIds_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - servingConfigIds_ = servingConfigIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ModelProto .internal_static_google_cloud_retail_v2alpha_Model_ServingConfigList_descriptor; @@ -5900,7 +5560,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < servingConfigIds_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, servingConfigIds_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5917,7 +5577,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getServingConfigIdsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5934,7 +5594,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.Model.ServingConfigList) obj; if (!getServingConfigIdsList().equals(other.getServingConfigIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5949,7 +5609,7 @@ public int hashCode() { hash = (37 * hash) + SERVING_CONFIG_IDS_FIELD_NUMBER; hash = (53 * hash) + getServingConfigIdsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6082,17 +5742,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Model.ServingConfigList.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -6195,7 +5848,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Model.ServingConfigList } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6210,18 +5863,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Model.ServingConfigList parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureServingConfigIdsIsMutable(); + servingConfigIds_.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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.Model.ServingConfigList) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6446,7 +6119,19 @@ public ServingConfigList parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServingConfigList(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7406,7 +7091,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < servingConfigLists_.size(); i++) { output.writeMessage(19, servingConfigLists_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7474,7 +7159,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(19, servingConfigLists_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7520,7 +7205,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7575,7 +7260,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7707,24 +7392,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Model.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getServingConfigListsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + if (pageOptimizationConfigBuilder_ != null) { + pageOptimizationConfigBuilder_.clear(); + } name_ = ""; displayName_ = ""; @@ -7765,10 +7444,11 @@ public Builder clear() { if (servingConfigListsBuilder_ == null) { servingConfigLists_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + servingConfigLists_ = null; servingConfigListsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); trainingConfigCase_ = 0; trainingConfig_ = null; return this; @@ -7972,7 +7652,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Model other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -7987,17 +7667,130 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Model parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + trainingState_ = input.readEnum(); + + break; + } // case 24 + case 32: + { + servingState_ = input.readEnum(); + + break; + } // case 32 + case 42: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + type_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: + { + optimizationObjective_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 88: + { + periodicTuningState_ = input.readEnum(); + + break; + } // case 88 + case 98: + { + input.readMessage(getLastTuneTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 98 + case 122: + { + tuningOperation_ = input.readStringRequireUtf8(); + + break; + } // case 122 + case 128: + { + dataState_ = input.readEnum(); + + break; + } // case 128 + case 138: + { + input.readMessage( + getPageOptimizationConfigFieldBuilder().getBuilder(), extensionRegistry); + trainingConfigCase_ = 17; + break; + } // case 138 + case 144: + { + filteringOption_ = input.readEnum(); + + break; + } // case 144 + case 154: + { + com.google.cloud.retail.v2alpha.Model.ServingConfigList m = + input.readMessage( + com.google.cloud.retail.v2alpha.Model.ServingConfigList.parser(), + extensionRegistry); + if (servingConfigListsBuilder_ == null) { + ensureServingConfigListsIsMutable(); + servingConfigLists_.add(m); + } else { + servingConfigListsBuilder_.addMessage(m); + } + break; + } // case 154 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2alpha.Model) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -10552,7 +10345,18 @@ public Model parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Model(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/OutputResult.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/OutputResult.java index 54eba04b..e9384d15 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/OutputResult.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/OutputResult.java @@ -52,62 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OutputResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - bigqueryResult_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - bigqueryResult_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.BigQueryOutputResult.parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - bigqueryResult_ = java.util.Collections.unmodifiableList(bigqueryResult_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ExportConfigProto .internal_static_google_cloud_retail_v2alpha_OutputResult_descriptor; @@ -211,7 +155,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < bigqueryResult_.size(); i++) { output.writeMessage(1, bigqueryResult_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -223,7 +167,7 @@ public int getSerializedSize() { for (int i = 0; i < bigqueryResult_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, bigqueryResult_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -240,7 +184,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.OutputResult) obj; if (!getBigqueryResultList().equals(other.getBigqueryResultList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -255,7 +199,7 @@ public int hashCode() { hash = (37 * hash) + BIGQUERY_RESULT_FIELD_NUMBER; hash = (53 * hash) + getBigqueryResultList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -384,19 +328,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.OutputResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getBigqueryResultFieldBuilder(); - } } @java.lang.Override @@ -404,10 +339,11 @@ public Builder clear() { super.clear(); if (bigqueryResultBuilder_ == null) { bigqueryResult_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + bigqueryResult_ = null; bigqueryResultBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -521,7 +457,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.OutputResult other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -536,17 +472,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.OutputResult parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2alpha.BigQueryOutputResult m = + input.readMessage( + com.google.cloud.retail.v2alpha.BigQueryOutputResult.parser(), + extensionRegistry); + if (bigqueryResultBuilder_ == null) { + ensureBigqueryResultIsMutable(); + bigqueryResult_.add(m); + } else { + bigqueryResultBuilder_.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) { - parsedMessage = (com.google.cloud.retail.v2alpha.OutputResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -946,7 +910,18 @@ public OutputResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputResult(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PauseModelRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PauseModelRequest.java index df518a4f..ad510d7e 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PauseModelRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PauseModelRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PauseModelRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ModelServiceProto .internal_static_google_cloud_retail_v2alpha_PauseModelRequest_descriptor; @@ -187,7 +141,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -199,7 +153,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -216,7 +170,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.PauseModelRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -229,7 +183,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -358,17 +312,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.PauseModelRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -458,7 +405,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.PauseModelRequest other name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -473,18 +420,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.PauseModelRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.PauseModelRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -646,7 +612,18 @@ public PauseModelRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PauseModelRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictRequest.java index 798a661d..c9a137fc 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictRequest.java @@ -54,119 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PredictRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - placement_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.UserEvent.Builder subBuilder = null; - if (userEvent_ != null) { - subBuilder = userEvent_.toBuilder(); - } - userEvent_ = - input.readMessage( - com.google.cloud.retail.v2alpha.UserEvent.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(userEvent_); - userEvent_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - pageSize_ = input.readInt32(); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 48: - { - validateOnly_ = input.readBool(); - break; - } - case 58: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - params_ = - com.google.protobuf.MapField.newMapField(ParamsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry params__ = - input.readMessage( - ParamsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - params_.getMutableMap().put(params__.getKey(), params__.getValue()); - break; - } - case 66: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.PredictionServiceProto .internal_static_google_cloud_retail_v2alpha_PredictRequest_descriptor; @@ -948,7 +835,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output, internalGetParams(), ParamsDefaultEntryHolder.defaultEntry, 7); com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 8); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -995,7 +882,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, labels__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1022,7 +909,7 @@ public boolean equals(final java.lang.Object obj) { if (getValidateOnly() != other.getValidateOnly()) return false; if (!internalGetParams().equals(other.internalGetParams())) return false; if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1055,7 +942,7 @@ public int hashCode() { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1208,17 +1095,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.retail.v2alpha.PredictRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1356,7 +1236,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.PredictRequest other) { } internalGetMutableParams().mergeFrom(other.internalGetParams()); internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1371,17 +1251,89 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.PredictRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + placement_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getUserEventFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 48: + { + validateOnly_ = input.readBool(); + + break; + } // case 48 + case 58: + { + com.google.protobuf.MapEntry params__ = + input.readMessage( + ParamsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableParams() + .getMutableMap() + .put(params__.getKey(), params__.getValue()); + break; + } // case 58 + case 66: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2alpha.PredictRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2968,7 +2920,18 @@ public PredictRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PredictRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictResponse.java index 1f64a370..e5cb0854 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PredictResponse.java @@ -54,88 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PredictResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = - new java.util.ArrayList< - com.google.cloud.retail.v2alpha.PredictResponse.PredictionResult>(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.PredictResponse.PredictionResult.parser(), - extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - attributionToken_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - missingIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - missingIds_.add(s); - break; - } - case 32: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - missingIds_ = missingIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.PredictionServiceProto .internal_static_google_cloud_retail_v2alpha_PredictResponse_descriptor; @@ -299,69 +217,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PredictionResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - id_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - metadata_ = - com.google.protobuf.MapField.newMapField( - MetadataDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - metadata__ = - input.readMessage( - MetadataDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - metadata_.getMutableMap().put(metadata__.getKey(), metadata__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.PredictionServiceProto .internal_static_google_cloud_retail_v2alpha_PredictResponse_PredictionResult_descriptor; @@ -580,7 +435,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 2); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -602,7 +457,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, metadata__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -620,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (!getId().equals(other.getId())) return false; if (!internalGetMetadata().equals(other.internalGetMetadata())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -637,7 +492,7 @@ public int hashCode() { hash = (37 * hash) + METADATA_FIELD_NUMBER; hash = (53 * hash) + internalGetMetadata().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -791,17 +646,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { // Construct using // com.google.cloud.retail.v2alpha.PredictResponse.PredictionResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -903,7 +751,7 @@ public Builder mergeFrom( onChanged(); } internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -918,19 +766,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.PredictResponse.PredictionResult parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry + metadata__ = + input.readMessage( + MetadataDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableMetadata() + .getMutableMap() + .put(metadata__.getKey(), metadata__.getValue()); + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.PredictResponse.PredictionResult) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1276,7 +1154,19 @@ public PredictionResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PredictionResult(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1538,7 +1428,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(4, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1564,7 +1454,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1584,7 +1474,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAttributionToken().equals(other.getAttributionToken())) return false; if (!getMissingIdsList().equals(other.getMissingIdsList())) return false; if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1607,7 +1497,7 @@ public int hashCode() { } hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1736,19 +1626,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.PredictResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - } } @java.lang.Override @@ -1756,10 +1637,11 @@ public Builder clear() { super.clear(); if (resultsBuilder_ == null) { results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + results_ = null; resultsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); attributionToken_ = ""; missingIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -1904,7 +1786,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.PredictResponse other) if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1919,17 +1801,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.PredictResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2alpha.PredictResponse.PredictionResult m = + input.readMessage( + com.google.cloud.retail.v2alpha.PredictResponse.PredictionResult.parser(), + extensionRegistry); + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(m); + } else { + resultsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + attributionToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureMissingIdsIsMutable(); + missingIds_.add(s); + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2alpha.PredictResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2714,7 +2643,18 @@ public PredictResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PredictResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PriceInfo.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PriceInfo.java index bc87f918..9d62c12c 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PriceInfo.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PriceInfo.java @@ -52,114 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PriceInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - currencyCode_ = s; - break; - } - case 21: - { - price_ = input.readFloat(); - break; - } - case 29: - { - originalPrice_ = input.readFloat(); - break; - } - case 37: - { - cost_ = input.readFloat(); - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (priceEffectiveTime_ != null) { - subBuilder = priceEffectiveTime_.toBuilder(); - } - priceEffectiveTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(priceEffectiveTime_); - priceEffectiveTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (priceExpireTime_ != null) { - subBuilder = priceExpireTime_.toBuilder(); - } - priceExpireTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(priceExpireTime_); - priceExpireTime_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - com.google.cloud.retail.v2alpha.PriceInfo.PriceRange.Builder subBuilder = null; - if (priceRange_ != null) { - subBuilder = priceRange_.toBuilder(); - } - priceRange_ = - input.readMessage( - com.google.cloud.retail.v2alpha.PriceInfo.PriceRange.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(priceRange_); - priceRange_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_PriceInfo_descriptor; @@ -315,77 +207,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PriceRange( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2alpha.Interval.Builder subBuilder = null; - if (price_ != null) { - subBuilder = price_.toBuilder(); - } - price_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Interval.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(price_); - price_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.Interval.Builder subBuilder = null; - if (originalPrice_ != null) { - subBuilder = originalPrice_.toBuilder(); - } - originalPrice_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Interval.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(originalPrice_); - originalPrice_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_PriceInfo_PriceRange_descriptor; @@ -547,7 +368,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (originalPrice_ != null) { output.writeMessage(2, getOriginalPrice()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -562,7 +383,7 @@ public int getSerializedSize() { if (originalPrice_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOriginalPrice()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -586,7 +407,7 @@ public boolean equals(final java.lang.Object obj) { if (hasOriginalPrice()) { if (!getOriginalPrice().equals(other.getOriginalPrice())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -605,7 +426,7 @@ public int hashCode() { hash = (37 * hash) + ORIGINAL_PRICE_FIELD_NUMBER; hash = (53 * hash) + getOriginalPrice().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -740,17 +561,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.PriceInfo.PriceRange.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -863,7 +677,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.PriceInfo.PriceRange ot if (other.hasOriginalPrice()) { mergeOriginalPrice(other.getOriginalPrice()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -878,18 +692,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.PriceInfo.PriceRange parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPriceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getOriginalPriceFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.PriceInfo.PriceRange) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1387,7 +1226,19 @@ public PriceRange parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PriceRange(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1826,7 +1677,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (priceRange_ != null) { output.writeMessage(7, getPriceRange()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1856,7 +1707,7 @@ public int getSerializedSize() { if (priceRange_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getPriceRange()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1891,7 +1742,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPriceRange()) { if (!getPriceRange().equals(other.getPriceRange())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1922,7 +1773,7 @@ public int hashCode() { hash = (37 * hash) + PRICE_RANGE_FIELD_NUMBER; hash = (53 * hash) + getPriceRange().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2051,17 +1902,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.PriceInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2210,7 +2054,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.PriceInfo other) { if (other.hasPriceRange()) { mergePriceRange(other.getPriceRange()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2225,17 +2069,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.PriceInfo parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + currencyCode_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 21: + { + price_ = input.readFloat(); + + break; + } // case 21 + case 29: + { + originalPrice_ = input.readFloat(); + + break; + } // case 29 + case 37: + { + cost_ = input.readFloat(); + + break; + } // case 37 + case 42: + { + input.readMessage( + getPriceEffectiveTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + input.readMessage(getPriceExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + input.readMessage(getPriceRangeFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = (com.google.cloud.retail.v2alpha.PriceInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3493,7 +3394,18 @@ public PriceInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PriceInfo(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Product.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Product.java index 612ec780..857282bc 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Product.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Product.java @@ -74,448 +74,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Product( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - id_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - primaryProductId_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - collectionMemberIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - collectionMemberIds_.add(s); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - gtin_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - categories_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - categories_.add(s); - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - title_ = s; - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - brands_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - brands_.add(s); - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 90: - { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - case 98: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - attributes_ = - com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000008; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.retail.v2alpha.CustomAttribute> - attributes__ = - input.readMessage( - AttributesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - attributes_.getMutableMap().put(attributes__.getKey(), attributes__.getValue()); - break; - } - case 106: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - tags_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000010; - } - tags_.add(s); - break; - } - case 114: - { - com.google.cloud.retail.v2alpha.PriceInfo.Builder subBuilder = null; - if (priceInfo_ != null) { - subBuilder = priceInfo_.toBuilder(); - } - priceInfo_ = - input.readMessage( - com.google.cloud.retail.v2alpha.PriceInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(priceInfo_); - priceInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 122: - { - com.google.cloud.retail.v2alpha.Rating.Builder subBuilder = null; - if (rating_ != null) { - subBuilder = rating_.toBuilder(); - } - rating_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Rating.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(rating_); - rating_ = subBuilder.buildPartial(); - } - - break; - } - case 130: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (expirationCase_ == 16) { - subBuilder = ((com.google.protobuf.Timestamp) expiration_).toBuilder(); - } - expiration_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.protobuf.Timestamp) expiration_); - expiration_ = subBuilder.buildPartial(); - } - expirationCase_ = 16; - break; - } - case 138: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (expirationCase_ == 17) { - subBuilder = ((com.google.protobuf.Duration) expiration_).toBuilder(); - } - expiration_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.protobuf.Duration) expiration_); - expiration_ = subBuilder.buildPartial(); - } - expirationCase_ = 17; - break; - } - case 146: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (availableTime_ != null) { - subBuilder = availableTime_.toBuilder(); - } - availableTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(availableTime_); - availableTime_ = subBuilder.buildPartial(); - } - - break; - } - case 152: - { - int rawValue = input.readEnum(); - - availability_ = rawValue; - break; - } - case 162: - { - com.google.protobuf.Int32Value.Builder subBuilder = null; - if (availableQuantity_ != null) { - subBuilder = availableQuantity_.toBuilder(); - } - availableQuantity_ = - input.readMessage(com.google.protobuf.Int32Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(availableQuantity_); - availableQuantity_ = subBuilder.buildPartial(); - } - - break; - } - case 170: - { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - fulfillmentInfo_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - fulfillmentInfo_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.FulfillmentInfo.parser(), extensionRegistry)); - break; - } - case 178: - { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 186: - { - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - images_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - images_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.Image.parser(), extensionRegistry)); - break; - } - case 194: - { - com.google.cloud.retail.v2alpha.Audience.Builder subBuilder = null; - if (audience_ != null) { - subBuilder = audience_.toBuilder(); - } - audience_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Audience.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(audience_); - audience_ = subBuilder.buildPartial(); - } - - break; - } - case 202: - { - com.google.cloud.retail.v2alpha.ColorInfo.Builder subBuilder = null; - if (colorInfo_ != null) { - subBuilder = colorInfo_.toBuilder(); - } - colorInfo_ = - input.readMessage( - com.google.cloud.retail.v2alpha.ColorInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(colorInfo_); - colorInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 210: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - sizes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000080; - } - sizes_.add(s); - break; - } - case 218: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000100) != 0)) { - materials_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000100; - } - materials_.add(s); - break; - } - case 226: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000200) != 0)) { - patterns_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000200; - } - patterns_.add(s); - break; - } - case 234: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000400) != 0)) { - conditions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000400; - } - conditions_.add(s); - break; - } - case 242: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (retrievableFields_ != null) { - subBuilder = retrievableFields_.toBuilder(); - } - retrievableFields_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(retrievableFields_); - retrievableFields_ = subBuilder.buildPartial(); - } - - break; - } - case 250: - { - if (!((mutable_bitField0_ & 0x00001000) != 0)) { - variants_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00001000; - } - variants_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.Product.parser(), extensionRegistry)); - break; - } - case 266: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (publishTime_ != null) { - subBuilder = publishTime_.toBuilder(); - } - publishTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(publishTime_); - publishTime_ = subBuilder.buildPartial(); - } - - break; - } - case 274: - { - if (!((mutable_bitField0_ & 0x00000800) != 0)) { - promotions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000800; - } - promotions_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.Promotion.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - collectionMemberIds_ = collectionMemberIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - categories_ = categories_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - brands_ = brands_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - tags_ = tags_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - fulfillmentInfo_ = java.util.Collections.unmodifiableList(fulfillmentInfo_); - } - if (((mutable_bitField0_ & 0x00000040) != 0)) { - images_ = java.util.Collections.unmodifiableList(images_); - } - if (((mutable_bitField0_ & 0x00000080) != 0)) { - sizes_ = sizes_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000100) != 0)) { - materials_ = materials_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000200) != 0)) { - patterns_ = patterns_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000400) != 0)) { - conditions_ = conditions_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00001000) != 0)) { - variants_ = java.util.Collections.unmodifiableList(variants_); - } - if (((mutable_bitField0_ & 0x00000800) != 0)) { - promotions_ = java.util.Collections.unmodifiableList(promotions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductProto .internal_static_google_cloud_retail_v2alpha_Product_descriptor; @@ -3913,7 +3471,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < promotions_.size(); i++) { output.writeMessage(34, promotions_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4076,7 +3634,7 @@ public int getSerializedSize() { for (int i = 0; i < promotions_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(34, promotions_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4157,7 +3715,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4284,7 +3842,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4434,27 +3992,21 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.retail.v2alpha.Product.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getFulfillmentInfoFieldBuilder(); - getImagesFieldBuilder(); - getPromotionsFieldBuilder(); - getVariantsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.clear(); + } + if (ttlBuilder_ != null) { + ttlBuilder_.clear(); + } name_ = ""; id_ = ""; @@ -4508,18 +4060,20 @@ public Builder clear() { } if (fulfillmentInfoBuilder_ == null) { fulfillmentInfo_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); } else { + fulfillmentInfo_ = null; fulfillmentInfoBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000020); uri_ = ""; if (imagesBuilder_ == null) { images_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); } else { + images_ = null; imagesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000040); if (audienceBuilder_ == null) { audience_ = null; } else { @@ -4542,10 +4096,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000400); if (promotionsBuilder_ == null) { promotions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); } else { + promotions_ = null; promotionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000800); if (publishTimeBuilder_ == null) { publishTime_ = null; } else { @@ -4560,10 +4115,11 @@ public Builder clear() { } if (variantsBuilder_ == null) { variants_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00001000); } else { + variants_ = null; variantsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00001000); expirationCase_ = 0; expiration_ = null; return this; @@ -5053,7 +4609,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Product other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5068,17 +4624,275 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Product parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + id_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + type_ = input.readEnum(); + + break; + } // case 24 + case 34: + { + primaryProductId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCollectionMemberIdsIsMutable(); + collectionMemberIds_.add(s); + break; + } // case 42 + case 50: + { + gtin_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCategoriesIsMutable(); + categories_.add(s); + break; + } // case 58 + case 66: + { + title_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureBrandsIsMutable(); + brands_.add(s); + break; + } // case 74 + case 82: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 90: + { + languageCode_ = input.readStringRequireUtf8(); + + break; + } // case 90 + case 98: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.retail.v2alpha.CustomAttribute> + attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .getMutableMap() + .put(attributes__.getKey(), attributes__.getValue()); + break; + } // case 98 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagsIsMutable(); + tags_.add(s); + break; + } // case 106 + case 114: + { + input.readMessage(getPriceInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 114 + case 122: + { + input.readMessage(getRatingFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 122 + case 130: + { + input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + expirationCase_ = 16; + break; + } // case 130 + case 138: + { + input.readMessage(getTtlFieldBuilder().getBuilder(), extensionRegistry); + expirationCase_ = 17; + break; + } // case 138 + case 146: + { + input.readMessage(getAvailableTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 146 + case 152: + { + availability_ = input.readEnum(); + + break; + } // case 152 + case 162: + { + input.readMessage( + getAvailableQuantityFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 162 + case 170: + { + com.google.cloud.retail.v2alpha.FulfillmentInfo m = + input.readMessage( + com.google.cloud.retail.v2alpha.FulfillmentInfo.parser(), + extensionRegistry); + if (fulfillmentInfoBuilder_ == null) { + ensureFulfillmentInfoIsMutable(); + fulfillmentInfo_.add(m); + } else { + fulfillmentInfoBuilder_.addMessage(m); + } + break; + } // case 170 + case 178: + { + uri_ = input.readStringRequireUtf8(); + + break; + } // case 178 + case 186: + { + com.google.cloud.retail.v2alpha.Image m = + input.readMessage( + com.google.cloud.retail.v2alpha.Image.parser(), extensionRegistry); + if (imagesBuilder_ == null) { + ensureImagesIsMutable(); + images_.add(m); + } else { + imagesBuilder_.addMessage(m); + } + break; + } // case 186 + case 194: + { + input.readMessage(getAudienceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 194 + case 202: + { + input.readMessage(getColorInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 202 + case 210: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSizesIsMutable(); + sizes_.add(s); + break; + } // case 210 + case 218: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureMaterialsIsMutable(); + materials_.add(s); + break; + } // case 218 + case 226: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePatternsIsMutable(); + patterns_.add(s); + break; + } // case 226 + case 234: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureConditionsIsMutable(); + conditions_.add(s); + break; + } // case 234 + case 242: + { + input.readMessage( + getRetrievableFieldsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 242 + case 250: + { + com.google.cloud.retail.v2alpha.Product m = + input.readMessage( + com.google.cloud.retail.v2alpha.Product.parser(), extensionRegistry); + if (variantsBuilder_ == null) { + ensureVariantsIsMutable(); + variants_.add(m); + } else { + variantsBuilder_.addMessage(m); + } + break; + } // case 250 + case 266: + { + input.readMessage(getPublishTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 266 + case 274: + { + com.google.cloud.retail.v2alpha.Promotion m = + input.readMessage( + com.google.cloud.retail.v2alpha.Promotion.parser(), extensionRegistry); + if (promotionsBuilder_ == null) { + ensurePromotionsIsMutable(); + promotions_.add(m); + } else { + promotionsBuilder_.addMessage(m); + } + break; + } // case 274 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2alpha.Product) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -13490,7 +13304,18 @@ public Product parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Product(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductDetail.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductDetail.java index db195831..c8fba923 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductDetail.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductDetail.java @@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ProductDetail( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2alpha.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Int32Value.Builder subBuilder = null; - if (quantity_ != null) { - subBuilder = quantity_.toBuilder(); - } - quantity_ = - input.readMessage(com.google.protobuf.Int32Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(quantity_); - quantity_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.UserEventProto .internal_static_google_cloud_retail_v2alpha_ProductDetail_descriptor; @@ -294,7 +224,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (quantity_ != null) { output.writeMessage(2, getQuantity()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -309,7 +239,7 @@ public int getSerializedSize() { if (quantity_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getQuantity()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -333,7 +263,7 @@ public boolean equals(final java.lang.Object obj) { if (hasQuantity()) { if (!getQuantity().equals(other.getQuantity())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -352,7 +282,7 @@ public int hashCode() { hash = (37 * hash) + QUANTITY_FIELD_NUMBER; hash = (53 * hash) + getQuantity().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -481,17 +411,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ProductDetail.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -601,7 +524,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ProductDetail other) { if (other.hasQuantity()) { mergeQuantity(other.getQuantity()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -616,17 +539,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ProductDetail parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getProductFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getQuantityFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = (com.google.cloud.retail.v2alpha.ProductDetail) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1161,7 +1110,18 @@ public ProductDetail parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductDetail(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductInlineSource.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductInlineSource.java index 54a2de81..9e4de8c2 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductInlineSource.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductInlineSource.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ProductInlineSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - products_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.Product.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = java.util.Collections.unmodifiableList(products_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ImportConfigProto .internal_static_google_cloud_retail_v2alpha_ProductInlineSource_descriptor; @@ -227,7 +173,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < products_.size(); i++) { output.writeMessage(1, products_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -239,7 +185,7 @@ public int getSerializedSize() { for (int i = 0; i < products_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, products_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -256,7 +202,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.ProductInlineSource) obj; if (!getProductsList().equals(other.getProductsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -271,7 +217,7 @@ public int hashCode() { hash = (37 * hash) + PRODUCTS_FIELD_NUMBER; hash = (53 * hash) + getProductsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -400,19 +346,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ProductInlineSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getProductsFieldBuilder(); - } } @java.lang.Override @@ -420,10 +357,11 @@ public Builder clear() { super.clear(); if (productsBuilder_ == null) { products_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + products_ = null; productsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -538,7 +476,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ProductInlineSource oth } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -553,18 +491,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ProductInlineSource parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2alpha.Product m = + input.readMessage( + com.google.cloud.retail.v2alpha.Product.parser(), extensionRegistry); + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(m); + } else { + productsBuilder_.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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ProductInlineSource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1023,7 +987,18 @@ public ProductInlineSource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductInlineSource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductInputConfig.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductInputConfig.java index 4836fe5f..9ecae531 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductInputConfig.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductInputConfig.java @@ -50,95 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ProductInputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2alpha.ProductInlineSource.Builder subBuilder = null; - if (sourceCase_ == 1) { - subBuilder = - ((com.google.cloud.retail.v2alpha.ProductInlineSource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.retail.v2alpha.ProductInlineSource.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2alpha.ProductInlineSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 1; - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.GcsSource.Builder subBuilder = null; - if (sourceCase_ == 2) { - subBuilder = ((com.google.cloud.retail.v2alpha.GcsSource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.retail.v2alpha.GcsSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2alpha.GcsSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 2; - break; - } - case 26: - { - com.google.cloud.retail.v2alpha.BigQuerySource.Builder subBuilder = null; - if (sourceCase_ == 3) { - subBuilder = ((com.google.cloud.retail.v2alpha.BigQuerySource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.retail.v2alpha.BigQuerySource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2alpha.BigQuerySource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 3; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ImportConfigProto .internal_static_google_cloud_retail_v2alpha_ProductInputConfig_descriptor; @@ -381,7 +292,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceCase_ == 3) { output.writeMessage(3, (com.google.cloud.retail.v2alpha.BigQuerySource) source_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +316,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 3, (com.google.cloud.retail.v2alpha.BigQuerySource) source_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -435,7 +346,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -462,7 +373,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -591,22 +502,24 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ProductInputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (productInlineSourceBuilder_ != null) { + productInlineSourceBuilder_.clear(); + } + if (gcsSourceBuilder_ != null) { + gcsSourceBuilder_.clear(); + } + if (bigQuerySourceBuilder_ != null) { + bigQuerySourceBuilder_.clear(); + } sourceCase_ = 0; source_ = null; return this; @@ -729,7 +642,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ProductInputConfig othe break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -744,18 +657,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ProductInputConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getProductInlineSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getGcsSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getBigQuerySourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ProductInputConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1439,7 +1384,18 @@ public ProductInputConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductInputConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductLevelConfig.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductLevelConfig.java index 69047a67..c5228cb2 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductLevelConfig.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ProductLevelConfig.java @@ -54,59 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ProductLevelConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - ingestionProductType_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - merchantCenterProductIdField_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogProto .internal_static_google_cloud_retail_v2alpha_ProductLevelConfig_descriptor; @@ -312,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(merchantCenterProductIdField_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, merchantCenterProductIdField_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -329,7 +276,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 2, merchantCenterProductIdField_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -348,7 +295,7 @@ public boolean equals(final java.lang.Object obj) { if (!getIngestionProductType().equals(other.getIngestionProductType())) return false; if (!getMerchantCenterProductIdField().equals(other.getMerchantCenterProductIdField())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -363,7 +310,7 @@ public int hashCode() { hash = (53 * hash) + getIngestionProductType().hashCode(); hash = (37 * hash) + MERCHANT_CENTER_PRODUCT_ID_FIELD_FIELD_NUMBER; hash = (53 * hash) + getMerchantCenterProductIdField().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -493,17 +440,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ProductLevelConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -600,7 +540,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ProductLevelConfig othe merchantCenterProductIdField_ = other.merchantCenterProductIdField_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -615,18 +555,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ProductLevelConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + ingestionProductType_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + merchantCenterProductIdField_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ProductLevelConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1054,7 +1019,18 @@ public ProductLevelConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductLevelConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Promotion.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Promotion.java index a205a8c9..3c399e92 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Promotion.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Promotion.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Promotion( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - promotionId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.PromotionProto .internal_static_google_cloud_retail_v2alpha_Promotion_descriptor; @@ -191,7 +145,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promotionId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, promotionId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -203,7 +157,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promotionId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, promotionId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -220,7 +174,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.Promotion) obj; if (!getPromotionId().equals(other.getPromotionId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -233,7 +187,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PROMOTION_ID_FIELD_NUMBER; hash = (53 * hash) + getPromotionId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -362,17 +316,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Promotion.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -461,7 +408,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Promotion other) { promotionId_ = other.promotionId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -476,17 +423,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Promotion parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + promotionId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2alpha.Promotion) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -658,7 +625,18 @@ public Promotion parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Promotion(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurchaseTransaction.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurchaseTransaction.java index 6e12b3b7..4f39476e 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurchaseTransaction.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurchaseTransaction.java @@ -53,74 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PurchaseTransaction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - id_ = s; - break; - } - case 21: - { - revenue_ = input.readFloat(); - break; - } - case 29: - { - tax_ = input.readFloat(); - break; - } - case 37: - { - cost_ = input.readFloat(); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - currencyCode_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.UserEventProto .internal_static_google_cloud_retail_v2alpha_PurchaseTransaction_descriptor; @@ -326,7 +258,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currencyCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, currencyCode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -350,7 +282,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currencyCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, currencyCode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -374,7 +306,7 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Float.floatToIntBits(getCost()) != java.lang.Float.floatToIntBits(other.getCost())) return false; if (!getCurrencyCode().equals(other.getCurrencyCode())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -395,7 +327,7 @@ public int hashCode() { hash = (53 * hash) + java.lang.Float.floatToIntBits(getCost()); hash = (37 * hash) + CURRENCY_CODE_FIELD_NUMBER; hash = (53 * hash) + getCurrencyCode().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -524,17 +456,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.PurchaseTransaction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -649,7 +574,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.PurchaseTransaction oth currencyCode_ = other.currencyCode_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -664,18 +589,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.PurchaseTransaction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 21: + { + revenue_ = input.readFloat(); + + break; + } // case 21 + case 29: + { + tax_ = input.readFloat(); + + break; + } // case 29 + case 37: + { + cost_ = input.readFloat(); + + break; + } // case 37 + case 42: + { + currencyCode_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.PurchaseTransaction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1106,7 +1074,18 @@ public PurchaseTransaction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PurchaseTransaction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeMetadata.java index 11952a5f..d3face2f 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeMetadata.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeMetadata.java @@ -51,45 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PurgeMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.PurgeConfigProto .internal_static_google_cloud_retail_v2alpha_PurgeMetadata_descriptor; @@ -119,7 +80,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -128,7 +89,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -144,7 +105,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2alpha.PurgeMetadata other = (com.google.cloud.retail.v2alpha.PurgeMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -155,7 +116,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -285,17 +246,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.PurgeMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -377,7 +331,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2alpha.PurgeMetadata other) { if (other == com.google.cloud.retail.v2alpha.PurgeMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -392,17 +346,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.PurgeMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = (com.google.cloud.retail.v2alpha.PurgeMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -438,7 +406,18 @@ public PurgeMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PurgeMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeProductsMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeProductsMetadata.java index 2d842373..98dc0a67 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeProductsMetadata.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeProductsMetadata.java @@ -51,85 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PurgeProductsMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - successCount_ = input.readInt64(); - break; - } - case 32: - { - failureCount_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.PurgeConfigProto .internal_static_google_cloud_retail_v2alpha_PurgeProductsMetadata_descriptor; @@ -302,7 +223,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (failureCount_ != 0L) { output.writeInt64(4, failureCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -323,7 +244,7 @@ public int getSerializedSize() { if (failureCount_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, failureCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -349,7 +270,7 @@ public boolean equals(final java.lang.Object obj) { } if (getSuccessCount() != other.getSuccessCount()) return false; if (getFailureCount() != other.getFailureCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -372,7 +293,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getSuccessCount()); hash = (37 * hash) + FAILURE_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getFailureCount()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -503,17 +424,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.PurgeProductsMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -636,7 +550,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.PurgeProductsMetadata o if (other.getFailureCount() != 0L) { setFailureCount(other.getFailureCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -651,18 +565,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.PurgeProductsMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + successCount_ = input.readInt64(); + + break; + } // case 24 + case 32: + { + failureCount_ = input.readInt64(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.PurgeProductsMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1177,7 +1128,18 @@ public PurgeProductsMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PurgeProductsMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeProductsRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeProductsRequest.java index 103b1a8f..c11a0b3b 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeProductsRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeProductsRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PurgeProductsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 24: - { - force_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.PurgeConfigProto .internal_static_google_cloud_retail_v2alpha_PurgeProductsRequest_descriptor; @@ -333,7 +275,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (force_ != false) { output.writeBool(3, force_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -351,7 +293,7 @@ public int getSerializedSize() { if (force_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -370,7 +312,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (!getFilter().equals(other.getFilter())) return false; if (getForce() != other.getForce()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -387,7 +329,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + FORCE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -516,17 +458,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.PurgeProductsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -629,7 +564,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.PurgeProductsRequest ot if (other.getForce() != false) { setForce(other.getForce()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -644,18 +579,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.PurgeProductsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + force_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.PurgeProductsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1126,7 +1092,18 @@ public PurgeProductsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PurgeProductsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeProductsResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeProductsResponse.java index 495a7715..939b58db 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeProductsResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeProductsResponse.java @@ -54,64 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PurgeProductsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - purgeCount_ = input.readInt64(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - purgeSample_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - purgeSample_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - purgeSample_ = purgeSample_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.PurgeConfigProto .internal_static_google_cloud_retail_v2alpha_PurgeProductsResponse_descriptor; @@ -234,7 +176,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < purgeSample_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, purgeSample_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +196,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getPurgeSampleList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +214,7 @@ public boolean equals(final java.lang.Object obj) { if (getPurgeCount() != other.getPurgeCount()) return false; if (!getPurgeSampleList().equals(other.getPurgeSampleList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -289,7 +231,7 @@ public int hashCode() { hash = (37 * hash) + PURGE_SAMPLE_FIELD_NUMBER; hash = (53 * hash) + getPurgeSampleList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -421,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.PurgeProductsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -538,7 +473,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.PurgeProductsResponse o } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -553,18 +488,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.PurgeProductsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + purgeCount_ = input.readInt64(); + + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePurgeSampleIsMutable(); + purgeSample_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2alpha.PurgeProductsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -840,7 +801,18 @@ public PurgeProductsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PurgeProductsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeUserEventsRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeUserEventsRequest.java index ca4afb0c..92a6934f 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeUserEventsRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeUserEventsRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PurgeUserEventsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 24: - { - force_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.PurgeConfigProto .internal_static_google_cloud_retail_v2alpha_PurgeUserEventsRequest_descriptor; @@ -313,7 +255,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (force_ != false) { output.writeBool(3, force_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -331,7 +273,7 @@ public int getSerializedSize() { if (force_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -350,7 +292,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (!getFilter().equals(other.getFilter())) return false; if (getForce() != other.getForce()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -367,7 +309,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + FORCE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -497,17 +439,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.PurgeUserEventsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -610,7 +545,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.PurgeUserEventsRequest if (other.getForce() != false) { setForce(other.getForce()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -625,18 +560,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.PurgeUserEventsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + force_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.PurgeUserEventsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1057,7 +1023,18 @@ public PurgeUserEventsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PurgeUserEventsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeUserEventsResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeUserEventsResponse.java index 7299eb9f..da74704e 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeUserEventsResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/PurgeUserEventsResponse.java @@ -52,50 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PurgeUserEventsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - purgedEventsCount_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.PurgeConfigProto .internal_static_google_cloud_retail_v2alpha_PurgeUserEventsResponse_descriptor; @@ -146,7 +102,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (purgedEventsCount_ != 0L) { output.writeInt64(1, purgedEventsCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -158,7 +114,7 @@ public int getSerializedSize() { if (purgedEventsCount_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, purgedEventsCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -175,7 +131,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.PurgeUserEventsResponse) obj; if (getPurgedEventsCount() != other.getPurgedEventsCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -188,7 +144,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PURGED_EVENTS_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPurgedEventsCount()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -320,17 +276,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.PurgeUserEventsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -419,7 +368,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.PurgeUserEventsResponse if (other.getPurgedEventsCount() != 0L) { setPurgedEventsCount(other.getPurgedEventsCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -434,18 +383,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.PurgeUserEventsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + purgedEventsCount_ = input.readInt64(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.PurgeUserEventsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -533,7 +501,18 @@ public PurgeUserEventsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PurgeUserEventsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Rating.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Rating.java index 8975ef2a..3a100eb2 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Rating.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Rating.java @@ -52,82 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Rating( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - ratingCount_ = input.readInt32(); - break; - } - case 21: - { - averageRating_ = input.readFloat(); - break; - } - case 24: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - ratingHistogram_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - ratingHistogram_.addInt(input.readInt32()); - break; - } - case 26: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - ratingHistogram_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - ratingHistogram_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - ratingHistogram_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_Rating_descriptor; @@ -276,7 +200,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < ratingHistogram_.size(); i++) { output.writeInt32NoTag(ratingHistogram_.getInt(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -304,7 +228,7 @@ public int getSerializedSize() { } ratingHistogramMemoizedSerializedSize = dataSize; } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -323,7 +247,7 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Float.floatToIntBits(getAverageRating()) != java.lang.Float.floatToIntBits(other.getAverageRating())) return false; if (!getRatingHistogramList().equals(other.getRatingHistogramList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -342,7 +266,7 @@ public int hashCode() { hash = (37 * hash) + RATING_HISTOGRAM_FIELD_NUMBER; hash = (53 * hash) + getRatingHistogramList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -471,17 +395,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Rating.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -593,7 +510,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Rating other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -608,17 +525,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Rating parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + ratingCount_ = input.readInt32(); + + break; + } // case 8 + case 21: + { + averageRating_ = input.readFloat(); + + break; + } // case 21 + case 24: + { + int v = input.readInt32(); + ensureRatingHistogramIsMutable(); + ratingHistogram_.addInt(v); + break; + } // case 24 + case 26: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureRatingHistogramIsMutable(); + while (input.getBytesUntilLimit() > 0) { + ratingHistogram_.addInt(input.readInt32()); + } + 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) { - parsedMessage = (com.google.cloud.retail.v2alpha.Rating) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -936,7 +897,18 @@ public Rating parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Rating(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RejoinUserEventsMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RejoinUserEventsMetadata.java index abc64d9a..a66b44d5 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RejoinUserEventsMetadata.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RejoinUserEventsMetadata.java @@ -50,45 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RejoinUserEventsMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.UserEventServiceProto .internal_static_google_cloud_retail_v2alpha_RejoinUserEventsMetadata_descriptor; @@ -118,7 +79,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -127,7 +88,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -143,7 +104,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2alpha.RejoinUserEventsMetadata other = (com.google.cloud.retail.v2alpha.RejoinUserEventsMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -154,7 +115,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -284,17 +245,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.RejoinUserEventsMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -377,7 +331,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2alpha.RejoinUserEventsMetadata other) { if (other == com.google.cloud.retail.v2alpha.RejoinUserEventsMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -392,18 +346,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.RejoinUserEventsMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.RejoinUserEventsMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -439,7 +406,18 @@ public RejoinUserEventsMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RejoinUserEventsMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RejoinUserEventsRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RejoinUserEventsRequest.java index 327dbfe5..b3b89e78 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RejoinUserEventsRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RejoinUserEventsRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RejoinUserEventsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - userEventRejoinScope_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.UserEventServiceProto .internal_static_google_cloud_retail_v2alpha_RejoinUserEventsRequest_descriptor; @@ -415,7 +362,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(2, userEventRejoinScope_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -433,7 +380,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, userEventRejoinScope_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -451,7 +398,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (userEventRejoinScope_ != other.userEventRejoinScope_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -466,7 +413,7 @@ public int hashCode() { hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + USER_EVENT_REJOIN_SCOPE_FIELD_NUMBER; hash = (53 * hash) + userEventRejoinScope_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -596,17 +543,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.RejoinUserEventsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -702,7 +642,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.RejoinUserEventsRequest if (other.userEventRejoinScope_ != 0) { setUserEventRejoinScopeValue(other.getUserEventRejoinScopeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -717,18 +657,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.RejoinUserEventsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + userEventRejoinScope_ = input.readEnum(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.RejoinUserEventsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -997,7 +962,18 @@ public RejoinUserEventsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RejoinUserEventsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RejoinUserEventsResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RejoinUserEventsResponse.java index e235e1d0..29c6a156 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RejoinUserEventsResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RejoinUserEventsResponse.java @@ -50,50 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RejoinUserEventsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - rejoinedUserEventsCount_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.UserEventServiceProto .internal_static_google_cloud_retail_v2alpha_RejoinUserEventsResponse_descriptor; @@ -144,7 +100,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (rejoinedUserEventsCount_ != 0L) { output.writeInt64(1, rejoinedUserEventsCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -156,7 +112,7 @@ public int getSerializedSize() { if (rejoinedUserEventsCount_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, rejoinedUserEventsCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -173,7 +129,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.RejoinUserEventsResponse) obj; if (getRejoinedUserEventsCount() != other.getRejoinedUserEventsCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -186,7 +142,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + REJOINED_USER_EVENTS_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRejoinedUserEventsCount()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -316,17 +272,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.RejoinUserEventsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -415,7 +364,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.RejoinUserEventsRespons if (other.getRejoinedUserEventsCount() != 0L) { setRejoinedUserEventsCount(other.getRejoinedUserEventsCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -430,18 +379,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.RejoinUserEventsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + rejoinedUserEventsCount_ = input.readInt64(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.RejoinUserEventsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -529,7 +497,18 @@ public RejoinUserEventsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RejoinUserEventsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveCatalogAttributeRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveCatalogAttributeRequest.java index db3cd81a..eca9dc00 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveCatalogAttributeRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveCatalogAttributeRequest.java @@ -55,59 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveCatalogAttributeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - attributesConfig_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - key_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogServiceProto .internal_static_google_cloud_retail_v2alpha_RemoveCatalogAttributeRequest_descriptor; @@ -249,7 +196,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, key_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -264,7 +211,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, key_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -282,7 +229,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAttributesConfig().equals(other.getAttributesConfig())) return false; if (!getKey().equals(other.getKey())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -297,7 +244,7 @@ public int hashCode() { hash = (53 * hash) + getAttributesConfig().hashCode(); hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -429,17 +376,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.RemoveCatalogAttributeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -538,7 +478,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.RemoveCatalogAttributeR key_ = other.key_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -553,19 +493,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.RemoveCatalogAttributeRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attributesConfig_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + key_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.RemoveCatalogAttributeRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -834,7 +798,18 @@ public RemoveCatalogAttributeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveCatalogAttributeRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveControlRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveControlRequest.java index e6f76654..7c7efe2d 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveControlRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveControlRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveControlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - servingConfig_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - controlId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ServingConfigServiceProto .internal_static_google_cloud_retail_v2alpha_RemoveControlRequest_descriptor; @@ -247,7 +194,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controlId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, controlId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -262,7 +209,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controlId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, controlId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -280,7 +227,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServingConfig().equals(other.getServingConfig())) return false; if (!getControlId().equals(other.getControlId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -295,7 +242,7 @@ public int hashCode() { hash = (53 * hash) + getServingConfig().hashCode(); hash = (37 * hash) + CONTROL_ID_FIELD_NUMBER; hash = (53 * hash) + getControlId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -424,17 +371,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.RemoveControlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -531,7 +471,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.RemoveControlRequest ot controlId_ = other.controlId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -546,18 +486,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.RemoveControlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + servingConfig_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + controlId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.RemoveControlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -825,7 +790,18 @@ public RemoveControlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveControlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesMetadata.java index c8a3d966..0d3f5a53 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesMetadata.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesMetadata.java @@ -54,45 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveFulfillmentPlacesMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_RemoveFulfillmentPlacesMetadata_descriptor; @@ -122,7 +83,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -131,7 +92,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -147,7 +108,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesMetadata other = (com.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -158,7 +119,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -291,17 +252,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -387,7 +341,7 @@ public Builder mergeFrom( if (other == com.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -402,19 +356,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesMetadata) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -452,7 +418,18 @@ public RemoveFulfillmentPlacesMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveFulfillmentPlacesMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesRequest.java index c72fd58c..597b5959 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveFulfillmentPlacesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - product_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - placeIds_.add(s); - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (removeTime_ != null) { - subBuilder = removeTime_.toBuilder(); - } - removeTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(removeTime_); - removeTime_ = subBuilder.buildPartial(); - } - - break; - } - case 40: - { - allowMissing_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = placeIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_RemoveFulfillmentPlacesRequest_descriptor; @@ -498,7 +411,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (allowMissing_ != false) { output.writeBool(5, allowMissing_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -527,7 +440,7 @@ public int getSerializedSize() { if (allowMissing_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, allowMissing_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -551,7 +464,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRemoveTime().equals(other.getRemoveTime())) return false; } if (getAllowMissing() != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -576,7 +489,7 @@ public int hashCode() { } hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -708,17 +621,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -855,7 +761,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.RemoveFulfillmentPlaces if (other.getAllowMissing() != false) { setAllowMissing(other.getAllowMissing()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -870,19 +776,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + product_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + type_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePlaceIdsIsMutable(); + placeIds_.add(s); + break; + } // case 26 + case 34: + { + input.readMessage(getRemoveTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 40: + { + allowMissing_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1752,7 +1701,18 @@ public RemoveFulfillmentPlacesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveFulfillmentPlacesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesResponse.java index c329d6c2..2e46d343 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveFulfillmentPlacesResponse.java @@ -54,45 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveFulfillmentPlacesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_RemoveFulfillmentPlacesResponse_descriptor; @@ -122,7 +83,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -131,7 +92,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -147,7 +108,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesResponse other = (com.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -158,7 +119,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -291,17 +252,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -387,7 +341,7 @@ public Builder mergeFrom( if (other == com.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -402,19 +356,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.RemoveFulfillmentPlacesResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -452,7 +418,18 @@ public RemoveFulfillmentPlacesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveFulfillmentPlacesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesMetadata.java index b735b3f3..6ac4aa75 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesMetadata.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesMetadata.java @@ -54,45 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveLocalInventoriesMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_RemoveLocalInventoriesMetadata_descriptor; @@ -122,7 +83,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -131,7 +92,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -147,7 +108,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2alpha.RemoveLocalInventoriesMetadata other = (com.google.cloud.retail.v2alpha.RemoveLocalInventoriesMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -158,7 +119,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -291,17 +252,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.RemoveLocalInventoriesMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -386,7 +340,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.RemoveLocalInventoriesM if (other == com.google.cloud.retail.v2alpha.RemoveLocalInventoriesMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -401,19 +355,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.RemoveLocalInventoriesMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.RemoveLocalInventoriesMetadata) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -451,7 +417,18 @@ public RemoveLocalInventoriesMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveLocalInventoriesMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesRequest.java index 3c0ff764..57227f26 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveLocalInventoriesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - product_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - placeIds_.add(s); - break; - } - case 24: - { - allowMissing_ = input.readBool(); - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (removeTime_ != null) { - subBuilder = removeTime_.toBuilder(); - } - removeTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(removeTime_); - removeTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = placeIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_RemoveLocalInventoriesRequest_descriptor; @@ -379,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (removeTime_ != null) { output.writeMessage(5, getRemoveTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +325,7 @@ public int getSerializedSize() { if (removeTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRemoveTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +348,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRemoveTime().equals(other.getRemoveTime())) return false; } if (getAllowMissing() != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -451,7 +371,7 @@ public int hashCode() { } hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -583,17 +503,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.RemoveLocalInventoriesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -723,7 +636,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.RemoveLocalInventoriesR if (other.getAllowMissing() != false) { setAllowMissing(other.getAllowMissing()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -738,19 +651,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.RemoveLocalInventoriesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + product_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePlaceIdsIsMutable(); + placeIds_.add(s); + break; + } // case 18 + case 24: + { + allowMissing_ = input.readBool(); + + break; + } // case 24 + case 42: + { + input.readMessage(getRemoveTimeFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.RemoveLocalInventoriesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1375,7 +1325,18 @@ public RemoveLocalInventoriesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveLocalInventoriesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesResponse.java index 445c0a2f..72b30447 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/RemoveLocalInventoriesResponse.java @@ -56,45 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveLocalInventoriesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_RemoveLocalInventoriesResponse_descriptor; @@ -124,7 +85,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -133,7 +94,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -149,7 +110,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2alpha.RemoveLocalInventoriesResponse other = (com.google.cloud.retail.v2alpha.RemoveLocalInventoriesResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -160,7 +121,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -295,17 +256,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.RemoveLocalInventoriesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -390,7 +344,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.RemoveLocalInventoriesR if (other == com.google.cloud.retail.v2alpha.RemoveLocalInventoriesResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -405,19 +359,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.RemoveLocalInventoriesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.RemoveLocalInventoriesResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -455,7 +421,18 @@ public RemoveLocalInventoriesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveLocalInventoriesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ReplaceCatalogAttributeRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ReplaceCatalogAttributeRequest.java index 5cdfe144..f4efbf48 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ReplaceCatalogAttributeRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ReplaceCatalogAttributeRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReplaceCatalogAttributeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - attributesConfig_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.CatalogAttribute.Builder subBuilder = null; - if (catalogAttribute_ != null) { - subBuilder = catalogAttribute_.toBuilder(); - } - catalogAttribute_ = - input.readMessage( - com.google.cloud.retail.v2alpha.CatalogAttribute.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(catalogAttribute_); - catalogAttribute_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogServiceProto .internal_static_google_cloud_retail_v2alpha_ReplaceCatalogAttributeRequest_descriptor; @@ -340,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(3, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -358,7 +281,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -383,7 +306,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -404,7 +327,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -536,17 +459,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ReplaceCatalogAttributeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -666,7 +582,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ReplaceCatalogAttribute if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -681,19 +597,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ReplaceCatalogAttributeRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attributesConfig_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage( + getCatalogAttributeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ReplaceCatalogAttributeRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1285,7 +1232,18 @@ public ReplaceCatalogAttributeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReplaceCatalogAttributeRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ResumeModelRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ResumeModelRequest.java index a1a87233..a77eb996 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ResumeModelRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ResumeModelRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ResumeModelRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ModelServiceProto .internal_static_google_cloud_retail_v2alpha_ResumeModelRequest_descriptor; @@ -183,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +149,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -212,7 +166,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.ResumeModelRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -225,7 +179,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -354,17 +308,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ResumeModelRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -454,7 +401,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ResumeModelRequest othe name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -469,18 +416,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ResumeModelRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.ResumeModelRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -632,7 +598,18 @@ public ResumeModelRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ResumeModelRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Rule.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Rule.java index 269303c5..bbaff3cf 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Rule.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/Rule.java @@ -54,211 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Rule( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2alpha.Condition.Builder subBuilder = null; - if (condition_ != null) { - subBuilder = condition_.toBuilder(); - } - condition_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Condition.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(condition_); - condition_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.Rule.BoostAction.Builder subBuilder = null; - if (actionCase_ == 2) { - subBuilder = - ((com.google.cloud.retail.v2alpha.Rule.BoostAction) action_).toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Rule.BoostAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2alpha.Rule.BoostAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 2; - break; - } - case 26: - { - com.google.cloud.retail.v2alpha.Rule.RedirectAction.Builder subBuilder = null; - if (actionCase_ == 3) { - subBuilder = - ((com.google.cloud.retail.v2alpha.Rule.RedirectAction) action_).toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Rule.RedirectAction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2alpha.Rule.RedirectAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 3; - break; - } - case 50: - { - com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.Builder subBuilder = null; - if (actionCase_ == 6) { - subBuilder = - ((com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction) action_) - .toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 6; - break; - } - case 58: - { - com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.Builder subBuilder = null; - if (actionCase_ == 7) { - subBuilder = - ((com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction) action_) - .toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 7; - break; - } - case 66: - { - com.google.cloud.retail.v2alpha.Rule.ReplacementAction.Builder subBuilder = null; - if (actionCase_ == 8) { - subBuilder = - ((com.google.cloud.retail.v2alpha.Rule.ReplacementAction) action_).toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Rule.ReplacementAction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.retail.v2alpha.Rule.ReplacementAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 8; - break; - } - case 74: - { - com.google.cloud.retail.v2alpha.Rule.IgnoreAction.Builder subBuilder = null; - if (actionCase_ == 9) { - subBuilder = - ((com.google.cloud.retail.v2alpha.Rule.IgnoreAction) action_).toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Rule.IgnoreAction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2alpha.Rule.IgnoreAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 9; - break; - } - case 82: - { - com.google.cloud.retail.v2alpha.Rule.FilterAction.Builder subBuilder = null; - if (actionCase_ == 10) { - subBuilder = - ((com.google.cloud.retail.v2alpha.Rule.FilterAction) action_).toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Rule.FilterAction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2alpha.Rule.FilterAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 10; - break; - } - case 90: - { - com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.Builder subBuilder = null; - if (actionCase_ == 11) { - subBuilder = - ((com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) action_) - .toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 11; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_Rule_descriptor; @@ -386,57 +181,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BoostAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: - { - boost_ = input.readFloat(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - productsFilter_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_Rule_BoostAction_descriptor; @@ -574,7 +318,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productsFilter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, productsFilter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -589,7 +333,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productsFilter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, productsFilter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -608,7 +352,7 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Float.floatToIntBits(getBoost()) != java.lang.Float.floatToIntBits(other.getBoost())) return false; if (!getProductsFilter().equals(other.getProductsFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -623,7 +367,7 @@ public int hashCode() { hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoost()); hash = (37 * hash) + PRODUCTS_FILTER_FIELD_NUMBER; hash = (53 * hash) + getProductsFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -754,17 +498,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Rule.BoostAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -862,7 +599,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Rule.BoostAction other) productsFilter_ = other.productsFilter_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -877,18 +614,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Rule.BoostAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + boost_ = input.readFloat(); + + break; + } // case 13 + case 18: + { + productsFilter_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.Rule.BoostAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1177,7 +939,19 @@ public BoostAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BoostAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1299,52 +1073,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FilterAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - filter_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_Rule_FilterAction_descriptor; @@ -1452,7 +1180,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1464,7 +1192,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1481,7 +1209,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.Rule.FilterAction) obj; if (!getFilter().equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1494,7 +1222,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1638,17 +1366,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Rule.FilterAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1740,7 +1461,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Rule.FilterAction other filter_ = other.filter_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1755,18 +1476,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Rule.FilterAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + filter_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.Rule.FilterAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1974,7 +1714,19 @@ public FilterAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FilterAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2062,52 +1814,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RedirectAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - redirectUri_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_Rule_RedirectAction_descriptor; @@ -2189,7 +1895,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirectUri_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, redirectUri_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2201,7 +1907,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirectUri_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, redirectUri_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2218,7 +1924,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.Rule.RedirectAction) obj; if (!getRedirectUri().equals(other.getRedirectUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2231,7 +1937,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + REDIRECT_URI_FIELD_NUMBER; hash = (53 * hash) + getRedirectUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2368,17 +2074,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Rule.RedirectAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2470,7 +2169,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Rule.RedirectAction oth redirectUri_ = other.redirectUri_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2485,18 +2184,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Rule.RedirectAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + redirectUri_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.Rule.RedirectAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2639,7 +2357,19 @@ public RedirectAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RedirectAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2759,59 +2489,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TwowaySynonymsAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - synonyms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - synonyms_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - synonyms_ = synonyms_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_Rule_TwowaySynonymsAction_descriptor; @@ -2913,7 +2590,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < synonyms_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, synonyms_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2930,7 +2607,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getSynonymsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2947,7 +2624,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) obj; if (!getSynonymsList().equals(other.getSynonymsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2962,7 +2639,7 @@ public int hashCode() { hash = (37 * hash) + SYNONYMS_FIELD_NUMBER; hash = (53 * hash) + getSynonymsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3097,17 +2774,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -3210,7 +2880,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsActi } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3225,18 +2895,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSynonymsIsMutable(); + synonyms_.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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3461,7 +3151,19 @@ public TwowaySynonymsAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TwowaySynonymsAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3698,85 +3400,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OnewaySynonymsAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - onewayTerms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - onewayTerms_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - queryTerms_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - synonyms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - synonyms_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) != 0)) { - onewayTerms_ = onewayTerms_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = queryTerms_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - synonyms_ = synonyms_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_Rule_OnewaySynonymsAction_descriptor; @@ -4018,7 +3641,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < synonyms_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, synonyms_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4051,7 +3674,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getSynonymsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4070,7 +3693,7 @@ public boolean equals(final java.lang.Object obj) { if (!getQueryTermsList().equals(other.getQueryTermsList())) return false; if (!getSynonymsList().equals(other.getSynonymsList())) return false; if (!getOnewayTermsList().equals(other.getOnewayTermsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4093,7 +3716,7 @@ public int hashCode() { hash = (37 * hash) + ONEWAY_TERMS_FIELD_NUMBER; hash = (53 * hash) + getOnewayTermsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4229,17 +3852,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -4376,7 +3992,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsActi } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4391,18 +4007,52 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureOnewayTermsIsMutable(); + onewayTerms_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureQueryTermsIsMutable(); + queryTerms_.add(s); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSynonymsIsMutable(); + synonyms_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2alpha.Rule.OnewaySynonymsAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4990,7 +4640,19 @@ public OnewaySynonymsAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OnewaySynonymsAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5217,85 +4879,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DoNotAssociateAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - terms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - terms_.add(s); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - queryTerms_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - doNotAssociateTerms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - doNotAssociateTerms_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) != 0)) { - terms_ = terms_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = queryTerms_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - doNotAssociateTerms_ = doNotAssociateTerms_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_Rule_DoNotAssociateAction_descriptor; @@ -5530,7 +5113,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 3, doNotAssociateTerms_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5563,7 +5146,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getDoNotAssociateTermsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5582,7 +5165,7 @@ public boolean equals(final java.lang.Object obj) { if (!getQueryTermsList().equals(other.getQueryTermsList())) return false; if (!getDoNotAssociateTermsList().equals(other.getDoNotAssociateTermsList())) return false; if (!getTermsList().equals(other.getTermsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5605,7 +5188,7 @@ public int hashCode() { hash = (37 * hash) + TERMS_FIELD_NUMBER; hash = (53 * hash) + getTermsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5739,17 +5322,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -5886,7 +5462,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Rule.DoNotAssociateActi } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5901,18 +5477,52 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTermsIsMutable(); + terms_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureQueryTermsIsMutable(); + queryTerms_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDoNotAssociateTermsIsMutable(); + doNotAssociateTerms_.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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.Rule.DoNotAssociateAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6482,7 +6092,19 @@ public DoNotAssociateAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DoNotAssociateAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6653,73 +6275,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReplacementAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - term_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - queryTerms_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - replacementTerm_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = queryTerms_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_Rule_ReplacementAction_descriptor; @@ -6925,7 +6480,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(replacementTerm_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, replacementTerm_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6948,7 +6503,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(replacementTerm_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, replacementTerm_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6967,7 +6522,7 @@ public boolean equals(final java.lang.Object obj) { if (!getQueryTermsList().equals(other.getQueryTermsList())) return false; if (!getReplacementTerm().equals(other.getReplacementTerm())) return false; if (!getTerm().equals(other.getTerm())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6986,7 +6541,7 @@ public int hashCode() { hash = (53 * hash) + getReplacementTerm().hashCode(); hash = (37 * hash) + TERM_FIELD_NUMBER; hash = (53 * hash) + getTerm().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7120,17 +6675,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Rule.ReplacementAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -7247,7 +6795,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Rule.ReplacementAction term_ = other.term_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -7262,18 +6810,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Rule.ReplacementAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + term_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureQueryTermsIsMutable(); + queryTerms_.add(s); + break; + } // case 18 + case 26: + { + replacementTerm_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.Rule.ReplacementAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -7710,7 +7290,19 @@ public ReplacementAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReplacementAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7820,59 +7412,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private IgnoreAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - ignoreTerms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - ignoreTerms_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - ignoreTerms_ = ignoreTerms_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_Rule_IgnoreAction_descriptor; @@ -7966,7 +7505,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < ignoreTerms_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ignoreTerms_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7983,7 +7522,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getIgnoreTermsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -8000,7 +7539,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.Rule.IgnoreAction) obj; if (!getIgnoreTermsList().equals(other.getIgnoreTermsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -8015,7 +7554,7 @@ public int hashCode() { hash = (37 * hash) + IGNORE_TERMS_FIELD_NUMBER; hash = (53 * hash) + getIgnoreTermsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8147,17 +7686,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Rule.IgnoreAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -8260,7 +7792,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Rule.IgnoreAction other } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8275,18 +7807,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Rule.IgnoreAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIgnoreTermsIsMutable(); + ignoreTerms_.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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.Rule.IgnoreAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -8493,7 +8045,19 @@ public IgnoreAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new IgnoreAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -9096,7 +8660,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (actionCase_ == 11) { output.writeMessage(11, (com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) action_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -9148,7 +8712,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 11, (com.google.cloud.retail.v2alpha.Rule.TwowaySynonymsAction) action_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -9196,7 +8760,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -9247,7 +8811,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -9379,22 +8943,39 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.Rule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (boostActionBuilder_ != null) { + boostActionBuilder_.clear(); + } + if (redirectActionBuilder_ != null) { + redirectActionBuilder_.clear(); + } + if (onewaySynonymsActionBuilder_ != null) { + onewaySynonymsActionBuilder_.clear(); + } + if (doNotAssociateActionBuilder_ != null) { + doNotAssociateActionBuilder_.clear(); + } + if (replacementActionBuilder_ != null) { + replacementActionBuilder_.clear(); + } + if (ignoreActionBuilder_ != null) { + ignoreActionBuilder_.clear(); + } + if (filterActionBuilder_ != null) { + filterActionBuilder_.clear(); + } + if (twowaySynonymsActionBuilder_ != null) { + twowaySynonymsActionBuilder_.clear(); + } if (conditionBuilder_ == null) { condition_ = null; } else { @@ -9589,7 +9170,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.Rule other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -9604,17 +9185,89 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.Rule parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getBoostActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getRedirectActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 3; + break; + } // case 26 + case 50: + { + input.readMessage( + getOnewaySynonymsActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + getDoNotAssociateActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage( + getReplacementActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage(getIgnoreActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage(getFilterActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage( + getTwowaySynonymsActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 11; + 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) { - parsedMessage = (com.google.cloud.retail.v2alpha.Rule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -11614,7 +11267,18 @@ public Rule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Rule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequest.java index c09114b9..078eee7e 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchRequest.java @@ -66,287 +66,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SearchRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - placement_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - branch_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - query_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - visitorId_ = s; - break; - } - case 42: - { - com.google.cloud.retail.v2alpha.UserInfo.Builder subBuilder = null; - if (userInfo_ != null) { - subBuilder = userInfo_.toBuilder(); - } - userInfo_ = - input.readMessage( - com.google.cloud.retail.v2alpha.UserInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(userInfo_); - userInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 56: - { - pageSize_ = input.readInt32(); - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 72: - { - offset_ = input.readInt32(); - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 90: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 98: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - facetSpecs_ = - new java.util.ArrayList< - com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec>(); - mutable_bitField0_ |= 0x00000001; - } - facetSpecs_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec.parser(), - extensionRegistry)); - break; - } - case 106: - { - com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec.Builder subBuilder = null; - if (boostSpec_ != null) { - subBuilder = boostSpec_.toBuilder(); - } - boostSpec_ = - input.readMessage( - com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boostSpec_); - boostSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 114: - { - com.google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec.Builder subBuilder = - null; - if (queryExpansionSpec_ != null) { - subBuilder = queryExpansionSpec_.toBuilder(); - } - queryExpansionSpec_ = - input.readMessage( - com.google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(queryExpansionSpec_); - queryExpansionSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 120: - { - int rawValue = input.readEnum(); - - relevanceThreshold_ = rawValue; - break; - } - case 138: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - variantRollupKeys_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - variantRollupKeys_.add(s); - break; - } - case 170: - { - com.google.cloud.retail.v2alpha.SearchRequest.DynamicFacetSpec.Builder subBuilder = - null; - if (dynamicFacetSpec_ != null) { - subBuilder = dynamicFacetSpec_.toBuilder(); - } - dynamicFacetSpec_ = - input.readMessage( - com.google.cloud.retail.v2alpha.SearchRequest.DynamicFacetSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dynamicFacetSpec_); - dynamicFacetSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 186: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - pageCategories_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - pageCategories_.add(s); - break; - } - case 226: - { - java.lang.String s = input.readStringRequireUtf8(); - - canonicalFilter_ = s; - break; - } - case 248: - { - int rawValue = input.readEnum(); - - searchMode_ = rawValue; - break; - } - case 258: - { - com.google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec.Builder subBuilder = - null; - if (personalizationSpec_ != null) { - subBuilder = personalizationSpec_.toBuilder(); - } - personalizationSpec_ = - input.readMessage( - com.google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(personalizationSpec_); - personalizationSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 274: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000008; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 282: - { - com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.Builder subBuilder = - null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = spellCorrectionSpec_.toBuilder(); - } - spellCorrectionSpec_ = - input.readMessage( - com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(spellCorrectionSpec_); - spellCorrectionSpec_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - facetSpecs_ = java.util.Collections.unmodifiableList(facetSpecs_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - variantRollupKeys_ = variantRollupKeys_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - pageCategories_ = pageCategories_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.SearchServiceProto .internal_static_google_cloud_retail_v2alpha_SearchRequest_descriptor; @@ -1038,87 +757,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FacetSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.Builder - subBuilder = null; - if (facetKey_ != null) { - subBuilder = facetKey_.toBuilder(); - } - facetKey_ = - input.readMessage( - com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(facetKey_); - facetKey_ = subBuilder.buildPartial(); - } - - break; - } - case 16: - { - limit_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - excludedFilterKeys_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - excludedFilterKeys_.add(s); - break; - } - case 32: - { - enableDynamicPosition_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - excludedFilterKeys_ = excludedFilterKeys_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.SearchServiceProto .internal_static_google_cloud_retail_v2alpha_SearchRequest_FacetSpec_descriptor; @@ -1733,132 +1371,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FacetKey( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - key_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - intervals_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - intervals_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.Interval.parser(), extensionRegistry)); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - restrictedValues_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - restrictedValues_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - query_ = s; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - prefixes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - prefixes_.add(s); - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - contains_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - contains_.add(s); - break; - } - case 80: - { - caseInsensitive_ = input.readBool(); - break; - } - case 88: - { - returnMinMax_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - intervals_ = java.util.Collections.unmodifiableList(intervals_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - restrictedValues_ = restrictedValues_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - prefixes_ = prefixes_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - contains_ = contains_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.SearchServiceProto .internal_static_google_cloud_retail_v2alpha_SearchRequest_FacetSpec_FacetKey_descriptor; @@ -2599,7 +2111,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (returnMinMax_ != false) { output.writeBool(11, returnMinMax_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2650,7 +2162,7 @@ public int getSerializedSize() { if (returnMinMax_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, returnMinMax_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2675,7 +2187,7 @@ public boolean equals(final java.lang.Object obj) { if (!getOrderBy().equals(other.getOrderBy())) return false; if (!getQuery().equals(other.getQuery())) return false; if (getReturnMinMax() != other.getReturnMinMax()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2712,7 +2224,7 @@ public int hashCode() { hash = (53 * hash) + getQuery().hashCode(); hash = (37 * hash) + RETURN_MIN_MAX_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnMinMax()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2847,19 +2359,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getIntervalsFieldBuilder(); - } } @java.lang.Override @@ -2869,10 +2372,11 @@ public Builder clear() { if (intervalsBuilder_ == null) { intervals_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + intervals_ = null; intervalsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); restrictedValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); prefixes_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -3076,7 +2580,7 @@ public Builder mergeFrom( if (other.getReturnMinMax() != false) { setReturnMinMax(other.getReturnMinMax()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3091,19 +2595,95 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.cloud.retail.v2alpha.Interval m = + input.readMessage( + com.google.cloud.retail.v2alpha.Interval.parser(), extensionRegistry); + if (intervalsBuilder_ == null) { + ensureIntervalsIsMutable(); + intervals_.add(m); + } else { + intervalsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRestrictedValuesIsMutable(); + restrictedValues_.add(s); + break; + } // case 26 + case 34: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + query_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePrefixesIsMutable(); + prefixes_.add(s); + break; + } // case 66 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureContainsIsMutable(); + contains_.add(s); + break; + } // case 74 + case 80: + { + caseInsensitive_ = input.readBool(); + + break; + } // case 80 + case 88: + { + returnMinMax_ = input.readBool(); + + break; + } // case 88 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec.FacetKey) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5034,7 +4614,19 @@ public FacetKey parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FacetKey(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5341,7 +4933,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (enableDynamicPosition_ != false) { output.writeBool(4, enableDynamicPosition_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5367,7 +4959,7 @@ public int getSerializedSize() { if (enableDynamicPosition_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, enableDynamicPosition_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5390,7 +4982,7 @@ public boolean equals(final java.lang.Object obj) { if (getLimit() != other.getLimit()) return false; if (!getExcludedFilterKeysList().equals(other.getExcludedFilterKeysList())) return false; if (getEnableDynamicPosition() != other.getEnableDynamicPosition()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5413,7 +5005,7 @@ public int hashCode() { } hash = (37 * hash) + ENABLE_DYNAMIC_POSITION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableDynamicPosition()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5545,17 +5137,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -5684,7 +5269,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec if (other.getEnableDynamicPosition() != false) { setEnableDynamicPosition(other.getEnableDynamicPosition()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5699,18 +5284,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getFacetKeyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 16: + { + limit_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExcludedFilterKeysIsMutable(); + excludedFilterKeys_.add(s); + break; + } // case 26 + case 32: + { + enableDynamicPosition_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6494,7 +6117,19 @@ public FacetSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FacetSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6583,52 +6218,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DynamicFacetSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - mode_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.SearchServiceProto .internal_static_google_cloud_retail_v2alpha_SearchRequest_DynamicFacetSpec_descriptor; @@ -6866,7 +6455,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, mode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6880,7 +6469,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6897,7 +6486,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.SearchRequest.DynamicFacetSpec) obj; if (mode_ != other.mode_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6910,7 +6499,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + MODE_FIELD_NUMBER; hash = (53 * hash) + mode_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7042,17 +6631,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.SearchRequest.DynamicFacetSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -7146,7 +6728,7 @@ public Builder mergeFrom( if (other.mode_ != 0) { setModeValue(other.getModeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -7161,19 +6743,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.SearchRequest.DynamicFacetSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + mode_ = input.readEnum(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.SearchRequest.DynamicFacetSpec) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -7321,7 +6921,19 @@ public DynamicFacetSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DynamicFacetSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7497,71 +7109,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BoostSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - conditionBoostSpecs_ = - new java.util.ArrayList< - com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec - .ConditionBoostSpec>(); - mutable_bitField0_ |= 0x00000001; - } - conditionBoostSpecs_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec - .parser(), - extensionRegistry)); - break; - } - case 16: - { - bitField0_ |= 0x00000001; - skipBoostSpecValidation_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - conditionBoostSpecs_ = java.util.Collections.unmodifiableList(conditionBoostSpecs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.SearchServiceProto .internal_static_google_cloud_retail_v2alpha_SearchRequest_BoostSpec_descriptor; @@ -7685,58 +7232,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ConditionBoostSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - condition_ = s; - break; - } - case 21: - { - boost_ = input.readFloat(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.SearchServiceProto .internal_static_google_cloud_retail_v2alpha_SearchRequest_BoostSpec_ConditionBoostSpec_descriptor; @@ -7871,7 +7366,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (java.lang.Float.floatToRawIntBits(boost_) != 0) { output.writeFloat(2, boost_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7886,7 +7381,7 @@ public int getSerializedSize() { if (java.lang.Float.floatToRawIntBits(boost_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, boost_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7907,7 +7402,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCondition().equals(other.getCondition())) return false; if (java.lang.Float.floatToIntBits(getBoost()) != java.lang.Float.floatToIntBits(other.getBoost())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7922,7 +7417,7 @@ public int hashCode() { hash = (53 * hash) + getCondition().hashCode(); hash = (37 * hash) + BOOST_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoost()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8065,17 +7560,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -8182,7 +7670,7 @@ public Builder mergeFrom( if (other.getBoost() != 0F) { setBoost(other.getBoost()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8197,20 +7685,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec parsedMessage = - null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + condition_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 21: + { + boost_ = input.readFloat(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -8493,7 +8004,19 @@ public ConditionBoostSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConditionBoostSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -8679,7 +8202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(2, skipBoostSpecValidation_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -8696,7 +8219,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, skipBoostSpecValidation_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -8717,7 +8240,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSkipBoostSpecValidation()) { if (getSkipBoostSpecValidation() != other.getSkipBoostSpecValidation()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -8736,7 +8259,7 @@ public int hashCode() { hash = (37 * hash) + SKIP_BOOST_SPEC_VALIDATION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSkipBoostSpecValidation()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8868,19 +8391,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getConditionBoostSpecsFieldBuilder(); - } } @java.lang.Override @@ -8888,10 +8402,11 @@ public Builder clear() { super.clear(); if (conditionBoostSpecsBuilder_ == null) { conditionBoostSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + conditionBoostSpecs_ = null; conditionBoostSpecsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); skipBoostSpecValidation_ = false; bitField0_ = (bitField0_ & ~0x00000002); return this; @@ -9019,7 +8534,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec if (other.hasSkipBoostSpecValidation()) { setSkipBoostSpecValidation(other.getSkipBoostSpecValidation()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -9034,18 +8549,52 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec m = + input.readMessage( + com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .parser(), + extensionRegistry); + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(m); + } else { + conditionBoostSpecsBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: + { + skipBoostSpecValidation_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -9649,7 +9198,19 @@ public BoostSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BoostSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -9738,69 +9299,18 @@ private QueryExpansionSpec(com.google.protobuf.GeneratedMessageV3.Builder bui } private QueryExpansionSpec() { - condition_ = 0; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new QueryExpansionSpec(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private QueryExpansionSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); + condition_ = 0; + } - condition_ = rawValue; - break; - } - case 16: - { - pinUnexpandedResults_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new QueryExpansionSpec(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -10072,7 +9582,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (pinUnexpandedResults_ != false) { output.writeBool(2, pinUnexpandedResults_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -10090,7 +9600,7 @@ public int getSerializedSize() { if (pinUnexpandedResults_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, pinUnexpandedResults_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -10108,7 +9618,7 @@ public boolean equals(final java.lang.Object obj) { if (condition_ != other.condition_) return false; if (getPinUnexpandedResults() != other.getPinUnexpandedResults()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -10123,7 +9633,7 @@ public int hashCode() { hash = (53 * hash) + condition_; hash = (37 * hash) + PIN_UNEXPANDED_RESULTS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPinUnexpandedResults()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -10258,17 +9768,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -10370,7 +9873,7 @@ public Builder mergeFrom( if (other.getPinUnexpandedResults() != false) { setPinUnexpandedResults(other.getPinUnexpandedResults()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -10385,19 +9888,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + condition_ = input.readEnum(); + + break; + } // case 8 + case 16: + { + pinUnexpandedResults_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.SearchRequest.QueryExpansionSpec) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -10606,7 +10133,19 @@ public QueryExpansionSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryExpansionSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -10692,52 +10231,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PersonalizationSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - mode_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.SearchServiceProto .internal_static_google_cloud_retail_v2alpha_SearchRequest_PersonalizationSpec_descriptor; @@ -10973,7 +10466,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, mode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -10987,7 +10480,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -11004,7 +10497,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec) obj; if (mode_ != other.mode_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -11017,7 +10510,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + MODE_FIELD_NUMBER; hash = (53 * hash) + mode_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -11151,17 +10644,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -11257,7 +10743,7 @@ public Builder mergeFrom( if (other.mode_ != 0) { setModeValue(other.getModeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -11272,19 +10758,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + mode_ = input.readEnum(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.SearchRequest.PersonalizationSpec) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -11422,7 +10926,19 @@ public PersonalizationSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PersonalizationSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -11510,52 +11026,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SpellCorrectionSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - mode_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.SearchServiceProto .internal_static_google_cloud_retail_v2alpha_SearchRequest_SpellCorrectionSpec_descriptor; @@ -11803,7 +11273,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, mode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -11817,7 +11287,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -11834,7 +11304,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec) obj; if (mode_ != other.mode_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -11847,7 +11317,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + MODE_FIELD_NUMBER; hash = (53 * hash) + mode_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -11981,17 +11451,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -12087,7 +11550,7 @@ public Builder mergeFrom( if (other.mode_ != 0) { setModeValue(other.getModeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -12102,19 +11565,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + mode_ = input.readEnum(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.SearchRequest.SpellCorrectionSpec) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -12257,7 +11738,19 @@ public SpellCorrectionSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SpellCorrectionSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -14034,7 +13527,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(35, getSpellCorrectionSpec()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -14133,7 +13626,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(35, getSpellCorrectionSpec()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -14189,7 +13682,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSpellCorrectionSpec()) { if (!getSpellCorrectionSpec().equals(other.getSpellCorrectionSpec())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -14264,7 +13757,7 @@ public int hashCode() { hash = (37 * hash) + SPELL_CORRECTION_SPEC_FIELD_NUMBER; hash = (53 * hash) + getSpellCorrectionSpec().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -14462,10 +13955,11 @@ public Builder clear() { if (facetSpecsBuilder_ == null) { facetSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + facetSpecs_ = null; facetSpecsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (dynamicFacetSpecBuilder_ == null) { dynamicFacetSpec_ = null; } else { @@ -14760,7 +14254,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.SearchRequest other) { if (other.hasSpellCorrectionSpec()) { mergeSpellCorrectionSpec(other.getSpellCorrectionSpec()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -14775,17 +14269,182 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.SearchRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + placement_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + branch_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + query_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + visitorId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + input.readMessage(getUserInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 56: + { + pageSize_ = input.readInt32(); + + break; + } // case 56 + case 66: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 72: + { + offset_ = input.readInt32(); + + break; + } // case 72 + case 82: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 90: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 90 + case 98: + { + com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec m = + input.readMessage( + com.google.cloud.retail.v2alpha.SearchRequest.FacetSpec.parser(), + extensionRegistry); + if (facetSpecsBuilder_ == null) { + ensureFacetSpecsIsMutable(); + facetSpecs_.add(m); + } else { + facetSpecsBuilder_.addMessage(m); + } + break; + } // case 98 + case 106: + { + input.readMessage(getBoostSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 106 + case 114: + { + input.readMessage( + getQueryExpansionSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 114 + case 120: + { + relevanceThreshold_ = input.readEnum(); + + break; + } // case 120 + case 138: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureVariantRollupKeysIsMutable(); + variantRollupKeys_.add(s); + break; + } // case 138 + case 170: + { + input.readMessage( + getDynamicFacetSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 170 + case 186: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePageCategoriesIsMutable(); + pageCategories_.add(s); + break; + } // case 186 + case 226: + { + canonicalFilter_ = input.readStringRequireUtf8(); + + break; + } // case 226 + case 248: + { + searchMode_ = input.readEnum(); + + break; + } // case 248 + case 258: + { + input.readMessage( + getPersonalizationSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 258 + case 274: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 274 + case 282: + { + input.readMessage( + getSpellCorrectionSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 282 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2alpha.SearchRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -19346,7 +19005,18 @@ public SearchRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchResponse.java index fdb8751b..fb9c2e88 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SearchResponse.java @@ -61,163 +61,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SearchResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = - new java.util.ArrayList< - com.google.cloud.retail.v2alpha.SearchResponse.SearchResult>(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.SearchResponse.SearchResult.parser(), - extensionRegistry)); - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - facets_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - facets_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.SearchResponse.Facet.parser(), - extensionRegistry)); - break; - } - case 24: - { - totalSize_ = input.readInt32(); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - correctedQuery_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - attributionToken_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 58: - { - com.google.cloud.retail.v2alpha.SearchResponse.QueryExpansionInfo.Builder subBuilder = - null; - if (queryExpansionInfo_ != null) { - subBuilder = queryExpansionInfo_.toBuilder(); - } - queryExpansionInfo_ = - input.readMessage( - com.google.cloud.retail.v2alpha.SearchResponse.QueryExpansionInfo.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(queryExpansionInfo_); - queryExpansionInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - redirectUri_ = s; - break; - } - case 98: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - appliedControls_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - appliedControls_.add(s); - break; - } - case 114: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - invalidConditionBoostSpecs_ = - new java.util.ArrayList< - com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec - .ConditionBoostSpec>(); - mutable_bitField0_ |= 0x00000008; - } - invalidConditionBoostSpecs_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec - .parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - facets_ = java.util.Collections.unmodifiableList(facets_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - appliedControls_ = appliedControls_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - invalidConditionBoostSpecs_ = - java.util.Collections.unmodifiableList(invalidConditionBoostSpecs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.SearchServiceProto .internal_static_google_cloud_retail_v2alpha_SearchResponse_descriptor; @@ -685,110 +528,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SearchResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - id_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - matchingVariantCount_ = input.readInt32(); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - matchingVariantFields_ = - com.google.protobuf.MapField.newMapField( - MatchingVariantFieldsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - matchingVariantFields__ = - input.readMessage( - MatchingVariantFieldsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - matchingVariantFields_ - .getMutableMap() - .put(matchingVariantFields__.getKey(), matchingVariantFields__.getValue()); - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - variantRollupValues_ = - com.google.protobuf.MapField.newMapField( - VariantRollupValuesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry - variantRollupValues__ = - input.readMessage( - VariantRollupValuesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - variantRollupValues_ - .getMutableMap() - .put(variantRollupValues__.getKey(), variantRollupValues__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.SearchServiceProto .internal_static_google_cloud_retail_v2alpha_SearchResponse_SearchResult_descriptor; @@ -1364,7 +1103,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io internalGetVariantRollupValues(), VariantRollupValuesDefaultEntryHolder.defaultEntry, 5); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1405,7 +1144,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, variantRollupValues__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1431,7 +1170,7 @@ public boolean equals(final java.lang.Object obj) { return false; if (!internalGetVariantRollupValues().equals(other.internalGetVariantRollupValues())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1458,7 +1197,7 @@ public int hashCode() { hash = (37 * hash) + VARIANT_ROLLUP_VALUES_FIELD_NUMBER; hash = (53 * hash) + internalGetVariantRollupValues().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1614,17 +1353,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.retail.v2alpha.SearchResponse.SearchResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1748,7 +1480,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.SearchResponse.SearchRe internalGetMutableMatchingVariantFields() .mergeFrom(other.internalGetMatchingVariantFields()); internalGetMutableVariantRollupValues().mergeFrom(other.internalGetVariantRollupValues()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1763,19 +1495,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.SearchResponse.SearchResult parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getProductFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + matchingVariantCount_ = input.readInt32(); + + break; + } // case 24 + case 34: + { + com.google.protobuf.MapEntry + matchingVariantFields__ = + input.readMessage( + MatchingVariantFieldsDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + internalGetMutableMatchingVariantFields() + .getMutableMap() + .put(matchingVariantFields__.getKey(), matchingVariantFields__.getValue()); + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry + variantRollupValues__ = + input.readMessage( + VariantRollupValuesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableVariantRollupValues() + .getMutableMap() + .put(variantRollupValues__.getKey(), variantRollupValues__.getValue()); + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.SearchResponse.SearchResult) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2865,7 +2652,19 @@ public SearchResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchResult(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3023,75 +2822,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Facet( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - key_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - values_ = - new java.util.ArrayList< - com.google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue>(); - mutable_bitField0_ |= 0x00000001; - } - values_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.parser(), - extensionRegistry)); - break; - } - case 24: - { - dynamicFacet_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - values_ = java.util.Collections.unmodifiableList(values_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.SearchServiceProto .internal_static_google_cloud_retail_v2alpha_SearchResponse_Facet_descriptor; @@ -3266,85 +2996,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FacetValue( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - facetValueCase_ = 1; - facetValue_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.Interval.Builder subBuilder = null; - if (facetValueCase_ == 2) { - subBuilder = - ((com.google.cloud.retail.v2alpha.Interval) facetValue_).toBuilder(); - } - facetValue_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Interval.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2alpha.Interval) facetValue_); - facetValue_ = subBuilder.buildPartial(); - } - facetValueCase_ = 2; - break; - } - case 24: - { - count_ = input.readInt64(); - break; - } - case 41: - { - minValue_ = input.readDouble(); - break; - } - case 49: - { - maxValue_ = input.readDouble(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.SearchServiceProto .internal_static_google_cloud_retail_v2alpha_SearchResponse_Facet_FacetValue_descriptor; @@ -3619,7 +3270,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (java.lang.Double.doubleToRawLongBits(maxValue_) != 0) { output.writeDouble(6, maxValue_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3645,7 +3296,7 @@ public int getSerializedSize() { if (java.lang.Double.doubleToRawLongBits(maxValue_) != 0) { size += com.google.protobuf.CodedOutputStream.computeDoubleSize(6, maxValue_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3677,7 +3328,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3712,7 +3363,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3847,22 +3498,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (intervalBuilder_ != null) { + intervalBuilder_.clear(); + } count_ = 0L; minValue_ = 0D; @@ -3996,7 +3643,7 @@ public Builder mergeFrom( break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4011,19 +3658,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + facetValueCase_ = 1; + facetValue_ = s; + break; + } // case 10 + case 18: + { + input.readMessage(getIntervalFieldBuilder().getBuilder(), extensionRegistry); + facetValueCase_ = 2; + break; + } // case 18 + case 24: + { + count_ = input.readInt64(); + + break; + } // case 24 + case 41: + { + minValue_ = input.readDouble(); + + break; + } // case 41 + case 49: + { + maxValue_ = input.readDouble(); + + break; + } // case 49 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4600,7 +4290,19 @@ public FacetValue parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FacetValue(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4789,7 +4491,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (dynamicFacet_ != false) { output.writeBool(3, dynamicFacet_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4807,7 +4509,7 @@ public int getSerializedSize() { if (dynamicFacet_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, dynamicFacet_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4826,7 +4528,7 @@ public boolean equals(final java.lang.Object obj) { if (!getKey().equals(other.getKey())) return false; if (!getValuesList().equals(other.getValuesList())) return false; if (getDynamicFacet() != other.getDynamicFacet()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4845,7 +4547,7 @@ public int hashCode() { } hash = (37 * hash) + DYNAMIC_FACET_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDynamicFacet()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4977,19 +4679,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.SearchResponse.Facet.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getValuesFieldBuilder(); - } } @java.lang.Override @@ -4999,10 +4692,11 @@ public Builder clear() { if (valuesBuilder_ == null) { values_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + values_ = null; valuesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); dynamicFacet_ = false; return this; @@ -5130,7 +4824,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.SearchResponse.Facet ot if (other.getDynamicFacet() != false) { setDynamicFacet(other.getDynamicFacet()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5145,18 +4839,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.SearchResponse.Facet parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue m = + input.readMessage( + com.google.cloud.retail.v2alpha.SearchResponse.Facet.FacetValue.parser(), + extensionRegistry); + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(m); + } else { + valuesBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + dynamicFacet_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.SearchResponse.Facet) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5746,7 +5479,19 @@ public Facet parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Facet(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5832,55 +5577,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private QueryExpansionInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - expandedQuery_ = input.readBool(); - break; - } - case 16: - { - pinnedResultCount_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.SearchServiceProto .internal_static_google_cloud_retail_v2alpha_SearchResponse_QueryExpansionInfo_descriptor; @@ -5955,7 +5651,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (pinnedResultCount_ != 0L) { output.writeInt64(2, pinnedResultCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5970,7 +5666,7 @@ public int getSerializedSize() { if (pinnedResultCount_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, pinnedResultCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5988,7 +5684,7 @@ public boolean equals(final java.lang.Object obj) { if (getExpandedQuery() != other.getExpandedQuery()) return false; if (getPinnedResultCount() != other.getPinnedResultCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6003,7 +5699,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExpandedQuery()); hash = (37 * hash) + PINNED_RESULT_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPinnedResultCount()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6138,17 +5834,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2alpha.SearchResponse.QueryExpansionInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -6250,7 +5939,7 @@ public Builder mergeFrom( if (other.getPinnedResultCount() != 0L) { setPinnedResultCount(other.getPinnedResultCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6265,19 +5954,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.SearchResponse.QueryExpansionInfo parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + expandedQuery_ = input.readBool(); + + break; + } // case 8 + case 16: + { + pinnedResultCount_ = input.readInt64(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.SearchResponse.QueryExpansionInfo) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6429,7 +6142,19 @@ public QueryExpansionInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryExpansionInfo(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7087,7 +6812,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < invalidConditionBoostSpecs_.size(); i++) { output.writeMessage(14, invalidConditionBoostSpecs_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7133,7 +6858,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 14, invalidConditionBoostSpecs_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7163,7 +6888,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAppliedControlsList().equals(other.getAppliedControlsList())) return false; if (!getInvalidConditionBoostSpecsList().equals(other.getInvalidConditionBoostSpecsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7204,7 +6929,7 @@ public int hashCode() { hash = (37 * hash) + INVALID_CONDITION_BOOST_SPECS_FIELD_NUMBER; hash = (53 * hash) + getInvalidConditionBoostSpecsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7335,21 +7060,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.SearchResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - getFacetsFieldBuilder(); - getInvalidConditionBoostSpecsFieldBuilder(); - } } @java.lang.Override @@ -7357,16 +7071,18 @@ public Builder clear() { super.clear(); if (resultsBuilder_ == null) { results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + results_ = null; resultsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (facetsBuilder_ == null) { facets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + facets_ = null; facetsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); totalSize_ = 0; correctedQuery_ = ""; @@ -7387,10 +7103,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000004); if (invalidConditionBoostSpecsBuilder_ == null) { invalidConditionBoostSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + invalidConditionBoostSpecs_ = null; invalidConditionBoostSpecsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -7624,7 +7341,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.SearchResponse other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -7639,17 +7356,118 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.SearchResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2alpha.SearchResponse.SearchResult m = + input.readMessage( + com.google.cloud.retail.v2alpha.SearchResponse.SearchResult.parser(), + extensionRegistry); + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(m); + } else { + resultsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.retail.v2alpha.SearchResponse.Facet m = + input.readMessage( + com.google.cloud.retail.v2alpha.SearchResponse.Facet.parser(), + extensionRegistry); + if (facetsBuilder_ == null) { + ensureFacetsIsMutable(); + facets_.add(m); + } else { + facetsBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + totalSize_ = input.readInt32(); + + break; + } // case 24 + case 34: + { + correctedQuery_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + attributionToken_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + input.readMessage( + getQueryExpansionInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 82: + { + redirectUri_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAppliedControlsIsMutable(); + appliedControls_.add(s); + break; + } // case 98 + case 114: + { + com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec m = + input.readMessage( + com.google.cloud.retail.v2alpha.SearchRequest.BoostSpec.ConditionBoostSpec + .parser(), + extensionRegistry); + if (invalidConditionBoostSpecsBuilder_ == null) { + ensureInvalidConditionBoostSpecsIsMutable(); + invalidConditionBoostSpecs_.add(m); + } else { + invalidConditionBoostSpecsBuilder_.addMessage(m); + } + 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) { - parsedMessage = (com.google.cloud.retail.v2alpha.SearchResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -9797,7 +9615,18 @@ public SearchResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfig.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfig.java index 2a214244..f400a996 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfig.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/ServingConfig.java @@ -70,251 +70,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ServingConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - modelId_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - priceRerankingLevel_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - facetControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - facetControlIds_.add(s); - break; - } - case 50: - { - com.google.cloud.retail.v2alpha.SearchRequest.DynamicFacetSpec.Builder subBuilder = - null; - if (dynamicFacetSpec_ != null) { - subBuilder = dynamicFacetSpec_.toBuilder(); - } - dynamicFacetSpec_ = - input.readMessage( - com.google.cloud.retail.v2alpha.SearchRequest.DynamicFacetSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dynamicFacetSpec_); - dynamicFacetSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - boostControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - boostControlIds_.add(s); - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - diversityLevel_ = s; - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - filterControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - filterControlIds_.add(s); - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - redirectControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - redirectControlIds_.add(s); - break; - } - case 98: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - onewaySynonymsControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - onewaySynonymsControlIds_.add(s); - break; - } - case 106: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - doNotAssociateControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000040; - } - doNotAssociateControlIds_.add(s); - break; - } - case 114: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - replacementControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000080; - } - replacementControlIds_.add(s); - break; - } - case 122: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000100) != 0)) { - ignoreControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000100; - } - ignoreControlIds_.add(s); - break; - } - case 130: - { - java.lang.String s = input.readStringRequireUtf8(); - - enableCategoryFilterLevel_ = s; - break; - } - case 146: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - twowaySynonymsControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000010; - } - twowaySynonymsControlIds_.add(s); - break; - } - case 152: - { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000200) != 0)) { - solutionTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; - } - solutionTypes_.add(rawValue); - break; - } - case 154: - { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while (input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000200) != 0)) { - solutionTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; - } - solutionTypes_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - facetControlIds_ = facetControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - boostControlIds_ = boostControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - filterControlIds_ = filterControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - redirectControlIds_ = redirectControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - onewaySynonymsControlIds_ = onewaySynonymsControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000040) != 0)) { - doNotAssociateControlIds_ = doNotAssociateControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000080) != 0)) { - replacementControlIds_ = replacementControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000100) != 0)) { - ignoreControlIds_ = ignoreControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - twowaySynonymsControlIds_ = twowaySynonymsControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000200) != 0)) { - solutionTypes_ = java.util.Collections.unmodifiableList(solutionTypes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ServingConfigProto .internal_static_google_cloud_retail_v2alpha_ServingConfig_descriptor; @@ -1825,7 +1580,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < solutionTypes_.size(); i++) { output.writeEnumNoTag(solutionTypes_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1941,7 +1696,7 @@ public int getSerializedSize() { } solutionTypesMemoizedSerializedSize = dataSize; } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1980,7 +1735,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDiversityLevel().equals(other.getDiversityLevel())) return false; if (!getEnableCategoryFilterLevel().equals(other.getEnableCategoryFilterLevel())) return false; if (!solutionTypes_.equals(other.solutionTypes_)) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2047,7 +1802,7 @@ public int hashCode() { hash = (37 * hash) + SOLUTION_TYPES_FIELD_NUMBER; hash = (53 * hash) + solutionTypes_.hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2179,17 +1934,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.ServingConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2498,7 +2246,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.ServingConfig other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2513,17 +2261,156 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.ServingConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + modelId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + priceRerankingLevel_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFacetControlIdsIsMutable(); + facetControlIds_.add(s); + break; + } // case 42 + case 50: + { + input.readMessage( + getDynamicFacetSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureBoostControlIdsIsMutable(); + boostControlIds_.add(s); + break; + } // case 58 + case 66: + { + diversityLevel_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFilterControlIdsIsMutable(); + filterControlIds_.add(s); + break; + } // case 74 + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRedirectControlIdsIsMutable(); + redirectControlIds_.add(s); + break; + } // case 82 + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureOnewaySynonymsControlIdsIsMutable(); + onewaySynonymsControlIds_.add(s); + break; + } // case 98 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDoNotAssociateControlIdsIsMutable(); + doNotAssociateControlIds_.add(s); + break; + } // case 106 + case 114: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReplacementControlIdsIsMutable(); + replacementControlIds_.add(s); + break; + } // case 114 + case 122: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIgnoreControlIdsIsMutable(); + ignoreControlIds_.add(s); + break; + } // case 122 + case 130: + { + enableCategoryFilterLevel_ = input.readStringRequireUtf8(); + + break; + } // case 130 + case 146: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTwowaySynonymsControlIdsIsMutable(); + twowaySynonymsControlIds_.add(s); + break; + } // case 146 + case 152: + { + int tmpRaw = input.readEnum(); + ensureSolutionTypesIsMutable(); + solutionTypes_.add(tmpRaw); + break; + } // case 152 + case 154: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureSolutionTypesIsMutable(); + solutionTypes_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 154 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2alpha.ServingConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6136,7 +6023,18 @@ public ServingConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServingConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetDefaultBranchRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetDefaultBranchRequest.java index 851135c0..c7c76c6a 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetDefaultBranchRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetDefaultBranchRequest.java @@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetDefaultBranchRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - catalog_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - branchId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - note_ = s; - break; - } - case 32: - { - force_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogServiceProto .internal_static_google_cloud_retail_v2alpha_SetDefaultBranchRequest_descriptor; @@ -347,7 +282,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (force_ != false) { output.writeBool(4, force_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -368,7 +303,7 @@ public int getSerializedSize() { if (force_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, force_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -388,7 +323,7 @@ public boolean equals(final java.lang.Object obj) { if (!getBranchId().equals(other.getBranchId())) return false; if (!getNote().equals(other.getNote())) return false; if (getForce() != other.getForce()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -407,7 +342,7 @@ public int hashCode() { hash = (53 * hash) + getNote().hashCode(); hash = (37 * hash) + FORCE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -537,17 +472,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.SetDefaultBranchRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -657,7 +585,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.SetDefaultBranchRequest if (other.getForce() != false) { setForce(other.getForce()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -672,18 +600,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.SetDefaultBranchRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + catalog_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + branchId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + note_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: + { + force_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.SetDefaultBranchRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1145,7 +1110,18 @@ public SetDefaultBranchRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetDefaultBranchRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryMetadata.java index 8f38103d..914b8201 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryMetadata.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryMetadata.java @@ -53,45 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetInventoryMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_SetInventoryMetadata_descriptor; @@ -121,7 +82,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -130,7 +91,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -146,7 +107,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2alpha.SetInventoryMetadata other = (com.google.cloud.retail.v2alpha.SetInventoryMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -157,7 +118,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -289,17 +250,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.SetInventoryMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -382,7 +336,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2alpha.SetInventoryMetadata other) { if (other == com.google.cloud.retail.v2alpha.SetInventoryMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -397,18 +351,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.SetInventoryMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.SetInventoryMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -444,7 +411,18 @@ public SetInventoryMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetInventoryMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryRequest.java index 19444c20..e446c49c 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryRequest.java @@ -52,96 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetInventoryRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2alpha.Product.Builder subBuilder = null; - if (inventory_ != null) { - subBuilder = inventory_.toBuilder(); - } - inventory_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inventory_); - inventory_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (setMask_ != null) { - subBuilder = setMask_.toBuilder(); - } - setMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(setMask_); - setMask_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (setTime_ != null) { - subBuilder = setTime_.toBuilder(); - } - setTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(setTime_); - setTime_ = subBuilder.buildPartial(); - } - - break; - } - case 32: - { - allowMissing_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_SetInventoryRequest_descriptor; @@ -508,7 +418,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (allowMissing_ != false) { output.writeBool(4, allowMissing_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -529,7 +439,7 @@ public int getSerializedSize() { if (allowMissing_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, allowMissing_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -558,7 +468,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSetTime().equals(other.getSetTime())) return false; } if (getAllowMissing() != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -583,7 +493,7 @@ public int hashCode() { } hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -714,17 +624,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.SetInventoryRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -855,7 +758,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.SetInventoryRequest oth if (other.getAllowMissing() != false) { setAllowMissing(other.getAllowMissing()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -870,18 +773,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.SetInventoryRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getInventoryFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getSetMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getSetTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + allowMissing_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.SetInventoryRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2013,7 +1953,18 @@ public SetInventoryRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetInventoryRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryResponse.java index 7a1758bd..1f804aa1 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/SetInventoryResponse.java @@ -53,45 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetInventoryResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_SetInventoryResponse_descriptor; @@ -121,7 +82,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -130,7 +91,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -146,7 +107,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2alpha.SetInventoryResponse other = (com.google.cloud.retail.v2alpha.SetInventoryResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -157,7 +118,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -289,17 +250,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.SetInventoryResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -382,7 +336,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2alpha.SetInventoryResponse other) { if (other == com.google.cloud.retail.v2alpha.SetInventoryResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -397,18 +351,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.SetInventoryResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.SetInventoryResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -444,7 +411,18 @@ public SetInventoryResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetInventoryResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelMetadata.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelMetadata.java index c19a0532..a26685f6 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelMetadata.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelMetadata.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TuneModelMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - model_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ModelServiceProto .internal_static_google_cloud_retail_v2alpha_TuneModelMetadata_descriptor; @@ -183,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -195,7 +149,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -212,7 +166,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.TuneModelMetadata) obj; if (!getModel().equals(other.getModel())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -225,7 +179,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + MODEL_FIELD_NUMBER; hash = (53 * hash) + getModel().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -354,17 +308,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.TuneModelMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -454,7 +401,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.TuneModelMetadata other model_ = other.model_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -469,18 +416,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.TuneModelMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + model_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.TuneModelMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -632,7 +598,18 @@ public TuneModelMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TuneModelMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelRequest.java index 4da818b2..fdb76dc4 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelRequest.java @@ -53,52 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TuneModelRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ModelServiceProto .internal_static_google_cloud_retail_v2alpha_TuneModelRequest_descriptor; @@ -188,7 +142,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -200,7 +154,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -217,7 +171,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.TuneModelRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -230,7 +184,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -360,17 +314,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.TuneModelRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -460,7 +407,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.TuneModelRequest other) name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -475,17 +422,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.TuneModelRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2alpha.TuneModelRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -647,7 +614,18 @@ public TuneModelRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TuneModelRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelResponse.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelResponse.java index 0dc405d6..5e96641e 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelResponse.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/TuneModelResponse.java @@ -50,45 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TuneModelResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ModelServiceProto .internal_static_google_cloud_retail_v2alpha_TuneModelResponse_descriptor; @@ -118,7 +79,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -127,7 +88,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -143,7 +104,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2alpha.TuneModelResponse other = (com.google.cloud.retail.v2alpha.TuneModelResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -154,7 +115,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -283,17 +244,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.TuneModelResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -376,7 +330,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2alpha.TuneModelResponse other) { if (other == com.google.cloud.retail.v2alpha.TuneModelResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -391,18 +345,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.TuneModelResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.TuneModelResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -438,7 +405,18 @@ public TuneModelResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TuneModelResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateAttributesConfigRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateAttributesConfigRequest.java index 96987a66..d3f68fec 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateAttributesConfigRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateAttributesConfigRequest.java @@ -52,76 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateAttributesConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2alpha.AttributesConfig.Builder subBuilder = null; - if (attributesConfig_ != null) { - subBuilder = attributesConfig_.toBuilder(); - } - attributesConfig_ = - input.readMessage( - com.google.cloud.retail.v2alpha.AttributesConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(attributesConfig_); - attributesConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogServiceProto .internal_static_google_cloud_retail_v2alpha_UpdateAttributesConfigRequest_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -287,7 +217,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -311,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -330,7 +260,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -462,17 +392,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.UpdateAttributesConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -585,7 +508,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.UpdateAttributesConfigR if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -600,19 +523,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.UpdateAttributesConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getAttributesConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.UpdateAttributesConfigRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1082,7 +1030,18 @@ public UpdateAttributesConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateAttributesConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateCatalogRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateCatalogRequest.java index 1c1fc255..81875d65 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateCatalogRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateCatalogRequest.java @@ -52,76 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateCatalogRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2alpha.Catalog.Builder subBuilder = null; - if (catalog_ != null) { - subBuilder = catalog_.toBuilder(); - } - catalog_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Catalog.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(catalog_); - catalog_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogServiceProto .internal_static_google_cloud_retail_v2alpha_UpdateCatalogRequest_descriptor; @@ -281,7 +211,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -296,7 +226,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -320,7 +250,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -339,7 +269,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -470,17 +400,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.UpdateCatalogRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -591,7 +514,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.UpdateCatalogRequest ot if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -606,18 +529,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.UpdateCatalogRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCatalogFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.UpdateCatalogRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1111,7 +1059,18 @@ public UpdateCatalogRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateCatalogRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateCompletionConfigRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateCompletionConfigRequest.java index 05d10ea0..41d9c4a3 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateCompletionConfigRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateCompletionConfigRequest.java @@ -52,76 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateCompletionConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2alpha.CompletionConfig.Builder subBuilder = null; - if (completionConfig_ != null) { - subBuilder = completionConfig_.toBuilder(); - } - completionConfig_ = - input.readMessage( - com.google.cloud.retail.v2alpha.CompletionConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(completionConfig_); - completionConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CatalogServiceProto .internal_static_google_cloud_retail_v2alpha_UpdateCompletionConfigRequest_descriptor; @@ -296,7 +226,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -311,7 +241,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -335,7 +265,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -354,7 +284,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -486,17 +416,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.UpdateCompletionConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -609,7 +532,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.UpdateCompletionConfigR if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -624,19 +547,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.UpdateCompletionConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getCompletionConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.UpdateCompletionConfigRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1178,7 +1126,18 @@ public UpdateCompletionConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateCompletionConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateControlRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateControlRequest.java index 40b0c00a..3c4fab6a 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateControlRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateControlRequest.java @@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateControlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2alpha.Control.Builder subBuilder = null; - if (control_ != null) { - subBuilder = control_.toBuilder(); - } - control_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Control.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(control_); - control_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ControlServiceProto .internal_static_google_cloud_retail_v2alpha_UpdateControlRequest_descriptor; @@ -267,7 +197,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -282,7 +212,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -306,7 +236,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -325,7 +255,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -454,17 +384,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.UpdateControlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -575,7 +498,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.UpdateControlRequest ot if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -590,18 +513,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.UpdateControlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getControlFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.UpdateControlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1059,7 +1007,18 @@ public UpdateControlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateControlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateModelRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateModelRequest.java index a50da072..637b1059 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateModelRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateModelRequest.java @@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateModelRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2alpha.Model.Builder subBuilder = null; - if (model_ != null) { - subBuilder = model_.toBuilder(); - } - model_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Model.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(model_); - model_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ModelServiceProto .internal_static_google_cloud_retail_v2alpha_UpdateModelRequest_descriptor; @@ -256,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -271,7 +201,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -295,7 +225,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -314,7 +244,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -443,17 +373,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.UpdateModelRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -564,7 +487,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.UpdateModelRequest othe if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -579,18 +502,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.UpdateModelRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getModelFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.UpdateModelRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1017,7 +965,18 @@ public UpdateModelRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateModelRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateProductRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateProductRequest.java index c17e9f1e..c40c27fd 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateProductRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateProductRequest.java @@ -52,81 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2alpha.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = - input.readMessage( - com.google.cloud.retail.v2alpha.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - allowMissing_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ProductServiceProto .internal_static_google_cloud_retail_v2alpha_UpdateProductRequest_descriptor; @@ -333,7 +258,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (allowMissing_ != false) { output.writeBool(3, allowMissing_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -351,7 +276,7 @@ public int getSerializedSize() { if (allowMissing_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowMissing_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -376,7 +301,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } if (getAllowMissing() != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -397,7 +322,7 @@ public int hashCode() { } hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -528,17 +453,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.UpdateProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -655,7 +573,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.UpdateProductRequest ot if (other.getAllowMissing() != false) { setAllowMissing(other.getAllowMissing()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -670,18 +588,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.UpdateProductRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getProductFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + allowMissing_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.UpdateProductRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1305,7 +1254,18 @@ public UpdateProductRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateProductRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateServingConfigRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateServingConfigRequest.java index ace41026..6107baba 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateServingConfigRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UpdateServingConfigRequest.java @@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateServingConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2alpha.ServingConfig.Builder subBuilder = null; - if (servingConfig_ != null) { - subBuilder = servingConfig_.toBuilder(); - } - servingConfig_ = - input.readMessage( - com.google.cloud.retail.v2alpha.ServingConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(servingConfig_); - servingConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ServingConfigServiceProto .internal_static_google_cloud_retail_v2alpha_UpdateServingConfigRequest_descriptor; @@ -267,7 +197,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -282,7 +212,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -306,7 +236,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -325,7 +255,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -455,17 +385,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.UpdateServingConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -576,7 +499,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.UpdateServingConfigRequ if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -591,18 +514,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.UpdateServingConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getServingConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.UpdateServingConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1061,7 +1009,18 @@ public UpdateServingConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateServingConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEvent.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEvent.java index 90c32165..b3a97777 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEvent.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEvent.java @@ -66,250 +66,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UserEvent( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - eventType_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - visitorId_ = s; - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (eventTime_ != null) { - subBuilder = eventTime_.toBuilder(); - } - eventTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(eventTime_); - eventTime_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - experimentIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - experimentIds_.add(s); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - attributionToken_ = s; - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - productDetails_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - productDetails_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.ProductDetail.parser(), extensionRegistry)); - break; - } - case 58: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - attributes_ = - com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000004; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.retail.v2alpha.CustomAttribute> - attributes__ = - input.readMessage( - AttributesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - attributes_.getMutableMap().put(attributes__.getKey(), attributes__.getValue()); - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - cartId_ = s; - break; - } - case 74: - { - com.google.cloud.retail.v2alpha.PurchaseTransaction.Builder subBuilder = null; - if (purchaseTransaction_ != null) { - subBuilder = purchaseTransaction_.toBuilder(); - } - purchaseTransaction_ = - input.readMessage( - com.google.cloud.retail.v2alpha.PurchaseTransaction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(purchaseTransaction_); - purchaseTransaction_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - searchQuery_ = s; - break; - } - case 90: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - pageCategories_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - pageCategories_.add(s); - break; - } - case 98: - { - com.google.cloud.retail.v2alpha.UserInfo.Builder subBuilder = null; - if (userInfo_ != null) { - subBuilder = userInfo_.toBuilder(); - } - userInfo_ = - input.readMessage( - com.google.cloud.retail.v2alpha.UserInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(userInfo_); - userInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 106: - { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 114: - { - java.lang.String s = input.readStringRequireUtf8(); - - referrerUri_ = s; - break; - } - case 122: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageViewId_ = s; - break; - } - case 130: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 138: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 144: - { - offset_ = input.readInt32(); - break; - } - case 170: - { - java.lang.String s = input.readStringRequireUtf8(); - - sessionId_ = s; - break; - } - case 178: - { - com.google.cloud.retail.v2alpha.CompletionDetail.Builder subBuilder = null; - if (completionDetail_ != null) { - subBuilder = completionDetail_.toBuilder(); - } - completionDetail_ = - input.readMessage( - com.google.cloud.retail.v2alpha.CompletionDetail.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(completionDetail_); - completionDetail_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - experimentIds_ = experimentIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - productDetails_ = java.util.Collections.unmodifiableList(productDetails_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - pageCategories_ = pageCategories_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.UserEventProto .internal_static_google_cloud_retail_v2alpha_UserEvent_descriptor; @@ -1839,7 +1595,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (completionDetail_ != null) { output.writeMessage(22, getCompletionDetail()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1927,7 +1683,7 @@ public int getSerializedSize() { if (completionDetail_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, getCompletionDetail()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1975,7 +1731,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUri().equals(other.getUri())) return false; if (!getReferrerUri().equals(other.getReferrerUri())) return false; if (!getPageViewId().equals(other.getPageViewId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2042,7 +1798,7 @@ public int hashCode() { hash = (53 * hash) + getReferrerUri().hashCode(); hash = (37 * hash) + PAGE_VIEW_ID_FIELD_NUMBER; hash = (53 * hash) + getPageViewId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2192,19 +1948,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.retail.v2alpha.UserEvent.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getProductDetailsFieldBuilder(); - } } @java.lang.Override @@ -2228,10 +1975,11 @@ public Builder clear() { if (productDetailsBuilder_ == null) { productDetails_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + productDetails_ = null; productDetailsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); if (completionDetailBuilder_ == null) { completionDetail_ = null; } else { @@ -2506,7 +2254,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.UserEvent other) { pageViewId_ = other.pageViewId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2521,17 +2269,169 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.UserEvent parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + eventType_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + visitorId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getEventTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExperimentIdsIsMutable(); + experimentIds_.add(s); + break; + } // case 34 + case 42: + { + attributionToken_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + com.google.cloud.retail.v2alpha.ProductDetail m = + input.readMessage( + com.google.cloud.retail.v2alpha.ProductDetail.parser(), extensionRegistry); + if (productDetailsBuilder_ == null) { + ensureProductDetailsIsMutable(); + productDetails_.add(m); + } else { + productDetailsBuilder_.addMessage(m); + } + break; + } // case 50 + case 58: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.retail.v2alpha.CustomAttribute> + attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .getMutableMap() + .put(attributes__.getKey(), attributes__.getValue()); + break; + } // case 58 + case 66: + { + cartId_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 74: + { + input.readMessage( + getPurchaseTransactionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 74 + case 82: + { + searchQuery_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 90: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePageCategoriesIsMutable(); + pageCategories_.add(s); + break; + } // case 90 + case 98: + { + input.readMessage(getUserInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 98 + case 106: + { + uri_ = input.readStringRequireUtf8(); + + break; + } // case 106 + case 114: + { + referrerUri_ = input.readStringRequireUtf8(); + + break; + } // case 114 + case 122: + { + pageViewId_ = input.readStringRequireUtf8(); + + break; + } // case 122 + case 130: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 130 + case 138: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 138 + case 144: + { + offset_ = input.readInt32(); + + break; + } // case 144 + case 170: + { + sessionId_ = input.readStringRequireUtf8(); + + break; + } // case 170 + case 178: + { + input.readMessage( + getCompletionDetailFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 178 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2alpha.UserEvent) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6346,7 +6246,18 @@ public UserEvent parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UserEvent(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventImportSummary.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventImportSummary.java index cfa48a1f..859b0081 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventImportSummary.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventImportSummary.java @@ -51,55 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UserEventImportSummary( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - joinedEventsCount_ = input.readInt64(); - break; - } - case 16: - { - unjoinedEventsCount_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ImportConfigProto .internal_static_google_cloud_retail_v2alpha_UserEventImportSummary_descriptor; @@ -172,7 +123,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (unjoinedEventsCount_ != 0L) { output.writeInt64(2, unjoinedEventsCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -187,7 +138,7 @@ public int getSerializedSize() { if (unjoinedEventsCount_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, unjoinedEventsCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -205,7 +156,7 @@ public boolean equals(final java.lang.Object obj) { if (getJoinedEventsCount() != other.getJoinedEventsCount()) return false; if (getUnjoinedEventsCount() != other.getUnjoinedEventsCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -220,7 +171,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getJoinedEventsCount()); hash = (37 * hash) + UNJOINED_EVENTS_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getUnjoinedEventsCount()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -351,17 +302,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.UserEventImportSummary.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -456,7 +400,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.UserEventImportSummary if (other.getUnjoinedEventsCount() != 0L) { setUnjoinedEventsCount(other.getUnjoinedEventsCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -471,18 +415,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.UserEventImportSummary parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + joinedEventsCount_ = input.readInt64(); + + break; + } // case 8 + case 16: + { + unjoinedEventsCount_ = input.readInt64(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.UserEventImportSummary) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -625,7 +594,18 @@ public UserEventImportSummary parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UserEventImportSummary(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventInlineSource.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventInlineSource.java index 6ce3bf10..4b075145 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventInlineSource.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventInlineSource.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UserEventInlineSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - userEvents_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - userEvents_.add( - input.readMessage( - com.google.cloud.retail.v2alpha.UserEvent.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - userEvents_ = java.util.Collections.unmodifiableList(userEvents_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ImportConfigProto .internal_static_google_cloud_retail_v2alpha_UserEventInlineSource_descriptor; @@ -217,7 +163,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < userEvents_.size(); i++) { output.writeMessage(1, userEvents_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -229,7 +175,7 @@ public int getSerializedSize() { for (int i = 0; i < userEvents_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, userEvents_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -246,7 +192,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2alpha.UserEventInlineSource) obj; if (!getUserEventsList().equals(other.getUserEventsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -261,7 +207,7 @@ public int hashCode() { hash = (37 * hash) + USER_EVENTS_FIELD_NUMBER; hash = (53 * hash) + getUserEventsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -391,19 +337,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.UserEventInlineSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getUserEventsFieldBuilder(); - } } @java.lang.Override @@ -411,10 +348,11 @@ public Builder clear() { super.clear(); if (userEventsBuilder_ == null) { userEvents_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + userEvents_ = null; userEventsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -529,7 +467,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.UserEventInlineSource o } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -544,18 +482,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.UserEventInlineSource parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2alpha.UserEvent m = + input.readMessage( + com.google.cloud.retail.v2alpha.UserEvent.parser(), extensionRegistry); + if (userEventsBuilder_ == null) { + ensureUserEventsIsMutable(); + userEvents_.add(m); + } else { + userEventsBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2alpha.UserEventInlineSource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -980,7 +944,18 @@ public UserEventInlineSource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UserEventInlineSource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventInputConfig.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventInputConfig.java index d4b11019..e2c8edfa 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventInputConfig.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserEventInputConfig.java @@ -50,96 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UserEventInputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2alpha.UserEventInlineSource.Builder subBuilder = null; - if (sourceCase_ == 1) { - subBuilder = - ((com.google.cloud.retail.v2alpha.UserEventInlineSource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.retail.v2alpha.UserEventInlineSource.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.retail.v2alpha.UserEventInlineSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 1; - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.GcsSource.Builder subBuilder = null; - if (sourceCase_ == 2) { - subBuilder = ((com.google.cloud.retail.v2alpha.GcsSource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.retail.v2alpha.GcsSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2alpha.GcsSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 2; - break; - } - case 26: - { - com.google.cloud.retail.v2alpha.BigQuerySource.Builder subBuilder = null; - if (sourceCase_ == 3) { - subBuilder = ((com.google.cloud.retail.v2alpha.BigQuerySource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.retail.v2alpha.BigQuerySource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2alpha.BigQuerySource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 3; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.ImportConfigProto .internal_static_google_cloud_retail_v2alpha_UserEventInputConfig_descriptor; @@ -400,7 +310,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceCase_ == 3) { output.writeMessage(3, (com.google.cloud.retail.v2alpha.BigQuerySource) source_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -424,7 +334,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 3, (com.google.cloud.retail.v2alpha.BigQuerySource) source_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -454,7 +364,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -481,7 +391,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -610,22 +520,24 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.UserEventInputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (userEventInlineSourceBuilder_ != null) { + userEventInlineSourceBuilder_.clear(); + } + if (gcsSourceBuilder_ != null) { + gcsSourceBuilder_.clear(); + } + if (bigQuerySourceBuilder_ != null) { + bigQuerySourceBuilder_.clear(); + } sourceCase_ = 0; source_ = null; return this; @@ -748,7 +660,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.UserEventInputConfig ot break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -763,18 +675,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.UserEventInputConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getUserEventInlineSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getGcsSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getBigQuerySourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.UserEventInputConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1512,7 +1456,18 @@ public UserEventInputConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UserEventInputConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserInfo.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserInfo.java index 6c7499f5..813d03ba 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserInfo.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/UserInfo.java @@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UserInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - userId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - ipAddress_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - userAgent_ = s; - break; - } - case 32: - { - directUserRequest_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.CommonProto .internal_static_google_cloud_retail_v2alpha_UserInfo_descriptor; @@ -388,7 +323,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (directUserRequest_ != false) { output.writeBool(4, directUserRequest_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -409,7 +344,7 @@ public int getSerializedSize() { if (directUserRequest_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, directUserRequest_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +363,7 @@ public boolean equals(final java.lang.Object obj) { if (!getIpAddress().equals(other.getIpAddress())) return false; if (!getUserAgent().equals(other.getUserAgent())) return false; if (getDirectUserRequest() != other.getDirectUserRequest()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -447,7 +382,7 @@ public int hashCode() { hash = (53 * hash) + getUserAgent().hashCode(); hash = (37 * hash) + DIRECT_USER_REQUEST_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDirectUserRequest()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -576,17 +511,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.UserInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -695,7 +623,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.UserInfo other) { if (other.getDirectUserRequest() != false) { setDirectUserRequest(other.getDirectUserRequest()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -710,17 +638,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.UserInfo parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + userId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + ipAddress_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + userAgent_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: + { + directUserRequest_ = input.readBool(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2alpha.UserInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1287,7 +1253,18 @@ public UserInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UserInfo(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/WriteUserEventRequest.java b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/WriteUserEventRequest.java index 6f6e46f2..725f6c28 100644 --- a/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/WriteUserEventRequest.java +++ b/proto-google-cloud-retail-v2alpha/src/main/java/com/google/cloud/retail/v2alpha/WriteUserEventRequest.java @@ -52,68 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private WriteUserEventRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2alpha.UserEvent.Builder subBuilder = null; - if (userEvent_ != null) { - subBuilder = userEvent_.toBuilder(); - } - userEvent_ = - input.readMessage( - com.google.cloud.retail.v2alpha.UserEvent.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(userEvent_); - userEvent_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2alpha.UserEventServiceProto .internal_static_google_cloud_retail_v2alpha_WriteUserEventRequest_descriptor; @@ -254,7 +192,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (userEvent_ != null) { output.writeMessage(2, getUserEvent()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -269,7 +207,7 @@ public int getSerializedSize() { if (userEvent_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUserEvent()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -290,7 +228,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUserEvent()) { if (!getUserEvent().equals(other.getUserEvent())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -307,7 +245,7 @@ public int hashCode() { hash = (37 * hash) + USER_EVENT_FIELD_NUMBER; hash = (53 * hash) + getUserEvent().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -437,17 +375,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2alpha.WriteUserEventRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -551,7 +482,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2alpha.WriteUserEventRequest o if (other.hasUserEvent()) { mergeUserEvent(other.getUserEvent()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -566,18 +497,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2alpha.WriteUserEventRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getUserEventFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2alpha.WriteUserEventRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -927,7 +883,18 @@ public WriteUserEventRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new WriteUserEventRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/pom.xml b/proto-google-cloud-retail-v2beta/pom.xml index 037b430d..1f6ea31a 100644 --- a/proto-google-cloud-retail-v2beta/pom.xml +++ b/proto-google-cloud-retail-v2beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-cloud-retail-v2beta - 2.5.0 + 2.5.1 proto-google-cloud-retail-v2beta Proto library for google-cloud-retail com.google.cloud google-cloud-retail-parent - 2.5.0 + 2.5.1 diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddCatalogAttributeRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddCatalogAttributeRequest.java index 128fc211..430212da 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddCatalogAttributeRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddCatalogAttributeRequest.java @@ -54,68 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddCatalogAttributeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - attributesConfig_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2beta.CatalogAttribute.Builder subBuilder = null; - if (catalogAttribute_ != null) { - subBuilder = catalogAttribute_.toBuilder(); - } - catalogAttribute_ = - input.readMessage( - com.google.cloud.retail.v2beta.CatalogAttribute.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(catalogAttribute_); - catalogAttribute_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CatalogServiceProto .internal_static_google_cloud_retail_v2beta_AddCatalogAttributeRequest_descriptor; @@ -263,7 +201,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (catalogAttribute_ != null) { output.writeMessage(2, getCatalogAttribute()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -278,7 +216,7 @@ public int getSerializedSize() { if (catalogAttribute_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCatalogAttribute()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -299,7 +237,7 @@ public boolean equals(final java.lang.Object obj) { if (hasCatalogAttribute()) { if (!getCatalogAttribute().equals(other.getCatalogAttribute())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -316,7 +254,7 @@ public int hashCode() { hash = (37 * hash) + CATALOG_ATTRIBUTE_FIELD_NUMBER; hash = (53 * hash) + getCatalogAttribute().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -448,17 +386,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.AddCatalogAttributeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -562,7 +493,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.AddCatalogAttributeReque if (other.hasCatalogAttribute()) { mergeCatalogAttribute(other.getCatalogAttribute()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -577,18 +508,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.AddCatalogAttributeRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attributesConfig_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage( + getCatalogAttributeFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.AddCatalogAttributeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -958,7 +915,18 @@ public AddCatalogAttributeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddCatalogAttributeRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddControlRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddControlRequest.java index 0909a27f..535dbab7 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddControlRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddControlRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddControlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - servingConfig_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - controlId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ServingConfigServiceProto .internal_static_google_cloud_retail_v2beta_AddControlRequest_descriptor; @@ -128,7 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The source ServingConfig resource name . Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
    * 
* * @@ -154,7 +101,7 @@ public java.lang.String getServingConfig() { * *
    * Required. The source ServingConfig resource name . Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
    * 
* * @@ -247,7 +194,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controlId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, controlId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -262,7 +209,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controlId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, controlId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -280,7 +227,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServingConfig().equals(other.getServingConfig())) return false; if (!getControlId().equals(other.getControlId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -295,7 +242,7 @@ public int hashCode() { hash = (53 * hash) + getServingConfig().hashCode(); hash = (37 * hash) + CONTROL_ID_FIELD_NUMBER; hash = (53 * hash) + getControlId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -424,17 +371,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.AddControlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -531,7 +471,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.AddControlRequest other) controlId_ = other.controlId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -546,17 +486,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.AddControlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + servingConfig_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + controlId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.AddControlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -566,7 +532,7 @@ public Builder mergeFrom( * *
      * Required. The source ServingConfig resource name . Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -591,7 +557,7 @@ public java.lang.String getServingConfig() { * *
      * Required. The source ServingConfig resource name . Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -616,7 +582,7 @@ public com.google.protobuf.ByteString getServingConfigBytes() { * *
      * Required. The source ServingConfig resource name . Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -640,7 +606,7 @@ public Builder setServingConfig(java.lang.String value) { * *
      * Required. The source ServingConfig resource name . Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -660,7 +626,7 @@ public Builder clearServingConfig() { * *
      * Required. The source ServingConfig resource name . Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -824,7 +790,18 @@ public AddControlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddControlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddControlRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddControlRequestOrBuilder.java index 870921a0..f4f79cf0 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddControlRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddControlRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface AddControlRequestOrBuilder * *
    * Required. The source ServingConfig resource name . Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
    * 
* * @@ -43,7 +43,7 @@ public interface AddControlRequestOrBuilder * *
    * Required. The source ServingConfig resource name . Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
    * 
* * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesMetadata.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesMetadata.java index fc803998..8eca2003 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesMetadata.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesMetadata.java @@ -53,45 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddFulfillmentPlacesMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_AddFulfillmentPlacesMetadata_descriptor; @@ -121,7 +82,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -130,7 +91,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -146,7 +107,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2beta.AddFulfillmentPlacesMetadata other = (com.google.cloud.retail.v2beta.AddFulfillmentPlacesMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -157,7 +118,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -290,17 +251,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.AddFulfillmentPlacesMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -383,7 +337,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2beta.AddFulfillmentPlacesMetadata other) { if (other == com.google.cloud.retail.v2beta.AddFulfillmentPlacesMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -398,18 +352,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.AddFulfillmentPlacesMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.AddFulfillmentPlacesMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -445,7 +412,18 @@ public AddFulfillmentPlacesMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddFulfillmentPlacesMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesRequest.java index 09d344e1..e3804ba8 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesRequest.java @@ -56,93 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddFulfillmentPlacesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - product_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - placeIds_.add(s); - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (addTime_ != null) { - subBuilder = addTime_.toBuilder(); - } - addTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(addTime_); - addTime_ = subBuilder.buildPartial(); - } - - break; - } - case 40: - { - allowMissing_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = placeIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_AddFulfillmentPlacesRequest_descriptor; @@ -513,7 +426,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (allowMissing_ != false) { output.writeBool(5, allowMissing_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -542,7 +455,7 @@ public int getSerializedSize() { if (allowMissing_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, allowMissing_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -566,7 +479,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAddTime().equals(other.getAddTime())) return false; } if (getAllowMissing() != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -591,7 +504,7 @@ public int hashCode() { } hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -723,17 +636,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.AddFulfillmentPlacesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -868,7 +774,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.AddFulfillmentPlacesRequ if (other.getAllowMissing() != false) { setAllowMissing(other.getAllowMissing()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -883,18 +789,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.AddFulfillmentPlacesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + product_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + type_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePlaceIdsIsMutable(); + placeIds_.add(s); + break; + } // case 26 + case 34: + { + input.readMessage(getAddTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 40: + { + allowMissing_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.AddFulfillmentPlacesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1794,7 +1744,18 @@ public AddFulfillmentPlacesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddFulfillmentPlacesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesResponse.java index 66dbba5a..f8a44a29 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddFulfillmentPlacesResponse.java @@ -53,45 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddFulfillmentPlacesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_AddFulfillmentPlacesResponse_descriptor; @@ -121,7 +82,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -130,7 +91,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -146,7 +107,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2beta.AddFulfillmentPlacesResponse other = (com.google.cloud.retail.v2beta.AddFulfillmentPlacesResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -157,7 +118,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -290,17 +251,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.AddFulfillmentPlacesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -383,7 +337,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2beta.AddFulfillmentPlacesResponse other) { if (other == com.google.cloud.retail.v2beta.AddFulfillmentPlacesResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -398,18 +352,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.AddFulfillmentPlacesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.AddFulfillmentPlacesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -445,7 +412,18 @@ public AddFulfillmentPlacesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddFulfillmentPlacesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesMetadata.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesMetadata.java index 287b980b..d51ed50b 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesMetadata.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesMetadata.java @@ -53,45 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddLocalInventoriesMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_AddLocalInventoriesMetadata_descriptor; @@ -121,7 +82,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -130,7 +91,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -146,7 +107,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2beta.AddLocalInventoriesMetadata other = (com.google.cloud.retail.v2beta.AddLocalInventoriesMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -157,7 +118,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -290,17 +251,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.AddLocalInventoriesMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -383,7 +337,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2beta.AddLocalInventoriesMetadata other) { if (other == com.google.cloud.retail.v2beta.AddLocalInventoriesMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -398,18 +352,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.AddLocalInventoriesMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.AddLocalInventoriesMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -445,7 +412,18 @@ public AddLocalInventoriesMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddLocalInventoriesMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesRequest.java index d3ab1bb6..9d458832 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesRequest.java @@ -55,103 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddLocalInventoriesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - product_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - localInventories_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - localInventories_.add( - input.readMessage( - com.google.cloud.retail.v2beta.LocalInventory.parser(), extensionRegistry)); - break; - } - case 34: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (addMask_ != null) { - subBuilder = addMask_.toBuilder(); - } - addMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(addMask_); - addMask_ = subBuilder.buildPartial(); - } - - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (addTime_ != null) { - subBuilder = addTime_.toBuilder(); - } - addTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(addTime_); - addTime_ = subBuilder.buildPartial(); - } - - break; - } - case 48: - { - allowMissing_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - localInventories_ = java.util.Collections.unmodifiableList(localInventories_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_AddLocalInventoriesRequest_descriptor; @@ -500,7 +403,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (allowMissing_ != false) { output.writeBool(6, allowMissing_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -524,7 +427,7 @@ public int getSerializedSize() { if (allowMissing_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, allowMissing_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -551,7 +454,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAddTime().equals(other.getAddTime())) return false; } if (getAllowMissing() != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -578,7 +481,7 @@ public int hashCode() { } hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -710,19 +613,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.AddLocalInventoriesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getLocalInventoriesFieldBuilder(); - } } @java.lang.Override @@ -732,10 +626,11 @@ public Builder clear() { if (localInventoriesBuilder_ == null) { localInventories_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + localInventories_ = null; localInventoriesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (addMaskBuilder_ == null) { addMask_ = null; } else { @@ -889,7 +784,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.AddLocalInventoriesReque if (other.getAllowMissing() != false) { setAllowMissing(other.getAllowMissing()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -904,18 +799,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.AddLocalInventoriesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + product_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.cloud.retail.v2beta.LocalInventory m = + input.readMessage( + com.google.cloud.retail.v2beta.LocalInventory.parser(), extensionRegistry); + if (localInventoriesBuilder_ == null) { + ensureLocalInventoriesIsMutable(); + localInventories_.add(m); + } else { + localInventoriesBuilder_.addMessage(m); + } + break; + } // case 18 + case 34: + { + input.readMessage(getAddMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 42: + { + input.readMessage(getAddTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 48: + { + allowMissing_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.AddLocalInventoriesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2059,7 +2004,18 @@ public AddLocalInventoriesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddLocalInventoriesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesResponse.java index 5cead3e2..46cd24cc 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AddLocalInventoriesResponse.java @@ -55,45 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AddLocalInventoriesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_AddLocalInventoriesResponse_descriptor; @@ -123,7 +84,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -132,7 +93,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -148,7 +109,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2beta.AddLocalInventoriesResponse other = (com.google.cloud.retail.v2beta.AddLocalInventoriesResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -159,7 +120,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -294,17 +255,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.AddLocalInventoriesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -387,7 +341,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2beta.AddLocalInventoriesResponse other) { if (other == com.google.cloud.retail.v2beta.AddLocalInventoriesResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -402,18 +356,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.AddLocalInventoriesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.AddLocalInventoriesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -449,7 +416,18 @@ public AddLocalInventoriesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AddLocalInventoriesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AttributesConfig.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AttributesConfig.java index 17ecaf3c..faa234e1 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AttributesConfig.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/AttributesConfig.java @@ -53,79 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AttributesConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - catalogAttributes_ = - com.google.protobuf.MapField.newMapField( - CatalogAttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.retail.v2beta.CatalogAttribute> - catalogAttributes__ = - input.readMessage( - CatalogAttributesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - catalogAttributes_ - .getMutableMap() - .put(catalogAttributes__.getKey(), catalogAttributes__.getValue()); - break; - } - case 24: - { - int rawValue = input.readEnum(); - - attributeConfigLevel_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CatalogProto .internal_static_google_cloud_retail_v2beta_AttributesConfig_descriptor; @@ -421,7 +348,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(3, attributeConfigLevel_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -450,7 +377,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, attributeConfigLevel_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -469,7 +396,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!internalGetCatalogAttributes().equals(other.internalGetCatalogAttributes())) return false; if (attributeConfigLevel_ != other.attributeConfigLevel_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -488,7 +415,7 @@ public int hashCode() { } hash = (37 * hash) + ATTRIBUTE_CONFIG_LEVEL_FIELD_NUMBER; hash = (53 * hash) + attributeConfigLevel_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -637,17 +564,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.retail.v2beta.AttributesConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -748,7 +668,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.AttributesConfig other) if (other.attributeConfigLevel_ != 0) { setAttributeConfigLevelValue(other.getAttributeConfigLevelValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -763,17 +683,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.AttributesConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.retail.v2beta.CatalogAttribute> + catalogAttributes__ = + input.readMessage( + CatalogAttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableCatalogAttributes() + .getMutableMap() + .put(catalogAttributes__.getKey(), catalogAttributes__.getValue()); + break; + } // case 18 + case 24: + { + attributeConfigLevel_ = input.readEnum(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.AttributesConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1269,7 +1228,18 @@ public AttributesConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AttributesConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Audience.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Audience.java index bc9c3d28..e03ff5e2 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Audience.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Audience.java @@ -54,72 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Audience( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - genders_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - genders_.add(s); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - ageGroups_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - ageGroups_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - genders_ = genders_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - ageGroups_ = ageGroups_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_Audience_descriptor; @@ -353,7 +287,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < ageGroups_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ageGroups_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -378,7 +312,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getAgeGroupsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -395,7 +329,7 @@ public boolean equals(final java.lang.Object obj) { if (!getGendersList().equals(other.getGendersList())) return false; if (!getAgeGroupsList().equals(other.getAgeGroupsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -414,7 +348,7 @@ public int hashCode() { hash = (37 * hash) + AGE_GROUPS_FIELD_NUMBER; hash = (53 * hash) + getAgeGroupsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -544,17 +478,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.Audience.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -671,7 +598,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Audience other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -686,17 +613,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Audience parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureGendersIsMutable(); + genders_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAgeGroupsIsMutable(); + ageGroups_.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) { - parsedMessage = (com.google.cloud.retail.v2beta.Audience) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1241,7 +1196,18 @@ public Audience parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Audience(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BatchRemoveCatalogAttributesRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BatchRemoveCatalogAttributesRequest.java new file mode 100644 index 00000000..ea90b250 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BatchRemoveCatalogAttributesRequest.java @@ -0,0 +1,959 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/catalog_service.proto + +package com.google.cloud.retail.v2beta; + +/** + * + * + *
+ * Request for
+ * [CatalogService.BatchRemoveCatalogAttributes][google.cloud.retail.v2beta.CatalogService.BatchRemoveCatalogAttributes]
+ * method.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest} + */ +public final class BatchRemoveCatalogAttributesRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest) + BatchRemoveCatalogAttributesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchRemoveCatalogAttributesRequest.newBuilder() to construct. + private BatchRemoveCatalogAttributesRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchRemoveCatalogAttributesRequest() { + attributesConfig_ = ""; + attributeKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchRemoveCatalogAttributesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CatalogServiceProto + .internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CatalogServiceProto + .internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest.class, + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest.Builder.class); + } + + public static final int ATTRIBUTES_CONFIG_FIELD_NUMBER = 1; + private volatile java.lang.Object attributesConfig_; + /** + * + * + *
+   * Required. The attributes config resource shared by all catalog attributes
+   * being deleted. Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
+   * 
+ * + * + * string attributes_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The attributesConfig. + */ + @java.lang.Override + public java.lang.String getAttributesConfig() { + java.lang.Object ref = attributesConfig_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributesConfig_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The attributes config resource shared by all catalog attributes
+   * being deleted. Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
+   * 
+ * + * + * string attributes_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for attributesConfig. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAttributesConfigBytes() { + java.lang.Object ref = attributesConfig_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributesConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ATTRIBUTE_KEYS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList attributeKeys_; + /** + * + * + *
+   * Required. The attribute name keys of the
+   * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s to delete.
+   * A maximum of 1000 catalog attributes can be deleted in a batch.
+   * 
+ * + * repeated string attribute_keys = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the attributeKeys. + */ + public com.google.protobuf.ProtocolStringList getAttributeKeysList() { + return attributeKeys_; + } + /** + * + * + *
+   * Required. The attribute name keys of the
+   * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s to delete.
+   * A maximum of 1000 catalog attributes can be deleted in a batch.
+   * 
+ * + * repeated string attribute_keys = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of attributeKeys. + */ + public int getAttributeKeysCount() { + return attributeKeys_.size(); + } + /** + * + * + *
+   * Required. The attribute name keys of the
+   * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s to delete.
+   * A maximum of 1000 catalog attributes can be deleted in a batch.
+   * 
+ * + * repeated string attribute_keys = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The attributeKeys at the given index. + */ + public java.lang.String getAttributeKeys(int index) { + return attributeKeys_.get(index); + } + /** + * + * + *
+   * Required. The attribute name keys of the
+   * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s to delete.
+   * A maximum of 1000 catalog attributes can be deleted in a batch.
+   * 
+ * + * repeated string attribute_keys = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the attributeKeys at the given index. + */ + public com.google.protobuf.ByteString getAttributeKeysBytes(int index) { + return attributeKeys_.getByteString(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributesConfig_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attributesConfig_); + } + for (int i = 0; i < attributeKeys_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, attributeKeys_.getRaw(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attributesConfig_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attributesConfig_); + } + { + int dataSize = 0; + for (int i = 0; i < attributeKeys_.size(); i++) { + dataSize += computeStringSizeNoTag(attributeKeys_.getRaw(i)); + } + size += dataSize; + size += 1 * getAttributeKeysList().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.retail.v2beta.BatchRemoveCatalogAttributesRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest other = + (com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest) obj; + + if (!getAttributesConfig().equals(other.getAttributesConfig())) return false; + if (!getAttributeKeysList().equals(other.getAttributeKeysList())) return false; + if (!getUnknownFields().equals(other.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) + ATTRIBUTES_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getAttributesConfig().hashCode(); + if (getAttributeKeysCount() > 0) { + hash = (37 * hash) + ATTRIBUTE_KEYS_FIELD_NUMBER; + hash = (53 * hash) + getAttributeKeysList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for
+   * [CatalogService.BatchRemoveCatalogAttributes][google.cloud.retail.v2beta.CatalogService.BatchRemoveCatalogAttributes]
+   * method.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest) + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CatalogServiceProto + .internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CatalogServiceProto + .internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest.class, + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest.Builder.class); + } + + // Construct using + // com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + attributesConfig_ = ""; + + attributeKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.CatalogServiceProto + .internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest + getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest build() { + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest buildPartial() { + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest result = + new com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest(this); + int from_bitField0_ = bitField0_; + result.attributesConfig_ = attributesConfig_; + if (((bitField0_ & 0x00000001) != 0)) { + attributeKeys_ = attributeKeys_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.attributeKeys_ = attributeKeys_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest) { + return mergeFrom( + (com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest other) { + if (other + == com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest + .getDefaultInstance()) return this; + if (!other.getAttributesConfig().isEmpty()) { + attributesConfig_ = other.attributesConfig_; + onChanged(); + } + if (!other.attributeKeys_.isEmpty()) { + if (attributeKeys_.isEmpty()) { + attributeKeys_ = other.attributeKeys_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAttributeKeysIsMutable(); + attributeKeys_.addAll(other.attributeKeys_); + } + 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: + { + attributesConfig_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAttributeKeysIsMutable(); + attributeKeys_.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 attributesConfig_ = ""; + /** + * + * + *
+     * Required. The attributes config resource shared by all catalog attributes
+     * being deleted. Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
+     * 
+ * + * + * string attributes_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The attributesConfig. + */ + public java.lang.String getAttributesConfig() { + java.lang.Object ref = attributesConfig_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + attributesConfig_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The attributes config resource shared by all catalog attributes
+     * being deleted. Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
+     * 
+ * + * + * string attributes_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for attributesConfig. + */ + public com.google.protobuf.ByteString getAttributesConfigBytes() { + java.lang.Object ref = attributesConfig_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + attributesConfig_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The attributes config resource shared by all catalog attributes
+     * being deleted. Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
+     * 
+ * + * + * string attributes_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The attributesConfig to set. + * @return This builder for chaining. + */ + public Builder setAttributesConfig(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + attributesConfig_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The attributes config resource shared by all catalog attributes
+     * being deleted. Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
+     * 
+ * + * + * string attributes_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearAttributesConfig() { + + attributesConfig_ = getDefaultInstance().getAttributesConfig(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The attributes config resource shared by all catalog attributes
+     * being deleted. Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
+     * 
+ * + * + * string attributes_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for attributesConfig to set. + * @return This builder for chaining. + */ + public Builder setAttributesConfigBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + attributesConfig_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList attributeKeys_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAttributeKeysIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + attributeKeys_ = new com.google.protobuf.LazyStringArrayList(attributeKeys_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Required. The attribute name keys of the
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s to delete.
+     * A maximum of 1000 catalog attributes can be deleted in a batch.
+     * 
+ * + * repeated string attribute_keys = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the attributeKeys. + */ + public com.google.protobuf.ProtocolStringList getAttributeKeysList() { + return attributeKeys_.getUnmodifiableView(); + } + /** + * + * + *
+     * Required. The attribute name keys of the
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s to delete.
+     * A maximum of 1000 catalog attributes can be deleted in a batch.
+     * 
+ * + * repeated string attribute_keys = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of attributeKeys. + */ + public int getAttributeKeysCount() { + return attributeKeys_.size(); + } + /** + * + * + *
+     * Required. The attribute name keys of the
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s to delete.
+     * A maximum of 1000 catalog attributes can be deleted in a batch.
+     * 
+ * + * repeated string attribute_keys = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The attributeKeys at the given index. + */ + public java.lang.String getAttributeKeys(int index) { + return attributeKeys_.get(index); + } + /** + * + * + *
+     * Required. The attribute name keys of the
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s to delete.
+     * A maximum of 1000 catalog attributes can be deleted in a batch.
+     * 
+ * + * repeated string attribute_keys = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the attributeKeys at the given index. + */ + public com.google.protobuf.ByteString getAttributeKeysBytes(int index) { + return attributeKeys_.getByteString(index); + } + /** + * + * + *
+     * Required. The attribute name keys of the
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s to delete.
+     * A maximum of 1000 catalog attributes can be deleted in a batch.
+     * 
+ * + * repeated string attribute_keys = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index to set the value at. + * @param value The attributeKeys to set. + * @return This builder for chaining. + */ + public Builder setAttributeKeys(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributeKeysIsMutable(); + attributeKeys_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The attribute name keys of the
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s to delete.
+     * A maximum of 1000 catalog attributes can be deleted in a batch.
+     * 
+ * + * repeated string attribute_keys = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The attributeKeys to add. + * @return This builder for chaining. + */ + public Builder addAttributeKeys(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAttributeKeysIsMutable(); + attributeKeys_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The attribute name keys of the
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s to delete.
+     * A maximum of 1000 catalog attributes can be deleted in a batch.
+     * 
+ * + * repeated string attribute_keys = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param values The attributeKeys to add. + * @return This builder for chaining. + */ + public Builder addAllAttributeKeys(java.lang.Iterable values) { + ensureAttributeKeysIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, attributeKeys_); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The attribute name keys of the
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s to delete.
+     * A maximum of 1000 catalog attributes can be deleted in a batch.
+     * 
+ * + * repeated string attribute_keys = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAttributeKeys() { + attributeKeys_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The attribute name keys of the
+     * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s to delete.
+     * A maximum of 1000 catalog attributes can be deleted in a batch.
+     * 
+ * + * repeated string attribute_keys = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes of the attributeKeys to add. + * @return This builder for chaining. + */ + public Builder addAttributeKeysBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAttributeKeysIsMutable(); + attributeKeys_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest) + private static final com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest(); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchRemoveCatalogAttributesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BatchRemoveCatalogAttributesRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BatchRemoveCatalogAttributesRequestOrBuilder.java new file mode 100644 index 00000000..fe6af39d --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BatchRemoveCatalogAttributesRequestOrBuilder.java @@ -0,0 +1,117 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/catalog_service.proto + +package com.google.cloud.retail.v2beta; + +public interface BatchRemoveCatalogAttributesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The attributes config resource shared by all catalog attributes
+   * being deleted. Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
+   * 
+ * + * + * string attributes_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The attributesConfig. + */ + java.lang.String getAttributesConfig(); + /** + * + * + *
+   * Required. The attributes config resource shared by all catalog attributes
+   * being deleted. Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
+   * 
+ * + * + * string attributes_config = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for attributesConfig. + */ + com.google.protobuf.ByteString getAttributesConfigBytes(); + + /** + * + * + *
+   * Required. The attribute name keys of the
+   * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s to delete.
+   * A maximum of 1000 catalog attributes can be deleted in a batch.
+   * 
+ * + * repeated string attribute_keys = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return A list containing the attributeKeys. + */ + java.util.List getAttributeKeysList(); + /** + * + * + *
+   * Required. The attribute name keys of the
+   * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s to delete.
+   * A maximum of 1000 catalog attributes can be deleted in a batch.
+   * 
+ * + * repeated string attribute_keys = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The count of attributeKeys. + */ + int getAttributeKeysCount(); + /** + * + * + *
+   * Required. The attribute name keys of the
+   * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s to delete.
+   * A maximum of 1000 catalog attributes can be deleted in a batch.
+   * 
+ * + * repeated string attribute_keys = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the element to return. + * @return The attributeKeys at the given index. + */ + java.lang.String getAttributeKeys(int index); + /** + * + * + *
+   * Required. The attribute name keys of the
+   * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s to delete.
+   * A maximum of 1000 catalog attributes can be deleted in a batch.
+   * 
+ * + * repeated string attribute_keys = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param index The index of the value to return. + * @return The bytes of the attributeKeys at the given index. + */ + com.google.protobuf.ByteString getAttributeKeysBytes(int index); +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BatchRemoveCatalogAttributesResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BatchRemoveCatalogAttributesResponse.java new file mode 100644 index 00000000..b6c17dcb --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BatchRemoveCatalogAttributesResponse.java @@ -0,0 +1,1040 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/catalog_service.proto + +package com.google.cloud.retail.v2beta; + +/** + * + * + *
+ * Response of the
+ * [CatalogService.BatchRemoveCatalogAttributes][google.cloud.retail.v2beta.CatalogService.BatchRemoveCatalogAttributes].
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse} + */ +public final class BatchRemoveCatalogAttributesResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse) + BatchRemoveCatalogAttributesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use BatchRemoveCatalogAttributesResponse.newBuilder() to construct. + private BatchRemoveCatalogAttributesResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private BatchRemoveCatalogAttributesResponse() { + deletedCatalogAttributes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + resetCatalogAttributes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new BatchRemoveCatalogAttributesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CatalogServiceProto + .internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CatalogServiceProto + .internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse.class, + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse.Builder.class); + } + + public static final int DELETED_CATALOG_ATTRIBUTES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList deletedCatalogAttributes_; + /** + * + * + *
+   * Catalog attributes that were deleted. Only attributes that are not [in
+   * use][CatalogAttribute.in_use] by products can be deleted.
+   * 
+ * + * repeated string deleted_catalog_attributes = 1; + * + * @return A list containing the deletedCatalogAttributes. + */ + public com.google.protobuf.ProtocolStringList getDeletedCatalogAttributesList() { + return deletedCatalogAttributes_; + } + /** + * + * + *
+   * Catalog attributes that were deleted. Only attributes that are not [in
+   * use][CatalogAttribute.in_use] by products can be deleted.
+   * 
+ * + * repeated string deleted_catalog_attributes = 1; + * + * @return The count of deletedCatalogAttributes. + */ + public int getDeletedCatalogAttributesCount() { + return deletedCatalogAttributes_.size(); + } + /** + * + * + *
+   * Catalog attributes that were deleted. Only attributes that are not [in
+   * use][CatalogAttribute.in_use] by products can be deleted.
+   * 
+ * + * repeated string deleted_catalog_attributes = 1; + * + * @param index The index of the element to return. + * @return The deletedCatalogAttributes at the given index. + */ + public java.lang.String getDeletedCatalogAttributes(int index) { + return deletedCatalogAttributes_.get(index); + } + /** + * + * + *
+   * Catalog attributes that were deleted. Only attributes that are not [in
+   * use][CatalogAttribute.in_use] by products can be deleted.
+   * 
+ * + * repeated string deleted_catalog_attributes = 1; + * + * @param index The index of the value to return. + * @return The bytes of the deletedCatalogAttributes at the given index. + */ + public com.google.protobuf.ByteString getDeletedCatalogAttributesBytes(int index) { + return deletedCatalogAttributes_.getByteString(index); + } + + public static final int RESET_CATALOG_ATTRIBUTES_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList resetCatalogAttributes_; + /** + * + * + *
+   * Catalog attributes that were reset. Attributes that are [in
+   * use][CatalogAttribute.in_use] by products cannot be deleted, however their
+   * configuration properties will reset to default values upon removal request.
+   * 
+ * + * repeated string reset_catalog_attributes = 2; + * + * @return A list containing the resetCatalogAttributes. + */ + public com.google.protobuf.ProtocolStringList getResetCatalogAttributesList() { + return resetCatalogAttributes_; + } + /** + * + * + *
+   * Catalog attributes that were reset. Attributes that are [in
+   * use][CatalogAttribute.in_use] by products cannot be deleted, however their
+   * configuration properties will reset to default values upon removal request.
+   * 
+ * + * repeated string reset_catalog_attributes = 2; + * + * @return The count of resetCatalogAttributes. + */ + public int getResetCatalogAttributesCount() { + return resetCatalogAttributes_.size(); + } + /** + * + * + *
+   * Catalog attributes that were reset. Attributes that are [in
+   * use][CatalogAttribute.in_use] by products cannot be deleted, however their
+   * configuration properties will reset to default values upon removal request.
+   * 
+ * + * repeated string reset_catalog_attributes = 2; + * + * @param index The index of the element to return. + * @return The resetCatalogAttributes at the given index. + */ + public java.lang.String getResetCatalogAttributes(int index) { + return resetCatalogAttributes_.get(index); + } + /** + * + * + *
+   * Catalog attributes that were reset. Attributes that are [in
+   * use][CatalogAttribute.in_use] by products cannot be deleted, however their
+   * configuration properties will reset to default values upon removal request.
+   * 
+ * + * repeated string reset_catalog_attributes = 2; + * + * @param index The index of the value to return. + * @return The bytes of the resetCatalogAttributes at the given index. + */ + public com.google.protobuf.ByteString getResetCatalogAttributesBytes(int index) { + return resetCatalogAttributes_.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 < deletedCatalogAttributes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 1, deletedCatalogAttributes_.getRaw(i)); + } + for (int i = 0; i < resetCatalogAttributes_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString( + output, 2, resetCatalogAttributes_.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 < deletedCatalogAttributes_.size(); i++) { + dataSize += computeStringSizeNoTag(deletedCatalogAttributes_.getRaw(i)); + } + size += dataSize; + size += 1 * getDeletedCatalogAttributesList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < resetCatalogAttributes_.size(); i++) { + dataSize += computeStringSizeNoTag(resetCatalogAttributes_.getRaw(i)); + } + size += dataSize; + size += 1 * getResetCatalogAttributesList().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.retail.v2beta.BatchRemoveCatalogAttributesResponse)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse other = + (com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse) obj; + + if (!getDeletedCatalogAttributesList().equals(other.getDeletedCatalogAttributesList())) + return false; + if (!getResetCatalogAttributesList().equals(other.getResetCatalogAttributesList())) + return false; + if (!getUnknownFields().equals(other.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 (getDeletedCatalogAttributesCount() > 0) { + hash = (37 * hash) + DELETED_CATALOG_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getDeletedCatalogAttributesList().hashCode(); + } + if (getResetCatalogAttributesCount() > 0) { + hash = (37 * hash) + RESET_CATALOG_ATTRIBUTES_FIELD_NUMBER; + hash = (53 * hash) + getResetCatalogAttributesList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response of the
+   * [CatalogService.BatchRemoveCatalogAttributes][google.cloud.retail.v2beta.CatalogService.BatchRemoveCatalogAttributes].
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse) + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CatalogServiceProto + .internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.CatalogServiceProto + .internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse.class, + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse.Builder.class); + } + + // Construct using + // com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + deletedCatalogAttributes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + resetCatalogAttributes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.CatalogServiceProto + .internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse + getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse build() { + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse buildPartial() { + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse result = + new com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + deletedCatalogAttributes_ = deletedCatalogAttributes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.deletedCatalogAttributes_ = deletedCatalogAttributes_; + if (((bitField0_ & 0x00000002) != 0)) { + resetCatalogAttributes_ = resetCatalogAttributes_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.resetCatalogAttributes_ = resetCatalogAttributes_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse) { + return mergeFrom( + (com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse other) { + if (other + == com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse + .getDefaultInstance()) return this; + if (!other.deletedCatalogAttributes_.isEmpty()) { + if (deletedCatalogAttributes_.isEmpty()) { + deletedCatalogAttributes_ = other.deletedCatalogAttributes_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureDeletedCatalogAttributesIsMutable(); + deletedCatalogAttributes_.addAll(other.deletedCatalogAttributes_); + } + onChanged(); + } + if (!other.resetCatalogAttributes_.isEmpty()) { + if (resetCatalogAttributes_.isEmpty()) { + resetCatalogAttributes_ = other.resetCatalogAttributes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureResetCatalogAttributesIsMutable(); + resetCatalogAttributes_.addAll(other.resetCatalogAttributes_); + } + 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(); + ensureDeletedCatalogAttributesIsMutable(); + deletedCatalogAttributes_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureResetCatalogAttributesIsMutable(); + resetCatalogAttributes_.add(s); + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList deletedCatalogAttributes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureDeletedCatalogAttributesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + deletedCatalogAttributes_ = + new com.google.protobuf.LazyStringArrayList(deletedCatalogAttributes_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Catalog attributes that were deleted. Only attributes that are not [in
+     * use][CatalogAttribute.in_use] by products can be deleted.
+     * 
+ * + * repeated string deleted_catalog_attributes = 1; + * + * @return A list containing the deletedCatalogAttributes. + */ + public com.google.protobuf.ProtocolStringList getDeletedCatalogAttributesList() { + return deletedCatalogAttributes_.getUnmodifiableView(); + } + /** + * + * + *
+     * Catalog attributes that were deleted. Only attributes that are not [in
+     * use][CatalogAttribute.in_use] by products can be deleted.
+     * 
+ * + * repeated string deleted_catalog_attributes = 1; + * + * @return The count of deletedCatalogAttributes. + */ + public int getDeletedCatalogAttributesCount() { + return deletedCatalogAttributes_.size(); + } + /** + * + * + *
+     * Catalog attributes that were deleted. Only attributes that are not [in
+     * use][CatalogAttribute.in_use] by products can be deleted.
+     * 
+ * + * repeated string deleted_catalog_attributes = 1; + * + * @param index The index of the element to return. + * @return The deletedCatalogAttributes at the given index. + */ + public java.lang.String getDeletedCatalogAttributes(int index) { + return deletedCatalogAttributes_.get(index); + } + /** + * + * + *
+     * Catalog attributes that were deleted. Only attributes that are not [in
+     * use][CatalogAttribute.in_use] by products can be deleted.
+     * 
+ * + * repeated string deleted_catalog_attributes = 1; + * + * @param index The index of the value to return. + * @return The bytes of the deletedCatalogAttributes at the given index. + */ + public com.google.protobuf.ByteString getDeletedCatalogAttributesBytes(int index) { + return deletedCatalogAttributes_.getByteString(index); + } + /** + * + * + *
+     * Catalog attributes that were deleted. Only attributes that are not [in
+     * use][CatalogAttribute.in_use] by products can be deleted.
+     * 
+ * + * repeated string deleted_catalog_attributes = 1; + * + * @param index The index to set the value at. + * @param value The deletedCatalogAttributes to set. + * @return This builder for chaining. + */ + public Builder setDeletedCatalogAttributes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeletedCatalogAttributesIsMutable(); + deletedCatalogAttributes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Catalog attributes that were deleted. Only attributes that are not [in
+     * use][CatalogAttribute.in_use] by products can be deleted.
+     * 
+ * + * repeated string deleted_catalog_attributes = 1; + * + * @param value The deletedCatalogAttributes to add. + * @return This builder for chaining. + */ + public Builder addDeletedCatalogAttributes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureDeletedCatalogAttributesIsMutable(); + deletedCatalogAttributes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Catalog attributes that were deleted. Only attributes that are not [in
+     * use][CatalogAttribute.in_use] by products can be deleted.
+     * 
+ * + * repeated string deleted_catalog_attributes = 1; + * + * @param values The deletedCatalogAttributes to add. + * @return This builder for chaining. + */ + public Builder addAllDeletedCatalogAttributes(java.lang.Iterable values) { + ensureDeletedCatalogAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, deletedCatalogAttributes_); + onChanged(); + return this; + } + /** + * + * + *
+     * Catalog attributes that were deleted. Only attributes that are not [in
+     * use][CatalogAttribute.in_use] by products can be deleted.
+     * 
+ * + * repeated string deleted_catalog_attributes = 1; + * + * @return This builder for chaining. + */ + public Builder clearDeletedCatalogAttributes() { + deletedCatalogAttributes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Catalog attributes that were deleted. Only attributes that are not [in
+     * use][CatalogAttribute.in_use] by products can be deleted.
+     * 
+ * + * repeated string deleted_catalog_attributes = 1; + * + * @param value The bytes of the deletedCatalogAttributes to add. + * @return This builder for chaining. + */ + public Builder addDeletedCatalogAttributesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureDeletedCatalogAttributesIsMutable(); + deletedCatalogAttributes_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList resetCatalogAttributes_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureResetCatalogAttributesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + resetCatalogAttributes_ = + new com.google.protobuf.LazyStringArrayList(resetCatalogAttributes_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Catalog attributes that were reset. Attributes that are [in
+     * use][CatalogAttribute.in_use] by products cannot be deleted, however their
+     * configuration properties will reset to default values upon removal request.
+     * 
+ * + * repeated string reset_catalog_attributes = 2; + * + * @return A list containing the resetCatalogAttributes. + */ + public com.google.protobuf.ProtocolStringList getResetCatalogAttributesList() { + return resetCatalogAttributes_.getUnmodifiableView(); + } + /** + * + * + *
+     * Catalog attributes that were reset. Attributes that are [in
+     * use][CatalogAttribute.in_use] by products cannot be deleted, however their
+     * configuration properties will reset to default values upon removal request.
+     * 
+ * + * repeated string reset_catalog_attributes = 2; + * + * @return The count of resetCatalogAttributes. + */ + public int getResetCatalogAttributesCount() { + return resetCatalogAttributes_.size(); + } + /** + * + * + *
+     * Catalog attributes that were reset. Attributes that are [in
+     * use][CatalogAttribute.in_use] by products cannot be deleted, however their
+     * configuration properties will reset to default values upon removal request.
+     * 
+ * + * repeated string reset_catalog_attributes = 2; + * + * @param index The index of the element to return. + * @return The resetCatalogAttributes at the given index. + */ + public java.lang.String getResetCatalogAttributes(int index) { + return resetCatalogAttributes_.get(index); + } + /** + * + * + *
+     * Catalog attributes that were reset. Attributes that are [in
+     * use][CatalogAttribute.in_use] by products cannot be deleted, however their
+     * configuration properties will reset to default values upon removal request.
+     * 
+ * + * repeated string reset_catalog_attributes = 2; + * + * @param index The index of the value to return. + * @return The bytes of the resetCatalogAttributes at the given index. + */ + public com.google.protobuf.ByteString getResetCatalogAttributesBytes(int index) { + return resetCatalogAttributes_.getByteString(index); + } + /** + * + * + *
+     * Catalog attributes that were reset. Attributes that are [in
+     * use][CatalogAttribute.in_use] by products cannot be deleted, however their
+     * configuration properties will reset to default values upon removal request.
+     * 
+ * + * repeated string reset_catalog_attributes = 2; + * + * @param index The index to set the value at. + * @param value The resetCatalogAttributes to set. + * @return This builder for chaining. + */ + public Builder setResetCatalogAttributes(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResetCatalogAttributesIsMutable(); + resetCatalogAttributes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Catalog attributes that were reset. Attributes that are [in
+     * use][CatalogAttribute.in_use] by products cannot be deleted, however their
+     * configuration properties will reset to default values upon removal request.
+     * 
+ * + * repeated string reset_catalog_attributes = 2; + * + * @param value The resetCatalogAttributes to add. + * @return This builder for chaining. + */ + public Builder addResetCatalogAttributes(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResetCatalogAttributesIsMutable(); + resetCatalogAttributes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Catalog attributes that were reset. Attributes that are [in
+     * use][CatalogAttribute.in_use] by products cannot be deleted, however their
+     * configuration properties will reset to default values upon removal request.
+     * 
+ * + * repeated string reset_catalog_attributes = 2; + * + * @param values The resetCatalogAttributes to add. + * @return This builder for chaining. + */ + public Builder addAllResetCatalogAttributes(java.lang.Iterable values) { + ensureResetCatalogAttributesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resetCatalogAttributes_); + onChanged(); + return this; + } + /** + * + * + *
+     * Catalog attributes that were reset. Attributes that are [in
+     * use][CatalogAttribute.in_use] by products cannot be deleted, however their
+     * configuration properties will reset to default values upon removal request.
+     * 
+ * + * repeated string reset_catalog_attributes = 2; + * + * @return This builder for chaining. + */ + public Builder clearResetCatalogAttributes() { + resetCatalogAttributes_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Catalog attributes that were reset. Attributes that are [in
+     * use][CatalogAttribute.in_use] by products cannot be deleted, however their
+     * configuration properties will reset to default values upon removal request.
+     * 
+ * + * repeated string reset_catalog_attributes = 2; + * + * @param value The bytes of the resetCatalogAttributes to add. + * @return This builder for chaining. + */ + public Builder addResetCatalogAttributesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureResetCatalogAttributesIsMutable(); + resetCatalogAttributes_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse) + private static final com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse(); + } + + public static com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public BatchRemoveCatalogAttributesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BatchRemoveCatalogAttributesResponseOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BatchRemoveCatalogAttributesResponseOrBuilder.java new file mode 100644 index 00000000..4e42b898 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BatchRemoveCatalogAttributesResponseOrBuilder.java @@ -0,0 +1,139 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/catalog_service.proto + +package com.google.cloud.retail.v2beta; + +public interface BatchRemoveCatalogAttributesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Catalog attributes that were deleted. Only attributes that are not [in
+   * use][CatalogAttribute.in_use] by products can be deleted.
+   * 
+ * + * repeated string deleted_catalog_attributes = 1; + * + * @return A list containing the deletedCatalogAttributes. + */ + java.util.List getDeletedCatalogAttributesList(); + /** + * + * + *
+   * Catalog attributes that were deleted. Only attributes that are not [in
+   * use][CatalogAttribute.in_use] by products can be deleted.
+   * 
+ * + * repeated string deleted_catalog_attributes = 1; + * + * @return The count of deletedCatalogAttributes. + */ + int getDeletedCatalogAttributesCount(); + /** + * + * + *
+   * Catalog attributes that were deleted. Only attributes that are not [in
+   * use][CatalogAttribute.in_use] by products can be deleted.
+   * 
+ * + * repeated string deleted_catalog_attributes = 1; + * + * @param index The index of the element to return. + * @return The deletedCatalogAttributes at the given index. + */ + java.lang.String getDeletedCatalogAttributes(int index); + /** + * + * + *
+   * Catalog attributes that were deleted. Only attributes that are not [in
+   * use][CatalogAttribute.in_use] by products can be deleted.
+   * 
+ * + * repeated string deleted_catalog_attributes = 1; + * + * @param index The index of the value to return. + * @return The bytes of the deletedCatalogAttributes at the given index. + */ + com.google.protobuf.ByteString getDeletedCatalogAttributesBytes(int index); + + /** + * + * + *
+   * Catalog attributes that were reset. Attributes that are [in
+   * use][CatalogAttribute.in_use] by products cannot be deleted, however their
+   * configuration properties will reset to default values upon removal request.
+   * 
+ * + * repeated string reset_catalog_attributes = 2; + * + * @return A list containing the resetCatalogAttributes. + */ + java.util.List getResetCatalogAttributesList(); + /** + * + * + *
+   * Catalog attributes that were reset. Attributes that are [in
+   * use][CatalogAttribute.in_use] by products cannot be deleted, however their
+   * configuration properties will reset to default values upon removal request.
+   * 
+ * + * repeated string reset_catalog_attributes = 2; + * + * @return The count of resetCatalogAttributes. + */ + int getResetCatalogAttributesCount(); + /** + * + * + *
+   * Catalog attributes that were reset. Attributes that are [in
+   * use][CatalogAttribute.in_use] by products cannot be deleted, however their
+   * configuration properties will reset to default values upon removal request.
+   * 
+ * + * repeated string reset_catalog_attributes = 2; + * + * @param index The index of the element to return. + * @return The resetCatalogAttributes at the given index. + */ + java.lang.String getResetCatalogAttributes(int index); + /** + * + * + *
+   * Catalog attributes that were reset. Attributes that are [in
+   * use][CatalogAttribute.in_use] by products cannot be deleted, however their
+   * configuration properties will reset to default values upon removal request.
+   * 
+ * + * repeated string reset_catalog_attributes = 2; + * + * @param index The index of the value to return. + * @return The bytes of the resetCatalogAttributes at the given index. + */ + com.google.protobuf.ByteString getResetCatalogAttributesBytes(int index); +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQueryOutputResult.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQueryOutputResult.java index b1201f82..31786d22 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQueryOutputResult.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQueryOutputResult.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BigQueryOutputResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - datasetId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - tableId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ExportConfigProto .internal_static_google_cloud_retail_v2beta_BigQueryOutputResult_descriptor; @@ -239,7 +186,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, tableId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -254,7 +201,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tableId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, tableId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -272,7 +219,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDatasetId().equals(other.getDatasetId())) return false; if (!getTableId().equals(other.getTableId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -287,7 +234,7 @@ public int hashCode() { hash = (53 * hash) + getDatasetId().hashCode(); hash = (37 * hash) + TABLE_ID_FIELD_NUMBER; hash = (53 * hash) + getTableId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -416,17 +363,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.BigQueryOutputResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -523,7 +463,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.BigQueryOutputResult oth tableId_ = other.tableId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -538,18 +478,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.BigQueryOutputResult parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + datasetId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + tableId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.BigQueryOutputResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -797,7 +762,18 @@ public BigQueryOutputResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BigQueryOutputResult(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQuerySource.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQuerySource.java index a34a5b26..7aac0304 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQuerySource.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQuerySource.java @@ -56,94 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BigQuerySource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - datasetId_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - tableId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - gcsStagingDir_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - dataSchema_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - projectId_ = s; - break; - } - case 50: - { - com.google.type.Date.Builder subBuilder = null; - if (partitionCase_ == 6) { - subBuilder = ((com.google.type.Date) partition_).toBuilder(); - } - partition_ = input.readMessage(com.google.type.Date.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.type.Date) partition_); - partition_ = subBuilder.buildPartial(); - } - partitionCase_ = 6; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ImportConfigProto .internal_static_google_cloud_retail_v2beta_BigQuerySource_descriptor; @@ -209,9 +121,8 @@ public PartitionCase getPartitionCase() { * *
    * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
-   * Only supported when
-   * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-   * is set to `FULL`.
+   * Only supported in
+   * [ImportProductsRequest][google.cloud.retail.v2beta.ImportProductsRequest].
    * 
* * .google.type.Date partition_date = 6; @@ -227,9 +138,8 @@ public boolean hasPartitionDate() { * *
    * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
-   * Only supported when
-   * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-   * is set to `FULL`.
+   * Only supported in
+   * [ImportProductsRequest][google.cloud.retail.v2beta.ImportProductsRequest].
    * 
* * .google.type.Date partition_date = 6; @@ -248,9 +158,8 @@ public com.google.type.Date getPartitionDate() { * *
    * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
-   * Only supported when
-   * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-   * is set to `FULL`.
+   * Only supported in
+   * [ImportProductsRequest][google.cloud.retail.v2beta.ImportProductsRequest].
    * 
* * .google.type.Date partition_date = 6; @@ -490,8 +399,7 @@ public com.google.protobuf.ByteString getGcsStagingDirBytes() { * * `user_event_ga360`: * The schema is available here: * https://support.google.com/analytics/answer/3437719. - * * `user_event_ga4`: This feature is in private preview. Please contact the - * support team for importing Google Analytics 4 events. + * * `user_event_ga4`: * The schema is available here: * https://support.google.com/analytics/answer/7029846. * Supported values for auto-completion imports: @@ -533,8 +441,7 @@ public java.lang.String getDataSchema() { * * `user_event_ga360`: * The schema is available here: * https://support.google.com/analytics/answer/3437719. - * * `user_event_ga4`: This feature is in private preview. Please contact the - * support team for importing Google Analytics 4 events. + * * `user_event_ga4`: * The schema is available here: * https://support.google.com/analytics/answer/7029846. * Supported values for auto-completion imports: @@ -592,7 +499,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (partitionCase_ == 6) { output.writeMessage(6, (com.google.type.Date) partition_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -621,7 +528,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 6, (com.google.type.Date) partition_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -650,7 +557,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -679,7 +586,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -808,22 +715,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.BigQuerySource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (partitionDateBuilder_ != null) { + partitionDateBuilder_.clear(); + } projectId_ = ""; datasetId_ = ""; @@ -956,7 +859,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.BigQuerySource other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -971,17 +874,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.BigQuerySource parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + datasetId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + tableId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + gcsStagingDir_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + dataSchema_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + projectId_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + input.readMessage(getPartitionDateFieldBuilder().getBuilder(), extensionRegistry); + partitionCase_ = 6; + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.BigQuerySource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1007,9 +960,8 @@ public Builder clearPartition() { * *
      * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
-     * Only supported when
-     * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-     * is set to `FULL`.
+     * Only supported in
+     * [ImportProductsRequest][google.cloud.retail.v2beta.ImportProductsRequest].
      * 
* * .google.type.Date partition_date = 6; @@ -1025,9 +977,8 @@ public boolean hasPartitionDate() { * *
      * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
-     * Only supported when
-     * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-     * is set to `FULL`.
+     * Only supported in
+     * [ImportProductsRequest][google.cloud.retail.v2beta.ImportProductsRequest].
      * 
* * .google.type.Date partition_date = 6; @@ -1053,9 +1004,8 @@ public com.google.type.Date getPartitionDate() { * *
      * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
-     * Only supported when
-     * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-     * is set to `FULL`.
+     * Only supported in
+     * [ImportProductsRequest][google.cloud.retail.v2beta.ImportProductsRequest].
      * 
* * .google.type.Date partition_date = 6; @@ -1078,9 +1028,8 @@ public Builder setPartitionDate(com.google.type.Date value) { * *
      * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
-     * Only supported when
-     * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-     * is set to `FULL`.
+     * Only supported in
+     * [ImportProductsRequest][google.cloud.retail.v2beta.ImportProductsRequest].
      * 
* * .google.type.Date partition_date = 6; @@ -1100,9 +1049,8 @@ public Builder setPartitionDate(com.google.type.Date.Builder builderForValue) { * *
      * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
-     * Only supported when
-     * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-     * is set to `FULL`.
+     * Only supported in
+     * [ImportProductsRequest][google.cloud.retail.v2beta.ImportProductsRequest].
      * 
* * .google.type.Date partition_date = 6; @@ -1133,9 +1081,8 @@ public Builder mergePartitionDate(com.google.type.Date value) { * *
      * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
-     * Only supported when
-     * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-     * is set to `FULL`.
+     * Only supported in
+     * [ImportProductsRequest][google.cloud.retail.v2beta.ImportProductsRequest].
      * 
* * .google.type.Date partition_date = 6; @@ -1161,9 +1108,8 @@ public Builder clearPartitionDate() { * *
      * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
-     * Only supported when
-     * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-     * is set to `FULL`.
+     * Only supported in
+     * [ImportProductsRequest][google.cloud.retail.v2beta.ImportProductsRequest].
      * 
* * .google.type.Date partition_date = 6; @@ -1176,9 +1122,8 @@ public com.google.type.Date.Builder getPartitionDateBuilder() { * *
      * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
-     * Only supported when
-     * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-     * is set to `FULL`.
+     * Only supported in
+     * [ImportProductsRequest][google.cloud.retail.v2beta.ImportProductsRequest].
      * 
* * .google.type.Date partition_date = 6; @@ -1199,9 +1144,8 @@ public com.google.type.DateOrBuilder getPartitionDateOrBuilder() { * *
      * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
-     * Only supported when
-     * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-     * is set to `FULL`.
+     * Only supported in
+     * [ImportProductsRequest][google.cloud.retail.v2beta.ImportProductsRequest].
      * 
* * .google.type.Date partition_date = 6; @@ -1697,8 +1641,7 @@ public Builder setGcsStagingDirBytes(com.google.protobuf.ByteString value) { * * `user_event_ga360`: * The schema is available here: * https://support.google.com/analytics/answer/3437719. - * * `user_event_ga4`: This feature is in private preview. Please contact the - * support team for importing Google Analytics 4 events. + * * `user_event_ga4`: * The schema is available here: * https://support.google.com/analytics/answer/7029846. * Supported values for auto-completion imports: @@ -1739,8 +1682,7 @@ public java.lang.String getDataSchema() { * * `user_event_ga360`: * The schema is available here: * https://support.google.com/analytics/answer/3437719. - * * `user_event_ga4`: This feature is in private preview. Please contact the - * support team for importing Google Analytics 4 events. + * * `user_event_ga4`: * The schema is available here: * https://support.google.com/analytics/answer/7029846. * Supported values for auto-completion imports: @@ -1781,8 +1723,7 @@ public com.google.protobuf.ByteString getDataSchemaBytes() { * * `user_event_ga360`: * The schema is available here: * https://support.google.com/analytics/answer/3437719. - * * `user_event_ga4`: This feature is in private preview. Please contact the - * support team for importing Google Analytics 4 events. + * * `user_event_ga4`: * The schema is available here: * https://support.google.com/analytics/answer/7029846. * Supported values for auto-completion imports: @@ -1822,8 +1763,7 @@ public Builder setDataSchema(java.lang.String value) { * * `user_event_ga360`: * The schema is available here: * https://support.google.com/analytics/answer/3437719. - * * `user_event_ga4`: This feature is in private preview. Please contact the - * support team for importing Google Analytics 4 events. + * * `user_event_ga4`: * The schema is available here: * https://support.google.com/analytics/answer/7029846. * Supported values for auto-completion imports: @@ -1859,8 +1799,7 @@ public Builder clearDataSchema() { * * `user_event_ga360`: * The schema is available here: * https://support.google.com/analytics/answer/3437719. - * * `user_event_ga4`: This feature is in private preview. Please contact the - * support team for importing Google Analytics 4 events. + * * `user_event_ga4`: * The schema is available here: * https://support.google.com/analytics/answer/7029846. * Supported values for auto-completion imports: @@ -1917,7 +1856,18 @@ public BigQuerySource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BigQuerySource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQuerySourceOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQuerySourceOrBuilder.java index 79ab5181..fab8abee 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQuerySourceOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/BigQuerySourceOrBuilder.java @@ -28,9 +28,8 @@ public interface BigQuerySourceOrBuilder * *
    * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
-   * Only supported when
-   * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-   * is set to `FULL`.
+   * Only supported in
+   * [ImportProductsRequest][google.cloud.retail.v2beta.ImportProductsRequest].
    * 
* * .google.type.Date partition_date = 6; @@ -43,9 +42,8 @@ public interface BigQuerySourceOrBuilder * *
    * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
-   * Only supported when
-   * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-   * is set to `FULL`.
+   * Only supported in
+   * [ImportProductsRequest][google.cloud.retail.v2beta.ImportProductsRequest].
    * 
* * .google.type.Date partition_date = 6; @@ -58,9 +56,8 @@ public interface BigQuerySourceOrBuilder * *
    * BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
-   * Only supported when
-   * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-   * is set to `FULL`.
+   * Only supported in
+   * [ImportProductsRequest][google.cloud.retail.v2beta.ImportProductsRequest].
    * 
* * .google.type.Date partition_date = 6; @@ -196,8 +193,7 @@ public interface BigQuerySourceOrBuilder * * `user_event_ga360`: * The schema is available here: * https://support.google.com/analytics/answer/3437719. - * * `user_event_ga4`: This feature is in private preview. Please contact the - * support team for importing Google Analytics 4 events. + * * `user_event_ga4`: * The schema is available here: * https://support.google.com/analytics/answer/7029846. * Supported values for auto-completion imports: @@ -228,8 +224,7 @@ public interface BigQuerySourceOrBuilder * * `user_event_ga360`: * The schema is available here: * https://support.google.com/analytics/answer/3437719. - * * `user_event_ga4`: This feature is in private preview. Please contact the - * support team for importing Google Analytics 4 events. + * * `user_event_ga4`: * The schema is available here: * https://support.google.com/analytics/answer/7029846. * Supported values for auto-completion imports: diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Catalog.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Catalog.java index 30262d6b..2697a024 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Catalog.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Catalog.java @@ -53,93 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Catalog( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 34: - { - com.google.cloud.retail.v2beta.ProductLevelConfig.Builder subBuilder = null; - if (productLevelConfig_ != null) { - subBuilder = productLevelConfig_.toBuilder(); - } - productLevelConfig_ = - input.readMessage( - com.google.cloud.retail.v2beta.ProductLevelConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(productLevelConfig_); - productLevelConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - com.google.cloud.retail.v2beta.MerchantCenterLinkingConfig.Builder subBuilder = null; - if (merchantCenterLinkingConfig_ != null) { - subBuilder = merchantCenterLinkingConfig_.toBuilder(); - } - merchantCenterLinkingConfig_ = - input.readMessage( - com.google.cloud.retail.v2beta.MerchantCenterLinkingConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(merchantCenterLinkingConfig_); - merchantCenterLinkingConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CatalogProto .internal_static_google_cloud_retail_v2beta_Catalog_descriptor; @@ -411,7 +324,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (merchantCenterLinkingConfig_ != null) { output.writeMessage(6, getMerchantCenterLinkingConfig()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -434,7 +347,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 6, getMerchantCenterLinkingConfig()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -460,7 +373,7 @@ public boolean equals(final java.lang.Object obj) { if (!getMerchantCenterLinkingConfig().equals(other.getMerchantCenterLinkingConfig())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -483,7 +396,7 @@ public int hashCode() { hash = (37 * hash) + MERCHANT_CENTER_LINKING_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getMerchantCenterLinkingConfig().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -612,17 +525,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.Catalog.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -746,7 +652,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Catalog other) { if (other.hasMerchantCenterLinkingConfig()) { mergeMerchantCenterLinkingConfig(other.getMerchantCenterLinkingConfig()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -761,17 +667,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Catalog parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 34: + { + input.readMessage( + getProductLevelConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 50: + { + input.readMessage( + getMerchantCenterLinkingConfigFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.Catalog) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1493,7 +1439,18 @@ public Catalog parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Catalog(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttribute.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttribute.java index 0f7c2c7c..a38847b5 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttribute.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttribute.java @@ -45,6 +45,7 @@ private CatalogAttribute() { dynamicFacetableOption_ = 0; searchableOption_ = 0; recommendationsFilteringOption_ = 0; + exactSearchableOption_ = 0; } @java.lang.Override @@ -58,92 +59,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CatalogAttribute( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - key_ = s; - break; - } - case 40: - { - int rawValue = input.readEnum(); - - indexableOption_ = rawValue; - break; - } - case 48: - { - int rawValue = input.readEnum(); - - dynamicFacetableOption_ = rawValue; - break; - } - case 56: - { - int rawValue = input.readEnum(); - - searchableOption_ = rawValue; - break; - } - case 64: - { - int rawValue = input.readEnum(); - - recommendationsFilteringOption_ = rawValue; - break; - } - case 72: - { - inUse_ = input.readBool(); - break; - } - case 80: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CatalogProto .internal_static_google_cloud_retail_v2beta_CatalogAttribute_descriptor; @@ -804,6 +719,168 @@ private SearchableOption(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.CatalogAttribute.SearchableOption) } + /** + * + * + *
+   * The status of the exact-searchable option of a catalog attribute.
+   * 
+ * + * Protobuf enum {@code google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption} + */ + public enum ExactSearchableOption implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Value used when unset. Defaults to
+     * [EXACT_SEARCHABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption.EXACT_SEARCHABLE_DISABLED].
+     * 
+ * + * EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0; + */ + EXACT_SEARCHABLE_OPTION_UNSPECIFIED(0), + /** + * + * + *
+     * Exact searchable option enabled for an attribute.
+     * 
+ * + * EXACT_SEARCHABLE_ENABLED = 1; + */ + EXACT_SEARCHABLE_ENABLED(1), + /** + * + * + *
+     * Exact searchable option disabled for an attribute.
+     * 
+ * + * EXACT_SEARCHABLE_DISABLED = 2; + */ + EXACT_SEARCHABLE_DISABLED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Value used when unset. Defaults to
+     * [EXACT_SEARCHABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption.EXACT_SEARCHABLE_DISABLED].
+     * 
+ * + * EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0; + */ + public static final int EXACT_SEARCHABLE_OPTION_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Exact searchable option enabled for an attribute.
+     * 
+ * + * EXACT_SEARCHABLE_ENABLED = 1; + */ + public static final int EXACT_SEARCHABLE_ENABLED_VALUE = 1; + /** + * + * + *
+     * Exact searchable option disabled for an attribute.
+     * 
+ * + * EXACT_SEARCHABLE_DISABLED = 2; + */ + public static final int EXACT_SEARCHABLE_DISABLED_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ExactSearchableOption 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 ExactSearchableOption forNumber(int value) { + switch (value) { + case 0: + return EXACT_SEARCHABLE_OPTION_UNSPECIFIED; + case 1: + return EXACT_SEARCHABLE_ENABLED; + case 2: + return EXACT_SEARCHABLE_DISABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ExactSearchableOption findValueByNumber(int number) { + return ExactSearchableOption.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2beta.CatalogAttribute.getDescriptor().getEnumTypes().get(4); + } + + private static final ExactSearchableOption[] VALUES = values(); + + public static ExactSearchableOption 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 ExactSearchableOption(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption) + } + public static final int KEY_FIELD_NUMBER = 1; private volatile java.lang.Object key_; /** @@ -1152,6 +1229,54 @@ public int getRecommendationsFilteringOptionValue() { : result; } + public static final int EXACT_SEARCHABLE_OPTION_FIELD_NUMBER = 11; + private int exactSearchableOption_; + /** + * + * + *
+   * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable.
+   * This property only applies to textual custom attributes and requires
+   * indexable set to enabled to enable exact-searchable.
+   * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11; + * + * + * @return The enum numeric value on the wire for exactSearchableOption. + */ + @java.lang.Override + public int getExactSearchableOptionValue() { + return exactSearchableOption_; + } + /** + * + * + *
+   * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable.
+   * This property only applies to textual custom attributes and requires
+   * indexable set to enabled to enable exact-searchable.
+   * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11; + * + * + * @return The exactSearchableOption. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption + getExactSearchableOption() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption result = + com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption.valueOf( + exactSearchableOption_); + return result == null + ? com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption.UNRECOGNIZED + : result; + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1200,7 +1325,13 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io != com.google.cloud.retail.v2beta.CatalogAttribute.AttributeType.UNKNOWN.getNumber()) { output.writeEnum(10, type_); } - unknownFields.writeTo(output); + if (exactSearchableOption_ + != com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption + .EXACT_SEARCHABLE_OPTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(11, exactSearchableOption_); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1244,7 +1375,13 @@ public int getSerializedSize() { != com.google.cloud.retail.v2beta.CatalogAttribute.AttributeType.UNKNOWN.getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, type_); } - size += unknownFields.getSerializedSize(); + if (exactSearchableOption_ + != com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption + .EXACT_SEARCHABLE_OPTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, exactSearchableOption_); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1267,7 +1404,8 @@ public boolean equals(final java.lang.Object obj) { if (dynamicFacetableOption_ != other.dynamicFacetableOption_) return false; if (searchableOption_ != other.searchableOption_) return false; if (recommendationsFilteringOption_ != other.recommendationsFilteringOption_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (exactSearchableOption_ != other.exactSearchableOption_) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1292,7 +1430,9 @@ public int hashCode() { hash = (53 * hash) + searchableOption_; hash = (37 * hash) + RECOMMENDATIONS_FILTERING_OPTION_FIELD_NUMBER; hash = (53 * hash) + recommendationsFilteringOption_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (37 * hash) + EXACT_SEARCHABLE_OPTION_FIELD_NUMBER; + hash = (53 * hash) + exactSearchableOption_; + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1422,17 +1562,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.CatalogAttribute.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1452,6 +1585,8 @@ public Builder clear() { recommendationsFilteringOption_ = 0; + exactSearchableOption_ = 0; + return this; } @@ -1486,6 +1621,7 @@ public com.google.cloud.retail.v2beta.CatalogAttribute buildPartial() { result.dynamicFacetableOption_ = dynamicFacetableOption_; result.searchableOption_ = searchableOption_; result.recommendationsFilteringOption_ = recommendationsFilteringOption_; + result.exactSearchableOption_ = exactSearchableOption_; onBuilt(); return result; } @@ -1558,7 +1694,10 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.CatalogAttribute other) if (other.recommendationsFilteringOption_ != 0) { setRecommendationsFilteringOptionValue(other.getRecommendationsFilteringOptionValue()); } - this.mergeUnknownFields(other.unknownFields); + if (other.exactSearchableOption_ != 0) { + setExactSearchableOptionValue(other.getExactSearchableOptionValue()); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1573,17 +1712,79 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.CatalogAttribute parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 40: + { + indexableOption_ = input.readEnum(); + + break; + } // case 40 + case 48: + { + dynamicFacetableOption_ = input.readEnum(); + + break; + } // case 48 + case 56: + { + searchableOption_ = input.readEnum(); + + break; + } // case 56 + case 64: + { + recommendationsFilteringOption_ = input.readEnum(); + + break; + } // case 64 + case 72: + { + inUse_ = input.readBool(); + + break; + } // case 72 + case 80: + { + type_ = input.readEnum(); + + break; + } // case 80 + case 88: + { + exactSearchableOption_ = input.readEnum(); + + break; + } // case 88 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2beta.CatalogAttribute) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2451,6 +2652,122 @@ public Builder clearRecommendationsFilteringOption() { return this; } + private int exactSearchableOption_ = 0; + /** + * + * + *
+     * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable.
+     * This property only applies to textual custom attributes and requires
+     * indexable set to enabled to enable exact-searchable.
+     * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11; + * + * + * @return The enum numeric value on the wire for exactSearchableOption. + */ + @java.lang.Override + public int getExactSearchableOptionValue() { + return exactSearchableOption_; + } + /** + * + * + *
+     * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable.
+     * This property only applies to textual custom attributes and requires
+     * indexable set to enabled to enable exact-searchable.
+     * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11; + * + * + * @param value The enum numeric value on the wire for exactSearchableOption to set. + * @return This builder for chaining. + */ + public Builder setExactSearchableOptionValue(int value) { + + exactSearchableOption_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable.
+     * This property only applies to textual custom attributes and requires
+     * indexable set to enabled to enable exact-searchable.
+     * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11; + * + * + * @return The exactSearchableOption. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption + getExactSearchableOption() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption result = + com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption.valueOf( + exactSearchableOption_); + return result == null + ? com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable.
+     * This property only applies to textual custom attributes and requires
+     * indexable set to enabled to enable exact-searchable.
+     * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11; + * + * + * @param value The exactSearchableOption to set. + * @return This builder for chaining. + */ + public Builder setExactSearchableOption( + com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption value) { + if (value == null) { + throw new NullPointerException(); + } + + exactSearchableOption_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable.
+     * This property only applies to textual custom attributes and requires
+     * indexable set to enabled to enable exact-searchable.
+     * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11; + * + * + * @return This builder for chaining. + */ + public Builder clearExactSearchableOption() { + + exactSearchableOption_ = 0; + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -2483,7 +2800,18 @@ public CatalogAttribute parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CatalogAttribute(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttributeOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttributeOrBuilder.java index 0a1d72b4..19f81a3b 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttributeOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogAttributeOrBuilder.java @@ -273,4 +273,37 @@ public interface CatalogAttributeOrBuilder * @return The recommendationsFilteringOption. */ com.google.cloud.retail.v2beta.RecommendationsFilteringOption getRecommendationsFilteringOption(); + + /** + * + * + *
+   * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable.
+   * This property only applies to textual custom attributes and requires
+   * indexable set to enabled to enable exact-searchable.
+   * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11; + * + * + * @return The enum numeric value on the wire for exactSearchableOption. + */ + int getExactSearchableOptionValue(); + /** + * + * + *
+   * If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable.
+   * This property only applies to textual custom attributes and requires
+   * indexable set to enabled to enable exact-searchable.
+   * 
+ * + * + * .google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption exact_searchable_option = 11; + * + * + * @return The exactSearchableOption. + */ + com.google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption getExactSearchableOption(); } diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogProto.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogProto.java index 61e4ac47..2683735a 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogProto.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogProto.java @@ -75,7 +75,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "ommon.proto\032.google/cloud/retail/v2beta/" + "import_config.proto\"^\n\022ProductLevelConfi" + "g\022\036\n\026ingestion_product_type\030\001 \001(\t\022(\n mer" - + "chant_center_product_id_field\030\002 \001(\t\"\221\007\n\020" + + "chant_center_product_id_field\030\002 \001(\t\"\365\010\n\020" + "CatalogAttribute\022\020\n\003key\030\001 \001(\tB\003\340A\002\022\023\n\006in" + "_use\030\t \001(\010B\003\340A\003\022M\n\004type\030\n \001(\0162:.google.c" + "loud.retail.v2beta.CatalogAttribute.Attr" @@ -88,66 +88,71 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "e.cloud.retail.v2beta.CatalogAttribute.S" + "earchableOption\022d\n recommendations_filte" + "ring_option\030\010 \001(\0162:.google.cloud.retail." - + "v2beta.RecommendationsFilteringOption\"8\n" - + "\rAttributeType\022\013\n\007UNKNOWN\020\000\022\013\n\007TEXTUAL\020\001" - + "\022\r\n\tNUMERICAL\020\002\"b\n\017IndexableOption\022 \n\034IN" - + "DEXABLE_OPTION_UNSPECIFIED\020\000\022\025\n\021INDEXABL" - + "E_ENABLED\020\001\022\026\n\022INDEXABLE_DISABLED\020\002\"\201\001\n\026" - + "DynamicFacetableOption\022(\n$DYNAMIC_FACETA" - + "BLE_OPTION_UNSPECIFIED\020\000\022\035\n\031DYNAMIC_FACE" - + "TABLE_ENABLED\020\001\022\036\n\032DYNAMIC_FACETABLE_DIS" - + "ABLED\020\002\"f\n\020SearchableOption\022!\n\035SEARCHABL" - + "E_OPTION_UNSPECIFIED\020\000\022\026\n\022SEARCHABLE_ENA" - + "BLED\020\001\022\027\n\023SEARCHABLE_DISABLED\020\002\"\302\003\n\020Attr" - + "ibutesConfig\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\005\022_\n\022ca" - + "talog_attributes\030\002 \003(\0132C.google.cloud.re" - + "tail.v2beta.AttributesConfig.CatalogAttr" - + "ibutesEntry\022U\n\026attribute_config_level\030\003 " - + "\001(\01620.google.cloud.retail.v2beta.Attribu" - + "teConfigLevelB\003\340A\003\032f\n\026CatalogAttributesE" - + "ntry\022\013\n\003key\030\001 \001(\t\022;\n\005value\030\002 \001(\0132,.googl" - + "e.cloud.retail.v2beta.CatalogAttribute:\002" - + "8\001:x\352Au\n&retail.googleapis.com/Attribute" - + "sConfig\022Kprojects/{project}/locations/{l" - + "ocation}/catalogs/{catalog}/attributesCo" - + "nfig\"\245\005\n\020CompletionConfig\022\024\n\004name\030\001 \001(\tB" - + "\006\340A\002\340A\005\022\026\n\016matching_order\030\002 \001(\t\022\027\n\017max_s" - + "uggestions\030\003 \001(\005\022\031\n\021min_prefix_length\030\004 " - + "\001(\005\022\025\n\rauto_learning\030\013 \001(\010\022\\\n\030suggestion" - + "s_input_config\030\005 \001(\01325.google.cloud.reta" - + "il.v2beta.CompletionDataInputConfigB\003\340A\003" - + "\022.\n!last_suggestions_import_operation\030\006 " - + "\001(\tB\003\340A\003\022Y\n\025denylist_input_config\030\007 \001(\0132" - + "5.google.cloud.retail.v2beta.CompletionD" - + "ataInputConfigB\003\340A\003\022+\n\036last_denylist_imp" - + "ort_operation\030\010 \001(\tB\003\340A\003\022Z\n\026allowlist_in" - + "put_config\030\t \001(\01325.google.cloud.retail.v" - + "2beta.CompletionDataInputConfigB\003\340A\003\022,\n\037" - + "last_allowlist_import_operation\030\n \001(\tB\003\340" - + "A\003:x\352Au\n&retail.googleapis.com/Completio" - + "nConfig\022Kprojects/{project}/locations/{l" - + "ocation}/catalogs/{catalog}/completionCo" - + "nfig\"\222\001\n\022MerchantCenterLink\022\'\n\032merchant_" - + "center_account_id\030\001 \001(\003B\003\340A\002\022\021\n\tbranch_i" - + "d\030\002 \001(\t\022\024\n\014destinations\030\003 \003(\t\022\023\n\013region_" - + "code\030\004 \001(\t\022\025\n\rlanguage_code\030\005 \001(\t\"\\\n\033Mer" - + "chantCenterLinkingConfig\022=\n\005links\030\001 \003(\0132" - + "..google.cloud.retail.v2beta.MerchantCen" - + "terLink\"\321\002\n\007Catalog\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A" - + "\005\022\034\n\014display_name\030\002 \001(\tB\006\340A\002\340A\005\022Q\n\024produ" - + "ct_level_config\030\004 \001(\0132..google.cloud.ret" - + "ail.v2beta.ProductLevelConfigB\003\340A\002\022_\n\036me" - + "rchant_center_linking_config\030\006 \001(\01327.goo" - + "gle.cloud.retail.v2beta.MerchantCenterLi" - + "nkingConfig:^\352A[\n\035retail.googleapis.com/" - + "Catalog\022:projects/{project}/locations/{l" - + "ocation}/catalogs/{catalog}B\325\001\n\036com.goog" - + "le.cloud.retail.v2betaB\014CatalogProtoP\001Z@" - + "google.golang.org/genproto/googleapis/cl" - + "oud/retail/v2beta;retail\242\002\006RETAIL\252\002\032Goog" - + "le.Cloud.Retail.V2Beta\312\002\032Google\\Cloud\\Re" - + "tail\\V2beta\352\002\035Google::Cloud::Retail::V2b" - + "etab\006proto3" + + "v2beta.RecommendationsFilteringOption\022c\n" + + "\027exact_searchable_option\030\013 \001(\0162B.google." + + "cloud.retail.v2beta.CatalogAttribute.Exa" + + "ctSearchableOption\"8\n\rAttributeType\022\013\n\007U" + + "NKNOWN\020\000\022\013\n\007TEXTUAL\020\001\022\r\n\tNUMERICAL\020\002\"b\n\017" + + "IndexableOption\022 \n\034INDEXABLE_OPTION_UNSP" + + "ECIFIED\020\000\022\025\n\021INDEXABLE_ENABLED\020\001\022\026\n\022INDE" + + "XABLE_DISABLED\020\002\"\201\001\n\026DynamicFacetableOpt" + + "ion\022(\n$DYNAMIC_FACETABLE_OPTION_UNSPECIF" + + "IED\020\000\022\035\n\031DYNAMIC_FACETABLE_ENABLED\020\001\022\036\n\032" + + "DYNAMIC_FACETABLE_DISABLED\020\002\"f\n\020Searchab" + + "leOption\022!\n\035SEARCHABLE_OPTION_UNSPECIFIE" + + "D\020\000\022\026\n\022SEARCHABLE_ENABLED\020\001\022\027\n\023SEARCHABL" + + "E_DISABLED\020\002\"}\n\025ExactSearchableOption\022\'\n" + + "#EXACT_SEARCHABLE_OPTION_UNSPECIFIED\020\000\022\034" + + "\n\030EXACT_SEARCHABLE_ENABLED\020\001\022\035\n\031EXACT_SE" + + "ARCHABLE_DISABLED\020\002\"\302\003\n\020AttributesConfig" + + "\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\005\022_\n\022catalog_attrib" + + "utes\030\002 \003(\0132C.google.cloud.retail.v2beta." + + "AttributesConfig.CatalogAttributesEntry\022" + + "U\n\026attribute_config_level\030\003 \001(\01620.google" + + ".cloud.retail.v2beta.AttributeConfigLeve" + + "lB\003\340A\003\032f\n\026CatalogAttributesEntry\022\013\n\003key\030" + + "\001 \001(\t\022;\n\005value\030\002 \001(\0132,.google.cloud.reta" + + "il.v2beta.CatalogAttribute:\0028\001:x\352Au\n&ret" + + "ail.googleapis.com/AttributesConfig\022Kpro" + + "jects/{project}/locations/{location}/cat" + + "alogs/{catalog}/attributesConfig\"\245\005\n\020Com" + + "pletionConfig\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\005\022\026\n\016m" + + "atching_order\030\002 \001(\t\022\027\n\017max_suggestions\030\003" + + " \001(\005\022\031\n\021min_prefix_length\030\004 \001(\005\022\025\n\rauto_" + + "learning\030\013 \001(\010\022\\\n\030suggestions_input_conf" + + "ig\030\005 \001(\01325.google.cloud.retail.v2beta.Co" + + "mpletionDataInputConfigB\003\340A\003\022.\n!last_sug" + + "gestions_import_operation\030\006 \001(\tB\003\340A\003\022Y\n\025" + + "denylist_input_config\030\007 \001(\01325.google.clo" + + "ud.retail.v2beta.CompletionDataInputConf" + + "igB\003\340A\003\022+\n\036last_denylist_import_operatio" + + "n\030\010 \001(\tB\003\340A\003\022Z\n\026allowlist_input_config\030\t" + + " \001(\01325.google.cloud.retail.v2beta.Comple" + + "tionDataInputConfigB\003\340A\003\022,\n\037last_allowli" + + "st_import_operation\030\n \001(\tB\003\340A\003:x\352Au\n&ret" + + "ail.googleapis.com/CompletionConfig\022Kpro" + + "jects/{project}/locations/{location}/cat" + + "alogs/{catalog}/completionConfig\"\222\001\n\022Mer" + + "chantCenterLink\022\'\n\032merchant_center_accou" + + "nt_id\030\001 \001(\003B\003\340A\002\022\021\n\tbranch_id\030\002 \001(\t\022\024\n\014d" + + "estinations\030\003 \003(\t\022\023\n\013region_code\030\004 \001(\t\022\025" + + "\n\rlanguage_code\030\005 \001(\t\"\\\n\033MerchantCenterL" + + "inkingConfig\022=\n\005links\030\001 \003(\0132..google.clo" + + "ud.retail.v2beta.MerchantCenterLink\"\321\002\n\007" + + "Catalog\022\024\n\004name\030\001 \001(\tB\006\340A\002\340A\005\022\034\n\014display" + + "_name\030\002 \001(\tB\006\340A\002\340A\005\022Q\n\024product_level_con" + + "fig\030\004 \001(\0132..google.cloud.retail.v2beta.P" + + "roductLevelConfigB\003\340A\002\022_\n\036merchant_cente" + + "r_linking_config\030\006 \001(\01327.google.cloud.re" + + "tail.v2beta.MerchantCenterLinkingConfig:" + + "^\352A[\n\035retail.googleapis.com/Catalog\022:pro" + + "jects/{project}/locations/{location}/cat" + + "alogs/{catalog}B\325\001\n\036com.google.cloud.ret" + + "ail.v2betaB\014CatalogProtoP\001Z@google.golan" + + "g.org/genproto/googleapis/cloud/retail/v" + + "2beta;retail\242\002\006RETAIL\252\002\032Google.Cloud.Ret" + + "ail.V2Beta\312\002\032Google\\Cloud\\Retail\\V2beta\352" + + "\002\035Google::Cloud::Retail::V2betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -179,6 +184,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DynamicFacetableOption", "SearchableOption", "RecommendationsFilteringOption", + "ExactSearchableOption", }); internal_static_google_cloud_retail_v2beta_AttributesConfig_descriptor = getDescriptor().getMessageTypes().get(2); diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceProto.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceProto.java index 6aff9507..c742f900 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceProto.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CatalogServiceProto.java @@ -75,6 +75,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_retail_v2beta_RemoveCatalogAttributeRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_retail_v2beta_RemoveCatalogAttributeRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_retail_v2beta_ReplaceCatalogAttributeRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -135,83 +143,97 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\340A\002\"|\n\035RemoveCatalogAttributeRequest\022I\n\021" + "attributes_config\030\001 \001(\tB.\340A\002\372A(\n&retail." + "googleapis.com/AttributesConfig\022\020\n\003key\030\002" - + " \001(\tB\003\340A\002\"\352\001\n\036ReplaceCatalogAttributeReq" - + "uest\022I\n\021attributes_config\030\001 \001(\tB.\340A\002\372A(\n" - + "&retail.googleapis.com/AttributesConfig\022" - + "L\n\021catalog_attribute\030\002 \001(\0132,.google.clou" - + "d.retail.v2beta.CatalogAttributeB\003\340A\002\022/\n" - + "\013update_mask\030\003 \001(\0132\032.google.protobuf.Fie" - + "ldMask2\227\024\n\016CatalogService\022\264\001\n\014ListCatalo" - + "gs\022/.google.cloud.retail.v2beta.ListCata" - + "logsRequest\0320.google.cloud.retail.v2beta" - + ".ListCatalogsResponse\"A\202\323\344\223\0022\0220/v2beta/{" - + "parent=projects/*/locations/*}/catalogs\332" - + "A\006parent\022\307\001\n\rUpdateCatalog\0220.google.clou" - + "d.retail.v2beta.UpdateCatalogRequest\032#.g" - + "oogle.cloud.retail.v2beta.Catalog\"_\202\323\344\223\002" - + "C28/v2beta/{catalog.name=projects/*/loca" - + "tions/*/catalogs/*}:\007catalog\332A\023catalog,u" - + "pdate_mask\022\272\001\n\020SetDefaultBranch\0223.google" - + ".cloud.retail.v2beta.SetDefaultBranchReq" - + "uest\032\026.google.protobuf.Empty\"Y\202\323\344\223\002I\"D/v" - + "2beta/{catalog=projects/*/locations/*/ca" - + "talogs/*}:setDefaultBranch:\001*\332A\007catalog\022" - + "\325\001\n\020GetDefaultBranch\0223.google.cloud.reta" - + "il.v2beta.GetDefaultBranchRequest\0324.goog" - + "le.cloud.retail.v2beta.GetDefaultBranchR" - + "esponse\"V\202\323\344\223\002F\022D/v2beta/{catalog=projec" - + "ts/*/locations/*/catalogs/*}:getDefaultB" - + "ranch\332A\007catalog\022\315\001\n\023GetCompletionConfig\022" - + "6.google.cloud.retail.v2beta.GetCompleti" - + "onConfigRequest\032,.google.cloud.retail.v2" - + "beta.CompletionConfig\"P\202\323\344\223\002C\022A/v2beta/{" - + "name=projects/*/locations/*/catalogs/*/c" - + "ompletionConfig}\332A\004name\022\222\002\n\026UpdateComple" - + "tionConfig\0229.google.cloud.retail.v2beta." - + "UpdateCompletionConfigRequest\032,.google.c" - + "loud.retail.v2beta.CompletionConfig\"\216\001\202\323" - + "\344\223\002h2S/v2beta/{completion_config.name=pr" - + "ojects/*/locations/*/catalogs/*/completi" - + "onConfig}:\021completion_config\332A\035completio" - + "n_config,update_mask\022\315\001\n\023GetAttributesCo" - + "nfig\0226.google.cloud.retail.v2beta.GetAtt" - + "ributesConfigRequest\032,.google.cloud.reta" - + "il.v2beta.AttributesConfig\"P\202\323\344\223\002C\022A/v2b" - + "eta/{name=projects/*/locations/*/catalog" - + "s/*/attributesConfig}\332A\004name\022\222\002\n\026UpdateA" - + "ttributesConfig\0229.google.cloud.retail.v2" - + "beta.UpdateAttributesConfigRequest\032,.goo" + + " \001(\tB\003\340A\002\"\215\001\n#BatchRemoveCatalogAttribut" + + "esRequest\022I\n\021attributes_config\030\001 \001(\tB.\340A" + + "\002\372A(\n&retail.googleapis.com/AttributesCo" + + "nfig\022\033\n\016attribute_keys\030\002 \003(\tB\003\340A\002\"l\n$Bat" + + "chRemoveCatalogAttributesResponse\022\"\n\032del" + + "eted_catalog_attributes\030\001 \003(\t\022 \n\030reset_c" + + "atalog_attributes\030\002 \003(\t\"\352\001\n\036ReplaceCatal" + + "ogAttributeRequest\022I\n\021attributes_config\030" + + "\001 \001(\tB.\340A\002\372A(\n&retail.googleapis.com/Att" + + "ributesConfig\022L\n\021catalog_attribute\030\002 \001(\013" + + "2,.google.cloud.retail.v2beta.CatalogAtt" + + "ributeB\003\340A\002\022/\n\013update_mask\030\003 \001(\0132\032.googl" + + "e.protobuf.FieldMask2\263\026\n\016CatalogService\022" + + "\264\001\n\014ListCatalogs\022/.google.cloud.retail.v" + + "2beta.ListCatalogsRequest\0320.google.cloud" + + ".retail.v2beta.ListCatalogsResponse\"A\202\323\344" + + "\223\0022\0220/v2beta/{parent=projects/*/location" + + "s/*}/catalogs\332A\006parent\022\307\001\n\rUpdateCatalog" + + "\0220.google.cloud.retail.v2beta.UpdateCata" + + "logRequest\032#.google.cloud.retail.v2beta." + + "Catalog\"_\202\323\344\223\002C28/v2beta/{catalog.name=p" + + "rojects/*/locations/*/catalogs/*}:\007catal" + + "og\332A\023catalog,update_mask\022\272\001\n\020SetDefaultB" + + "ranch\0223.google.cloud.retail.v2beta.SetDe" + + "faultBranchRequest\032\026.google.protobuf.Emp" + + "ty\"Y\202\323\344\223\002I\"D/v2beta/{catalog=projects/*/" + + "locations/*/catalogs/*}:setDefaultBranch" + + ":\001*\332A\007catalog\022\325\001\n\020GetDefaultBranch\0223.goo" + + "gle.cloud.retail.v2beta.GetDefaultBranch" + + "Request\0324.google.cloud.retail.v2beta.Get" + + "DefaultBranchResponse\"V\202\323\344\223\002F\022D/v2beta/{" + + "catalog=projects/*/locations/*/catalogs/" + + "*}:getDefaultBranch\332A\007catalog\022\315\001\n\023GetCom" + + "pletionConfig\0226.google.cloud.retail.v2be" + + "ta.GetCompletionConfigRequest\032,.google.c" + + "loud.retail.v2beta.CompletionConfig\"P\202\323\344" + + "\223\002C\022A/v2beta/{name=projects/*/locations/" + + "*/catalogs/*/completionConfig}\332A\004name\022\222\002" + + "\n\026UpdateCompletionConfig\0229.google.cloud." + + "retail.v2beta.UpdateCompletionConfigRequ" + + "est\032,.google.cloud.retail.v2beta.Complet" + + "ionConfig\"\216\001\202\323\344\223\002h2S/v2beta/{completion_" + + "config.name=projects/*/locations/*/catal" + + "ogs/*/completionConfig}:\021completion_conf" + + "ig\332A\035completion_config,update_mask\022\315\001\n\023G" + + "etAttributesConfig\0226.google.cloud.retail" + + ".v2beta.GetAttributesConfigRequest\032,.goo" + "gle.cloud.retail.v2beta.AttributesConfig" - + "\"\216\001\202\323\344\223\002h2S/v2beta/{attributes_config.na" - + "me=projects/*/locations/*/catalogs/*/att" - + "ributesConfig}:\021attributes_config\332A\035attr" - + "ibutes_config,update_mask\022\352\001\n\023AddCatalog" - + "Attribute\0226.google.cloud.retail.v2beta.A" - + "ddCatalogAttributeRequest\032,.google.cloud" - + ".retail.v2beta.AttributesConfig\"m\202\323\344\223\002g\"" - + "b/v2beta/{attributes_config=projects/*/l" - + "ocations/*/catalogs/*/attributesConfig}:" - + "addCatalogAttribute:\001*\022\363\001\n\026RemoveCatalog" - + "Attribute\0229.google.cloud.retail.v2beta.R" - + "emoveCatalogAttributeRequest\032,.google.cl" - + "oud.retail.v2beta.AttributesConfig\"p\202\323\344\223" - + "\002j\"e/v2beta/{attributes_config=projects/" - + "*/locations/*/catalogs/*/attributesConfi" - + "g}:removeCatalogAttribute:\001*\022\366\001\n\027Replace" - + "CatalogAttribute\022:.google.cloud.retail.v" - + "2beta.ReplaceCatalogAttributeRequest\032,.g" - + "oogle.cloud.retail.v2beta.AttributesConf" - + "ig\"q\202\323\344\223\002k\"f/v2beta/{attributes_config=p" - + "rojects/*/locations/*/catalogs/*/attribu" - + "tesConfig}:replaceCatalogAttribute:\001*\032I\312" - + "A\025retail.googleapis.com\322A.https://www.go" - + "ogleapis.com/auth/cloud-platformB\334\001\n\036com" - + ".google.cloud.retail.v2betaB\023CatalogServ" - + "iceProtoP\001Z@google.golang.org/genproto/g" - + "oogleapis/cloud/retail/v2beta;retail\242\002\006R" - + "ETAIL\252\002\032Google.Cloud.Retail.V2Beta\312\002\032Goo" - + "gle\\Cloud\\Retail\\V2beta\352\002\035Google::Cloud:" - + ":Retail::V2betab\006proto3" + + "\"P\202\323\344\223\002C\022A/v2beta/{name=projects/*/locat" + + "ions/*/catalogs/*/attributesConfig}\332A\004na" + + "me\022\222\002\n\026UpdateAttributesConfig\0229.google.c" + + "loud.retail.v2beta.UpdateAttributesConfi" + + "gRequest\032,.google.cloud.retail.v2beta.At" + + "tributesConfig\"\216\001\202\323\344\223\002h2S/v2beta/{attrib" + + "utes_config.name=projects/*/locations/*/" + + "catalogs/*/attributesConfig}:\021attributes" + + "_config\332A\035attributes_config,update_mask\022" + + "\352\001\n\023AddCatalogAttribute\0226.google.cloud.r" + + "etail.v2beta.AddCatalogAttributeRequest\032" + + ",.google.cloud.retail.v2beta.AttributesC" + + "onfig\"m\202\323\344\223\002g\"b/v2beta/{attributes_confi" + + "g=projects/*/locations/*/catalogs/*/attr" + + "ibutesConfig}:addCatalogAttribute:\001*\022\363\001\n" + + "\026RemoveCatalogAttribute\0229.google.cloud.r" + + "etail.v2beta.RemoveCatalogAttributeReque" + + "st\032,.google.cloud.retail.v2beta.Attribut" + + "esConfig\"p\202\323\344\223\002j\"e/v2beta/{attributes_co" + + "nfig=projects/*/locations/*/catalogs/*/a" + + "ttributesConfig}:removeCatalogAttribute:" + + "\001*\022\231\002\n\034BatchRemoveCatalogAttributes\022?.go" + + "ogle.cloud.retail.v2beta.BatchRemoveCata" + + "logAttributesRequest\032@.google.cloud.reta" + + "il.v2beta.BatchRemoveCatalogAttributesRe" + + "sponse\"v\202\323\344\223\002p\"k/v2beta/{attributes_conf" + + "ig=projects/*/locations/*/catalogs/*/att" + + "ributesConfig}:batchRemoveCatalogAttribu" + + "tes:\001*\022\366\001\n\027ReplaceCatalogAttribute\022:.goo" + + "gle.cloud.retail.v2beta.ReplaceCatalogAt" + + "tributeRequest\032,.google.cloud.retail.v2b" + + "eta.AttributesConfig\"q\202\323\344\223\002k\"f/v2beta/{a" + + "ttributes_config=projects/*/locations/*/" + + "catalogs/*/attributesConfig}:replaceCata" + + "logAttribute:\001*\032I\312A\025retail.googleapis.co" + + "m\322A.https://www.googleapis.com/auth/clou" + + "d-platformB\334\001\n\036com.google.cloud.retail.v" + + "2betaB\023CatalogServiceProtoP\001Z@google.gol" + + "ang.org/genproto/googleapis/cloud/retail" + + "/v2beta;retail\242\002\006RETAIL\252\002\032Google.Cloud.R" + + "etail.V2Beta\312\002\032Google\\Cloud\\Retail\\V2bet" + + "a\352\002\035Google::Cloud::Retail::V2betab\006proto" + + "3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -322,8 +344,24 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "AttributesConfig", "Key", }); - internal_static_google_cloud_retail_v2beta_ReplaceCatalogAttributeRequest_descriptor = + internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesRequest_descriptor = getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesRequest_descriptor, + new java.lang.String[] { + "AttributesConfig", "AttributeKeys", + }); + internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_BatchRemoveCatalogAttributesResponse_descriptor, + new java.lang.String[] { + "DeletedCatalogAttributes", "ResetCatalogAttributes", + }); + internal_static_google_cloud_retail_v2beta_ReplaceCatalogAttributeRequest_descriptor = + getDescriptor().getMessageTypes().get(14); internal_static_google_cloud_retail_v2beta_ReplaceCatalogAttributeRequest_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_retail_v2beta_ReplaceCatalogAttributeRequest_descriptor, diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CollectUserEventRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CollectUserEventRequest.java index 1be2ee0c..f2924749 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CollectUserEventRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CollectUserEventRequest.java @@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CollectUserEventRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - userEvent_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 32: - { - ets_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.UserEventServiceProto .internal_static_google_cloud_retail_v2beta_CollectUserEventRequest_descriptor; @@ -337,7 +272,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (ets_ != 0L) { output.writeInt64(4, ets_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -358,7 +293,7 @@ public int getSerializedSize() { if (ets_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, ets_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -378,7 +313,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUserEvent().equals(other.getUserEvent())) return false; if (!getUri().equals(other.getUri())) return false; if (getEts() != other.getEts()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -397,7 +332,7 @@ public int hashCode() { hash = (53 * hash) + getUri().hashCode(); hash = (37 * hash) + ETS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getEts()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -527,17 +462,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.CollectUserEventRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -647,7 +575,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.CollectUserEventRequest if (other.getEts() != 0L) { setEts(other.getEts()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -662,18 +590,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.CollectUserEventRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + userEvent_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + uri_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: + { + ets_ = input.readInt64(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.CollectUserEventRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1110,7 +1075,18 @@ public CollectUserEventRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CollectUserEventRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ColorInfo.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ColorInfo.java index 7d12f577..d6498bf9 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ColorInfo.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ColorInfo.java @@ -53,72 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ColorInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - colorFamilies_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - colorFamilies_.add(s); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - colors_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - colors_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - colorFamilies_ = colorFamilies_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - colors_ = colors_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_ColorInfo_descriptor; @@ -352,7 +286,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < colors_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, colors_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -377,7 +311,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getColorsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -394,7 +328,7 @@ public boolean equals(final java.lang.Object obj) { if (!getColorFamiliesList().equals(other.getColorFamiliesList())) return false; if (!getColorsList().equals(other.getColorsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -413,7 +347,7 @@ public int hashCode() { hash = (37 * hash) + COLORS_FIELD_NUMBER; hash = (53 * hash) + getColorsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -542,17 +476,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ColorInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -669,7 +596,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ColorInfo other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -684,17 +611,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ColorInfo parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureColorFamiliesIsMutable(); + colorFamilies_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureColorsIsMutable(); + colors_.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) { - parsedMessage = (com.google.cloud.retail.v2beta.ColorInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1239,7 +1194,18 @@ public ColorInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ColorInfo(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequest.java index 3be243ca..3222996d 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryRequest.java @@ -57,99 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CompleteQueryRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - catalog_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - query_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - languageCodes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - languageCodes_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - deviceType_ = s; - break; - } - case 40: - { - maxSuggestions_ = input.readInt32(); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - dataset_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - visitorId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - languageCodes_ = languageCodes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CompletionServiceProto .internal_static_google_cloud_retail_v2beta_CompleteQueryRequest_descriptor; @@ -610,7 +517,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(visitorId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, visitorId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -645,7 +552,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(visitorId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, visitorId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -668,7 +575,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDeviceType().equals(other.getDeviceType())) return false; if (!getDataset().equals(other.getDataset())) return false; if (getMaxSuggestions() != other.getMaxSuggestions()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -695,7 +602,7 @@ public int hashCode() { hash = (53 * hash) + getDataset().hashCode(); hash = (37 * hash) + MAX_SUGGESTIONS_FIELD_NUMBER; hash = (53 * hash) + getMaxSuggestions(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -824,17 +731,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.CompleteQueryRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -976,7 +876,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.CompleteQueryRequest oth if (other.getMaxSuggestions() != 0) { setMaxSuggestions(other.getMaxSuggestions()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -991,18 +891,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.CompleteQueryRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + catalog_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + query_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureLanguageCodesIsMutable(); + languageCodes_.add(s); + break; + } // case 26 + case 34: + { + deviceType_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 40: + { + maxSuggestions_ = input.readInt32(); + + break; + } // case 40 + case 50: + { + dataset_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + visitorId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.CompleteQueryRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2000,7 +1956,18 @@ public CompleteQueryRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CompleteQueryRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponse.java index 07f8cca1..79c532ab 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompleteQueryResponse.java @@ -54,89 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CompleteQueryResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - completionResults_ = - new java.util.ArrayList< - com.google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResult>(); - mutable_bitField0_ |= 0x00000001; - } - completionResults_.add( - input.readMessage( - com.google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResult - .parser(), - extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - attributionToken_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - recentSearchResults_ = - new java.util.ArrayList< - com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult>(); - mutable_bitField0_ |= 0x00000002; - } - recentSearchResults_.add( - input.readMessage( - com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult - .parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - completionResults_ = java.util.Collections.unmodifiableList(completionResults_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - recentSearchResults_ = java.util.Collections.unmodifiableList(recentSearchResults_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CompletionServiceProto .internal_static_google_cloud_retail_v2beta_CompleteQueryResponse_descriptor; @@ -306,70 +223,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CompletionResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - suggestion_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - attributes_ = - com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.retail.v2beta.CustomAttribute> - attributes__ = - input.readMessage( - AttributesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - attributes_.getMutableMap().put(attributes__.getKey(), attributes__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CompletionServiceProto .internal_static_google_cloud_retail_v2beta_CompleteQueryResponse_CompletionResult_descriptor; @@ -601,7 +454,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetAttributes(), AttributesDefaultEntryHolder.defaultEntry, 2); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -625,7 +478,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, attributes__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -643,7 +496,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSuggestion().equals(other.getSuggestion())) return false; if (!internalGetAttributes().equals(other.internalGetAttributes())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -660,7 +513,7 @@ public int hashCode() { hash = (37 * hash) + ATTRIBUTES_FIELD_NUMBER; hash = (53 * hash) + internalGetAttributes().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -815,17 +668,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { // Construct using // com.google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -929,7 +775,7 @@ public Builder mergeFrom( onChanged(); } internalGetMutableAttributes().mergeFrom(other.internalGetAttributes()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -944,19 +790,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResult parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + suggestion_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.retail.v2beta.CustomAttribute> + attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .getMutableMap() + .put(attributes__.getKey(), attributes__.getValue()); + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResult) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1319,7 +1196,19 @@ public CompletionResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CompletionResult(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1403,52 +1292,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RecentSearchResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - recentSearch_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CompletionServiceProto .internal_static_google_cloud_retail_v2beta_CompleteQueryResponse_RecentSearchResult_descriptor; @@ -1531,7 +1374,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recentSearch_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, recentSearch_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1543,7 +1386,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recentSearch_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, recentSearch_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1561,7 +1404,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult) obj; if (!getRecentSearch().equals(other.getRecentSearch())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1574,7 +1417,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + RECENT_SEARCH_FIELD_NUMBER; hash = (53 * hash) + getRecentSearch().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1709,17 +1552,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1819,7 +1655,7 @@ public Builder mergeFrom( recentSearch_ = other.recentSearch_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1834,20 +1670,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult parsedMessage = - null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + recentSearch_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1993,7 +1846,19 @@ public RecentSearchResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RecentSearchResult(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2335,7 +2200,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < recentSearchResults_.size(); i++) { output.writeMessage(3, recentSearchResults_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2355,7 +2220,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, recentSearchResults_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2374,7 +2239,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCompletionResultsList().equals(other.getCompletionResultsList())) return false; if (!getAttributionToken().equals(other.getAttributionToken())) return false; if (!getRecentSearchResultsList().equals(other.getRecentSearchResultsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2395,7 +2260,7 @@ public int hashCode() { hash = (37 * hash) + RECENT_SEARCH_RESULTS_FIELD_NUMBER; hash = (53 * hash) + getRecentSearchResultsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2524,20 +2389,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.CompleteQueryResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCompletionResultsFieldBuilder(); - getRecentSearchResultsFieldBuilder(); - } } @java.lang.Override @@ -2545,18 +2400,20 @@ public Builder clear() { super.clear(); if (completionResultsBuilder_ == null) { completionResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + completionResults_ = null; completionResultsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); attributionToken_ = ""; if (recentSearchResultsBuilder_ == null) { recentSearchResults_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + recentSearchResults_ = null; recentSearchResultsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -2712,7 +2569,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.CompleteQueryResponse ot } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2727,18 +2584,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.CompleteQueryResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResult m = + input.readMessage( + com.google.cloud.retail.v2beta.CompleteQueryResponse.CompletionResult + .parser(), + extensionRegistry); + if (completionResultsBuilder_ == null) { + ensureCompletionResultsIsMutable(); + completionResults_.add(m); + } else { + completionResultsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + attributionToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult m = + input.readMessage( + com.google.cloud.retail.v2beta.CompleteQueryResponse.RecentSearchResult + .parser(), + extensionRegistry); + if (recentSearchResultsBuilder_ == null) { + ensureRecentSearchResultsIsMutable(); + recentSearchResults_.add(m); + } else { + recentSearchResultsBuilder_.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) { - parsedMessage = - (com.google.cloud.retail.v2beta.CompleteQueryResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3999,7 +3905,18 @@ public CompleteQueryResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CompleteQueryResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfig.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfig.java index 7caa6733..5c97fd14 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfig.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionConfig.java @@ -57,146 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CompletionConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - matchingOrder_ = s; - break; - } - case 24: - { - maxSuggestions_ = input.readInt32(); - break; - } - case 32: - { - minPrefixLength_ = input.readInt32(); - break; - } - case 42: - { - com.google.cloud.retail.v2beta.CompletionDataInputConfig.Builder subBuilder = null; - if (suggestionsInputConfig_ != null) { - subBuilder = suggestionsInputConfig_.toBuilder(); - } - suggestionsInputConfig_ = - input.readMessage( - com.google.cloud.retail.v2beta.CompletionDataInputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(suggestionsInputConfig_); - suggestionsInputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - lastSuggestionsImportOperation_ = s; - break; - } - case 58: - { - com.google.cloud.retail.v2beta.CompletionDataInputConfig.Builder subBuilder = null; - if (denylistInputConfig_ != null) { - subBuilder = denylistInputConfig_.toBuilder(); - } - denylistInputConfig_ = - input.readMessage( - com.google.cloud.retail.v2beta.CompletionDataInputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(denylistInputConfig_); - denylistInputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - lastDenylistImportOperation_ = s; - break; - } - case 74: - { - com.google.cloud.retail.v2beta.CompletionDataInputConfig.Builder subBuilder = null; - if (allowlistInputConfig_ != null) { - subBuilder = allowlistInputConfig_.toBuilder(); - } - allowlistInputConfig_ = - input.readMessage( - com.google.cloud.retail.v2beta.CompletionDataInputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(allowlistInputConfig_); - allowlistInputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - lastAllowlistImportOperation_ = s; - break; - } - case 88: - { - autoLearning_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CatalogProto .internal_static_google_cloud_retail_v2beta_CompletionConfig_descriptor; @@ -783,7 +643,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (autoLearning_ != false) { output.writeBool(11, autoLearning_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -832,7 +692,7 @@ public int getSerializedSize() { if (autoLearning_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, autoLearning_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -871,7 +731,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getLastAllowlistImportOperation().equals(other.getLastAllowlistImportOperation())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -910,7 +770,7 @@ public int hashCode() { } hash = (37 * hash) + LAST_ALLOWLIST_IMPORT_OPERATION_FIELD_NUMBER; hash = (53 * hash) + getLastAllowlistImportOperation().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1040,17 +900,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.CompletionConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1228,7 +1081,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.CompletionConfig other) lastAllowlistImportOperation_ = other.lastAllowlistImportOperation_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1243,17 +1096,100 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.CompletionConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + matchingOrder_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + maxSuggestions_ = input.readInt32(); + + break; + } // case 24 + case 32: + { + minPrefixLength_ = input.readInt32(); + + break; + } // case 32 + case 42: + { + input.readMessage( + getSuggestionsInputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + lastSuggestionsImportOperation_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + input.readMessage( + getDenylistInputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 66: + { + lastDenylistImportOperation_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 74: + { + input.readMessage( + getAllowlistInputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 74 + case 82: + { + lastAllowlistImportOperation_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 88: + { + autoLearning_ = input.readBool(); + + break; + } // case 88 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2beta.CompletionConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2764,7 +2700,18 @@ public CompletionConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CompletionConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionDataInputConfig.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionDataInputConfig.java index af51a61e..c3e491f9 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionDataInputConfig.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionDataInputConfig.java @@ -50,61 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CompletionDataInputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2beta.BigQuerySource.Builder subBuilder = null; - if (sourceCase_ == 1) { - subBuilder = ((com.google.cloud.retail.v2beta.BigQuerySource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.retail.v2beta.BigQuerySource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2beta.BigQuerySource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 1; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ImportConfigProto .internal_static_google_cloud_retail_v2beta_CompletionDataInputConfig_descriptor; @@ -247,7 +192,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceCase_ == 1) { output.writeMessage(1, (com.google.cloud.retail.v2beta.BigQuerySource) source_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -261,7 +206,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 1, (com.google.cloud.retail.v2beta.BigQuerySource) source_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -285,7 +230,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -304,7 +249,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -434,22 +379,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.CompletionDataInputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (bigQuerySourceBuilder_ != null) { + bigQuerySourceBuilder_.clear(); + } sourceCase_ = 0; source_ = null; return this; @@ -548,7 +489,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.CompletionDataInputConfi break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -563,18 +504,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.CompletionDataInputConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getBigQuerySourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.CompletionDataInputConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -879,7 +839,18 @@ public CompletionDataInputConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CompletionDataInputConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionDetail.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionDetail.java index 56c2e662..9db28c7a 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionDetail.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CompletionDetail.java @@ -54,64 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CompletionDetail( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - completionAttributionToken_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - selectedSuggestion_ = s; - break; - } - case 24: - { - selectedPosition_ = input.readInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.UserEventProto .internal_static_google_cloud_retail_v2beta_CompletionDetail_descriptor; @@ -272,7 +214,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (selectedPosition_ != 0) { output.writeInt32(3, selectedPosition_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -291,7 +233,7 @@ public int getSerializedSize() { if (selectedPosition_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, selectedPosition_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -311,7 +253,7 @@ public boolean equals(final java.lang.Object obj) { return false; if (!getSelectedSuggestion().equals(other.getSelectedSuggestion())) return false; if (getSelectedPosition() != other.getSelectedPosition()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -328,7 +270,7 @@ public int hashCode() { hash = (53 * hash) + getSelectedSuggestion().hashCode(); hash = (37 * hash) + SELECTED_POSITION_FIELD_NUMBER; hash = (53 * hash) + getSelectedPosition(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -458,17 +400,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.CompletionDetail.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -571,7 +506,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.CompletionDetail other) if (other.getSelectedPosition() != 0) { setSelectedPosition(other.getSelectedPosition()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -586,17 +521,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.CompletionDetail parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + completionAttributionToken_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + selectedSuggestion_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + selectedPosition_ = input.readInt32(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.CompletionDetail) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -912,7 +879,18 @@ public CompletionDetail parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CompletionDetail(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Condition.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Condition.java index e5c7150c..aa0c743e 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Condition.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Condition.java @@ -58,78 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Condition( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - queryTerms_.add( - input.readMessage( - com.google.cloud.retail.v2beta.Condition.QueryTerm.parser(), - extensionRegistry)); - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - activeTimeRange_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - activeTimeRange_.add( - input.readMessage( - com.google.cloud.retail.v2beta.Condition.TimeRange.parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = java.util.Collections.unmodifiableList(queryTerms_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - activeTimeRange_ = java.util.Collections.unmodifiableList(activeTimeRange_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_Condition_descriptor; @@ -158,8 +86,8 @@ public interface QueryTermOrBuilder * Value cannot be empty. * Value can have at most 3 terms if specified as a partial match. Each * space separated string is considered as one term. - * Example) "a b c" is 3 terms and allowed, " a b c d" is 4 terms and not - * allowed for partial match. + * For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms + * and not allowed for a partial match. * * * string value = 1; @@ -175,8 +103,8 @@ public interface QueryTermOrBuilder * Value cannot be empty. * Value can have at most 3 terms if specified as a partial match. Each * space separated string is considered as one term. - * Example) "a b c" is 3 terms and allowed, " a b c d" is 4 terms and not - * allowed for partial match. + * For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms + * and not allowed for a partial match. * * * string value = 1; @@ -232,57 +160,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private QueryTerm( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - value_ = s; - break; - } - case 16: - { - fullMatch_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_Condition_QueryTerm_descriptor; @@ -308,8 +185,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * Value cannot be empty. * Value can have at most 3 terms if specified as a partial match. Each * space separated string is considered as one term. - * Example) "a b c" is 3 terms and allowed, " a b c d" is 4 terms and not - * allowed for partial match. + * For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms + * and not allowed for a partial match. * * * string value = 1; @@ -336,8 +213,8 @@ public java.lang.String getValue() { * Value cannot be empty. * Value can have at most 3 terms if specified as a partial match. Each * space separated string is considered as one term. - * Example) "a b c" is 3 terms and allowed, " a b c d" is 4 terms and not - * allowed for partial match. + * For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms + * and not allowed for a partial match. * * * string value = 1; @@ -395,7 +272,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (fullMatch_ != false) { output.writeBool(2, fullMatch_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -410,7 +287,7 @@ public int getSerializedSize() { if (fullMatch_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, fullMatch_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +305,7 @@ public boolean equals(final java.lang.Object obj) { if (!getValue().equals(other.getValue())) return false; if (getFullMatch() != other.getFullMatch()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -443,7 +320,7 @@ public int hashCode() { hash = (53 * hash) + getValue().hashCode(); hash = (37 * hash) + FULL_MATCH_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getFullMatch()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -574,17 +451,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.Condition.QueryTerm.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -682,7 +552,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Condition.QueryTerm othe if (other.getFullMatch() != false) { setFullMatch(other.getFullMatch()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -697,18 +567,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Condition.QueryTerm parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + value_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + fullMatch_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.Condition.QueryTerm) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -721,8 +616,8 @@ public Builder mergeFrom( * Value cannot be empty. * Value can have at most 3 terms if specified as a partial match. Each * space separated string is considered as one term. - * Example) "a b c" is 3 terms and allowed, " a b c d" is 4 terms and not - * allowed for partial match. + * For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms + * and not allowed for a partial match. * * * string value = 1; @@ -748,8 +643,8 @@ public java.lang.String getValue() { * Value cannot be empty. * Value can have at most 3 terms if specified as a partial match. Each * space separated string is considered as one term. - * Example) "a b c" is 3 terms and allowed, " a b c d" is 4 terms and not - * allowed for partial match. + * For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms + * and not allowed for a partial match. * * * string value = 1; @@ -775,8 +670,8 @@ public com.google.protobuf.ByteString getValueBytes() { * Value cannot be empty. * Value can have at most 3 terms if specified as a partial match. Each * space separated string is considered as one term. - * Example) "a b c" is 3 terms and allowed, " a b c d" is 4 terms and not - * allowed for partial match. + * For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms + * and not allowed for a partial match. * * * string value = 1; @@ -801,8 +696,8 @@ public Builder setValue(java.lang.String value) { * Value cannot be empty. * Value can have at most 3 terms if specified as a partial match. Each * space separated string is considered as one term. - * Example) "a b c" is 3 terms and allowed, " a b c d" is 4 terms and not - * allowed for partial match. + * For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms + * and not allowed for a partial match. * * * string value = 1; @@ -823,8 +718,8 @@ public Builder clearValue() { * Value cannot be empty. * Value can have at most 3 terms if specified as a partial match. Each * space separated string is considered as one term. - * Example) "a b c" is 3 terms and allowed, " a b c d" is 4 terms and not - * allowed for partial match. + * For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms + * and not allowed for a partial match. * * * string value = 1; @@ -928,7 +823,19 @@ public QueryTerm parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryTerm(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1055,75 +962,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TimeRange( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (startTime_ != null) { - subBuilder = startTime_.toBuilder(); - } - startTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(startTime_); - startTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (endTime_ != null) { - subBuilder = endTime_.toBuilder(); - } - endTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(endTime_); - endTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_Condition_TimeRange_descriptor; @@ -1251,7 +1089,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (endTime_ != null) { output.writeMessage(2, getEndTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1266,7 +1104,7 @@ public int getSerializedSize() { if (endTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1290,7 +1128,7 @@ public boolean equals(final java.lang.Object obj) { if (hasEndTime()) { if (!getEndTime().equals(other.getEndTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1309,7 +1147,7 @@ public int hashCode() { hash = (37 * hash) + END_TIME_FIELD_NUMBER; hash = (53 * hash) + getEndTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1441,17 +1279,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.Condition.TimeRange.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1564,7 +1395,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Condition.TimeRange othe if (other.hasEndTime()) { mergeEndTime(other.getEndTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1579,18 +1410,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Condition.TimeRange parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getStartTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getEndTimeFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.Condition.TimeRange) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1991,7 +1847,19 @@ public TimeRange parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TimeRange(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2191,7 +2059,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < activeTimeRange_.size(); i++) { output.writeMessage(3, activeTimeRange_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2206,7 +2074,7 @@ public int getSerializedSize() { for (int i = 0; i < activeTimeRange_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, activeTimeRange_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2223,7 +2091,7 @@ public boolean equals(final java.lang.Object obj) { if (!getQueryTermsList().equals(other.getQueryTermsList())) return false; if (!getActiveTimeRangeList().equals(other.getActiveTimeRangeList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2242,7 +2110,7 @@ public int hashCode() { hash = (37 * hash) + ACTIVE_TIME_RANGE_FIELD_NUMBER; hash = (53 * hash) + getActiveTimeRangeList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2376,20 +2244,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.Condition.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getQueryTermsFieldBuilder(); - getActiveTimeRangeFieldBuilder(); - } } @java.lang.Override @@ -2397,16 +2255,18 @@ public Builder clear() { super.clear(); if (queryTermsBuilder_ == null) { queryTerms_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + queryTerms_ = null; queryTermsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (activeTimeRangeBuilder_ == null) { activeTimeRange_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + activeTimeRange_ = null; activeTimeRangeBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -2556,7 +2416,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Condition other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2571,17 +2431,59 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Condition parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2beta.Condition.QueryTerm m = + input.readMessage( + com.google.cloud.retail.v2beta.Condition.QueryTerm.parser(), + extensionRegistry); + if (queryTermsBuilder_ == null) { + ensureQueryTermsIsMutable(); + queryTerms_.add(m); + } else { + queryTermsBuilder_.addMessage(m); + } + break; + } // case 10 + case 26: + { + com.google.cloud.retail.v2beta.Condition.TimeRange m = + input.readMessage( + com.google.cloud.retail.v2beta.Condition.TimeRange.parser(), + extensionRegistry); + if (activeTimeRangeBuilder_ == null) { + ensureActiveTimeRangeIsMutable(); + activeTimeRange_.add(m); + } else { + activeTimeRangeBuilder_.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) { - parsedMessage = (com.google.cloud.retail.v2beta.Condition) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3411,7 +3313,18 @@ public Condition parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Condition(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Control.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Control.java index bfb23e4f..c67c1faa 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Control.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Control.java @@ -22,8 +22,9 @@ * * *
- * Configures dynamic serving time metadata that is used to pre and post
- * process search/recommendation model results.
+ * Configures dynamic metadata that can be linked to a
+ * [ServingConfig][google.cloud.retail.v2beta.ServingConfig] and affect search
+ * or recommendation results at serving time.
  * 
* * Protobuf type {@code google.cloud.retail.v2beta.Control} @@ -43,6 +44,7 @@ private Control() { displayName_ = ""; associatedServingConfigIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; solutionTypes_ = java.util.Collections.emptyList(); + searchSolutionUseCase_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -56,136 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Control( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: - { - com.google.cloud.retail.v2beta.SearchRequest.FacetSpec.Builder subBuilder = null; - if (controlCase_ == 3) { - subBuilder = - ((com.google.cloud.retail.v2beta.SearchRequest.FacetSpec) control_).toBuilder(); - } - control_ = - input.readMessage( - com.google.cloud.retail.v2beta.SearchRequest.FacetSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.retail.v2beta.SearchRequest.FacetSpec) control_); - control_ = subBuilder.buildPartial(); - } - controlCase_ = 3; - break; - } - case 34: - { - com.google.cloud.retail.v2beta.Rule.Builder subBuilder = null; - if (controlCase_ == 4) { - subBuilder = ((com.google.cloud.retail.v2beta.Rule) control_).toBuilder(); - } - control_ = - input.readMessage( - com.google.cloud.retail.v2beta.Rule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2beta.Rule) control_); - control_ = subBuilder.buildPartial(); - } - controlCase_ = 4; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - associatedServingConfigIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - associatedServingConfigIds_.add(s); - break; - } - case 48: - { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - solutionTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - solutionTypes_.add(rawValue); - break; - } - case 50: - { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while (input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - solutionTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - solutionTypes_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - associatedServingConfigIds_ = associatedServingConfigIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - solutionTypes_ = java.util.Collections.unmodifiableList(solutionTypes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ControlProto .internal_static_google_cloud_retail_v2beta_Control_descriptor; @@ -208,6 +80,7 @@ public enum ControlCase implements com.google.protobuf.Internal.EnumLite, com.google.protobuf.AbstractMessage.InternalOneOfEnum { + @java.lang.Deprecated FACET_SPEC(3), RULE(4), CONTROL_NOT_SET(0); @@ -254,13 +127,19 @@ public ControlCase getControlCase() { * *
    * A facet specification to perform faceted search.
+   * Note that this field is deprecated and will throw NOT_IMPLEMENTED if
+   * used for creating a control.
    * 
* - * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3; + * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3 [deprecated = true]; + * * + * @deprecated google.cloud.retail.v2beta.Control.facet_spec is deprecated. See + * google/cloud/retail/v2beta/control.proto;l=51 * @return Whether the facetSpec field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasFacetSpec() { return controlCase_ == 3; } @@ -269,13 +148,19 @@ public boolean hasFacetSpec() { * *
    * A facet specification to perform faceted search.
+   * Note that this field is deprecated and will throw NOT_IMPLEMENTED if
+   * used for creating a control.
    * 
* - * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3; + * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3 [deprecated = true]; + * * + * @deprecated google.cloud.retail.v2beta.Control.facet_spec is deprecated. See + * google/cloud/retail/v2beta/control.proto;l=51 * @return The facetSpec. */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.retail.v2beta.SearchRequest.FacetSpec getFacetSpec() { if (controlCase_ == 3) { return (com.google.cloud.retail.v2beta.SearchRequest.FacetSpec) control_; @@ -287,11 +172,15 @@ public com.google.cloud.retail.v2beta.SearchRequest.FacetSpec getFacetSpec() { * *
    * A facet specification to perform faceted search.
+   * Note that this field is deprecated and will throw NOT_IMPLEMENTED if
+   * used for creating a control.
    * 
* - * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3; + * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3 [deprecated = true]; + * */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.retail.v2beta.SearchRequest.FacetSpecOrBuilder getFacetSpecOrBuilder() { if (controlCase_ == 3) { return (com.google.cloud.retail.v2beta.SearchRequest.FacetSpec) control_; @@ -466,10 +355,13 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * * *
-   * Output only. List of serving configuration ids that that are associated
-   * with this control. Note the association is managed via the ServingConfig,
-   * this is an output only denormalizeed  view. Assumed to be in the same
-   * catalog.
+   * Output only. List of [serving
+   * configuration][google.cloud.retail.v2beta.ServingConfig] ids that are
+   * associated with this control in the same
+   * [Catalog][google.cloud.retail.v2beta.Catalog].
+   * Note the association is managed via the
+   * [ServingConfig][google.cloud.retail.v2beta.ServingConfig], this is an
+   * output only denormalized view.
    * 
* * @@ -485,10 +377,13 @@ public com.google.protobuf.ProtocolStringList getAssociatedServingConfigIdsList( * * *
-   * Output only. List of serving configuration ids that that are associated
-   * with this control. Note the association is managed via the ServingConfig,
-   * this is an output only denormalizeed  view. Assumed to be in the same
-   * catalog.
+   * Output only. List of [serving
+   * configuration][google.cloud.retail.v2beta.ServingConfig] ids that are
+   * associated with this control in the same
+   * [Catalog][google.cloud.retail.v2beta.Catalog].
+   * Note the association is managed via the
+   * [ServingConfig][google.cloud.retail.v2beta.ServingConfig], this is an
+   * output only denormalized view.
    * 
* * @@ -504,10 +399,13 @@ public int getAssociatedServingConfigIdsCount() { * * *
-   * Output only. List of serving configuration ids that that are associated
-   * with this control. Note the association is managed via the ServingConfig,
-   * this is an output only denormalizeed  view. Assumed to be in the same
-   * catalog.
+   * Output only. List of [serving
+   * configuration][google.cloud.retail.v2beta.ServingConfig] ids that are
+   * associated with this control in the same
+   * [Catalog][google.cloud.retail.v2beta.Catalog].
+   * Note the association is managed via the
+   * [ServingConfig][google.cloud.retail.v2beta.ServingConfig], this is an
+   * output only denormalized view.
    * 
* * @@ -524,10 +422,13 @@ public java.lang.String getAssociatedServingConfigIds(int index) { * * *
-   * Output only. List of serving configuration ids that that are associated
-   * with this control. Note the association is managed via the ServingConfig,
-   * this is an output only denormalizeed  view. Assumed to be in the same
-   * catalog.
+   * Output only. List of [serving
+   * configuration][google.cloud.retail.v2beta.ServingConfig] ids that are
+   * associated with this control in the same
+   * [Catalog][google.cloud.retail.v2beta.Catalog].
+   * Note the association is managed via the
+   * [ServingConfig][google.cloud.retail.v2beta.ServingConfig], this is an
+   * output only denormalized view.
    * 
* * @@ -561,12 +462,11 @@ public com.google.cloud.retail.v2beta.SolutionType convert(java.lang.Integer fro * * *
-   * Required. Immutable. The solution types that the serving config is used
-   * for. Currently we support setting only one type of solution at creation
-   * time.
+   * Required. Immutable. The solution types that the control is used for.
+   * Currently we support setting only one type of solution at creation time.
    * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
    * If no solution type is provided at creation time, will default to
-   * SOLUTION_TYPE_SEARCH.
+   * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
    * 
* * @@ -585,12 +485,11 @@ public java.util.List getSolutionTy * * *
-   * Required. Immutable. The solution types that the serving config is used
-   * for. Currently we support setting only one type of solution at creation
-   * time.
+   * Required. Immutable. The solution types that the control is used for.
+   * Currently we support setting only one type of solution at creation time.
    * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
    * If no solution type is provided at creation time, will default to
-   * SOLUTION_TYPE_SEARCH.
+   * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
    * 
* * @@ -607,12 +506,11 @@ public int getSolutionTypesCount() { * * *
-   * Required. Immutable. The solution types that the serving config is used
-   * for. Currently we support setting only one type of solution at creation
-   * time.
+   * Required. Immutable. The solution types that the control is used for.
+   * Currently we support setting only one type of solution at creation time.
    * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
    * If no solution type is provided at creation time, will default to
-   * SOLUTION_TYPE_SEARCH.
+   * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
    * 
* * @@ -630,12 +528,11 @@ public com.google.cloud.retail.v2beta.SolutionType getSolutionTypes(int index) { * * *
-   * Required. Immutable. The solution types that the serving config is used
-   * for. Currently we support setting only one type of solution at creation
-   * time.
+   * Required. Immutable. The solution types that the control is used for.
+   * Currently we support setting only one type of solution at creation time.
    * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
    * If no solution type is provided at creation time, will default to
-   * SOLUTION_TYPE_SEARCH.
+   * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
    * 
* * @@ -652,12 +549,11 @@ public java.util.List getSolutionTypesValueList() { * * *
-   * Required. Immutable. The solution types that the serving config is used
-   * for. Currently we support setting only one type of solution at creation
-   * time.
+   * Required. Immutable. The solution types that the control is used for.
+   * Currently we support setting only one type of solution at creation time.
    * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
    * If no solution type is provided at creation time, will default to
-   * SOLUTION_TYPE_SEARCH.
+   * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
    * 
* * @@ -674,6 +570,141 @@ public int getSolutionTypesValue(int index) { private int solutionTypesMemoizedSerializedSize; + public static final int SEARCH_SOLUTION_USE_CASE_FIELD_NUMBER = 7; + private java.util.List searchSolutionUseCase_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.retail.v2beta.SearchSolutionUseCase> + searchSolutionUseCase_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.retail.v2beta.SearchSolutionUseCase>() { + public com.google.cloud.retail.v2beta.SearchSolutionUseCase convert( + java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2beta.SearchSolutionUseCase result = + com.google.cloud.retail.v2beta.SearchSolutionUseCase.valueOf(from); + return result == null + ? com.google.cloud.retail.v2beta.SearchSolutionUseCase.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Specifies the use case for the control.
+   * Affects what condition fields can be set.
+   * Only settable by search controls.
+   * Will default to
+   * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+   * if not specified. Currently only allow one search_solution_use_case per
+   * control.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @return A list containing the searchSolutionUseCase. + */ + @java.lang.Override + public java.util.List + getSearchSolutionUseCaseList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.retail.v2beta.SearchSolutionUseCase>( + searchSolutionUseCase_, searchSolutionUseCase_converter_); + } + /** + * + * + *
+   * Specifies the use case for the control.
+   * Affects what condition fields can be set.
+   * Only settable by search controls.
+   * Will default to
+   * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+   * if not specified. Currently only allow one search_solution_use_case per
+   * control.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @return The count of searchSolutionUseCase. + */ + @java.lang.Override + public int getSearchSolutionUseCaseCount() { + return searchSolutionUseCase_.size(); + } + /** + * + * + *
+   * Specifies the use case for the control.
+   * Affects what condition fields can be set.
+   * Only settable by search controls.
+   * Will default to
+   * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+   * if not specified. Currently only allow one search_solution_use_case per
+   * control.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @param index The index of the element to return. + * @return The searchSolutionUseCase at the given index. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.SearchSolutionUseCase getSearchSolutionUseCase(int index) { + return searchSolutionUseCase_converter_.convert(searchSolutionUseCase_.get(index)); + } + /** + * + * + *
+   * Specifies the use case for the control.
+   * Affects what condition fields can be set.
+   * Only settable by search controls.
+   * Will default to
+   * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+   * if not specified. Currently only allow one search_solution_use_case per
+   * control.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @return A list containing the enum numeric values on the wire for searchSolutionUseCase. + */ + @java.lang.Override + public java.util.List getSearchSolutionUseCaseValueList() { + return searchSolutionUseCase_; + } + /** + * + * + *
+   * Specifies the use case for the control.
+   * Affects what condition fields can be set.
+   * Only settable by search controls.
+   * Will default to
+   * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+   * if not specified. Currently only allow one search_solution_use_case per
+   * control.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of searchSolutionUseCase at the given index. + */ + @java.lang.Override + public int getSearchSolutionUseCaseValue(int index) { + return searchSolutionUseCase_.get(index); + } + + private int searchSolutionUseCaseMemoizedSerializedSize; + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -712,7 +743,14 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < solutionTypes_.size(); i++) { output.writeEnumNoTag(solutionTypes_.get(i)); } - unknownFields.writeTo(output); + if (getSearchSolutionUseCaseList().size() > 0) { + output.writeUInt32NoTag(58); + output.writeUInt32NoTag(searchSolutionUseCaseMemoizedSerializedSize); + } + for (int i = 0; i < searchSolutionUseCase_.size(); i++) { + output.writeEnumNoTag(searchSolutionUseCase_.get(i)); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -758,7 +796,21 @@ public int getSerializedSize() { } solutionTypesMemoizedSerializedSize = dataSize; } - size += unknownFields.getSerializedSize(); + { + int dataSize = 0; + for (int i = 0; i < searchSolutionUseCase_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + searchSolutionUseCase_.get(i)); + } + size += dataSize; + if (!getSearchSolutionUseCaseList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + searchSolutionUseCaseMemoizedSerializedSize = dataSize; + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -778,6 +830,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAssociatedServingConfigIdsList().equals(other.getAssociatedServingConfigIdsList())) return false; if (!solutionTypes_.equals(other.solutionTypes_)) return false; + if (!searchSolutionUseCase_.equals(other.searchSolutionUseCase_)) return false; if (!getControlCase().equals(other.getControlCase())) return false; switch (controlCase_) { case 3: @@ -789,7 +842,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -812,6 +865,10 @@ public int hashCode() { hash = (37 * hash) + SOLUTION_TYPES_FIELD_NUMBER; hash = (53 * hash) + solutionTypes_.hashCode(); } + if (getSearchSolutionUseCaseCount() > 0) { + hash = (37 * hash) + SEARCH_SOLUTION_USE_CASE_FIELD_NUMBER; + hash = (53 * hash) + searchSolutionUseCase_.hashCode(); + } switch (controlCase_) { case 3: hash = (37 * hash) + FACET_SPEC_FIELD_NUMBER; @@ -824,7 +881,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -928,8 +985,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Configures dynamic serving time metadata that is used to pre and post
-   * process search/recommendation model results.
+   * Configures dynamic metadata that can be linked to a
+   * [ServingConfig][google.cloud.retail.v2beta.ServingConfig] and affect search
+   * or recommendation results at serving time.
    * 
* * Protobuf type {@code google.cloud.retail.v2beta.Control} @@ -954,22 +1012,21 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.Control.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (facetSpecBuilder_ != null) { + facetSpecBuilder_.clear(); + } + if (ruleBuilder_ != null) { + ruleBuilder_.clear(); + } name_ = ""; displayName_ = ""; @@ -978,6 +1035,8 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000001); solutionTypes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000002); + searchSolutionUseCase_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); controlCase_ = 0; control_ = null; return this; @@ -1034,6 +1093,11 @@ public com.google.cloud.retail.v2beta.Control buildPartial() { bitField0_ = (bitField0_ & ~0x00000002); } result.solutionTypes_ = solutionTypes_; + if (((bitField0_ & 0x00000004) != 0)) { + searchSolutionUseCase_ = java.util.Collections.unmodifiableList(searchSolutionUseCase_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.searchSolutionUseCase_ = searchSolutionUseCase_; result.controlCase_ = controlCase_; onBuilt(); return result; @@ -1112,6 +1176,16 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Control other) { } onChanged(); } + if (!other.searchSolutionUseCase_.isEmpty()) { + if (searchSolutionUseCase_.isEmpty()) { + searchSolutionUseCase_ = other.searchSolutionUseCase_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureSearchSolutionUseCaseIsMutable(); + searchSolutionUseCase_.addAll(other.searchSolutionUseCase_); + } + onChanged(); + } switch (other.getControlCase()) { case FACET_SPEC: { @@ -1128,7 +1202,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Control other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1143,17 +1217,100 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Control parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + input.readMessage(getFacetSpecFieldBuilder().getBuilder(), extensionRegistry); + controlCase_ = 3; + break; + } // case 26 + case 34: + { + input.readMessage(getRuleFieldBuilder().getBuilder(), extensionRegistry); + controlCase_ = 4; + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAssociatedServingConfigIdsIsMutable(); + associatedServingConfigIds_.add(s); + break; + } // case 42 + case 48: + { + int tmpRaw = input.readEnum(); + ensureSolutionTypesIsMutable(); + solutionTypes_.add(tmpRaw); + break; + } // case 48 + case 50: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureSolutionTypesIsMutable(); + solutionTypes_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 50 + case 56: + { + int tmpRaw = input.readEnum(); + ensureSearchSolutionUseCaseIsMutable(); + searchSolutionUseCase_.add(tmpRaw); + break; + } // case 56 + case 58: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureSearchSolutionUseCaseIsMutable(); + searchSolutionUseCase_.add(tmpRaw); + } + input.popLimit(oldLimit); + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.Control) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1183,13 +1340,19 @@ public Builder clearControl() { * *
      * A facet specification to perform faceted search.
+     * Note that this field is deprecated and will throw NOT_IMPLEMENTED if
+     * used for creating a control.
      * 
* - * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3; + * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3 [deprecated = true]; + * * + * @deprecated google.cloud.retail.v2beta.Control.facet_spec is deprecated. See + * google/cloud/retail/v2beta/control.proto;l=51 * @return Whether the facetSpec field is set. */ @java.lang.Override + @java.lang.Deprecated public boolean hasFacetSpec() { return controlCase_ == 3; } @@ -1198,13 +1361,19 @@ public boolean hasFacetSpec() { * *
      * A facet specification to perform faceted search.
+     * Note that this field is deprecated and will throw NOT_IMPLEMENTED if
+     * used for creating a control.
      * 
* - * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3; + * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3 [deprecated = true]; + * * + * @deprecated google.cloud.retail.v2beta.Control.facet_spec is deprecated. See + * google/cloud/retail/v2beta/control.proto;l=51 * @return The facetSpec. */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.retail.v2beta.SearchRequest.FacetSpec getFacetSpec() { if (facetSpecBuilder_ == null) { if (controlCase_ == 3) { @@ -1223,10 +1392,14 @@ public com.google.cloud.retail.v2beta.SearchRequest.FacetSpec getFacetSpec() { * *
      * A facet specification to perform faceted search.
+     * Note that this field is deprecated and will throw NOT_IMPLEMENTED if
+     * used for creating a control.
      * 
* - * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3; + * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder setFacetSpec(com.google.cloud.retail.v2beta.SearchRequest.FacetSpec value) { if (facetSpecBuilder_ == null) { if (value == null) { @@ -1245,10 +1418,14 @@ public Builder setFacetSpec(com.google.cloud.retail.v2beta.SearchRequest.FacetSp * *
      * A facet specification to perform faceted search.
+     * Note that this field is deprecated and will throw NOT_IMPLEMENTED if
+     * used for creating a control.
      * 
* - * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3; + * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder setFacetSpec( com.google.cloud.retail.v2beta.SearchRequest.FacetSpec.Builder builderForValue) { if (facetSpecBuilder_ == null) { @@ -1265,10 +1442,14 @@ public Builder setFacetSpec( * *
      * A facet specification to perform faceted search.
+     * Note that this field is deprecated and will throw NOT_IMPLEMENTED if
+     * used for creating a control.
      * 
* - * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3; + * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder mergeFacetSpec(com.google.cloud.retail.v2beta.SearchRequest.FacetSpec value) { if (facetSpecBuilder_ == null) { if (controlCase_ == 3 @@ -1298,10 +1479,14 @@ public Builder mergeFacetSpec(com.google.cloud.retail.v2beta.SearchRequest.Facet * *
      * A facet specification to perform faceted search.
+     * Note that this field is deprecated and will throw NOT_IMPLEMENTED if
+     * used for creating a control.
      * 
* - * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3; + * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public Builder clearFacetSpec() { if (facetSpecBuilder_ == null) { if (controlCase_ == 3) { @@ -1323,10 +1508,14 @@ public Builder clearFacetSpec() { * *
      * A facet specification to perform faceted search.
+     * Note that this field is deprecated and will throw NOT_IMPLEMENTED if
+     * used for creating a control.
      * 
* - * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3; + * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3 [deprecated = true]; + * */ + @java.lang.Deprecated public com.google.cloud.retail.v2beta.SearchRequest.FacetSpec.Builder getFacetSpecBuilder() { return getFacetSpecFieldBuilder().getBuilder(); } @@ -1335,11 +1524,15 @@ public com.google.cloud.retail.v2beta.SearchRequest.FacetSpec.Builder getFacetSp * *
      * A facet specification to perform faceted search.
+     * Note that this field is deprecated and will throw NOT_IMPLEMENTED if
+     * used for creating a control.
      * 
* - * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3; + * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3 [deprecated = true]; + * */ @java.lang.Override + @java.lang.Deprecated public com.google.cloud.retail.v2beta.SearchRequest.FacetSpecOrBuilder getFacetSpecOrBuilder() { if ((controlCase_ == 3) && (facetSpecBuilder_ != null)) { return facetSpecBuilder_.getMessageOrBuilder(); @@ -1355,9 +1548,12 @@ public com.google.cloud.retail.v2beta.SearchRequest.FacetSpecOrBuilder getFacetS * *
      * A facet specification to perform faceted search.
+     * Note that this field is deprecated and will throw NOT_IMPLEMENTED if
+     * used for creating a control.
      * 
* - * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3; + * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3 [deprecated = true]; + * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.cloud.retail.v2beta.SearchRequest.FacetSpec, @@ -1850,10 +2046,13 @@ private void ensureAssociatedServingConfigIdsIsMutable() { * * *
-     * Output only. List of serving configuration ids that that are associated
-     * with this control. Note the association is managed via the ServingConfig,
-     * this is an output only denormalizeed  view. Assumed to be in the same
-     * catalog.
+     * Output only. List of [serving
+     * configuration][google.cloud.retail.v2beta.ServingConfig] ids that are
+     * associated with this control in the same
+     * [Catalog][google.cloud.retail.v2beta.Catalog].
+     * Note the association is managed via the
+     * [ServingConfig][google.cloud.retail.v2beta.ServingConfig], this is an
+     * output only denormalized view.
      * 
* * @@ -1869,10 +2068,13 @@ public com.google.protobuf.ProtocolStringList getAssociatedServingConfigIdsList( * * *
-     * Output only. List of serving configuration ids that that are associated
-     * with this control. Note the association is managed via the ServingConfig,
-     * this is an output only denormalizeed  view. Assumed to be in the same
-     * catalog.
+     * Output only. List of [serving
+     * configuration][google.cloud.retail.v2beta.ServingConfig] ids that are
+     * associated with this control in the same
+     * [Catalog][google.cloud.retail.v2beta.Catalog].
+     * Note the association is managed via the
+     * [ServingConfig][google.cloud.retail.v2beta.ServingConfig], this is an
+     * output only denormalized view.
      * 
* * @@ -1888,10 +2090,13 @@ public int getAssociatedServingConfigIdsCount() { * * *
-     * Output only. List of serving configuration ids that that are associated
-     * with this control. Note the association is managed via the ServingConfig,
-     * this is an output only denormalizeed  view. Assumed to be in the same
-     * catalog.
+     * Output only. List of [serving
+     * configuration][google.cloud.retail.v2beta.ServingConfig] ids that are
+     * associated with this control in the same
+     * [Catalog][google.cloud.retail.v2beta.Catalog].
+     * Note the association is managed via the
+     * [ServingConfig][google.cloud.retail.v2beta.ServingConfig], this is an
+     * output only denormalized view.
      * 
* * @@ -1908,10 +2113,13 @@ public java.lang.String getAssociatedServingConfigIds(int index) { * * *
-     * Output only. List of serving configuration ids that that are associated
-     * with this control. Note the association is managed via the ServingConfig,
-     * this is an output only denormalizeed  view. Assumed to be in the same
-     * catalog.
+     * Output only. List of [serving
+     * configuration][google.cloud.retail.v2beta.ServingConfig] ids that are
+     * associated with this control in the same
+     * [Catalog][google.cloud.retail.v2beta.Catalog].
+     * Note the association is managed via the
+     * [ServingConfig][google.cloud.retail.v2beta.ServingConfig], this is an
+     * output only denormalized view.
      * 
* * @@ -1928,10 +2136,13 @@ public com.google.protobuf.ByteString getAssociatedServingConfigIdsBytes(int ind * * *
-     * Output only. List of serving configuration ids that that are associated
-     * with this control. Note the association is managed via the ServingConfig,
-     * this is an output only denormalizeed  view. Assumed to be in the same
-     * catalog.
+     * Output only. List of [serving
+     * configuration][google.cloud.retail.v2beta.ServingConfig] ids that are
+     * associated with this control in the same
+     * [Catalog][google.cloud.retail.v2beta.Catalog].
+     * Note the association is managed via the
+     * [ServingConfig][google.cloud.retail.v2beta.ServingConfig], this is an
+     * output only denormalized view.
      * 
* * @@ -1955,10 +2166,13 @@ public Builder setAssociatedServingConfigIds(int index, java.lang.String value) * * *
-     * Output only. List of serving configuration ids that that are associated
-     * with this control. Note the association is managed via the ServingConfig,
-     * this is an output only denormalizeed  view. Assumed to be in the same
-     * catalog.
+     * Output only. List of [serving
+     * configuration][google.cloud.retail.v2beta.ServingConfig] ids that are
+     * associated with this control in the same
+     * [Catalog][google.cloud.retail.v2beta.Catalog].
+     * Note the association is managed via the
+     * [ServingConfig][google.cloud.retail.v2beta.ServingConfig], this is an
+     * output only denormalized view.
      * 
* * @@ -1981,10 +2195,13 @@ public Builder addAssociatedServingConfigIds(java.lang.String value) { * * *
-     * Output only. List of serving configuration ids that that are associated
-     * with this control. Note the association is managed via the ServingConfig,
-     * this is an output only denormalizeed  view. Assumed to be in the same
-     * catalog.
+     * Output only. List of [serving
+     * configuration][google.cloud.retail.v2beta.ServingConfig] ids that are
+     * associated with this control in the same
+     * [Catalog][google.cloud.retail.v2beta.Catalog].
+     * Note the association is managed via the
+     * [ServingConfig][google.cloud.retail.v2beta.ServingConfig], this is an
+     * output only denormalized view.
      * 
* * @@ -2004,10 +2221,13 @@ public Builder addAllAssociatedServingConfigIds(java.lang.Iterable - * Output only. List of serving configuration ids that that are associated - * with this control. Note the association is managed via the ServingConfig, - * this is an output only denormalizeed view. Assumed to be in the same - * catalog. + * Output only. List of [serving + * configuration][google.cloud.retail.v2beta.ServingConfig] ids that are + * associated with this control in the same + * [Catalog][google.cloud.retail.v2beta.Catalog]. + * Note the association is managed via the + * [ServingConfig][google.cloud.retail.v2beta.ServingConfig], this is an + * output only denormalized view. * * * @@ -2026,10 +2246,13 @@ public Builder clearAssociatedServingConfigIds() { * * *
-     * Output only. List of serving configuration ids that that are associated
-     * with this control. Note the association is managed via the ServingConfig,
-     * this is an output only denormalizeed  view. Assumed to be in the same
-     * catalog.
+     * Output only. List of [serving
+     * configuration][google.cloud.retail.v2beta.ServingConfig] ids that are
+     * associated with this control in the same
+     * [Catalog][google.cloud.retail.v2beta.Catalog].
+     * Note the association is managed via the
+     * [ServingConfig][google.cloud.retail.v2beta.ServingConfig], this is an
+     * output only denormalized view.
      * 
* * @@ -2062,12 +2285,11 @@ private void ensureSolutionTypesIsMutable() { * * *
-     * Required. Immutable. The solution types that the serving config is used
-     * for. Currently we support setting only one type of solution at creation
-     * time.
+     * Required. Immutable. The solution types that the control is used for.
+     * Currently we support setting only one type of solution at creation time.
      * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
      * If no solution type is provided at creation time, will default to
-     * SOLUTION_TYPE_SEARCH.
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
      * 
* * @@ -2085,12 +2307,11 @@ public java.util.List getSolutionTy * * *
-     * Required. Immutable. The solution types that the serving config is used
-     * for. Currently we support setting only one type of solution at creation
-     * time.
+     * Required. Immutable. The solution types that the control is used for.
+     * Currently we support setting only one type of solution at creation time.
      * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
      * If no solution type is provided at creation time, will default to
-     * SOLUTION_TYPE_SEARCH.
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
      * 
* * @@ -2106,12 +2327,11 @@ public int getSolutionTypesCount() { * * *
-     * Required. Immutable. The solution types that the serving config is used
-     * for. Currently we support setting only one type of solution at creation
-     * time.
+     * Required. Immutable. The solution types that the control is used for.
+     * Currently we support setting only one type of solution at creation time.
      * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
      * If no solution type is provided at creation time, will default to
-     * SOLUTION_TYPE_SEARCH.
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
      * 
* * @@ -2128,12 +2348,11 @@ public com.google.cloud.retail.v2beta.SolutionType getSolutionTypes(int index) { * * *
-     * Required. Immutable. The solution types that the serving config is used
-     * for. Currently we support setting only one type of solution at creation
-     * time.
+     * Required. Immutable. The solution types that the control is used for.
+     * Currently we support setting only one type of solution at creation time.
      * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
      * If no solution type is provided at creation time, will default to
-     * SOLUTION_TYPE_SEARCH.
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
      * 
* * @@ -2157,12 +2376,11 @@ public Builder setSolutionTypes(int index, com.google.cloud.retail.v2beta.Soluti * * *
-     * Required. Immutable. The solution types that the serving config is used
-     * for. Currently we support setting only one type of solution at creation
-     * time.
+     * Required. Immutable. The solution types that the control is used for.
+     * Currently we support setting only one type of solution at creation time.
      * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
      * If no solution type is provided at creation time, will default to
-     * SOLUTION_TYPE_SEARCH.
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
      * 
* * @@ -2185,12 +2403,11 @@ public Builder addSolutionTypes(com.google.cloud.retail.v2beta.SolutionType valu * * *
-     * Required. Immutable. The solution types that the serving config is used
-     * for. Currently we support setting only one type of solution at creation
-     * time.
+     * Required. Immutable. The solution types that the control is used for.
+     * Currently we support setting only one type of solution at creation time.
      * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
      * If no solution type is provided at creation time, will default to
-     * SOLUTION_TYPE_SEARCH.
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
      * 
* * @@ -2213,12 +2430,11 @@ public Builder addAllSolutionTypes( * * *
-     * Required. Immutable. The solution types that the serving config is used
-     * for. Currently we support setting only one type of solution at creation
-     * time.
+     * Required. Immutable. The solution types that the control is used for.
+     * Currently we support setting only one type of solution at creation time.
      * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
      * If no solution type is provided at creation time, will default to
-     * SOLUTION_TYPE_SEARCH.
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
      * 
* * @@ -2237,12 +2453,11 @@ public Builder clearSolutionTypes() { * * *
-     * Required. Immutable. The solution types that the serving config is used
-     * for. Currently we support setting only one type of solution at creation
-     * time.
+     * Required. Immutable. The solution types that the control is used for.
+     * Currently we support setting only one type of solution at creation time.
      * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
      * If no solution type is provided at creation time, will default to
-     * SOLUTION_TYPE_SEARCH.
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
      * 
* * @@ -2258,12 +2473,11 @@ public java.util.List getSolutionTypesValueList() { * * *
-     * Required. Immutable. The solution types that the serving config is used
-     * for. Currently we support setting only one type of solution at creation
-     * time.
+     * Required. Immutable. The solution types that the control is used for.
+     * Currently we support setting only one type of solution at creation time.
      * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
      * If no solution type is provided at creation time, will default to
-     * SOLUTION_TYPE_SEARCH.
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
      * 
* * @@ -2280,12 +2494,11 @@ public int getSolutionTypesValue(int index) { * * *
-     * Required. Immutable. The solution types that the serving config is used
-     * for. Currently we support setting only one type of solution at creation
-     * time.
+     * Required. Immutable. The solution types that the control is used for.
+     * Currently we support setting only one type of solution at creation time.
      * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
      * If no solution type is provided at creation time, will default to
-     * SOLUTION_TYPE_SEARCH.
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
      * 
* * @@ -2306,12 +2519,11 @@ public Builder setSolutionTypesValue(int index, int value) { * * *
-     * Required. Immutable. The solution types that the serving config is used
-     * for. Currently we support setting only one type of solution at creation
-     * time.
+     * Required. Immutable. The solution types that the control is used for.
+     * Currently we support setting only one type of solution at creation time.
      * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
      * If no solution type is provided at creation time, will default to
-     * SOLUTION_TYPE_SEARCH.
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
      * 
* * @@ -2331,12 +2543,11 @@ public Builder addSolutionTypesValue(int value) { * * *
-     * Required. Immutable. The solution types that the serving config is used
-     * for. Currently we support setting only one type of solution at creation
-     * time.
+     * Required. Immutable. The solution types that the control is used for.
+     * Currently we support setting only one type of solution at creation time.
      * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
      * If no solution type is provided at creation time, will default to
-     * SOLUTION_TYPE_SEARCH.
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
      * 
* * @@ -2355,6 +2566,328 @@ public Builder addAllSolutionTypesValue(java.lang.Iterable va return this; } + private java.util.List searchSolutionUseCase_ = + java.util.Collections.emptyList(); + + private void ensureSearchSolutionUseCaseIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + searchSolutionUseCase_ = new java.util.ArrayList(searchSolutionUseCase_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * Specifies the use case for the control.
+     * Affects what condition fields can be set.
+     * Only settable by search controls.
+     * Will default to
+     * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+     * if not specified. Currently only allow one search_solution_use_case per
+     * control.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @return A list containing the searchSolutionUseCase. + */ + public java.util.List + getSearchSolutionUseCaseList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.retail.v2beta.SearchSolutionUseCase>( + searchSolutionUseCase_, searchSolutionUseCase_converter_); + } + /** + * + * + *
+     * Specifies the use case for the control.
+     * Affects what condition fields can be set.
+     * Only settable by search controls.
+     * Will default to
+     * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+     * if not specified. Currently only allow one search_solution_use_case per
+     * control.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @return The count of searchSolutionUseCase. + */ + public int getSearchSolutionUseCaseCount() { + return searchSolutionUseCase_.size(); + } + /** + * + * + *
+     * Specifies the use case for the control.
+     * Affects what condition fields can be set.
+     * Only settable by search controls.
+     * Will default to
+     * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+     * if not specified. Currently only allow one search_solution_use_case per
+     * control.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @param index The index of the element to return. + * @return The searchSolutionUseCase at the given index. + */ + public com.google.cloud.retail.v2beta.SearchSolutionUseCase getSearchSolutionUseCase( + int index) { + return searchSolutionUseCase_converter_.convert(searchSolutionUseCase_.get(index)); + } + /** + * + * + *
+     * Specifies the use case for the control.
+     * Affects what condition fields can be set.
+     * Only settable by search controls.
+     * Will default to
+     * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+     * if not specified. Currently only allow one search_solution_use_case per
+     * control.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @param index The index to set the value at. + * @param value The searchSolutionUseCase to set. + * @return This builder for chaining. + */ + public Builder setSearchSolutionUseCase( + int index, com.google.cloud.retail.v2beta.SearchSolutionUseCase value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchSolutionUseCaseIsMutable(); + searchSolutionUseCase_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the use case for the control.
+     * Affects what condition fields can be set.
+     * Only settable by search controls.
+     * Will default to
+     * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+     * if not specified. Currently only allow one search_solution_use_case per
+     * control.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @param value The searchSolutionUseCase to add. + * @return This builder for chaining. + */ + public Builder addSearchSolutionUseCase( + com.google.cloud.retail.v2beta.SearchSolutionUseCase value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSearchSolutionUseCaseIsMutable(); + searchSolutionUseCase_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the use case for the control.
+     * Affects what condition fields can be set.
+     * Only settable by search controls.
+     * Will default to
+     * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+     * if not specified. Currently only allow one search_solution_use_case per
+     * control.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @param values The searchSolutionUseCase to add. + * @return This builder for chaining. + */ + public Builder addAllSearchSolutionUseCase( + java.lang.Iterable values) { + ensureSearchSolutionUseCaseIsMutable(); + for (com.google.cloud.retail.v2beta.SearchSolutionUseCase value : values) { + searchSolutionUseCase_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the use case for the control.
+     * Affects what condition fields can be set.
+     * Only settable by search controls.
+     * Will default to
+     * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+     * if not specified. Currently only allow one search_solution_use_case per
+     * control.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @return This builder for chaining. + */ + public Builder clearSearchSolutionUseCase() { + searchSolutionUseCase_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the use case for the control.
+     * Affects what condition fields can be set.
+     * Only settable by search controls.
+     * Will default to
+     * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+     * if not specified. Currently only allow one search_solution_use_case per
+     * control.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @return A list containing the enum numeric values on the wire for searchSolutionUseCase. + */ + public java.util.List getSearchSolutionUseCaseValueList() { + return java.util.Collections.unmodifiableList(searchSolutionUseCase_); + } + /** + * + * + *
+     * Specifies the use case for the control.
+     * Affects what condition fields can be set.
+     * Only settable by search controls.
+     * Will default to
+     * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+     * if not specified. Currently only allow one search_solution_use_case per
+     * control.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of searchSolutionUseCase at the given index. + */ + public int getSearchSolutionUseCaseValue(int index) { + return searchSolutionUseCase_.get(index); + } + /** + * + * + *
+     * Specifies the use case for the control.
+     * Affects what condition fields can be set.
+     * Only settable by search controls.
+     * Will default to
+     * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+     * if not specified. Currently only allow one search_solution_use_case per
+     * control.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @param index The index to set the value at. + * @param value The enum numeric value on the wire for searchSolutionUseCase to set. + * @return This builder for chaining. + */ + public Builder setSearchSolutionUseCaseValue(int index, int value) { + ensureSearchSolutionUseCaseIsMutable(); + searchSolutionUseCase_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the use case for the control.
+     * Affects what condition fields can be set.
+     * Only settable by search controls.
+     * Will default to
+     * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+     * if not specified. Currently only allow one search_solution_use_case per
+     * control.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @param value The enum numeric value on the wire for searchSolutionUseCase to add. + * @return This builder for chaining. + */ + public Builder addSearchSolutionUseCaseValue(int value) { + ensureSearchSolutionUseCaseIsMutable(); + searchSolutionUseCase_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies the use case for the control.
+     * Affects what condition fields can be set.
+     * Only settable by search controls.
+     * Will default to
+     * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+     * if not specified. Currently only allow one search_solution_use_case per
+     * control.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @param values The enum numeric values on the wire for searchSolutionUseCase to add. + * @return This builder for chaining. + */ + public Builder addAllSearchSolutionUseCaseValue(java.lang.Iterable values) { + ensureSearchSolutionUseCaseIsMutable(); + for (int value : values) { + searchSolutionUseCase_.add(value); + } + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -2387,7 +2920,18 @@ public Control parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Control(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ControlOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ControlOrBuilder.java index 981622f2..c31de227 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ControlOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ControlOrBuilder.java @@ -28,34 +28,50 @@ public interface ControlOrBuilder * *
    * A facet specification to perform faceted search.
+   * Note that this field is deprecated and will throw NOT_IMPLEMENTED if
+   * used for creating a control.
    * 
* - * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3; + * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3 [deprecated = true]; + * * + * @deprecated google.cloud.retail.v2beta.Control.facet_spec is deprecated. See + * google/cloud/retail/v2beta/control.proto;l=51 * @return Whether the facetSpec field is set. */ + @java.lang.Deprecated boolean hasFacetSpec(); /** * * *
    * A facet specification to perform faceted search.
+   * Note that this field is deprecated and will throw NOT_IMPLEMENTED if
+   * used for creating a control.
    * 
* - * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3; + * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3 [deprecated = true]; + * * + * @deprecated google.cloud.retail.v2beta.Control.facet_spec is deprecated. See + * google/cloud/retail/v2beta/control.proto;l=51 * @return The facetSpec. */ + @java.lang.Deprecated com.google.cloud.retail.v2beta.SearchRequest.FacetSpec getFacetSpec(); /** * * *
    * A facet specification to perform faceted search.
+   * Note that this field is deprecated and will throw NOT_IMPLEMENTED if
+   * used for creating a control.
    * 
* - * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3; + * .google.cloud.retail.v2beta.SearchRequest.FacetSpec facet_spec = 3 [deprecated = true]; + * */ + @java.lang.Deprecated com.google.cloud.retail.v2beta.SearchRequest.FacetSpecOrBuilder getFacetSpecOrBuilder(); /** @@ -159,10 +175,13 @@ public interface ControlOrBuilder * * *
-   * Output only. List of serving configuration ids that that are associated
-   * with this control. Note the association is managed via the ServingConfig,
-   * this is an output only denormalizeed  view. Assumed to be in the same
-   * catalog.
+   * Output only. List of [serving
+   * configuration][google.cloud.retail.v2beta.ServingConfig] ids that are
+   * associated with this control in the same
+   * [Catalog][google.cloud.retail.v2beta.Catalog].
+   * Note the association is managed via the
+   * [ServingConfig][google.cloud.retail.v2beta.ServingConfig], this is an
+   * output only denormalized view.
    * 
* * @@ -176,10 +195,13 @@ public interface ControlOrBuilder * * *
-   * Output only. List of serving configuration ids that that are associated
-   * with this control. Note the association is managed via the ServingConfig,
-   * this is an output only denormalizeed  view. Assumed to be in the same
-   * catalog.
+   * Output only. List of [serving
+   * configuration][google.cloud.retail.v2beta.ServingConfig] ids that are
+   * associated with this control in the same
+   * [Catalog][google.cloud.retail.v2beta.Catalog].
+   * Note the association is managed via the
+   * [ServingConfig][google.cloud.retail.v2beta.ServingConfig], this is an
+   * output only denormalized view.
    * 
* * @@ -193,10 +215,13 @@ public interface ControlOrBuilder * * *
-   * Output only. List of serving configuration ids that that are associated
-   * with this control. Note the association is managed via the ServingConfig,
-   * this is an output only denormalizeed  view. Assumed to be in the same
-   * catalog.
+   * Output only. List of [serving
+   * configuration][google.cloud.retail.v2beta.ServingConfig] ids that are
+   * associated with this control in the same
+   * [Catalog][google.cloud.retail.v2beta.Catalog].
+   * Note the association is managed via the
+   * [ServingConfig][google.cloud.retail.v2beta.ServingConfig], this is an
+   * output only denormalized view.
    * 
* * @@ -211,10 +236,13 @@ public interface ControlOrBuilder * * *
-   * Output only. List of serving configuration ids that that are associated
-   * with this control. Note the association is managed via the ServingConfig,
-   * this is an output only denormalizeed  view. Assumed to be in the same
-   * catalog.
+   * Output only. List of [serving
+   * configuration][google.cloud.retail.v2beta.ServingConfig] ids that are
+   * associated with this control in the same
+   * [Catalog][google.cloud.retail.v2beta.Catalog].
+   * Note the association is managed via the
+   * [ServingConfig][google.cloud.retail.v2beta.ServingConfig], this is an
+   * output only denormalized view.
    * 
* * @@ -230,12 +258,11 @@ public interface ControlOrBuilder * * *
-   * Required. Immutable. The solution types that the serving config is used
-   * for. Currently we support setting only one type of solution at creation
-   * time.
+   * Required. Immutable. The solution types that the control is used for.
+   * Currently we support setting only one type of solution at creation time.
    * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
    * If no solution type is provided at creation time, will default to
-   * SOLUTION_TYPE_SEARCH.
+   * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
    * 
* * @@ -249,12 +276,11 @@ public interface ControlOrBuilder * * *
-   * Required. Immutable. The solution types that the serving config is used
-   * for. Currently we support setting only one type of solution at creation
-   * time.
+   * Required. Immutable. The solution types that the control is used for.
+   * Currently we support setting only one type of solution at creation time.
    * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
    * If no solution type is provided at creation time, will default to
-   * SOLUTION_TYPE_SEARCH.
+   * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
    * 
* * @@ -268,12 +294,11 @@ public interface ControlOrBuilder * * *
-   * Required. Immutable. The solution types that the serving config is used
-   * for. Currently we support setting only one type of solution at creation
-   * time.
+   * Required. Immutable. The solution types that the control is used for.
+   * Currently we support setting only one type of solution at creation time.
    * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
    * If no solution type is provided at creation time, will default to
-   * SOLUTION_TYPE_SEARCH.
+   * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
    * 
* * @@ -288,12 +313,11 @@ public interface ControlOrBuilder * * *
-   * Required. Immutable. The solution types that the serving config is used
-   * for. Currently we support setting only one type of solution at creation
-   * time.
+   * Required. Immutable. The solution types that the control is used for.
+   * Currently we support setting only one type of solution at creation time.
    * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
    * If no solution type is provided at creation time, will default to
-   * SOLUTION_TYPE_SEARCH.
+   * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
    * 
* * @@ -307,12 +331,11 @@ public interface ControlOrBuilder * * *
-   * Required. Immutable. The solution types that the serving config is used
-   * for. Currently we support setting only one type of solution at creation
-   * time.
+   * Required. Immutable. The solution types that the control is used for.
+   * Currently we support setting only one type of solution at creation time.
    * Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
    * If no solution type is provided at creation time, will default to
-   * SOLUTION_TYPE_SEARCH.
+   * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
    * 
* * @@ -324,5 +347,104 @@ public interface ControlOrBuilder */ int getSolutionTypesValue(int index); + /** + * + * + *
+   * Specifies the use case for the control.
+   * Affects what condition fields can be set.
+   * Only settable by search controls.
+   * Will default to
+   * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+   * if not specified. Currently only allow one search_solution_use_case per
+   * control.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @return A list containing the searchSolutionUseCase. + */ + java.util.List + getSearchSolutionUseCaseList(); + /** + * + * + *
+   * Specifies the use case for the control.
+   * Affects what condition fields can be set.
+   * Only settable by search controls.
+   * Will default to
+   * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+   * if not specified. Currently only allow one search_solution_use_case per
+   * control.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @return The count of searchSolutionUseCase. + */ + int getSearchSolutionUseCaseCount(); + /** + * + * + *
+   * Specifies the use case for the control.
+   * Affects what condition fields can be set.
+   * Only settable by search controls.
+   * Will default to
+   * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+   * if not specified. Currently only allow one search_solution_use_case per
+   * control.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @param index The index of the element to return. + * @return The searchSolutionUseCase at the given index. + */ + com.google.cloud.retail.v2beta.SearchSolutionUseCase getSearchSolutionUseCase(int index); + /** + * + * + *
+   * Specifies the use case for the control.
+   * Affects what condition fields can be set.
+   * Only settable by search controls.
+   * Will default to
+   * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+   * if not specified. Currently only allow one search_solution_use_case per
+   * control.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @return A list containing the enum numeric values on the wire for searchSolutionUseCase. + */ + java.util.List getSearchSolutionUseCaseValueList(); + /** + * + * + *
+   * Specifies the use case for the control.
+   * Affects what condition fields can be set.
+   * Only settable by search controls.
+   * Will default to
+   * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+   * if not specified. Currently only allow one search_solution_use_case per
+   * control.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.SearchSolutionUseCase search_solution_use_case = 7; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of searchSolutionUseCase at the given index. + */ + int getSearchSolutionUseCaseValue(int index); + public com.google.cloud.retail.v2beta.Control.ControlCase getControlCase(); } diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ControlProto.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ControlProto.java index 7c290506..3e1a2093 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ControlProto.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ControlProto.java @@ -45,23 +45,25 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "pi/field_behavior.proto\032\031google/api/reso" + "urce.proto\032\'google/cloud/retail/v2beta/c" + "ommon.proto\032/google/cloud/retail/v2beta/" - + "search_service.proto\"\250\003\n\007Control\022I\n\nface" + + "search_service.proto\"\201\004\n\007Control\022M\n\nface" + "t_spec\030\003 \001(\01323.google.cloud.retail.v2bet" - + "a.SearchRequest.FacetSpecH\000\0220\n\004rule\030\004 \001(" - + "\0132 .google.cloud.retail.v2beta.RuleH\000\022\021\n" - + "\004name\030\001 \001(\tB\003\340A\005\022\031\n\014display_name\030\002 \001(\tB\003" - + "\340A\002\022*\n\035associated_serving_config_ids\030\005 \003" - + "(\tB\003\340A\003\022H\n\016solution_types\030\006 \003(\0162(.google" - + ".cloud.retail.v2beta.SolutionTypeB\006\340A\002\340A" - + "\005:q\352An\n\035retail.googleapis.com/Control\022Mp" - + "rojects/{project}/locations/{location}/c" - + "atalogs/{catalog}/controls/{control}B\t\n\007" - + "controlB\325\001\n\036com.google.cloud.retail.v2be" - + "taB\014ControlProtoP\001Z@google.golang.org/ge" - + "nproto/googleapis/cloud/retail/v2beta;re" - + "tail\242\002\006RETAIL\252\002\032Google.Cloud.Retail.V2Be" - + "ta\312\002\032Google\\Cloud\\Retail\\V2beta\352\002\035Google" - + "::Cloud::Retail::V2betab\006proto3" + + "a.SearchRequest.FacetSpecB\002\030\001H\000\0220\n\004rule\030" + + "\004 \001(\0132 .google.cloud.retail.v2beta.RuleH" + + "\000\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\031\n\014display_name\030\002 \001" + + "(\tB\003\340A\002\022*\n\035associated_serving_config_ids" + + "\030\005 \003(\tB\003\340A\003\022H\n\016solution_types\030\006 \003(\0162(.go" + + "ogle.cloud.retail.v2beta.SolutionTypeB\006\340" + + "A\002\340A\005\022S\n\030search_solution_use_case\030\007 \003(\0162" + + "1.google.cloud.retail.v2beta.SearchSolut" + + "ionUseCase:q\352An\n\035retail.googleapis.com/C" + + "ontrol\022Mprojects/{project}/locations/{lo" + + "cation}/catalogs/{catalog}/controls/{con" + + "trol}B\t\n\007controlB\325\001\n\036com.google.cloud.re" + + "tail.v2betaB\014ControlProtoP\001Z@google.gola" + + "ng.org/genproto/googleapis/cloud/retail/" + + "v2beta;retail\242\002\006RETAIL\252\002\032Google.Cloud.Re" + + "tail.V2Beta\312\002\032Google\\Cloud\\Retail\\V2beta" + + "\352\002\035Google::Cloud::Retail::V2betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -84,6 +86,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DisplayName", "AssociatedServingConfigIds", "SolutionTypes", + "SearchSolutionUseCase", "Control", }); com.google.protobuf.ExtensionRegistry registry = diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateControlRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateControlRequest.java index 7b3d8750..f0463387 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateControlRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateControlRequest.java @@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateControlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2beta.Control.Builder subBuilder = null; - if (control_ != null) { - subBuilder = control_.toBuilder(); - } - control_ = - input.readMessage( - com.google.cloud.retail.v2beta.Control.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(control_); - control_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - controlId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ControlServiceProto .internal_static_google_cloud_retail_v2beta_CreateControlRequest_descriptor; @@ -324,7 +255,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controlId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, controlId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -342,7 +273,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controlId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, controlId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -364,7 +295,7 @@ public boolean equals(final java.lang.Object obj) { if (!getControl().equals(other.getControl())) return false; } if (!getControlId().equals(other.getControlId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -383,7 +314,7 @@ public int hashCode() { } hash = (37 * hash) + CONTROL_ID_FIELD_NUMBER; hash = (53 * hash) + getControlId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -512,17 +443,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.CreateControlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -633,7 +557,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.CreateControlRequest oth controlId_ = other.controlId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -648,18 +572,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.CreateControlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getControlFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + controlId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.CreateControlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1140,7 +1095,18 @@ public CreateControlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateControlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateModelMetadata.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateModelMetadata.java new file mode 100644 index 00000000..4dc4d0e0 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateModelMetadata.java @@ -0,0 +1,629 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +/** + * + * + *
+ * Metadata associated with a create operation.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.CreateModelMetadata} + */ +public final class CreateModelMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.CreateModelMetadata) + CreateModelMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateModelMetadata.newBuilder() to construct. + private CreateModelMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateModelMetadata() { + model_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateModelMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_CreateModelMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_CreateModelMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.CreateModelMetadata.class, + com.google.cloud.retail.v2beta.CreateModelMetadata.Builder.class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + private volatile java.lang.Object model_; + /** + * + * + *
+   * The resource name of the model that this create applies to.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * string model = 1; + * + * @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 create applies to.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * string model = 1; + * + * @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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2beta.CreateModelMetadata)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.CreateModelMetadata other = + (com.google.cloud.retail.v2beta.CreateModelMetadata) obj; + + if (!getModel().equals(other.getModel())) return false; + if (!getUnknownFields().equals(other.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(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.CreateModelMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CreateModelMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CreateModelMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CreateModelMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CreateModelMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CreateModelMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CreateModelMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CreateModelMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CreateModelMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CreateModelMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CreateModelMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CreateModelMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2beta.CreateModelMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata associated with a create operation.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.CreateModelMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.CreateModelMetadata) + com.google.cloud.retail.v2beta.CreateModelMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_CreateModelMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_CreateModelMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.CreateModelMetadata.class, + com.google.cloud.retail.v2beta.CreateModelMetadata.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.CreateModelMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + model_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_CreateModelMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CreateModelMetadata getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.CreateModelMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CreateModelMetadata build() { + com.google.cloud.retail.v2beta.CreateModelMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CreateModelMetadata buildPartial() { + com.google.cloud.retail.v2beta.CreateModelMetadata result = + new com.google.cloud.retail.v2beta.CreateModelMetadata(this); + result.model_ = model_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.CreateModelMetadata) { + return mergeFrom((com.google.cloud.retail.v2beta.CreateModelMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.CreateModelMetadata other) { + if (other == com.google.cloud.retail.v2beta.CreateModelMetadata.getDefaultInstance()) + return this; + if (!other.getModel().isEmpty()) { + model_ = other.model_; + 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: + { + model_ = input.readStringRequireUtf8(); + + 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 java.lang.Object model_ = ""; + /** + * + * + *
+     * The resource name of the model that this create applies to.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * string model = 1; + * + * @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 create applies to.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * string model = 1; + * + * @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 create applies to.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * string model = 1; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the model that this create applies to.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * string model = 1; + * + * @return This builder for chaining. + */ + public Builder clearModel() { + + model_ = getDefaultInstance().getModel(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the model that this create applies to.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * string model = 1; + * + * @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; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.CreateModelMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.CreateModelMetadata) + private static final com.google.cloud.retail.v2beta.CreateModelMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.CreateModelMetadata(); + } + + public static com.google.cloud.retail.v2beta.CreateModelMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateModelMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CreateModelMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateModelMetadataOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateModelMetadataOrBuilder.java new file mode 100644 index 00000000..91701b6d --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateModelMetadataOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +public interface CreateModelMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.CreateModelMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the model that this create applies to.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * string model = 1; + * + * @return The model. + */ + java.lang.String getModel(); + /** + * + * + *
+   * The resource name of the model that this create applies to.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * string model = 1; + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateModelRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateModelRequest.java new file mode 100644 index 00000000..713d55a0 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateModelRequest.java @@ -0,0 +1,1016 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +/** + * + * + *
+ * Request for creating a model.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.CreateModelRequest} + */ +public final class CreateModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.CreateModelRequest) + CreateModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateModelRequest.newBuilder() to construct. + private CreateModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateModelRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_CreateModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_CreateModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.CreateModelRequest.class, + com.google.cloud.retail.v2beta.CreateModelRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent resource under which to create the model. Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent resource under which to create the model. Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int MODEL_FIELD_NUMBER = 2; + private com.google.cloud.retail.v2beta.Model model_; + /** + * + * + *
+   * Required. The payload of the [Model][google.cloud.retail.v2beta.Model]  to
+   * create.
+   * 
+ * + * .google.cloud.retail.v2beta.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the model field is set. + */ + @java.lang.Override + public boolean hasModel() { + return model_ != null; + } + /** + * + * + *
+   * Required. The payload of the [Model][google.cloud.retail.v2beta.Model]  to
+   * create.
+   * 
+ * + * .google.cloud.retail.v2beta.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The model. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model getModel() { + return model_ == null ? com.google.cloud.retail.v2beta.Model.getDefaultInstance() : model_; + } + /** + * + * + *
+   * Required. The payload of the [Model][google.cloud.retail.v2beta.Model]  to
+   * create.
+   * 
+ * + * .google.cloud.retail.v2beta.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.ModelOrBuilder getModelOrBuilder() { + return getModel(); + } + + public static final int DRY_RUN_FIELD_NUMBER = 3; + private boolean dryRun_; + /** + * + * + *
+   * Optional. Whether to run a dry run to validate the request (without
+   * actually creating the model).
+   * 
+ * + * bool dry_run = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dryRun. + */ + @java.lang.Override + public boolean getDryRun() { + return dryRun_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (model_ != null) { + output.writeMessage(2, getModel()); + } + if (dryRun_ != false) { + output.writeBool(3, dryRun_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (model_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getModel()); + } + if (dryRun_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, dryRun_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2beta.CreateModelRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.CreateModelRequest other = + (com.google.cloud.retail.v2beta.CreateModelRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasModel() != other.hasModel()) return false; + if (hasModel()) { + if (!getModel().equals(other.getModel())) return false; + } + if (getDryRun() != other.getDryRun()) return false; + if (!getUnknownFields().equals(other.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 (hasModel()) { + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().hashCode(); + } + hash = (37 * hash) + DRY_RUN_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDryRun()); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.CreateModelRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CreateModelRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CreateModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CreateModelRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CreateModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.CreateModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CreateModelRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CreateModelRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CreateModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CreateModelRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.CreateModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.CreateModelRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2beta.CreateModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for creating a model.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.CreateModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.CreateModelRequest) + com.google.cloud.retail.v2beta.CreateModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_CreateModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_CreateModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.CreateModelRequest.class, + com.google.cloud.retail.v2beta.CreateModelRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.CreateModelRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (modelBuilder_ == null) { + model_ = null; + } else { + model_ = null; + modelBuilder_ = null; + } + dryRun_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_CreateModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CreateModelRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.CreateModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CreateModelRequest build() { + com.google.cloud.retail.v2beta.CreateModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CreateModelRequest buildPartial() { + com.google.cloud.retail.v2beta.CreateModelRequest result = + new com.google.cloud.retail.v2beta.CreateModelRequest(this); + result.parent_ = parent_; + if (modelBuilder_ == null) { + result.model_ = model_; + } else { + result.model_ = modelBuilder_.build(); + } + result.dryRun_ = dryRun_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.CreateModelRequest) { + return mergeFrom((com.google.cloud.retail.v2beta.CreateModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.CreateModelRequest other) { + if (other == com.google.cloud.retail.v2beta.CreateModelRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasModel()) { + mergeModel(other.getModel()); + } + if (other.getDryRun() != false) { + setDryRun(other.getDryRun()); + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(); + + break; + } // case 10 + case 18: + { + input.readMessage(getModelFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + dryRun_ = input.readBool(); + + 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 java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent resource under which to create the model. Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent resource under which to create the model. Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent resource under which to create the model. Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource under which to create the model. Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent resource under which to create the model. Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.retail.v2beta.Model model_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.Model, + com.google.cloud.retail.v2beta.Model.Builder, + com.google.cloud.retail.v2beta.ModelOrBuilder> + modelBuilder_; + /** + * + * + *
+     * Required. The payload of the [Model][google.cloud.retail.v2beta.Model]  to
+     * create.
+     * 
+ * + * .google.cloud.retail.v2beta.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the model field is set. + */ + public boolean hasModel() { + return modelBuilder_ != null || model_ != null; + } + /** + * + * + *
+     * Required. The payload of the [Model][google.cloud.retail.v2beta.Model]  to
+     * create.
+     * 
+ * + * .google.cloud.retail.v2beta.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The model. + */ + public com.google.cloud.retail.v2beta.Model getModel() { + if (modelBuilder_ == null) { + return model_ == null ? com.google.cloud.retail.v2beta.Model.getDefaultInstance() : model_; + } else { + return modelBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The payload of the [Model][google.cloud.retail.v2beta.Model]  to
+     * create.
+     * 
+ * + * .google.cloud.retail.v2beta.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setModel(com.google.cloud.retail.v2beta.Model value) { + if (modelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + model_ = value; + onChanged(); + } else { + modelBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The payload of the [Model][google.cloud.retail.v2beta.Model]  to
+     * create.
+     * 
+ * + * .google.cloud.retail.v2beta.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setModel(com.google.cloud.retail.v2beta.Model.Builder builderForValue) { + if (modelBuilder_ == null) { + model_ = builderForValue.build(); + onChanged(); + } else { + modelBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The payload of the [Model][google.cloud.retail.v2beta.Model]  to
+     * create.
+     * 
+ * + * .google.cloud.retail.v2beta.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeModel(com.google.cloud.retail.v2beta.Model value) { + if (modelBuilder_ == null) { + if (model_ != null) { + model_ = + com.google.cloud.retail.v2beta.Model.newBuilder(model_) + .mergeFrom(value) + .buildPartial(); + } else { + model_ = value; + } + onChanged(); + } else { + modelBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The payload of the [Model][google.cloud.retail.v2beta.Model]  to
+     * create.
+     * 
+ * + * .google.cloud.retail.v2beta.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearModel() { + if (modelBuilder_ == null) { + model_ = null; + onChanged(); + } else { + model_ = null; + modelBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The payload of the [Model][google.cloud.retail.v2beta.Model]  to
+     * create.
+     * 
+ * + * .google.cloud.retail.v2beta.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2beta.Model.Builder getModelBuilder() { + + onChanged(); + return getModelFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The payload of the [Model][google.cloud.retail.v2beta.Model]  to
+     * create.
+     * 
+ * + * .google.cloud.retail.v2beta.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2beta.ModelOrBuilder getModelOrBuilder() { + if (modelBuilder_ != null) { + return modelBuilder_.getMessageOrBuilder(); + } else { + return model_ == null ? com.google.cloud.retail.v2beta.Model.getDefaultInstance() : model_; + } + } + /** + * + * + *
+     * Required. The payload of the [Model][google.cloud.retail.v2beta.Model]  to
+     * create.
+     * 
+ * + * .google.cloud.retail.v2beta.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.Model, + com.google.cloud.retail.v2beta.Model.Builder, + com.google.cloud.retail.v2beta.ModelOrBuilder> + getModelFieldBuilder() { + if (modelBuilder_ == null) { + modelBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.Model, + com.google.cloud.retail.v2beta.Model.Builder, + com.google.cloud.retail.v2beta.ModelOrBuilder>( + getModel(), getParentForChildren(), isClean()); + model_ = null; + } + return modelBuilder_; + } + + private boolean dryRun_; + /** + * + * + *
+     * Optional. Whether to run a dry run to validate the request (without
+     * actually creating the model).
+     * 
+ * + * bool dry_run = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dryRun. + */ + @java.lang.Override + public boolean getDryRun() { + return dryRun_; + } + /** + * + * + *
+     * Optional. Whether to run a dry run to validate the request (without
+     * actually creating the model).
+     * 
+ * + * bool dry_run = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The dryRun to set. + * @return This builder for chaining. + */ + public Builder setDryRun(boolean value) { + + dryRun_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Whether to run a dry run to validate the request (without
+     * actually creating the model).
+     * 
+ * + * bool dry_run = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDryRun() { + + dryRun_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.CreateModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.CreateModelRequest) + private static final com.google.cloud.retail.v2beta.CreateModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.CreateModelRequest(); + } + + public static com.google.cloud.retail.v2beta.CreateModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.CreateModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateModelRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateModelRequestOrBuilder.java new file mode 100644 index 00000000..497858b7 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateModelRequestOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +public interface CreateModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.CreateModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent resource under which to create the model. Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent resource under which to create the model. Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The payload of the [Model][google.cloud.retail.v2beta.Model]  to
+   * create.
+   * 
+ * + * .google.cloud.retail.v2beta.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the model field is set. + */ + boolean hasModel(); + /** + * + * + *
+   * Required. The payload of the [Model][google.cloud.retail.v2beta.Model]  to
+   * create.
+   * 
+ * + * .google.cloud.retail.v2beta.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The model. + */ + com.google.cloud.retail.v2beta.Model getModel(); + /** + * + * + *
+   * Required. The payload of the [Model][google.cloud.retail.v2beta.Model]  to
+   * create.
+   * 
+ * + * .google.cloud.retail.v2beta.Model model = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.retail.v2beta.ModelOrBuilder getModelOrBuilder(); + + /** + * + * + *
+   * Optional. Whether to run a dry run to validate the request (without
+   * actually creating the model).
+   * 
+ * + * bool dry_run = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The dryRun. + */ + boolean getDryRun(); +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateProductRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateProductRequest.java index af49d0eb..4c290299 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateProductRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateProductRequest.java @@ -55,75 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2beta.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = - input.readMessage( - com.google.cloud.retail.v2beta.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - productId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_CreateProductRequest_descriptor; @@ -342,7 +273,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, productId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -360,7 +291,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, productId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -382,7 +313,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProduct().equals(other.getProduct())) return false; } if (!getProductId().equals(other.getProductId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -401,7 +332,7 @@ public int hashCode() { } hash = (37 * hash) + PRODUCT_ID_FIELD_NUMBER; hash = (53 * hash) + getProductId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -532,17 +463,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.CreateProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -653,7 +577,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.CreateProductRequest oth productId_ = other.productId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -668,18 +592,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.CreateProductRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getProductFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + productId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.CreateProductRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1200,7 +1155,18 @@ public CreateProductRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateProductRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateServingConfigRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateServingConfigRequest.java index 7029391c..6b31b196 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateServingConfigRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CreateServingConfigRequest.java @@ -53,75 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreateServingConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2beta.ServingConfig.Builder subBuilder = null; - if (servingConfig_ != null) { - subBuilder = servingConfig_.toBuilder(); - } - servingConfig_ = - input.readMessage( - com.google.cloud.retail.v2beta.ServingConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(servingConfig_); - servingConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - servingConfigId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ServingConfigServiceProto .internal_static_google_cloud_retail_v2beta_CreateServingConfigRequest_descriptor; @@ -324,7 +255,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servingConfigId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, servingConfigId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -342,7 +273,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servingConfigId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, servingConfigId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -364,7 +295,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServingConfig().equals(other.getServingConfig())) return false; } if (!getServingConfigId().equals(other.getServingConfigId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -383,7 +314,7 @@ public int hashCode() { } hash = (37 * hash) + SERVING_CONFIG_ID_FIELD_NUMBER; hash = (53 * hash) + getServingConfigId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -513,17 +444,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.CreateServingConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -634,7 +558,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.CreateServingConfigReque servingConfigId_ = other.servingConfigId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -649,18 +573,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.CreateServingConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getServingConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + servingConfigId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.CreateServingConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1142,7 +1097,18 @@ public CreateServingConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreateServingConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttribute.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttribute.java index fe2e2c41..cb9e6f5f 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttribute.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttribute.java @@ -54,97 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CustomAttribute( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - text_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - text_.add(s); - break; - } - case 17: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - numbers_ = newDoubleList(); - mutable_bitField0_ |= 0x00000002; - } - numbers_.addDouble(input.readDouble()); - break; - } - case 18: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) { - numbers_ = newDoubleList(); - mutable_bitField0_ |= 0x00000002; - } - while (input.getBytesUntilLimit() > 0) { - numbers_.addDouble(input.readDouble()); - } - input.popLimit(limit); - break; - } - case 24: - { - bitField0_ |= 0x00000001; - searchable_ = input.readBool(); - break; - } - case 32: - { - bitField0_ |= 0x00000002; - indexable_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - text_ = text_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - numbers_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_CustomAttribute_descriptor; @@ -330,7 +239,7 @@ public double getNumbers(int index) { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=423 + * google/cloud/retail/v2beta/common.proto;l=425 * @return Whether the searchable field is set. */ @java.lang.Override @@ -359,7 +268,7 @@ public boolean hasSearchable() { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=423 + * google/cloud/retail/v2beta/common.proto;l=425 * @return The searchable. */ @java.lang.Override @@ -396,7 +305,7 @@ public boolean getSearchable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=444 + * google/cloud/retail/v2beta/common.proto;l=446 * @return Whether the indexable field is set. */ @java.lang.Override @@ -430,7 +339,7 @@ public boolean hasIndexable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=444 + * google/cloud/retail/v2beta/common.proto;l=446 * @return The indexable. */ @java.lang.Override @@ -470,7 +379,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000002) != 0)) { output.writeBool(4, indexable_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -503,7 +412,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, indexable_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -529,7 +438,7 @@ public boolean equals(final java.lang.Object obj) { if (hasIndexable()) { if (getIndexable() != other.getIndexable()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -556,7 +465,7 @@ public int hashCode() { hash = (37 * hash) + INDEXABLE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIndexable()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -686,17 +595,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.CustomAttribute.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -833,7 +735,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.CustomAttribute other) { if (other.hasIndexable()) { setIndexable(other.getIndexable()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -848,17 +750,68 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.CustomAttribute parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTextIsMutable(); + text_.add(s); + break; + } // case 10 + case 17: + { + double v = input.readDouble(); + ensureNumbersIsMutable(); + numbers_.addDouble(v); + break; + } // case 17 + case 18: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureNumbersIsMutable(); + while (input.getBytesUntilLimit() > 0) { + numbers_.addDouble(input.readDouble()); + } + input.popLimit(limit); + break; + } // case 18 + case 24: + { + searchable_ = input.readBool(); + bitField0_ |= 0x00000004; + break; + } // case 24 + case 32: + { + indexable_ = input.readBool(); + bitField0_ |= 0x00000008; + break; + } // case 32 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2beta.CustomAttribute) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1262,7 +1215,7 @@ public Builder clearNumbers() { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=423 + * google/cloud/retail/v2beta/common.proto;l=425 * @return Whether the searchable field is set. */ @java.lang.Override @@ -1291,7 +1244,7 @@ public boolean hasSearchable() { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=423 + * google/cloud/retail/v2beta/common.proto;l=425 * @return The searchable. */ @java.lang.Override @@ -1320,7 +1273,7 @@ public boolean getSearchable() { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=423 + * google/cloud/retail/v2beta/common.proto;l=425 * @param value The searchable to set. * @return This builder for chaining. */ @@ -1352,7 +1305,7 @@ public Builder setSearchable(boolean value) { * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=423 + * google/cloud/retail/v2beta/common.proto;l=425 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1390,7 +1343,7 @@ public Builder clearSearchable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=444 + * google/cloud/retail/v2beta/common.proto;l=446 * @return Whether the indexable field is set. */ @java.lang.Override @@ -1424,7 +1377,7 @@ public boolean hasIndexable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=444 + * google/cloud/retail/v2beta/common.proto;l=446 * @return The indexable. */ @java.lang.Override @@ -1458,7 +1411,7 @@ public boolean getIndexable() { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=444 + * google/cloud/retail/v2beta/common.proto;l=446 * @param value The indexable to set. * @return This builder for chaining. */ @@ -1495,7 +1448,7 @@ public Builder setIndexable(boolean value) { * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=444 + * google/cloud/retail/v2beta/common.proto;l=446 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1538,7 +1491,18 @@ public CustomAttribute parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CustomAttribute(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttributeOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttributeOrBuilder.java index d92b849f..cf0373c9 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttributeOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/CustomAttributeOrBuilder.java @@ -169,7 +169,7 @@ public interface CustomAttributeOrBuilder * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=423 + * google/cloud/retail/v2beta/common.proto;l=425 * @return Whether the searchable field is set. */ @java.lang.Deprecated @@ -195,7 +195,7 @@ public interface CustomAttributeOrBuilder * optional bool searchable = 3 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.searchable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=423 + * google/cloud/retail/v2beta/common.proto;l=425 * @return The searchable. */ @java.lang.Deprecated @@ -227,7 +227,7 @@ public interface CustomAttributeOrBuilder * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=444 + * google/cloud/retail/v2beta/common.proto;l=446 * @return Whether the indexable field is set. */ @java.lang.Deprecated @@ -258,7 +258,7 @@ public interface CustomAttributeOrBuilder * optional bool indexable = 4 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.CustomAttribute.indexable is deprecated. See - * google/cloud/retail/v2beta/common.proto;l=444 + * google/cloud/retail/v2beta/common.proto;l=446 * @return The indexable. */ @java.lang.Deprecated diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteControlRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteControlRequest.java index e819db64..829386ca 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteControlRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteControlRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteControlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ControlServiceProto .internal_static_google_cloud_retail_v2beta_DeleteControlRequest_descriptor; @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.DeleteControlRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.DeleteControlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -456,7 +403,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.DeleteControlRequest oth name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -471,18 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.DeleteControlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.DeleteControlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -639,7 +605,18 @@ public DeleteControlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteControlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteModelRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteModelRequest.java new file mode 100644 index 00000000..2ce715e0 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteModelRequest.java @@ -0,0 +1,643 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +/** + * + * + *
+ * Request for deleting a model.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.DeleteModelRequest} + */ +public final class DeleteModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.DeleteModelRequest) + DeleteModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteModelRequest.newBuilder() to construct. + private DeleteModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteModelRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_DeleteModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_DeleteModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.DeleteModelRequest.class, + com.google.cloud.retail.v2beta.DeleteModelRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the
+   * [Model][google.cloud.retail.v2beta.Model] to delete. Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the
+   * [Model][google.cloud.retail.v2beta.Model] to delete. Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2beta.DeleteModelRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.DeleteModelRequest other = + (com.google.cloud.retail.v2beta.DeleteModelRequest) 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.retail.v2beta.DeleteModelRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.DeleteModelRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.DeleteModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.DeleteModelRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.DeleteModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.DeleteModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.DeleteModelRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.DeleteModelRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.DeleteModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.DeleteModelRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.DeleteModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.DeleteModelRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2beta.DeleteModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for deleting a model.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.DeleteModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.DeleteModelRequest) + com.google.cloud.retail.v2beta.DeleteModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_DeleteModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_DeleteModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.DeleteModelRequest.class, + com.google.cloud.retail.v2beta.DeleteModelRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.DeleteModelRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_DeleteModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.DeleteModelRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.DeleteModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.DeleteModelRequest build() { + com.google.cloud.retail.v2beta.DeleteModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.DeleteModelRequest buildPartial() { + com.google.cloud.retail.v2beta.DeleteModelRequest result = + new com.google.cloud.retail.v2beta.DeleteModelRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.DeleteModelRequest) { + return mergeFrom((com.google.cloud.retail.v2beta.DeleteModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.DeleteModelRequest other) { + if (other == com.google.cloud.retail.v2beta.DeleteModelRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + 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(); + + 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 java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the
+     * [Model][google.cloud.retail.v2beta.Model] to delete. Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the
+     * [Model][google.cloud.retail.v2beta.Model] to delete. Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the
+     * [Model][google.cloud.retail.v2beta.Model] to delete. Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the
+     * [Model][google.cloud.retail.v2beta.Model] to delete. Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the
+     * [Model][google.cloud.retail.v2beta.Model] to delete. Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.DeleteModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.DeleteModelRequest) + private static final com.google.cloud.retail.v2beta.DeleteModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.DeleteModelRequest(); + } + + public static com.google.cloud.retail.v2beta.DeleteModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.DeleteModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteModelRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteModelRequestOrBuilder.java new file mode 100644 index 00000000..669ae1b8 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteModelRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +public interface DeleteModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.DeleteModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the
+   * [Model][google.cloud.retail.v2beta.Model] to delete. Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the
+   * [Model][google.cloud.retail.v2beta.Model] to delete. Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteProductRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteProductRequest.java index 3634a42b..0592e4b6 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteProductRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteProductRequest.java @@ -54,52 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_DeleteProductRequest_descriptor; @@ -219,7 +173,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -231,7 +185,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -248,7 +202,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.DeleteProductRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -261,7 +215,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -392,17 +346,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.DeleteProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -492,7 +439,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.DeleteProductRequest oth name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -507,18 +454,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.DeleteProductRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.DeleteProductRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -755,7 +721,18 @@ public DeleteProductRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteProductRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteServingConfigRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteServingConfigRequest.java index 1f7d041f..93196feb 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteServingConfigRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteServingConfigRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeleteServingConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ServingConfigServiceProto .internal_static_google_cloud_retail_v2beta_DeleteServingConfigRequest_descriptor; @@ -120,7 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The resource name of the ServingConfig to delete. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
    * 
* * @@ -146,7 +100,7 @@ public java.lang.String getName() { * *
    * Required. The resource name of the ServingConfig to delete. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
    * 
* * @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.DeleteServingConfigRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.DeleteServingConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -457,7 +404,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.DeleteServingConfigReque name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -472,18 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.DeleteServingConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.DeleteServingConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -493,7 +459,7 @@ public Builder mergeFrom( * *
      * Required. The resource name of the ServingConfig to delete. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -518,7 +484,7 @@ public java.lang.String getName() { * *
      * Required. The resource name of the ServingConfig to delete. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -543,7 +509,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. The resource name of the ServingConfig to delete. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -567,7 +533,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. The resource name of the ServingConfig to delete. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -587,7 +553,7 @@ public Builder clearName() { * *
      * Required. The resource name of the ServingConfig to delete. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -640,7 +606,18 @@ public DeleteServingConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeleteServingConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteServingConfigRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteServingConfigRequestOrBuilder.java index 6b9c0d61..8539c963 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteServingConfigRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/DeleteServingConfigRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface DeleteServingConfigRequestOrBuilder * *
    * Required. The resource name of the ServingConfig to delete. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
    * 
* * @@ -43,7 +43,7 @@ public interface DeleteServingConfigRequestOrBuilder * *
    * Required. The resource name of the ServingConfig to delete. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
    * 
* * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportConfigProto.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportConfigProto.java index 1e8def07..e8303269 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportConfigProto.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportConfigProto.java @@ -62,37 +62,41 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { java.lang.String[] descriptorData = { "\n.google/cloud/retail/v2beta/export_conf" + "ig.proto\022\032google.cloud.retail.v2beta\032\037go" - + "ogle/protobuf/timestamp.proto\032\027google/rp" - + "c/status.proto\"9\n\022ExportErrorsConfig\022\024\n\n" - + "gcs_prefix\030\001 \001(\tH\000B\r\n\013destination\"r\n\016Exp" - + "ortMetadata\022/\n\013create_time\030\001 \001(\0132\032.googl" - + "e.protobuf.Timestamp\022/\n\013update_time\030\002 \001(" - + "\0132\032.google.protobuf.Timestamp\"\313\001\n\026Export" - + "ProductsResponse\022)\n\rerror_samples\030\001 \003(\0132" - + "\022.google.rpc.Status\022E\n\rerrors_config\030\002 \001" - + "(\0132..google.cloud.retail.v2beta.ExportEr" - + "rorsConfig\022?\n\routput_result\030\003 \001(\0132(.goog" - + "le.cloud.retail.v2beta.OutputResult\"\315\001\n\030" - + "ExportUserEventsResponse\022)\n\rerror_sample" - + "s\030\001 \003(\0132\022.google.rpc.Status\022E\n\rerrors_co" - + "nfig\030\002 \001(\0132..google.cloud.retail.v2beta." - + "ExportErrorsConfig\022?\n\routput_result\030\003 \001(" - + "\0132(.google.cloud.retail.v2beta.OutputRes" - + "ult\"Y\n\014OutputResult\022I\n\017bigquery_result\030\001" - + " \003(\01320.google.cloud.retail.v2beta.BigQue" - + "ryOutputResult\"<\n\024BigQueryOutputResult\022\022" - + "\n\ndataset_id\030\001 \001(\t\022\020\n\010table_id\030\002 \001(\tB\332\001\n" - + "\036com.google.cloud.retail.v2betaB\021ExportC" - + "onfigProtoP\001Z@google.golang.org/genproto" - + "/googleapis/cloud/retail/v2beta;retail\242\002" - + "\006RETAIL\252\002\032Google.Cloud.Retail.V2Beta\312\002\032G" - + "oogle\\Cloud\\Retail\\V2beta\352\002\035Google::Clou" - + "d::Retail::V2betab\006proto3" + + "ogle/api/field_behavior.proto\032\031google/ap" + + "i/resource.proto\032\037google/protobuf/timest" + + "amp.proto\032\027google/rpc/status.proto\"9\n\022Ex" + + "portErrorsConfig\022\024\n\ngcs_prefix\030\001 \001(\tH\000B\r" + + "\n\013destination\"r\n\016ExportMetadata\022/\n\013creat" + + "e_time\030\001 \001(\0132\032.google.protobuf.Timestamp" + + "\022/\n\013update_time\030\002 \001(\0132\032.google.protobuf." + + "Timestamp\"\313\001\n\026ExportProductsResponse\022)\n\r" + + "error_samples\030\001 \003(\0132\022.google.rpc.Status\022" + + "E\n\rerrors_config\030\002 \001(\0132..google.cloud.re" + + "tail.v2beta.ExportErrorsConfig\022?\n\routput" + + "_result\030\003 \001(\0132(.google.cloud.retail.v2be" + + "ta.OutputResult\"\315\001\n\030ExportUserEventsResp" + + "onse\022)\n\rerror_samples\030\001 \003(\0132\022.google.rpc" + + ".Status\022E\n\rerrors_config\030\002 \001(\0132..google." + + "cloud.retail.v2beta.ExportErrorsConfig\022?" + + "\n\routput_result\030\003 \001(\0132(.google.cloud.ret" + + "ail.v2beta.OutputResult\"Y\n\014OutputResult\022" + + "I\n\017bigquery_result\030\001 \003(\01320.google.cloud." + + "retail.v2beta.BigQueryOutputResult\"<\n\024Bi" + + "gQueryOutputResult\022\022\n\ndataset_id\030\001 \001(\t\022\020" + + "\n\010table_id\030\002 \001(\tB\332\001\n\036com.google.cloud.re" + + "tail.v2betaB\021ExportConfigProtoP\001Z@google" + + ".golang.org/genproto/googleapis/cloud/re" + + "tail/v2beta;retail\242\002\006RETAIL\252\002\032Google.Clo" + + "ud.Retail.V2Beta\312\002\032Google\\Cloud\\Retail\\V" + + "2beta\352\002\035Google::Cloud::Retail::V2betab\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( descriptorData, new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), com.google.rpc.StatusProto.getDescriptor(), }); @@ -144,6 +148,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "DatasetId", "TableId", }); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); com.google.rpc.StatusProto.getDescriptor(); } diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportErrorsConfig.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportErrorsConfig.java index d2d10887..a5a8c52f 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportErrorsConfig.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportErrorsConfig.java @@ -50,52 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExportErrorsConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - destinationCase_ = 1; - destination_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ExportConfigProto .internal_static_google_cloud_retail_v2beta_ExportErrorsConfig_descriptor; @@ -251,7 +205,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (destinationCase_ == 1) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destination_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -263,7 +217,7 @@ public int getSerializedSize() { if (destinationCase_ == 1) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destination_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -287,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -306,7 +260,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -435,17 +389,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ExportErrorsConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -547,7 +494,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ExportErrorsConfig other break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -562,18 +509,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ExportErrorsConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 1; + destination_ = s; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2beta.ExportErrorsConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -775,7 +742,18 @@ public ExportErrorsConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportErrorsConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportMetadata.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportMetadata.java index 16939f5d..41c972c7 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportMetadata.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportMetadata.java @@ -22,7 +22,7 @@ * * *
- * Metadata related to the progress of the Export operation. This will be
+ * Metadata related to the progress of the Export operation. This is
  * returned by the google.longrunning.Operation.metadata field.
  * 
* @@ -51,75 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExportMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ExportConfigProto .internal_static_google_cloud_retail_v2beta_ExportMetadata_descriptor; @@ -250,7 +181,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateTime_ != null) { output.writeMessage(2, getUpdateTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -265,7 +196,7 @@ public int getSerializedSize() { if (updateTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -289,7 +220,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateTime()) { if (!getUpdateTime().equals(other.getUpdateTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -308,7 +239,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getUpdateTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -412,7 +343,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Metadata related to the progress of the Export operation. This will be
+   * Metadata related to the progress of the Export operation. This is
    * returned by the google.longrunning.Operation.metadata field.
    * 
* @@ -438,17 +369,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ExportMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -558,7 +482,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ExportMetadata other) { if (other.hasUpdateTime()) { mergeUpdateTime(other.getUpdateTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -573,17 +497,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ExportMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.ExportMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -994,7 +944,18 @@ public ExportMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportProductsResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportProductsResponse.java index 879f7544..09ee69f8 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportProductsResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportProductsResponse.java @@ -54,92 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExportProductsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - errorSamples_.add( - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); - break; - } - case 18: - { - com.google.cloud.retail.v2beta.ExportErrorsConfig.Builder subBuilder = null; - if (errorsConfig_ != null) { - subBuilder = errorsConfig_.toBuilder(); - } - errorsConfig_ = - input.readMessage( - com.google.cloud.retail.v2beta.ExportErrorsConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(errorsConfig_); - errorsConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.retail.v2beta.OutputResult.Builder subBuilder = null; - if (outputResult_ != null) { - subBuilder = outputResult_.toBuilder(); - } - outputResult_ = - input.readMessage( - com.google.cloud.retail.v2beta.OutputResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputResult_); - outputResult_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = java.util.Collections.unmodifiableList(errorSamples_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ExportConfigProto .internal_static_google_cloud_retail_v2beta_ExportProductsResponse_descriptor; @@ -342,7 +256,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (outputResult_ != null) { output.writeMessage(3, getOutputResult()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -360,7 +274,7 @@ public int getSerializedSize() { if (outputResult_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOutputResult()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -385,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasOutputResult()) { if (!getOutputResult().equals(other.getOutputResult())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -408,7 +322,7 @@ public int hashCode() { hash = (37 * hash) + OUTPUT_RESULT_FIELD_NUMBER; hash = (53 * hash) + getOutputResult().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -540,19 +454,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ExportProductsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getErrorSamplesFieldBuilder(); - } } @java.lang.Override @@ -560,10 +465,11 @@ public Builder clear() { super.clear(); if (errorSamplesBuilder_ == null) { errorSamples_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + errorSamples_ = null; errorSamplesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (errorsConfigBuilder_ == null) { errorsConfig_ = null; } else { @@ -706,7 +612,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ExportProductsResponse o if (other.hasOutputResult()) { mergeOutputResult(other.getOutputResult()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,18 +627,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ExportProductsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(m); + } else { + errorSamplesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage(getErrorsConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getOutputResultFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.ExportProductsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1480,7 +1423,18 @@ public ExportProductsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportProductsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportUserEventsResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportUserEventsResponse.java index 2f3bfcd9..1dc27755 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportUserEventsResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ExportUserEventsResponse.java @@ -54,92 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ExportUserEventsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - errorSamples_.add( - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); - break; - } - case 18: - { - com.google.cloud.retail.v2beta.ExportErrorsConfig.Builder subBuilder = null; - if (errorsConfig_ != null) { - subBuilder = errorsConfig_.toBuilder(); - } - errorsConfig_ = - input.readMessage( - com.google.cloud.retail.v2beta.ExportErrorsConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(errorsConfig_); - errorsConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.retail.v2beta.OutputResult.Builder subBuilder = null; - if (outputResult_ != null) { - subBuilder = outputResult_.toBuilder(); - } - outputResult_ = - input.readMessage( - com.google.cloud.retail.v2beta.OutputResult.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(outputResult_); - outputResult_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = java.util.Collections.unmodifiableList(errorSamples_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ExportConfigProto .internal_static_google_cloud_retail_v2beta_ExportUserEventsResponse_descriptor; @@ -342,7 +256,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (outputResult_ != null) { output.writeMessage(3, getOutputResult()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -360,7 +274,7 @@ public int getSerializedSize() { if (outputResult_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOutputResult()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -385,7 +299,7 @@ public boolean equals(final java.lang.Object obj) { if (hasOutputResult()) { if (!getOutputResult().equals(other.getOutputResult())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -408,7 +322,7 @@ public int hashCode() { hash = (37 * hash) + OUTPUT_RESULT_FIELD_NUMBER; hash = (53 * hash) + getOutputResult().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -540,19 +454,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ExportUserEventsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getErrorSamplesFieldBuilder(); - } } @java.lang.Override @@ -560,10 +465,11 @@ public Builder clear() { super.clear(); if (errorSamplesBuilder_ == null) { errorSamples_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + errorSamples_ = null; errorSamplesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (errorsConfigBuilder_ == null) { errorsConfig_ = null; } else { @@ -706,7 +612,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ExportUserEventsResponse if (other.hasOutputResult()) { mergeOutputResult(other.getOutputResult()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -721,18 +627,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ExportUserEventsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(m); + } else { + errorSamplesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage(getErrorsConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getOutputResultFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.ExportUserEventsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1480,7 +1423,18 @@ public ExportUserEventsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ExportUserEventsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/FulfillmentInfo.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/FulfillmentInfo.java index 4f922744..3f72f221 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/FulfillmentInfo.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/FulfillmentInfo.java @@ -54,66 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FulfillmentInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - type_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - placeIds_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = placeIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_FulfillmentInfo_descriptor; @@ -319,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < placeIds_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, placeIds_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -339,7 +279,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getPlaceIdsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -357,7 +297,7 @@ public boolean equals(final java.lang.Object obj) { if (!getType().equals(other.getType())) return false; if (!getPlaceIdsList().equals(other.getPlaceIdsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -374,7 +314,7 @@ public int hashCode() { hash = (37 * hash) + PLACE_IDS_FIELD_NUMBER; hash = (53 * hash) + getPlaceIdsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -504,17 +444,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.FulfillmentInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -621,7 +554,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.FulfillmentInfo other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -636,17 +569,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.FulfillmentInfo parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + type_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePlaceIdsIsMutable(); + placeIds_.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) { - parsedMessage = (com.google.cloud.retail.v2beta.FulfillmentInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1100,7 +1060,18 @@ public FulfillmentInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FulfillmentInfo(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GcsSource.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GcsSource.java index a4941047..48109285 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GcsSource.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GcsSource.java @@ -23,7 +23,6 @@ * *
  * Google Cloud Storage location for input content.
- * format.
  * 
* * Protobuf type {@code google.cloud.retail.v2beta.GcsSource} @@ -54,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GcsSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - inputUris_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - inputUris_.add(s); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - dataSchema_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - inputUris_ = inputUris_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ImportConfigProto .internal_static_google_cloud_retail_v2beta_GcsSource_descriptor; @@ -237,10 +176,10 @@ public com.google.protobuf.ByteString getInputUrisBytes(int index) { * * `user_event_ga360`: Using * https://support.google.com/analytics/answer/3437719. * Supported values for control imports: - * * 'control' (default): One JSON + * * `control` (default): One JSON * [Control][google.cloud.retail.v2beta.Control] per line. * Supported values for catalog attribute imports: - * * 'catalog_attribute' (default): One CSV + * * `catalog_attribute` (default): One CSV * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] per line. * * @@ -277,10 +216,10 @@ public java.lang.String getDataSchema() { * * `user_event_ga360`: Using * https://support.google.com/analytics/answer/3437719. * Supported values for control imports: - * * 'control' (default): One JSON + * * `control` (default): One JSON * [Control][google.cloud.retail.v2beta.Control] per line. * Supported values for catalog attribute imports: - * * 'catalog_attribute' (default): One CSV + * * `catalog_attribute` (default): One CSV * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] per line. * * @@ -321,7 +260,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataSchema_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, dataSchema_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -341,7 +280,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(dataSchema_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, dataSchema_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -358,7 +297,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInputUrisList().equals(other.getInputUrisList())) return false; if (!getDataSchema().equals(other.getDataSchema())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -375,7 +314,7 @@ public int hashCode() { } hash = (37 * hash) + DATA_SCHEMA_FIELD_NUMBER; hash = (53 * hash) + getDataSchema().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -480,7 +419,6 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * *
    * Google Cloud Storage location for input content.
-   * format.
    * 
* * Protobuf type {@code google.cloud.retail.v2beta.GcsSource} @@ -505,17 +443,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.GcsSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -622,7 +553,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.GcsSource other) { dataSchema_ = other.dataSchema_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -637,17 +568,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.GcsSource parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureInputUrisIsMutable(); + inputUris_.add(s); + break; + } // case 10 + case 18: + { + dataSchema_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.GcsSource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -902,10 +860,10 @@ public Builder addInputUrisBytes(com.google.protobuf.ByteString value) { * * `user_event_ga360`: Using * https://support.google.com/analytics/answer/3437719. * Supported values for control imports: - * * 'control' (default): One JSON + * * `control` (default): One JSON * [Control][google.cloud.retail.v2beta.Control] per line. * Supported values for catalog attribute imports: - * * 'catalog_attribute' (default): One CSV + * * `catalog_attribute` (default): One CSV * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] per line. * * @@ -941,10 +899,10 @@ public java.lang.String getDataSchema() { * * `user_event_ga360`: Using * https://support.google.com/analytics/answer/3437719. * Supported values for control imports: - * * 'control' (default): One JSON + * * `control` (default): One JSON * [Control][google.cloud.retail.v2beta.Control] per line. * Supported values for catalog attribute imports: - * * 'catalog_attribute' (default): One CSV + * * `catalog_attribute` (default): One CSV * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] per line. * * @@ -980,10 +938,10 @@ public com.google.protobuf.ByteString getDataSchemaBytes() { * * `user_event_ga360`: Using * https://support.google.com/analytics/answer/3437719. * Supported values for control imports: - * * 'control' (default): One JSON + * * `control` (default): One JSON * [Control][google.cloud.retail.v2beta.Control] per line. * Supported values for catalog attribute imports: - * * 'catalog_attribute' (default): One CSV + * * `catalog_attribute` (default): One CSV * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] per line. * * @@ -1018,10 +976,10 @@ public Builder setDataSchema(java.lang.String value) { * * `user_event_ga360`: Using * https://support.google.com/analytics/answer/3437719. * Supported values for control imports: - * * 'control' (default): One JSON + * * `control` (default): One JSON * [Control][google.cloud.retail.v2beta.Control] per line. * Supported values for catalog attribute imports: - * * 'catalog_attribute' (default): One CSV + * * `catalog_attribute` (default): One CSV * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] per line. * * @@ -1052,10 +1010,10 @@ public Builder clearDataSchema() { * * `user_event_ga360`: Using * https://support.google.com/analytics/answer/3437719. * Supported values for control imports: - * * 'control' (default): One JSON + * * `control` (default): One JSON * [Control][google.cloud.retail.v2beta.Control] per line. * Supported values for catalog attribute imports: - * * 'catalog_attribute' (default): One CSV + * * `catalog_attribute` (default): One CSV * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] per line. * * @@ -1107,7 +1065,18 @@ public GcsSource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GcsSource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GcsSourceOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GcsSourceOrBuilder.java index 7b16c116..104df643 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GcsSourceOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GcsSourceOrBuilder.java @@ -119,10 +119,10 @@ public interface GcsSourceOrBuilder * * `user_event_ga360`: Using * https://support.google.com/analytics/answer/3437719. * Supported values for control imports: - * * 'control' (default): One JSON + * * `control` (default): One JSON * [Control][google.cloud.retail.v2beta.Control] per line. * Supported values for catalog attribute imports: - * * 'catalog_attribute' (default): One CSV + * * `catalog_attribute` (default): One CSV * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] per line. * * @@ -148,10 +148,10 @@ public interface GcsSourceOrBuilder * * `user_event_ga360`: Using * https://support.google.com/analytics/answer/3437719. * Supported values for control imports: - * * 'control' (default): One JSON + * * `control` (default): One JSON * [Control][google.cloud.retail.v2beta.Control] per line. * Supported values for catalog attribute imports: - * * 'catalog_attribute' (default): One CSV + * * `catalog_attribute` (default): One CSV * [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] per line. * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetAttributesConfigRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetAttributesConfigRequest.java index 72ccaf6e..8e3dcbd6 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetAttributesConfigRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetAttributesConfigRequest.java @@ -54,52 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetAttributesConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CatalogServiceProto .internal_static_google_cloud_retail_v2beta_GetAttributesConfigRequest_descriptor; @@ -187,7 +141,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -199,7 +153,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -216,7 +170,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.GetAttributesConfigRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -229,7 +183,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -361,17 +315,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.GetAttributesConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -461,7 +408,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.GetAttributesConfigReque name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -476,18 +423,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.GetAttributesConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.GetAttributesConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -644,7 +610,18 @@ public GetAttributesConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetAttributesConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetCompletionConfigRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetCompletionConfigRequest.java index fe43495a..57239e16 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetCompletionConfigRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetCompletionConfigRequest.java @@ -54,52 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetCompletionConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CatalogServiceProto .internal_static_google_cloud_retail_v2beta_GetCompletionConfigRequest_descriptor; @@ -122,7 +76,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. Full CompletionConfig resource name. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`
    * 
* * @@ -148,7 +102,7 @@ public java.lang.String getName() { * *
    * Required. Full CompletionConfig resource name. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`
    * 
* * @@ -187,7 +141,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -199,7 +153,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -216,7 +170,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.GetCompletionConfigRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -229,7 +183,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -361,17 +315,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.GetCompletionConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -461,7 +408,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.GetCompletionConfigReque name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -476,18 +423,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.GetCompletionConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.GetCompletionConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -497,7 +463,7 @@ public Builder mergeFrom( * *
      * Required. Full CompletionConfig resource name. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`
      * 
* * @@ -522,7 +488,7 @@ public java.lang.String getName() { * *
      * Required. Full CompletionConfig resource name. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`
      * 
* * @@ -547,7 +513,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. Full CompletionConfig resource name. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`
      * 
* * @@ -571,7 +537,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. Full CompletionConfig resource name. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`
      * 
* * @@ -591,7 +557,7 @@ public Builder clearName() { * *
      * Required. Full CompletionConfig resource name. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`
      * 
* * @@ -644,7 +610,18 @@ public GetCompletionConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetCompletionConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetCompletionConfigRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetCompletionConfigRequestOrBuilder.java index 5beb82f4..8506df18 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetCompletionConfigRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetCompletionConfigRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface GetCompletionConfigRequestOrBuilder * *
    * Required. Full CompletionConfig resource name. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`
    * 
* * @@ -43,7 +43,7 @@ public interface GetCompletionConfigRequestOrBuilder * *
    * Required. Full CompletionConfig resource name. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`
    * 
* * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetControlRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetControlRequest.java index 7737aee3..5e562800 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetControlRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetControlRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetControlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ControlServiceProto .internal_static_google_cloud_retail_v2beta_GetControlRequest_descriptor; @@ -119,7 +73,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The resource name of the Control to delete. Format:
+   * Required. The resource name of the Control to get. Format:
    * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
    * 
* @@ -145,7 +99,7 @@ public java.lang.String getName() { * * *
-   * Required. The resource name of the Control to delete. Format:
+   * Required. The resource name of the Control to get. Format:
    * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
    * 
* @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.GetControlRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -356,17 +310,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.GetControlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -456,7 +403,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.GetControlRequest other) name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -471,17 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.GetControlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.GetControlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -490,7 +457,7 @@ public Builder mergeFrom( * * *
-     * Required. The resource name of the Control to delete. Format:
+     * Required. The resource name of the Control to get. Format:
      * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
      * 
* @@ -515,7 +482,7 @@ public java.lang.String getName() { * * *
-     * Required. The resource name of the Control to delete. Format:
+     * Required. The resource name of the Control to get. Format:
      * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
      * 
* @@ -540,7 +507,7 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-     * Required. The resource name of the Control to delete. Format:
+     * Required. The resource name of the Control to get. Format:
      * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
      * 
* @@ -564,7 +531,7 @@ public Builder setName(java.lang.String value) { * * *
-     * Required. The resource name of the Control to delete. Format:
+     * Required. The resource name of the Control to get. Format:
      * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
      * 
* @@ -584,7 +551,7 @@ public Builder clearName() { * * *
-     * Required. The resource name of the Control to delete. Format:
+     * Required. The resource name of the Control to get. Format:
      * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
      * 
* @@ -638,7 +605,18 @@ public GetControlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetControlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetControlRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetControlRequestOrBuilder.java index 7b04cb9e..01a10c8d 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetControlRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetControlRequestOrBuilder.java @@ -27,7 +27,7 @@ public interface GetControlRequestOrBuilder * * *
-   * Required. The resource name of the Control to delete. Format:
+   * Required. The resource name of the Control to get. Format:
    * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
    * 
* @@ -42,7 +42,7 @@ public interface GetControlRequestOrBuilder * * *
-   * Required. The resource name of the Control to delete. Format:
+   * Required. The resource name of the Control to get. Format:
    * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
    * 
* diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetDefaultBranchRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetDefaultBranchRequest.java index ac0cf44b..8549ccfb 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetDefaultBranchRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetDefaultBranchRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetDefaultBranchRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - catalog_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CatalogServiceProto .internal_static_google_cloud_retail_v2beta_GetDefaultBranchRequest_descriptor; @@ -181,7 +135,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalog_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, catalog_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -193,7 +147,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(catalog_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, catalog_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -210,7 +164,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.GetDefaultBranchRequest) obj; if (!getCatalog().equals(other.getCatalog())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -223,7 +177,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + CATALOG_FIELD_NUMBER; hash = (53 * hash) + getCatalog().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -353,17 +307,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.GetDefaultBranchRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -453,7 +400,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.GetDefaultBranchRequest catalog_ = other.catalog_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -468,18 +415,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.GetDefaultBranchRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + catalog_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.GetDefaultBranchRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -626,7 +592,18 @@ public GetDefaultBranchRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetDefaultBranchRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetDefaultBranchResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetDefaultBranchResponse.java index cc10ce32..bb73237d 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetDefaultBranchResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetDefaultBranchResponse.java @@ -54,74 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetDefaultBranchResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - branch_ = s; - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (setTime_ != null) { - subBuilder = setTime_.toBuilder(); - } - setTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(setTime_); - setTime_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - note_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CatalogServiceProto .internal_static_google_cloud_retail_v2beta_GetDefaultBranchResponse_descriptor; @@ -308,7 +240,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(note_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, note_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -326,7 +258,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(note_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, note_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -348,7 +280,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSetTime().equals(other.getSetTime())) return false; } if (!getNote().equals(other.getNote())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -367,7 +299,7 @@ public int hashCode() { } hash = (37 * hash) + NOTE_FIELD_NUMBER; hash = (53 * hash) + getNote().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -498,17 +430,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.GetDefaultBranchResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -619,7 +544,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.GetDefaultBranchResponse note_ = other.note_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -634,18 +559,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.GetDefaultBranchResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + branch_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getSetTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + note_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.GetDefaultBranchResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1082,7 +1038,18 @@ public GetDefaultBranchResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetDefaultBranchResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetProductRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetProductRequest.java index 004e78cd..d38b51c1 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetProductRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetProductRequest.java @@ -54,52 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_GetProductRequest_descriptor; @@ -199,7 +153,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -211,7 +165,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -228,7 +182,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.GetProductRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -241,7 +195,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -372,17 +326,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.GetProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -472,7 +419,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.GetProductRequest other) name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -487,17 +434,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.GetProductRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.GetProductRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -684,7 +651,18 @@ public GetProductRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetProductRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetServingConfigRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetServingConfigRequest.java index a47c1901..06981bfc 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetServingConfigRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetServingConfigRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetServingConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ServingConfigServiceProto .internal_static_google_cloud_retail_v2beta_GetServingConfigRequest_descriptor; @@ -120,7 +74,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The resource name of the ServingConfig to get. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
    * 
* * @@ -146,7 +100,7 @@ public java.lang.String getName() { * *
    * Required. The resource name of the ServingConfig to get. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
    * 
* * @@ -185,7 +139,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -197,7 +151,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.GetServingConfigRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -227,7 +181,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + NAME_FIELD_NUMBER; hash = (53 * hash) + getName().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -357,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.GetServingConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -457,7 +404,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.GetServingConfigRequest name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -472,18 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.GetServingConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.GetServingConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -493,7 +459,7 @@ public Builder mergeFrom( * *
      * Required. The resource name of the ServingConfig to get. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -518,7 +484,7 @@ public java.lang.String getName() { * *
      * Required. The resource name of the ServingConfig to get. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -543,7 +509,7 @@ public com.google.protobuf.ByteString getNameBytes() { * *
      * Required. The resource name of the ServingConfig to get. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -567,7 +533,7 @@ public Builder setName(java.lang.String value) { * *
      * Required. The resource name of the ServingConfig to get. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -587,7 +553,7 @@ public Builder clearName() { * *
      * Required. The resource name of the ServingConfig to get. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -640,7 +606,18 @@ public GetServingConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetServingConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetServingConfigRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetServingConfigRequestOrBuilder.java index 4345869c..cee7bffd 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetServingConfigRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/GetServingConfigRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface GetServingConfigRequestOrBuilder * *
    * Required. The resource name of the ServingConfig to get. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
    * 
* * @@ -43,7 +43,7 @@ public interface GetServingConfigRequestOrBuilder * *
    * Required. The resource name of the ServingConfig to get. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
    * 
* * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Image.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Image.java index 92f85002..eb3ea12e 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Image.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Image.java @@ -55,62 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Image( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - uri_ = s; - break; - } - case 16: - { - height_ = input.readInt32(); - break; - } - case 24: - { - width_ = input.readInt32(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_Image_descriptor; @@ -248,7 +192,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (width_ != 0) { output.writeInt32(3, width_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -266,7 +210,7 @@ public int getSerializedSize() { if (width_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, width_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -284,7 +228,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUri().equals(other.getUri())) return false; if (getHeight() != other.getHeight()) return false; if (getWidth() != other.getWidth()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -301,7 +245,7 @@ public int hashCode() { hash = (53 * hash) + getHeight(); hash = (37 * hash) + WIDTH_FIELD_NUMBER; hash = (53 * hash) + getWidth(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -432,17 +376,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.Image.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -542,7 +479,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Image other) { if (other.getWidth() != 0) { setWidth(other.getWidth()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -557,17 +494,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Image parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + uri_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + height_ = input.readInt32(); + + break; + } // case 16 + case 24: + { + width_ = input.readInt32(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.Image) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -850,7 +819,18 @@ public Image parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Image(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportCompletionDataRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportCompletionDataRequest.java index 4aa68aa6..01968c55 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportCompletionDataRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportCompletionDataRequest.java @@ -53,76 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportCompletionDataRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2beta.CompletionDataInputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = - input.readMessage( - com.google.cloud.retail.v2beta.CompletionDataInputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - notificationPubsubTopic_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ImportConfigProto .internal_static_google_cloud_retail_v2beta_ImportCompletionDataRequest_descriptor; @@ -255,8 +185,8 @@ public com.google.cloud.retail.v2beta.CompletionDataInputConfig getInputConfig() * *
    * Pub/Sub topic for receiving notification. If this field is set,
-   * when the import is finished, a notification will be sent to
-   * specified Pub/Sub topic. The message data will be JSON string of a
+   * when the import is finished, a notification is sent to
+   * specified Pub/Sub topic. The message data is JSON string of a
    * [Operation][google.longrunning.Operation].
    * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    * 
@@ -282,8 +212,8 @@ public java.lang.String getNotificationPubsubTopic() { * *
    * Pub/Sub topic for receiving notification. If this field is set,
-   * when the import is finished, a notification will be sent to
-   * specified Pub/Sub topic. The message data will be JSON string of a
+   * when the import is finished, a notification is sent to
+   * specified Pub/Sub topic. The message data is JSON string of a
    * [Operation][google.longrunning.Operation].
    * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    * 
@@ -328,7 +258,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationPubsubTopic_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, notificationPubsubTopic_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -346,7 +276,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationPubsubTopic_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, notificationPubsubTopic_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -368,7 +298,7 @@ public boolean equals(final java.lang.Object obj) { if (!getInputConfig().equals(other.getInputConfig())) return false; } if (!getNotificationPubsubTopic().equals(other.getNotificationPubsubTopic())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -387,7 +317,7 @@ public int hashCode() { } hash = (37 * hash) + NOTIFICATION_PUBSUB_TOPIC_FIELD_NUMBER; hash = (53 * hash) + getNotificationPubsubTopic().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -517,17 +447,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ImportCompletionDataRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -638,7 +561,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ImportCompletionDataRequ notificationPubsubTopic_ = other.notificationPubsubTopic_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -653,18 +576,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ImportCompletionDataRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getInputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + notificationPubsubTopic_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.ImportCompletionDataRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1002,8 +956,8 @@ public Builder clearInputConfig() { * *
      * Pub/Sub topic for receiving notification. If this field is set,
-     * when the import is finished, a notification will be sent to
-     * specified Pub/Sub topic. The message data will be JSON string of a
+     * when the import is finished, a notification is sent to
+     * specified Pub/Sub topic. The message data is JSON string of a
      * [Operation][google.longrunning.Operation].
      * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
      * 
@@ -1028,8 +982,8 @@ public java.lang.String getNotificationPubsubTopic() { * *
      * Pub/Sub topic for receiving notification. If this field is set,
-     * when the import is finished, a notification will be sent to
-     * specified Pub/Sub topic. The message data will be JSON string of a
+     * when the import is finished, a notification is sent to
+     * specified Pub/Sub topic. The message data is JSON string of a
      * [Operation][google.longrunning.Operation].
      * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
      * 
@@ -1054,8 +1008,8 @@ public com.google.protobuf.ByteString getNotificationPubsubTopicBytes() { * *
      * Pub/Sub topic for receiving notification. If this field is set,
-     * when the import is finished, a notification will be sent to
-     * specified Pub/Sub topic. The message data will be JSON string of a
+     * when the import is finished, a notification is sent to
+     * specified Pub/Sub topic. The message data is JSON string of a
      * [Operation][google.longrunning.Operation].
      * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
      * 
@@ -1079,8 +1033,8 @@ public Builder setNotificationPubsubTopic(java.lang.String value) { * *
      * Pub/Sub topic for receiving notification. If this field is set,
-     * when the import is finished, a notification will be sent to
-     * specified Pub/Sub topic. The message data will be JSON string of a
+     * when the import is finished, a notification is sent to
+     * specified Pub/Sub topic. The message data is JSON string of a
      * [Operation][google.longrunning.Operation].
      * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
      * 
@@ -1100,8 +1054,8 @@ public Builder clearNotificationPubsubTopic() { * *
      * Pub/Sub topic for receiving notification. If this field is set,
-     * when the import is finished, a notification will be sent to
-     * specified Pub/Sub topic. The message data will be JSON string of a
+     * when the import is finished, a notification is sent to
+     * specified Pub/Sub topic. The message data is JSON string of a
      * [Operation][google.longrunning.Operation].
      * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
      * 
@@ -1154,7 +1108,18 @@ public ImportCompletionDataRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportCompletionDataRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportCompletionDataRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportCompletionDataRequestOrBuilder.java index 4b00a5f0..7d79680d 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportCompletionDataRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportCompletionDataRequestOrBuilder.java @@ -100,8 +100,8 @@ public interface ImportCompletionDataRequestOrBuilder * *
    * Pub/Sub topic for receiving notification. If this field is set,
-   * when the import is finished, a notification will be sent to
-   * specified Pub/Sub topic. The message data will be JSON string of a
+   * when the import is finished, a notification is sent to
+   * specified Pub/Sub topic. The message data is JSON string of a
    * [Operation][google.longrunning.Operation].
    * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    * 
@@ -116,8 +116,8 @@ public interface ImportCompletionDataRequestOrBuilder * *
    * Pub/Sub topic for receiving notification. If this field is set,
-   * when the import is finished, a notification will be sent to
-   * specified Pub/Sub topic. The message data will be JSON string of a
+   * when the import is finished, a notification is sent to
+   * specified Pub/Sub topic. The message data is JSON string of a
    * [Operation][google.longrunning.Operation].
    * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    * 
diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportCompletionDataResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportCompletionDataResponse.java index ba2c7c2d..3294a1e9 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportCompletionDataResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportCompletionDataResponse.java @@ -55,59 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportCompletionDataResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - errorSamples_.add( - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = java.util.Collections.unmodifiableList(errorSamples_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ImportConfigProto .internal_static_google_cloud_retail_v2beta_ImportCompletionDataResponse_descriptor; @@ -208,7 +155,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < errorSamples_.size(); i++) { output.writeMessage(1, errorSamples_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -220,7 +167,7 @@ public int getSerializedSize() { for (int i = 0; i < errorSamples_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, errorSamples_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -237,7 +184,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.ImportCompletionDataResponse) obj; if (!getErrorSamplesList().equals(other.getErrorSamplesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -252,7 +199,7 @@ public int hashCode() { hash = (37 * hash) + ERROR_SAMPLES_FIELD_NUMBER; hash = (53 * hash) + getErrorSamplesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -385,19 +332,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ImportCompletionDataResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getErrorSamplesFieldBuilder(); - } } @java.lang.Override @@ -405,10 +343,11 @@ public Builder clear() { super.clear(); if (errorSamplesBuilder_ == null) { errorSamples_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + errorSamples_ = null; errorSamplesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -523,7 +462,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ImportCompletionDataResp } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -538,18 +477,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ImportCompletionDataResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(m); + } else { + errorSamplesBuilder_.addMessage(m); + } + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2beta.ImportCompletionDataResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -925,7 +889,18 @@ public ImportCompletionDataResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportCompletionDataResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportErrorsConfig.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportErrorsConfig.java index 9c8d93fe..021d783f 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportErrorsConfig.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportErrorsConfig.java @@ -50,52 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportErrorsConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - destinationCase_ = 1; - destination_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ImportConfigProto .internal_static_google_cloud_retail_v2beta_ImportErrorsConfig_descriptor; @@ -161,7 +115,7 @@ public DestinationCase getDestinationCase() { * *
    * Google Cloud Storage prefix for import errors. This must be an empty,
-   * existing Cloud Storage directory. Import errors will be written to
+   * existing Cloud Storage directory. Import errors are written to
    * sharded files in this directory, one per line, as a JSON-encoded
    * `google.rpc.Status` message.
    * 
@@ -178,7 +132,7 @@ public boolean hasGcsPrefix() { * *
    * Google Cloud Storage prefix for import errors. This must be an empty,
-   * existing Cloud Storage directory. Import errors will be written to
+   * existing Cloud Storage directory. Import errors are written to
    * sharded files in this directory, one per line, as a JSON-encoded
    * `google.rpc.Status` message.
    * 
@@ -208,7 +162,7 @@ public java.lang.String getGcsPrefix() { * *
    * Google Cloud Storage prefix for import errors. This must be an empty,
-   * existing Cloud Storage directory. Import errors will be written to
+   * existing Cloud Storage directory. Import errors are written to
    * sharded files in this directory, one per line, as a JSON-encoded
    * `google.rpc.Status` message.
    * 
@@ -251,7 +205,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (destinationCase_ == 1) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destination_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -263,7 +217,7 @@ public int getSerializedSize() { if (destinationCase_ == 1) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, destination_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -287,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -306,7 +260,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -435,17 +389,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ImportErrorsConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -547,7 +494,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ImportErrorsConfig other break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -562,18 +509,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ImportErrorsConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + destinationCase_ = 1; + destination_ = s; + break; + } // case 10 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2beta.ImportErrorsConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -596,7 +563,7 @@ public Builder clearDestination() { * *
      * Google Cloud Storage prefix for import errors. This must be an empty,
-     * existing Cloud Storage directory. Import errors will be written to
+     * existing Cloud Storage directory. Import errors are written to
      * sharded files in this directory, one per line, as a JSON-encoded
      * `google.rpc.Status` message.
      * 
@@ -614,7 +581,7 @@ public boolean hasGcsPrefix() { * *
      * Google Cloud Storage prefix for import errors. This must be an empty,
-     * existing Cloud Storage directory. Import errors will be written to
+     * existing Cloud Storage directory. Import errors are written to
      * sharded files in this directory, one per line, as a JSON-encoded
      * `google.rpc.Status` message.
      * 
@@ -645,7 +612,7 @@ public java.lang.String getGcsPrefix() { * *
      * Google Cloud Storage prefix for import errors. This must be an empty,
-     * existing Cloud Storage directory. Import errors will be written to
+     * existing Cloud Storage directory. Import errors are written to
      * sharded files in this directory, one per line, as a JSON-encoded
      * `google.rpc.Status` message.
      * 
@@ -676,7 +643,7 @@ public com.google.protobuf.ByteString getGcsPrefixBytes() { * *
      * Google Cloud Storage prefix for import errors. This must be an empty,
-     * existing Cloud Storage directory. Import errors will be written to
+     * existing Cloud Storage directory. Import errors are written to
      * sharded files in this directory, one per line, as a JSON-encoded
      * `google.rpc.Status` message.
      * 
@@ -700,7 +667,7 @@ public Builder setGcsPrefix(java.lang.String value) { * *
      * Google Cloud Storage prefix for import errors. This must be an empty,
-     * existing Cloud Storage directory. Import errors will be written to
+     * existing Cloud Storage directory. Import errors are written to
      * sharded files in this directory, one per line, as a JSON-encoded
      * `google.rpc.Status` message.
      * 
@@ -722,7 +689,7 @@ public Builder clearGcsPrefix() { * *
      * Google Cloud Storage prefix for import errors. This must be an empty,
-     * existing Cloud Storage directory. Import errors will be written to
+     * existing Cloud Storage directory. Import errors are written to
      * sharded files in this directory, one per line, as a JSON-encoded
      * `google.rpc.Status` message.
      * 
@@ -775,7 +742,18 @@ public ImportErrorsConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportErrorsConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportErrorsConfigOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportErrorsConfigOrBuilder.java index e202de4f..097174b4 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportErrorsConfigOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportErrorsConfigOrBuilder.java @@ -28,7 +28,7 @@ public interface ImportErrorsConfigOrBuilder * *
    * Google Cloud Storage prefix for import errors. This must be an empty,
-   * existing Cloud Storage directory. Import errors will be written to
+   * existing Cloud Storage directory. Import errors are written to
    * sharded files in this directory, one per line, as a JSON-encoded
    * `google.rpc.Status` message.
    * 
@@ -43,7 +43,7 @@ public interface ImportErrorsConfigOrBuilder * *
    * Google Cloud Storage prefix for import errors. This must be an empty,
-   * existing Cloud Storage directory. Import errors will be written to
+   * existing Cloud Storage directory. Import errors are written to
    * sharded files in this directory, one per line, as a JSON-encoded
    * `google.rpc.Status` message.
    * 
@@ -58,7 +58,7 @@ public interface ImportErrorsConfigOrBuilder * *
    * Google Cloud Storage prefix for import errors. This must be an empty,
-   * existing Cloud Storage directory. Import errors will be written to
+   * existing Cloud Storage directory. Import errors are written to
    * sharded files in this directory, one per line, as a JSON-encoded
    * `google.rpc.Status` message.
    * 
diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadata.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadata.java index b64a2977..c1267f7a 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadata.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadata.java @@ -22,7 +22,7 @@ * * *
- * Metadata related to the progress of the Import operation. This will be
+ * Metadata related to the progress of the Import operation. This is
  * returned by the google.longrunning.Operation.metadata field.
  * 
* @@ -54,99 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (createTime_ != null) { - subBuilder = createTime_.toBuilder(); - } - createTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(createTime_); - createTime_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (updateTime_ != null) { - subBuilder = updateTime_.toBuilder(); - } - updateTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateTime_); - updateTime_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - successCount_ = input.readInt64(); - break; - } - case 32: - { - failureCount_ = input.readInt64(); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - notificationPubsubTopic_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ImportConfigProto .internal_static_google_cloud_retail_v2beta_ImportMetadata_descriptor; @@ -305,7 +212,7 @@ public long getFailureCount() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=348 + * google/cloud/retail/v2beta/import_config.proto;l=330 * @return The requestId. */ @java.lang.Override @@ -331,7 +238,7 @@ public java.lang.String getRequestId() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=348 + * google/cloud/retail/v2beta/import_config.proto;l=330 * @return The bytes for requestId. */ @java.lang.Override @@ -355,8 +262,8 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * *
    * Pub/Sub topic for receiving notification. If this field is set,
-   * when the import is finished, a notification will be sent to
-   * specified Pub/Sub topic. The message data will be JSON string of a
+   * when the import is finished, a notification is sent to
+   * specified Pub/Sub topic. The message data is JSON string of a
    * [Operation][google.longrunning.Operation].
    * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    * 
@@ -382,8 +289,8 @@ public java.lang.String getNotificationPubsubTopic() { * *
    * Pub/Sub topic for receiving notification. If this field is set,
-   * when the import is finished, a notification will be sent to
-   * specified Pub/Sub topic. The message data will be JSON string of a
+   * when the import is finished, a notification is sent to
+   * specified Pub/Sub topic. The message data is JSON string of a
    * [Operation][google.longrunning.Operation].
    * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    * 
@@ -437,7 +344,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationPubsubTopic_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 6, notificationPubsubTopic_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -464,7 +371,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationPubsubTopic_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, notificationPubsubTopic_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -492,7 +399,7 @@ public boolean equals(final java.lang.Object obj) { if (getFailureCount() != other.getFailureCount()) return false; if (!getRequestId().equals(other.getRequestId())) return false; if (!getNotificationPubsubTopic().equals(other.getNotificationPubsubTopic())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -519,7 +426,7 @@ public int hashCode() { hash = (53 * hash) + getRequestId().hashCode(); hash = (37 * hash) + NOTIFICATION_PUBSUB_TOPIC_FIELD_NUMBER; hash = (53 * hash) + getNotificationPubsubTopic().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -623,7 +530,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Metadata related to the progress of the Import operation. This will be
+   * Metadata related to the progress of the Import operation. This is
    * returned by the google.longrunning.Operation.metadata field.
    * 
* @@ -649,17 +556,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ImportMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -795,7 +695,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ImportMetadata other) { notificationPubsubTopic_ = other.notificationPubsubTopic_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -810,17 +710,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ImportMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + successCount_ = input.readInt64(); + + break; + } // case 24 + case 32: + { + failureCount_ = input.readInt64(); + + break; + } // case 32 + case 42: + { + requestId_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + notificationPubsubTopic_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.ImportMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1314,7 +1264,7 @@ public Builder clearFailureCount() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=348 + * google/cloud/retail/v2beta/import_config.proto;l=330 * @return The requestId. */ @java.lang.Deprecated @@ -1339,7 +1289,7 @@ public java.lang.String getRequestId() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=348 + * google/cloud/retail/v2beta/import_config.proto;l=330 * @return The bytes for requestId. */ @java.lang.Deprecated @@ -1364,7 +1314,7 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=348 + * google/cloud/retail/v2beta/import_config.proto;l=330 * @param value The requestId to set. * @return This builder for chaining. */ @@ -1388,7 +1338,7 @@ public Builder setRequestId(java.lang.String value) { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=348 + * google/cloud/retail/v2beta/import_config.proto;l=330 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1408,7 +1358,7 @@ public Builder clearRequestId() { * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=348 + * google/cloud/retail/v2beta/import_config.proto;l=330 * @param value The bytes for requestId to set. * @return This builder for chaining. */ @@ -1430,8 +1380,8 @@ public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { * *
      * Pub/Sub topic for receiving notification. If this field is set,
-     * when the import is finished, a notification will be sent to
-     * specified Pub/Sub topic. The message data will be JSON string of a
+     * when the import is finished, a notification is sent to
+     * specified Pub/Sub topic. The message data is JSON string of a
      * [Operation][google.longrunning.Operation].
      * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
      * 
@@ -1456,8 +1406,8 @@ public java.lang.String getNotificationPubsubTopic() { * *
      * Pub/Sub topic for receiving notification. If this field is set,
-     * when the import is finished, a notification will be sent to
-     * specified Pub/Sub topic. The message data will be JSON string of a
+     * when the import is finished, a notification is sent to
+     * specified Pub/Sub topic. The message data is JSON string of a
      * [Operation][google.longrunning.Operation].
      * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
      * 
@@ -1482,8 +1432,8 @@ public com.google.protobuf.ByteString getNotificationPubsubTopicBytes() { * *
      * Pub/Sub topic for receiving notification. If this field is set,
-     * when the import is finished, a notification will be sent to
-     * specified Pub/Sub topic. The message data will be JSON string of a
+     * when the import is finished, a notification is sent to
+     * specified Pub/Sub topic. The message data is JSON string of a
      * [Operation][google.longrunning.Operation].
      * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
      * 
@@ -1507,8 +1457,8 @@ public Builder setNotificationPubsubTopic(java.lang.String value) { * *
      * Pub/Sub topic for receiving notification. If this field is set,
-     * when the import is finished, a notification will be sent to
-     * specified Pub/Sub topic. The message data will be JSON string of a
+     * when the import is finished, a notification is sent to
+     * specified Pub/Sub topic. The message data is JSON string of a
      * [Operation][google.longrunning.Operation].
      * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
      * 
@@ -1528,8 +1478,8 @@ public Builder clearNotificationPubsubTopic() { * *
      * Pub/Sub topic for receiving notification. If this field is set,
-     * when the import is finished, a notification will be sent to
-     * specified Pub/Sub topic. The message data will be JSON string of a
+     * when the import is finished, a notification is sent to
+     * specified Pub/Sub topic. The message data is JSON string of a
      * [Operation][google.longrunning.Operation].
      * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
      * 
@@ -1582,7 +1532,18 @@ public ImportMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadataOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadataOrBuilder.java index 81590ce9..0ffba887 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadataOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportMetadataOrBuilder.java @@ -132,7 +132,7 @@ public interface ImportMetadataOrBuilder * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=348 + * google/cloud/retail/v2beta/import_config.proto;l=330 * @return The requestId. */ @java.lang.Deprecated @@ -147,7 +147,7 @@ public interface ImportMetadataOrBuilder * string request_id = 5 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportMetadata.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=348 + * google/cloud/retail/v2beta/import_config.proto;l=330 * @return The bytes for requestId. */ @java.lang.Deprecated @@ -158,8 +158,8 @@ public interface ImportMetadataOrBuilder * *
    * Pub/Sub topic for receiving notification. If this field is set,
-   * when the import is finished, a notification will be sent to
-   * specified Pub/Sub topic. The message data will be JSON string of a
+   * when the import is finished, a notification is sent to
+   * specified Pub/Sub topic. The message data is JSON string of a
    * [Operation][google.longrunning.Operation].
    * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    * 
@@ -174,8 +174,8 @@ public interface ImportMetadataOrBuilder * *
    * Pub/Sub topic for receiving notification. If this field is set,
-   * when the import is finished, a notification will be sent to
-   * specified Pub/Sub topic. The message data will be JSON string of a
+   * when the import is finished, a notification is sent to
+   * specified Pub/Sub topic. The message data is JSON string of a
    * [Operation][google.longrunning.Operation].
    * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
    * 
diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequest.java index e519bc08..d917c65f 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequest.java @@ -55,122 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportProductsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2beta.ProductInputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = - input.readMessage( - com.google.cloud.retail.v2beta.ProductInputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.retail.v2beta.ImportErrorsConfig.Builder subBuilder = null; - if (errorsConfig_ != null) { - subBuilder = errorsConfig_.toBuilder(); - } - errorsConfig_ = - input.readMessage( - com.google.cloud.retail.v2beta.ImportErrorsConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(errorsConfig_); - errorsConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - case 40: - { - int rawValue = input.readEnum(); - - reconciliationMode_ = rawValue; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - requestId_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - - notificationPubsubTopic_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ImportConfigProto .internal_static_google_cloud_retail_v2beta_ImportProductsRequest_descriptor; @@ -223,14 +107,6 @@ public enum ReconciliationMode implements com.google.protobuf.ProtocolMessageEnu *
      * Calculates diff and replaces the entire product dataset. Existing
      * products may be deleted if they are not present in the source location.
-     * Can only be set while using
-     * [BigQuerySource][google.cloud.retail.v2beta.BigQuerySource]. And the
-     * BigQuery dataset must be created in the data location "us (multiple
-     * regions in United States)", otherwise a PERMISSION_DENIED error is
-     * thrown.
-     * Add the IAM permission "BigQuery Data Viewer" for
-     * cloud-retail-customer-data-access@system.gserviceaccount.com before
-     * using this feature otherwise an error is thrown.
      * 
* * FULL = 2; @@ -265,14 +141,6 @@ public enum ReconciliationMode implements com.google.protobuf.ProtocolMessageEnu *
      * Calculates diff and replaces the entire product dataset. Existing
      * products may be deleted if they are not present in the source location.
-     * Can only be set while using
-     * [BigQuerySource][google.cloud.retail.v2beta.BigQuerySource]. And the
-     * BigQuery dataset must be created in the data location "us (multiple
-     * regions in United States)", otherwise a PERMISSION_DENIED error is
-     * thrown.
-     * Add the IAM permission "BigQuery Data Viewer" for
-     * cloud-retail-customer-data-access@system.gserviceaccount.com before
-     * using this feature otherwise an error is thrown.
      * 
* * FULL = 2; @@ -438,7 +306,7 @@ public com.google.protobuf.ByteString getParentBytes() { * string request_id = 6 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportProductsRequest.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=202 + * google/cloud/retail/v2beta/import_config.proto;l=189 * @return The requestId. */ @java.lang.Override @@ -464,7 +332,7 @@ public java.lang.String getRequestId() { * string request_id = 6 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportProductsRequest.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=202 + * google/cloud/retail/v2beta/import_config.proto;l=189 * @return The bytes for requestId. */ @java.lang.Override @@ -589,8 +457,8 @@ public com.google.cloud.retail.v2beta.ImportErrorsConfigOrBuilder getErrorsConfi * * *
-   * Indicates which fields in the provided imported 'products' to update. If
-   * not set, will by default update all fields.
+   * Indicates which fields in the provided imported `products` to update. If
+   * not set, all fields are updated.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -605,8 +473,8 @@ public boolean hasUpdateMask() { * * *
-   * Indicates which fields in the provided imported 'products' to update. If
-   * not set, will by default update all fields.
+   * Indicates which fields in the provided imported `products` to update. If
+   * not set, all fields are updated.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -621,8 +489,8 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
-   * Indicates which fields in the provided imported 'products' to update. If
-   * not set, will by default update all fields.
+   * Indicates which fields in the provided imported `products` to update. If
+   * not set, all fields are updated.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -687,19 +555,15 @@ public int getReconciliationModeValue() { * *
    * Full Pub/Sub topic name for receiving notification. If this field is set,
-   * when the import is finished, a notification will be sent to
-   * specified Pub/Sub topic. The message data will be JSON string of a
+   * when the import is finished, a notification is sent to
+   * specified Pub/Sub topic. The message data is JSON string of a
    * [Operation][google.longrunning.Operation].
    * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    * to be within the same project as
    * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent].
-   * Make sure that both
-   * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
-   * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
-   * have the `pubsub.topics.publish` IAM permission on the topic.
-   * Only supported when
-   * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-   * is set to `FULL`.
+   * Make sure that `service-<project
+   * number>@gcp-sa-retail.iam.gserviceaccount.com` has the
+   * `pubsub.topics.publish` IAM permission on the topic.
    * 
* * string notification_pubsub_topic = 7; @@ -723,19 +587,15 @@ public java.lang.String getNotificationPubsubTopic() { * *
    * Full Pub/Sub topic name for receiving notification. If this field is set,
-   * when the import is finished, a notification will be sent to
-   * specified Pub/Sub topic. The message data will be JSON string of a
+   * when the import is finished, a notification is sent to
+   * specified Pub/Sub topic. The message data is JSON string of a
    * [Operation][google.longrunning.Operation].
    * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    * to be within the same project as
    * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent].
-   * Make sure that both
-   * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
-   * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
-   * have the `pubsub.topics.publish` IAM permission on the topic.
-   * Only supported when
-   * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-   * is set to `FULL`.
+   * Make sure that `service-<project
+   * number>@gcp-sa-retail.iam.gserviceaccount.com` has the
+   * `pubsub.topics.publish` IAM permission on the topic.
    * 
* * string notification_pubsub_topic = 7; @@ -793,7 +653,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationPubsubTopic_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 7, notificationPubsubTopic_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -826,7 +686,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(notificationPubsubTopic_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, notificationPubsubTopic_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -858,7 +718,7 @@ public boolean equals(final java.lang.Object obj) { } if (reconciliationMode_ != other.reconciliationMode_) return false; if (!getNotificationPubsubTopic().equals(other.getNotificationPubsubTopic())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -889,7 +749,7 @@ public int hashCode() { hash = (53 * hash) + reconciliationMode_; hash = (37 * hash) + NOTIFICATION_PUBSUB_TOPIC_FIELD_NUMBER; hash = (53 * hash) + getNotificationPubsubTopic().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1018,17 +878,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ImportProductsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1180,7 +1033,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ImportProductsRequest ot notificationPubsubTopic_ = other.notificationPubsubTopic_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1195,18 +1048,73 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ImportProductsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getInputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getErrorsConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 34: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 40: + { + reconciliationMode_ = input.readEnum(); + + break; + } // case 40 + case 50: + { + requestId_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + notificationPubsubTopic_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.ImportProductsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1352,7 +1260,7 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { * string request_id = 6 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportProductsRequest.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=202 + * google/cloud/retail/v2beta/import_config.proto;l=189 * @return The requestId. */ @java.lang.Deprecated @@ -1377,7 +1285,7 @@ public java.lang.String getRequestId() { * string request_id = 6 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportProductsRequest.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=202 + * google/cloud/retail/v2beta/import_config.proto;l=189 * @return The bytes for requestId. */ @java.lang.Deprecated @@ -1402,7 +1310,7 @@ public com.google.protobuf.ByteString getRequestIdBytes() { * string request_id = 6 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportProductsRequest.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=202 + * google/cloud/retail/v2beta/import_config.proto;l=189 * @param value The requestId to set. * @return This builder for chaining. */ @@ -1426,7 +1334,7 @@ public Builder setRequestId(java.lang.String value) { * string request_id = 6 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportProductsRequest.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=202 + * google/cloud/retail/v2beta/import_config.proto;l=189 * @return This builder for chaining. */ @java.lang.Deprecated @@ -1446,7 +1354,7 @@ public Builder clearRequestId() { * string request_id = 6 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportProductsRequest.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=202 + * google/cloud/retail/v2beta/import_config.proto;l=189 * @param value The bytes for requestId to set. * @return This builder for chaining. */ @@ -1862,8 +1770,8 @@ public com.google.cloud.retail.v2beta.ImportErrorsConfigOrBuilder getErrorsConfi * * *
-     * Indicates which fields in the provided imported 'products' to update. If
-     * not set, will by default update all fields.
+     * Indicates which fields in the provided imported `products` to update. If
+     * not set, all fields are updated.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1877,8 +1785,8 @@ public boolean hasUpdateMask() { * * *
-     * Indicates which fields in the provided imported 'products' to update. If
-     * not set, will by default update all fields.
+     * Indicates which fields in the provided imported `products` to update. If
+     * not set, all fields are updated.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1898,8 +1806,8 @@ public com.google.protobuf.FieldMask getUpdateMask() { * * *
-     * Indicates which fields in the provided imported 'products' to update. If
-     * not set, will by default update all fields.
+     * Indicates which fields in the provided imported `products` to update. If
+     * not set, all fields are updated.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1921,8 +1829,8 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask value) { * * *
-     * Indicates which fields in the provided imported 'products' to update. If
-     * not set, will by default update all fields.
+     * Indicates which fields in the provided imported `products` to update. If
+     * not set, all fields are updated.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1941,8 +1849,8 @@ public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForVal * * *
-     * Indicates which fields in the provided imported 'products' to update. If
-     * not set, will by default update all fields.
+     * Indicates which fields in the provided imported `products` to update. If
+     * not set, all fields are updated.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1966,8 +1874,8 @@ public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { * * *
-     * Indicates which fields in the provided imported 'products' to update. If
-     * not set, will by default update all fields.
+     * Indicates which fields in the provided imported `products` to update. If
+     * not set, all fields are updated.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -1987,8 +1895,8 @@ public Builder clearUpdateMask() { * * *
-     * Indicates which fields in the provided imported 'products' to update. If
-     * not set, will by default update all fields.
+     * Indicates which fields in the provided imported `products` to update. If
+     * not set, all fields are updated.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -2002,8 +1910,8 @@ public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { * * *
-     * Indicates which fields in the provided imported 'products' to update. If
-     * not set, will by default update all fields.
+     * Indicates which fields in the provided imported `products` to update. If
+     * not set, all fields are updated.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -2021,8 +1929,8 @@ public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { * * *
-     * Indicates which fields in the provided imported 'products' to update. If
-     * not set, will by default update all fields.
+     * Indicates which fields in the provided imported `products` to update. If
+     * not set, all fields are updated.
      * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -2166,19 +2074,15 @@ public Builder clearReconciliationMode() { * *
      * Full Pub/Sub topic name for receiving notification. If this field is set,
-     * when the import is finished, a notification will be sent to
-     * specified Pub/Sub topic. The message data will be JSON string of a
+     * when the import is finished, a notification is sent to
+     * specified Pub/Sub topic. The message data is JSON string of a
      * [Operation][google.longrunning.Operation].
      * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
      * to be within the same project as
      * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent].
-     * Make sure that both
-     * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
-     * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
-     * have the `pubsub.topics.publish` IAM permission on the topic.
-     * Only supported when
-     * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-     * is set to `FULL`.
+     * Make sure that `service-<project
+     * number>@gcp-sa-retail.iam.gserviceaccount.com` has the
+     * `pubsub.topics.publish` IAM permission on the topic.
      * 
* * string notification_pubsub_topic = 7; @@ -2201,19 +2105,15 @@ public java.lang.String getNotificationPubsubTopic() { * *
      * Full Pub/Sub topic name for receiving notification. If this field is set,
-     * when the import is finished, a notification will be sent to
-     * specified Pub/Sub topic. The message data will be JSON string of a
+     * when the import is finished, a notification is sent to
+     * specified Pub/Sub topic. The message data is JSON string of a
      * [Operation][google.longrunning.Operation].
      * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
      * to be within the same project as
      * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent].
-     * Make sure that both
-     * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
-     * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
-     * have the `pubsub.topics.publish` IAM permission on the topic.
-     * Only supported when
-     * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-     * is set to `FULL`.
+     * Make sure that `service-<project
+     * number>@gcp-sa-retail.iam.gserviceaccount.com` has the
+     * `pubsub.topics.publish` IAM permission on the topic.
      * 
* * string notification_pubsub_topic = 7; @@ -2236,19 +2136,15 @@ public com.google.protobuf.ByteString getNotificationPubsubTopicBytes() { * *
      * Full Pub/Sub topic name for receiving notification. If this field is set,
-     * when the import is finished, a notification will be sent to
-     * specified Pub/Sub topic. The message data will be JSON string of a
+     * when the import is finished, a notification is sent to
+     * specified Pub/Sub topic. The message data is JSON string of a
      * [Operation][google.longrunning.Operation].
      * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
      * to be within the same project as
      * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent].
-     * Make sure that both
-     * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
-     * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
-     * have the `pubsub.topics.publish` IAM permission on the topic.
-     * Only supported when
-     * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-     * is set to `FULL`.
+     * Make sure that `service-<project
+     * number>@gcp-sa-retail.iam.gserviceaccount.com` has the
+     * `pubsub.topics.publish` IAM permission on the topic.
      * 
* * string notification_pubsub_topic = 7; @@ -2270,19 +2166,15 @@ public Builder setNotificationPubsubTopic(java.lang.String value) { * *
      * Full Pub/Sub topic name for receiving notification. If this field is set,
-     * when the import is finished, a notification will be sent to
-     * specified Pub/Sub topic. The message data will be JSON string of a
+     * when the import is finished, a notification is sent to
+     * specified Pub/Sub topic. The message data is JSON string of a
      * [Operation][google.longrunning.Operation].
      * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
      * to be within the same project as
      * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent].
-     * Make sure that both
-     * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
-     * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
-     * have the `pubsub.topics.publish` IAM permission on the topic.
-     * Only supported when
-     * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-     * is set to `FULL`.
+     * Make sure that `service-<project
+     * number>@gcp-sa-retail.iam.gserviceaccount.com` has the
+     * `pubsub.topics.publish` IAM permission on the topic.
      * 
* * string notification_pubsub_topic = 7; @@ -2300,19 +2192,15 @@ public Builder clearNotificationPubsubTopic() { * *
      * Full Pub/Sub topic name for receiving notification. If this field is set,
-     * when the import is finished, a notification will be sent to
-     * specified Pub/Sub topic. The message data will be JSON string of a
+     * when the import is finished, a notification is sent to
+     * specified Pub/Sub topic. The message data is JSON string of a
      * [Operation][google.longrunning.Operation].
      * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
      * to be within the same project as
      * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent].
-     * Make sure that both
-     * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
-     * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
-     * have the `pubsub.topics.publish` IAM permission on the topic.
-     * Only supported when
-     * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-     * is set to `FULL`.
+     * Make sure that `service-<project
+     * number>@gcp-sa-retail.iam.gserviceaccount.com` has the
+     * `pubsub.topics.publish` IAM permission on the topic.
      * 
* * string notification_pubsub_topic = 7; @@ -2363,7 +2251,18 @@ public ImportProductsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportProductsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequestOrBuilder.java index 4cc3c26f..7f5c0aef 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsRequestOrBuilder.java @@ -68,7 +68,7 @@ public interface ImportProductsRequestOrBuilder * string request_id = 6 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportProductsRequest.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=202 + * google/cloud/retail/v2beta/import_config.proto;l=189 * @return The requestId. */ @java.lang.Deprecated @@ -83,7 +83,7 @@ public interface ImportProductsRequestOrBuilder * string request_id = 6 [deprecated = true]; * * @deprecated google.cloud.retail.v2beta.ImportProductsRequest.request_id is deprecated. See - * google/cloud/retail/v2beta/import_config.proto;l=202 + * google/cloud/retail/v2beta/import_config.proto;l=189 * @return The bytes for requestId. */ @java.lang.Deprecated @@ -169,8 +169,8 @@ public interface ImportProductsRequestOrBuilder * * *
-   * Indicates which fields in the provided imported 'products' to update. If
-   * not set, will by default update all fields.
+   * Indicates which fields in the provided imported `products` to update. If
+   * not set, all fields are updated.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -182,8 +182,8 @@ public interface ImportProductsRequestOrBuilder * * *
-   * Indicates which fields in the provided imported 'products' to update. If
-   * not set, will by default update all fields.
+   * Indicates which fields in the provided imported `products` to update. If
+   * not set, all fields are updated.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -195,8 +195,8 @@ public interface ImportProductsRequestOrBuilder * * *
-   * Indicates which fields in the provided imported 'products' to update. If
-   * not set, will by default update all fields.
+   * Indicates which fields in the provided imported `products` to update. If
+   * not set, all fields are updated.
    * 
* * .google.protobuf.FieldMask update_mask = 4; @@ -241,19 +241,15 @@ public interface ImportProductsRequestOrBuilder * *
    * Full Pub/Sub topic name for receiving notification. If this field is set,
-   * when the import is finished, a notification will be sent to
-   * specified Pub/Sub topic. The message data will be JSON string of a
+   * when the import is finished, a notification is sent to
+   * specified Pub/Sub topic. The message data is JSON string of a
    * [Operation][google.longrunning.Operation].
    * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    * to be within the same project as
    * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent].
-   * Make sure that both
-   * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
-   * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
-   * have the `pubsub.topics.publish` IAM permission on the topic.
-   * Only supported when
-   * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-   * is set to `FULL`.
+   * Make sure that `service-<project
+   * number>@gcp-sa-retail.iam.gserviceaccount.com` has the
+   * `pubsub.topics.publish` IAM permission on the topic.
    * 
* * string notification_pubsub_topic = 7; @@ -266,19 +262,15 @@ public interface ImportProductsRequestOrBuilder * *
    * Full Pub/Sub topic name for receiving notification. If this field is set,
-   * when the import is finished, a notification will be sent to
-   * specified Pub/Sub topic. The message data will be JSON string of a
+   * when the import is finished, a notification is sent to
+   * specified Pub/Sub topic. The message data is JSON string of a
    * [Operation][google.longrunning.Operation].
    * Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
    * to be within the same project as
    * [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent].
-   * Make sure that both
-   * `cloud-retail-customer-data-access@system.gserviceaccount.com` and
-   * `service-<project number>@gcp-sa-retail.iam.gserviceaccount.com`
-   * have the `pubsub.topics.publish` IAM permission on the topic.
-   * Only supported when
-   * [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-   * is set to `FULL`.
+   * Make sure that `service-<project
+   * number>@gcp-sa-retail.iam.gserviceaccount.com` has the
+   * `pubsub.topics.publish` IAM permission on the topic.
    * 
* * string notification_pubsub_topic = 7; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsResponse.java index 8100f3f5..d44a73d4 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportProductsResponse.java @@ -55,76 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportProductsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - errorSamples_.add( - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); - break; - } - case 18: - { - com.google.cloud.retail.v2beta.ImportErrorsConfig.Builder subBuilder = null; - if (errorsConfig_ != null) { - subBuilder = errorsConfig_.toBuilder(); - } - errorsConfig_ = - input.readMessage( - com.google.cloud.retail.v2beta.ImportErrorsConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(errorsConfig_); - errorsConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = java.util.Collections.unmodifiableList(errorSamples_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ImportConfigProto .internal_static_google_cloud_retail_v2beta_ImportProductsResponse_descriptor; @@ -276,7 +206,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (errorsConfig_ != null) { output.writeMessage(2, getErrorsConfig()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -291,7 +221,7 @@ public int getSerializedSize() { if (errorsConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getErrorsConfig()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -312,7 +242,7 @@ public boolean equals(final java.lang.Object obj) { if (hasErrorsConfig()) { if (!getErrorsConfig().equals(other.getErrorsConfig())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -331,7 +261,7 @@ public int hashCode() { hash = (37 * hash) + ERRORS_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getErrorsConfig().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -464,19 +394,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ImportProductsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getErrorSamplesFieldBuilder(); - } } @java.lang.Override @@ -484,10 +405,11 @@ public Builder clear() { super.clear(); if (errorSamplesBuilder_ == null) { errorSamples_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + errorSamples_ = null; errorSamplesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (errorsConfigBuilder_ == null) { errorsConfig_ = null; } else { @@ -616,7 +538,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ImportProductsResponse o if (other.hasErrorsConfig()) { mergeErrorsConfig(other.getErrorsConfig()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -631,18 +553,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ImportProductsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(m); + } else { + errorSamplesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage(getErrorsConfigFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.ImportProductsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1204,7 +1157,18 @@ public ImportProductsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportProductsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportUserEventsRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportUserEventsRequest.java index ebbeea5a..f1226502 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportUserEventsRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportUserEventsRequest.java @@ -52,86 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportUserEventsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2beta.UserEventInputConfig.Builder subBuilder = null; - if (inputConfig_ != null) { - subBuilder = inputConfig_.toBuilder(); - } - inputConfig_ = - input.readMessage( - com.google.cloud.retail.v2beta.UserEventInputConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inputConfig_); - inputConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.retail.v2beta.ImportErrorsConfig.Builder subBuilder = null; - if (errorsConfig_ != null) { - subBuilder = errorsConfig_.toBuilder(); - } - errorsConfig_ = - input.readMessage( - com.google.cloud.retail.v2beta.ImportErrorsConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(errorsConfig_); - errorsConfig_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ImportConfigProto .internal_static_google_cloud_retail_v2beta_ImportUserEventsRequest_descriptor; @@ -328,7 +248,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (errorsConfig_ != null) { output.writeMessage(3, getErrorsConfig()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -346,7 +266,7 @@ public int getSerializedSize() { if (errorsConfig_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getErrorsConfig()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -371,7 +291,7 @@ public boolean equals(final java.lang.Object obj) { if (hasErrorsConfig()) { if (!getErrorsConfig().equals(other.getErrorsConfig())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -392,7 +312,7 @@ public int hashCode() { hash = (37 * hash) + ERRORS_CONFIG_FIELD_NUMBER; hash = (53 * hash) + getErrorsConfig().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -522,17 +442,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ImportUserEventsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -650,7 +563,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ImportUserEventsRequest if (other.hasErrorsConfig()) { mergeErrorsConfig(other.getErrorsConfig()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -665,18 +578,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ImportUserEventsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getInputConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getErrorsConfigFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.ImportUserEventsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1227,7 +1171,18 @@ public ImportUserEventsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportUserEventsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportUserEventsResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportUserEventsResponse.java index c9ac7e4e..cfd472e0 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportUserEventsResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ImportUserEventsResponse.java @@ -54,93 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ImportUserEventsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - errorSamples_.add( - input.readMessage(com.google.rpc.Status.parser(), extensionRegistry)); - break; - } - case 18: - { - com.google.cloud.retail.v2beta.ImportErrorsConfig.Builder subBuilder = null; - if (errorsConfig_ != null) { - subBuilder = errorsConfig_.toBuilder(); - } - errorsConfig_ = - input.readMessage( - com.google.cloud.retail.v2beta.ImportErrorsConfig.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(errorsConfig_); - errorsConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.cloud.retail.v2beta.UserEventImportSummary.Builder subBuilder = null; - if (importSummary_ != null) { - subBuilder = importSummary_.toBuilder(); - } - importSummary_ = - input.readMessage( - com.google.cloud.retail.v2beta.UserEventImportSummary.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(importSummary_); - importSummary_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - errorSamples_ = java.util.Collections.unmodifiableList(errorSamples_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ImportConfigProto .internal_static_google_cloud_retail_v2beta_ImportUserEventsResponse_descriptor; @@ -347,7 +260,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (importSummary_ != null) { output.writeMessage(3, getImportSummary()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -365,7 +278,7 @@ public int getSerializedSize() { if (importSummary_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getImportSummary()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -390,7 +303,7 @@ public boolean equals(final java.lang.Object obj) { if (hasImportSummary()) { if (!getImportSummary().equals(other.getImportSummary())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -413,7 +326,7 @@ public int hashCode() { hash = (37 * hash) + IMPORT_SUMMARY_FIELD_NUMBER; hash = (53 * hash) + getImportSummary().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -545,19 +458,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ImportUserEventsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getErrorSamplesFieldBuilder(); - } } @java.lang.Override @@ -565,10 +469,11 @@ public Builder clear() { super.clear(); if (errorSamplesBuilder_ == null) { errorSamples_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + errorSamples_ = null; errorSamplesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (errorsConfigBuilder_ == null) { errorsConfig_ = null; } else { @@ -711,7 +616,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ImportUserEventsResponse if (other.hasImportSummary()) { mergeImportSummary(other.getImportSummary()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -726,18 +631,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ImportUserEventsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.rpc.Status m = + input.readMessage(com.google.rpc.Status.parser(), extensionRegistry); + if (errorSamplesBuilder_ == null) { + ensureErrorSamplesIsMutable(); + errorSamples_.add(m); + } else { + errorSamplesBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + input.readMessage(getErrorsConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getImportSummaryFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.ImportUserEventsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1495,7 +1437,18 @@ public ImportUserEventsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ImportUserEventsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Interval.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Interval.java index cfa34df6..437f9496 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Interval.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Interval.java @@ -50,69 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Interval( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 9: - { - min_ = input.readDouble(); - minCase_ = 1; - break; - } - case 17: - { - min_ = input.readDouble(); - minCase_ = 2; - break; - } - case 25: - { - max_ = input.readDouble(); - maxCase_ = 3; - break; - } - case 33: - { - max_ = input.readDouble(); - maxCase_ = 4; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_Interval_descriptor; @@ -388,7 +325,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (maxCase_ == 4) { output.writeDouble(4, (double) ((java.lang.Double) max_)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -417,7 +354,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeDoubleSize( 4, (double) ((java.lang.Double) max_)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -458,7 +395,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -505,7 +442,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -634,17 +571,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.Interval.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -776,7 +706,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Interval other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -791,17 +721,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Interval parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 9: + { + min_ = input.readDouble(); + minCase_ = 1; + break; + } // case 9 + case 17: + { + min_ = input.readDouble(); + minCase_ = 2; + break; + } // case 17 + case 25: + { + max_ = input.readDouble(); + maxCase_ = 3; + break; + } // case 25 + case 33: + { + max_ = input.readDouble(); + maxCase_ = 4; + break; + } // case 33 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2beta.Interval) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1141,7 +1109,18 @@ public Interval parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Interval(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListCatalogsRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListCatalogsRequest.java index d9a3cbea..289fcdc6 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListCatalogsRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListCatalogsRequest.java @@ -55,64 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListCatalogsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CatalogServiceProto .internal_static_google_cloud_retail_v2beta_ListCatalogsRequest_descriptor; @@ -298,7 +240,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -316,7 +258,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -335,7 +277,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -352,7 +294,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -483,17 +425,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ListCatalogsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -596,7 +531,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ListCatalogsRequest othe pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,18 +546,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ListCatalogsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.ListCatalogsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1001,7 +967,18 @@ public ListCatalogsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListCatalogsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListCatalogsResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListCatalogsResponse.java index dd503283..24ef869c 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListCatalogsResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListCatalogsResponse.java @@ -55,67 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListCatalogsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - catalogs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - catalogs_.add( - input.readMessage( - com.google.cloud.retail.v2beta.Catalog.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - catalogs_ = java.util.Collections.unmodifiableList(catalogs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CatalogServiceProto .internal_static_google_cloud_retail_v2beta_ListCatalogsResponse_descriptor; @@ -275,7 +214,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -290,7 +229,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -308,7 +247,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCatalogsList().equals(other.getCatalogsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -325,7 +264,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -456,19 +395,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ListCatalogsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getCatalogsFieldBuilder(); - } } @java.lang.Override @@ -476,10 +406,11 @@ public Builder clear() { super.clear(); if (catalogsBuilder_ == null) { catalogs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + catalogs_ = null; catalogsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -601,7 +532,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ListCatalogsResponse oth nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -616,18 +547,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ListCatalogsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2beta.Catalog m = + input.readMessage( + com.google.cloud.retail.v2beta.Catalog.parser(), extensionRegistry); + if (catalogsBuilder_ == null) { + ensureCatalogsIsMutable(); + catalogs_.add(m); + } else { + catalogsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.ListCatalogsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1134,7 +1097,18 @@ public ListCatalogsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListCatalogsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListControlsRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListControlsRequest.java index ad292b67..4dbaafad 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListControlsRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListControlsRequest.java @@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListControlsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ControlServiceProto .internal_static_google_cloud_retail_v2beta_ListControlsRequest_descriptor; @@ -342,7 +277,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -363,7 +298,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -383,7 +318,7 @@ public boolean equals(final java.lang.Object obj) { if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; if (!getFilter().equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -402,7 +337,7 @@ public int hashCode() { hash = (53 * hash) + getPageToken().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -531,17 +466,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ListControlsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -651,7 +579,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ListControlsRequest othe filter_ = other.filter_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -666,18 +594,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ListControlsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.ListControlsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1126,7 +1091,18 @@ public ListControlsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListControlsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListControlsResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListControlsResponse.java index 3b6127cf..5a138083 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListControlsResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListControlsResponse.java @@ -53,67 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListControlsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - controls_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - controls_.add( - input.readMessage( - com.google.cloud.retail.v2beta.Control.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - controls_ = java.util.Collections.unmodifiableList(controls_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ControlServiceProto .internal_static_google_cloud_retail_v2beta_ListControlsResponse_descriptor; @@ -267,7 +206,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -282,7 +221,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -300,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (!getControlsList().equals(other.getControlsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -317,7 +256,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -446,19 +385,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ListControlsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getControlsFieldBuilder(); - } } @java.lang.Override @@ -466,10 +396,11 @@ public Builder clear() { super.clear(); if (controlsBuilder_ == null) { controls_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + controls_ = null; controlsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -591,7 +522,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ListControlsResponse oth nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -606,18 +537,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ListControlsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2beta.Control m = + input.readMessage( + com.google.cloud.retail.v2beta.Control.parser(), extensionRegistry); + if (controlsBuilder_ == null) { + ensureControlsIsMutable(); + controls_.add(m); + } else { + controlsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.ListControlsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1109,7 +1072,18 @@ public ListControlsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListControlsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListModelsRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListModelsRequest.java new file mode 100644 index 00000000..1c6533ed --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListModelsRequest.java @@ -0,0 +1,923 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +/** + * + * + *
+ * Request for listing models associated with a resource.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.ListModelsRequest} + */ +public final class ListModelsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.ListModelsRequest) + ListModelsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListModelsRequest.newBuilder() to construct. + private ListModelsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListModelsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListModelsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_ListModelsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_ListModelsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.ListModelsRequest.class, + com.google.cloud.retail.v2beta.ListModelsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The parent for which to list models.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The parent for which to list models.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Optional. Maximum number of results to return. If unspecified, defaults
+   * to 50. Max allowed value is 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A page token, received from a previous `ListModels`
+   * call. Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A page token, received from a previous `ListModels`
+   * call. Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(parent_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2beta.ListModelsRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.ListModelsRequest other = + (com.google.cloud.retail.v2beta.ListModelsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.ListModelsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.ListModelsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.ListModelsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.ListModelsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.ListModelsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.ListModelsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.ListModelsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.ListModelsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.ListModelsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.ListModelsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.ListModelsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.ListModelsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2beta.ListModelsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for listing models associated with a resource.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.ListModelsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.ListModelsRequest) + com.google.cloud.retail.v2beta.ListModelsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_ListModelsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_ListModelsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.ListModelsRequest.class, + com.google.cloud.retail.v2beta.ListModelsRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.ListModelsRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_ListModelsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.ListModelsRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.ListModelsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.ListModelsRequest build() { + com.google.cloud.retail.v2beta.ListModelsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.ListModelsRequest buildPartial() { + com.google.cloud.retail.v2beta.ListModelsRequest result = + new com.google.cloud.retail.v2beta.ListModelsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.ListModelsRequest) { + return mergeFrom((com.google.cloud.retail.v2beta.ListModelsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.ListModelsRequest other) { + if (other == com.google.cloud.retail.v2beta.ListModelsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + 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(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + 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 java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The parent for which to list models.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The parent for which to list models.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The parent for which to list models.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent for which to list models.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The parent for which to list models.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Maximum number of results to return. If unspecified, defaults
+     * to 50. Max allowed value is 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Maximum number of results to return. If unspecified, defaults
+     * to 50. Max allowed value is 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Maximum number of results to return. If unspecified, defaults
+     * to 50. Max allowed value is 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A page token, received from a previous `ListModels`
+     * call. Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListModels`
+     * call. Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListModels`
+     * call. Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListModels`
+     * call. Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A page token, received from a previous `ListModels`
+     * call. Provide this to retrieve the subsequent page.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.ListModelsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.ListModelsRequest) + private static final com.google.cloud.retail.v2beta.ListModelsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.ListModelsRequest(); + } + + public static com.google.cloud.retail.v2beta.ListModelsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListModelsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.ListModelsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListModelsRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListModelsRequestOrBuilder.java new file mode 100644 index 00000000..1f4f30aa --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListModelsRequestOrBuilder.java @@ -0,0 +1,99 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +public interface ListModelsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.ListModelsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The parent for which to list models.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The parent for which to list models.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Maximum number of results to return. If unspecified, defaults
+   * to 50. Max allowed value is 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A page token, received from a previous `ListModels`
+   * call. Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A page token, received from a previous `ListModels`
+   * call. Provide this to retrieve the subsequent page.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListModelsResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListModelsResponse.java new file mode 100644 index 00000000..f52d1287 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListModelsResponse.java @@ -0,0 +1,1103 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +/** + * + * + *
+ * Response to a ListModelRequest.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.ListModelsResponse} + */ +public final class ListModelsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.ListModelsResponse) + ListModelsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListModelsResponse.newBuilder() to construct. + private ListModelsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListModelsResponse() { + models_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListModelsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_ListModelsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_ListModelsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.ListModelsResponse.class, + com.google.cloud.retail.v2beta.ListModelsResponse.Builder.class); + } + + public static final int MODELS_FIELD_NUMBER = 1; + private java.util.List models_; + /** + * + * + *
+   * List of Models.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + @java.lang.Override + public java.util.List getModelsList() { + return models_; + } + /** + * + * + *
+   * List of Models.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + @java.lang.Override + public java.util.List + getModelsOrBuilderList() { + return models_; + } + /** + * + * + *
+   * List of Models.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + @java.lang.Override + public int getModelsCount() { + return models_.size(); + } + /** + * + * + *
+   * List of Models.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model getModels(int index) { + return models_.get(index); + } + /** + * + * + *
+   * List of Models.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.ModelOrBuilder getModelsOrBuilder(int index) { + return models_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Pagination token, if not returned indicates the last page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Pagination token, if not returned indicates the last page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < models_.size(); i++) { + output.writeMessage(1, models_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < models_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, models_.get(i)); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2beta.ListModelsResponse)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.ListModelsResponse other = + (com.google.cloud.retail.v2beta.ListModelsResponse) obj; + + if (!getModelsList().equals(other.getModelsList())) 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 (getModelsCount() > 0) { + hash = (37 * hash) + MODELS_FIELD_NUMBER; + hash = (53 * hash) + getModelsList().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.retail.v2beta.ListModelsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.ListModelsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.ListModelsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.ListModelsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.ListModelsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.ListModelsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.ListModelsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.ListModelsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.ListModelsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.ListModelsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.ListModelsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.ListModelsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2beta.ListModelsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response to a ListModelRequest.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.ListModelsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.ListModelsResponse) + com.google.cloud.retail.v2beta.ListModelsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_ListModelsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_ListModelsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.ListModelsResponse.class, + com.google.cloud.retail.v2beta.ListModelsResponse.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.ListModelsResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (modelsBuilder_ == null) { + models_ = java.util.Collections.emptyList(); + } else { + models_ = null; + modelsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_ListModelsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.ListModelsResponse getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.ListModelsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.ListModelsResponse build() { + com.google.cloud.retail.v2beta.ListModelsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.ListModelsResponse buildPartial() { + com.google.cloud.retail.v2beta.ListModelsResponse result = + new com.google.cloud.retail.v2beta.ListModelsResponse(this); + int from_bitField0_ = bitField0_; + if (modelsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + models_ = java.util.Collections.unmodifiableList(models_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.models_ = models_; + } else { + result.models_ = modelsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.ListModelsResponse) { + return mergeFrom((com.google.cloud.retail.v2beta.ListModelsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.ListModelsResponse other) { + if (other == com.google.cloud.retail.v2beta.ListModelsResponse.getDefaultInstance()) + return this; + if (modelsBuilder_ == null) { + if (!other.models_.isEmpty()) { + if (models_.isEmpty()) { + models_ = other.models_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureModelsIsMutable(); + models_.addAll(other.models_); + } + onChanged(); + } + } else { + if (!other.models_.isEmpty()) { + if (modelsBuilder_.isEmpty()) { + modelsBuilder_.dispose(); + modelsBuilder_ = null; + models_ = other.models_; + bitField0_ = (bitField0_ & ~0x00000001); + modelsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getModelsFieldBuilder() + : null; + } else { + modelsBuilder_.addAllMessages(other.models_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + 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.retail.v2beta.Model m = + input.readMessage( + com.google.cloud.retail.v2beta.Model.parser(), extensionRegistry); + if (modelsBuilder_ == null) { + ensureModelsIsMutable(); + models_.add(m); + } else { + modelsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + 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 models_ = + java.util.Collections.emptyList(); + + private void ensureModelsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + models_ = new java.util.ArrayList(models_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.Model, + com.google.cloud.retail.v2beta.Model.Builder, + com.google.cloud.retail.v2beta.ModelOrBuilder> + modelsBuilder_; + + /** + * + * + *
+     * List of Models.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + public java.util.List getModelsList() { + if (modelsBuilder_ == null) { + return java.util.Collections.unmodifiableList(models_); + } else { + return modelsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of Models.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + public int getModelsCount() { + if (modelsBuilder_ == null) { + return models_.size(); + } else { + return modelsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of Models.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + public com.google.cloud.retail.v2beta.Model getModels(int index) { + if (modelsBuilder_ == null) { + return models_.get(index); + } else { + return modelsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of Models.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + public Builder setModels(int index, com.google.cloud.retail.v2beta.Model value) { + if (modelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelsIsMutable(); + models_.set(index, value); + onChanged(); + } else { + modelsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of Models.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + public Builder setModels( + int index, com.google.cloud.retail.v2beta.Model.Builder builderForValue) { + if (modelsBuilder_ == null) { + ensureModelsIsMutable(); + models_.set(index, builderForValue.build()); + onChanged(); + } else { + modelsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of Models.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + public Builder addModels(com.google.cloud.retail.v2beta.Model value) { + if (modelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelsIsMutable(); + models_.add(value); + onChanged(); + } else { + modelsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of Models.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + public Builder addModels(int index, com.google.cloud.retail.v2beta.Model value) { + if (modelsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureModelsIsMutable(); + models_.add(index, value); + onChanged(); + } else { + modelsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of Models.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + public Builder addModels(com.google.cloud.retail.v2beta.Model.Builder builderForValue) { + if (modelsBuilder_ == null) { + ensureModelsIsMutable(); + models_.add(builderForValue.build()); + onChanged(); + } else { + modelsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of Models.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + public Builder addModels( + int index, com.google.cloud.retail.v2beta.Model.Builder builderForValue) { + if (modelsBuilder_ == null) { + ensureModelsIsMutable(); + models_.add(index, builderForValue.build()); + onChanged(); + } else { + modelsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of Models.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + public Builder addAllModels( + java.lang.Iterable values) { + if (modelsBuilder_ == null) { + ensureModelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, models_); + onChanged(); + } else { + modelsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of Models.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + public Builder clearModels() { + if (modelsBuilder_ == null) { + models_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + modelsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of Models.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + public Builder removeModels(int index) { + if (modelsBuilder_ == null) { + ensureModelsIsMutable(); + models_.remove(index); + onChanged(); + } else { + modelsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of Models.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + public com.google.cloud.retail.v2beta.Model.Builder getModelsBuilder(int index) { + return getModelsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of Models.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + public com.google.cloud.retail.v2beta.ModelOrBuilder getModelsOrBuilder(int index) { + if (modelsBuilder_ == null) { + return models_.get(index); + } else { + return modelsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of Models.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + public java.util.List + getModelsOrBuilderList() { + if (modelsBuilder_ != null) { + return modelsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(models_); + } + } + /** + * + * + *
+     * List of Models.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + public com.google.cloud.retail.v2beta.Model.Builder addModelsBuilder() { + return getModelsFieldBuilder() + .addBuilder(com.google.cloud.retail.v2beta.Model.getDefaultInstance()); + } + /** + * + * + *
+     * List of Models.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + public com.google.cloud.retail.v2beta.Model.Builder addModelsBuilder(int index) { + return getModelsFieldBuilder() + .addBuilder(index, com.google.cloud.retail.v2beta.Model.getDefaultInstance()); + } + /** + * + * + *
+     * List of Models.
+     * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + public java.util.List getModelsBuilderList() { + return getModelsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.Model, + com.google.cloud.retail.v2beta.Model.Builder, + com.google.cloud.retail.v2beta.ModelOrBuilder> + getModelsFieldBuilder() { + if (modelsBuilder_ == null) { + modelsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.Model, + com.google.cloud.retail.v2beta.Model.Builder, + com.google.cloud.retail.v2beta.ModelOrBuilder>( + models_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + models_ = null; + } + return modelsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Pagination token, if not returned indicates the last page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Pagination token, if not returned indicates the last page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Pagination token, if not returned indicates the last page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Pagination token, if not returned indicates the last page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Pagination token, if not returned indicates the last page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.ListModelsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.ListModelsResponse) + private static final com.google.cloud.retail.v2beta.ListModelsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.ListModelsResponse(); + } + + public static com.google.cloud.retail.v2beta.ListModelsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListModelsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.ListModelsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListModelsResponseOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListModelsResponseOrBuilder.java new file mode 100644 index 00000000..87721910 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListModelsResponseOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +public interface ListModelsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.ListModelsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of Models.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + java.util.List getModelsList(); + /** + * + * + *
+   * List of Models.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + com.google.cloud.retail.v2beta.Model getModels(int index); + /** + * + * + *
+   * List of Models.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + int getModelsCount(); + /** + * + * + *
+   * List of Models.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + java.util.List getModelsOrBuilderList(); + /** + * + * + *
+   * List of Models.
+   * 
+ * + * repeated .google.cloud.retail.v2beta.Model models = 1; + */ + com.google.cloud.retail.v2beta.ModelOrBuilder getModelsOrBuilder(int index); + + /** + * + * + *
+   * Pagination token, if not returned indicates the last page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Pagination token, if not returned indicates the last page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListProductsRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListProductsRequest.java index 092d4daf..5b99c678 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListProductsRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListProductsRequest.java @@ -56,86 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListProductsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 42: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (readMask_ != null) { - subBuilder = readMask_.toBuilder(); - } - readMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(readMask_); - readMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_ListProductsRequest_descriptor; @@ -517,7 +437,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (readMask_ != null) { output.writeMessage(5, getReadMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -541,7 +461,7 @@ public int getSerializedSize() { if (readMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getReadMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -565,7 +485,7 @@ public boolean equals(final java.lang.Object obj) { if (hasReadMask()) { if (!getReadMask().equals(other.getReadMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -588,7 +508,7 @@ public int hashCode() { hash = (37 * hash) + READ_MASK_FIELD_NUMBER; hash = (53 * hash) + getReadMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -719,17 +639,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ListProductsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -853,7 +766,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ListProductsRequest othe if (other.hasReadMask()) { mergeReadMask(other.getReadMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -868,18 +781,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ListProductsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + input.readMessage(getReadMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.ListProductsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1800,7 +1756,18 @@ public ListProductsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListProductsResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListProductsResponse.java index c2b420a7..86d0df20 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListProductsResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListProductsResponse.java @@ -55,67 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListProductsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - products_.add( - input.readMessage( - com.google.cloud.retail.v2beta.Product.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = java.util.Collections.unmodifiableList(products_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_ListProductsResponse_descriptor; @@ -275,7 +214,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -290,7 +229,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -308,7 +247,7 @@ public boolean equals(final java.lang.Object obj) { if (!getProductsList().equals(other.getProductsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -325,7 +264,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -456,19 +395,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ListProductsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getProductsFieldBuilder(); - } } @java.lang.Override @@ -476,10 +406,11 @@ public Builder clear() { super.clear(); if (productsBuilder_ == null) { products_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + products_ = null; productsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -601,7 +532,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ListProductsResponse oth nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -616,18 +547,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ListProductsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2beta.Product m = + input.readMessage( + com.google.cloud.retail.v2beta.Product.parser(), extensionRegistry); + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(m); + } else { + productsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.ListProductsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1134,7 +1097,18 @@ public ListProductsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListProductsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListServingConfigsRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListServingConfigsRequest.java index f00da7bc..5bdd284b 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListServingConfigsRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListServingConfigsRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListServingConfigsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 16: - { - pageSize_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ServingConfigServiceProto .internal_static_google_cloud_retail_v2beta_ListServingConfigsRequest_descriptor; @@ -133,7 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The catalog resource name. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
    * 
* * @@ -159,7 +101,7 @@ public java.lang.String getParent() { * *
    * Required. The catalog resource name. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
    * 
* * @@ -275,7 +217,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -293,7 +235,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -312,7 +254,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (getPageSize() != other.getPageSize()) return false; if (!getPageToken().equals(other.getPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -329,7 +271,7 @@ public int hashCode() { hash = (53 * hash) + getPageSize(); hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -459,17 +401,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ListServingConfigsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -572,7 +507,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ListServingConfigsReques pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -587,18 +522,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ListServingConfigsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + pageSize_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + pageToken_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.ListServingConfigsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -608,7 +574,7 @@ public Builder mergeFrom( * *
      * Required. The catalog resource name. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
      * 
* * @@ -633,7 +599,7 @@ public java.lang.String getParent() { * *
      * Required. The catalog resource name. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
      * 
* * @@ -658,7 +624,7 @@ public com.google.protobuf.ByteString getParentBytes() { * *
      * Required. The catalog resource name. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
      * 
* * @@ -682,7 +648,7 @@ public Builder setParent(java.lang.String value) { * *
      * Required. The catalog resource name. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
      * 
* * @@ -702,7 +668,7 @@ public Builder clearParent() { * *
      * Required. The catalog resource name. Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
      * 
* * @@ -924,7 +890,18 @@ public ListServingConfigsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListServingConfigsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListServingConfigsRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListServingConfigsRequestOrBuilder.java index 1ff86f63..04eeddcb 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListServingConfigsRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListServingConfigsRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface ListServingConfigsRequestOrBuilder * *
    * Required. The catalog resource name. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
    * 
* * @@ -43,7 +43,7 @@ public interface ListServingConfigsRequestOrBuilder * *
    * Required. The catalog resource name. Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
    * 
* * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListServingConfigsResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListServingConfigsResponse.java index ef0a4c12..21bd2ebb 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListServingConfigsResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ListServingConfigsResponse.java @@ -53,68 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListServingConfigsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - servingConfigs_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - servingConfigs_.add( - input.readMessage( - com.google.cloud.retail.v2beta.ServingConfig.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - servingConfigs_ = java.util.Collections.unmodifiableList(servingConfigs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ServingConfigServiceProto .internal_static_google_cloud_retail_v2beta_ListServingConfigsResponse_descriptor; @@ -269,7 +207,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -284,7 +222,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -302,7 +240,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServingConfigsList().equals(other.getServingConfigsList())) return false; if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -319,7 +257,7 @@ public int hashCode() { } hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -449,19 +387,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ListServingConfigsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getServingConfigsFieldBuilder(); - } } @java.lang.Override @@ -469,10 +398,11 @@ public Builder clear() { super.clear(); if (servingConfigsBuilder_ == null) { servingConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + servingConfigs_ = null; servingConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -594,7 +524,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ListServingConfigsRespon nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -609,18 +539,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ListServingConfigsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2beta.ServingConfig m = + input.readMessage( + com.google.cloud.retail.v2beta.ServingConfig.parser(), extensionRegistry); + if (servingConfigsBuilder_ == null) { + ensureServingConfigsIsMutable(); + servingConfigs_.add(m); + } else { + servingConfigsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + nextPageToken_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.ListServingConfigsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1123,7 +1085,18 @@ public ListServingConfigsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListServingConfigsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/LocalInventory.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/LocalInventory.java index 1162f658..2afc2954 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/LocalInventory.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/LocalInventory.java @@ -54,99 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private LocalInventory( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - placeId_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2beta.PriceInfo.Builder subBuilder = null; - if (priceInfo_ != null) { - subBuilder = priceInfo_.toBuilder(); - } - priceInfo_ = - input.readMessage( - com.google.cloud.retail.v2beta.PriceInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(priceInfo_); - priceInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - attributes_ = - com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.retail.v2beta.CustomAttribute> - attributes__ = - input.readMessage( - AttributesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - attributes_.getMutableMap().put(attributes__.getKey(), attributes__.getValue()); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - fulfillmentTypes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - fulfillmentTypes_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000002) != 0)) { - fulfillmentTypes_ = fulfillmentTypes_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_LocalInventory_descriptor; @@ -601,7 +508,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < fulfillmentTypes_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, fulfillmentTypes_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -635,7 +542,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getFulfillmentTypesList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -658,7 +565,7 @@ public boolean equals(final java.lang.Object obj) { } if (!internalGetAttributes().equals(other.internalGetAttributes())) return false; if (!getFulfillmentTypesList().equals(other.getFulfillmentTypesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -683,7 +590,7 @@ public int hashCode() { hash = (37 * hash) + FULFILLMENT_TYPES_FIELD_NUMBER; hash = (53 * hash) + getFulfillmentTypesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -833,17 +740,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.retail.v2beta.LocalInventory.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -968,7 +868,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.LocalInventory other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -983,17 +883,63 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.LocalInventory parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + placeId_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getPriceInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.retail.v2beta.CustomAttribute> + attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .getMutableMap() + .put(attributes__.getKey(), attributes__.getValue()); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFulfillmentTypesIsMutable(); + fulfillmentTypes_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2beta.LocalInventory) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1948,7 +1894,18 @@ public LocalInventory parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new LocalInventory(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLink.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLink.java index a792c9b2..570610f9 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLink.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLink.java @@ -57,85 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private MerchantCenterLink( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - merchantCenterAccountId_ = input.readInt64(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - branchId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - destinations_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - destinations_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - regionCode_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - destinations_ = destinations_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CatalogProto .internal_static_google_cloud_retail_v2beta_MerchantCenterLink_descriptor; @@ -235,8 +156,8 @@ public com.google.protobuf.ByteString getBranchIdBytes() { * *
    * String representing the destination to import for, all if left empty.
-   * List of possible values can be found here.
-   * [https://support.google.com/merchants/answer/7501026]
+   * List of possible values is given in [Included
+   * destination](https://support.google.com/merchants/answer/7501026).
    * List of allowed string values:
    * "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory
    * _ads", "Free_listings", "Free_local_listings"
@@ -255,8 +176,8 @@ public com.google.protobuf.ProtocolStringList getDestinationsList() {
    *
    * 
    * String representing the destination to import for, all if left empty.
-   * List of possible values can be found here.
-   * [https://support.google.com/merchants/answer/7501026]
+   * List of possible values is given in [Included
+   * destination](https://support.google.com/merchants/answer/7501026).
    * List of allowed string values:
    * "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory
    * _ads", "Free_listings", "Free_local_listings"
@@ -275,8 +196,8 @@ public int getDestinationsCount() {
    *
    * 
    * String representing the destination to import for, all if left empty.
-   * List of possible values can be found here.
-   * [https://support.google.com/merchants/answer/7501026]
+   * List of possible values is given in [Included
+   * destination](https://support.google.com/merchants/answer/7501026).
    * List of allowed string values:
    * "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory
    * _ads", "Free_listings", "Free_local_listings"
@@ -296,8 +217,8 @@ public java.lang.String getDestinations(int index) {
    *
    * 
    * String representing the destination to import for, all if left empty.
-   * List of possible values can be found here.
-   * [https://support.google.com/merchants/answer/7501026]
+   * List of possible values is given in [Included
+   * destination](https://support.google.com/merchants/answer/7501026).
    * List of allowed string values:
    * "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory
    * _ads", "Free_listings", "Free_local_listings"
@@ -460,7 +381,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 5, languageCode_);
     }
-    unknownFields.writeTo(output);
+    getUnknownFields().writeTo(output);
   }
 
   @java.lang.Override
@@ -489,7 +410,7 @@ public int getSerializedSize() {
     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(languageCode_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, languageCode_);
     }
-    size += unknownFields.getSerializedSize();
+    size += getUnknownFields().getSerializedSize();
     memoizedSize = size;
     return size;
   }
@@ -510,7 +431,7 @@ public boolean equals(final java.lang.Object obj) {
     if (!getDestinationsList().equals(other.getDestinationsList())) return false;
     if (!getRegionCode().equals(other.getRegionCode())) return false;
     if (!getLanguageCode().equals(other.getLanguageCode())) return false;
-    if (!unknownFields.equals(other.unknownFields)) return false;
+    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
     return true;
   }
 
@@ -533,7 +454,7 @@ public int hashCode() {
     hash = (53 * hash) + getRegionCode().hashCode();
     hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER;
     hash = (53 * hash) + getLanguageCode().hashCode();
-    hash = (29 * hash) + unknownFields.hashCode();
+    hash = (29 * hash) + getUnknownFields().hashCode();
     memoizedHashCode = hash;
     return hash;
   }
@@ -664,17 +585,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
     }
 
     // Construct using com.google.cloud.retail.v2beta.MerchantCenterLink.newBuilder()
-    private Builder() {
-      maybeForceBuilderInitialization();
-    }
+    private Builder() {}
 
     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
       super(parent);
-      maybeForceBuilderInitialization();
-    }
-
-    private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
     }
 
     @java.lang.Override
@@ -802,7 +716,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.MerchantCenterLink other
         languageCode_ = other.languageCode_;
         onChanged();
       }
-      this.mergeUnknownFields(other.unknownFields);
+      this.mergeUnknownFields(other.getUnknownFields());
       onChanged();
       return this;
     }
@@ -817,18 +731,62 @@ public Builder mergeFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      com.google.cloud.retail.v2beta.MerchantCenterLink parsedMessage = null;
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
       try {
-        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 8:
+              {
+                merchantCenterAccountId_ = input.readInt64();
+
+                break;
+              } // case 8
+            case 18:
+              {
+                branchId_ = input.readStringRequireUtf8();
+
+                break;
+              } // case 18
+            case 26:
+              {
+                java.lang.String s = input.readStringRequireUtf8();
+                ensureDestinationsIsMutable();
+                destinations_.add(s);
+                break;
+              } // case 26
+            case 34:
+              {
+                regionCode_ = input.readStringRequireUtf8();
+
+                break;
+              } // case 34
+            case 42:
+              {
+                languageCode_ = input.readStringRequireUtf8();
+
+                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) {
-        parsedMessage =
-            (com.google.cloud.retail.v2beta.MerchantCenterLink) e.getUnfinishedMessage();
         throw e.unwrapIOException();
       } finally {
-        if (parsedMessage != null) {
-          mergeFrom(parsedMessage);
-        }
-      }
+        onChanged();
+      } // finally
       return this;
     }
 
@@ -1032,8 +990,8 @@ private void ensureDestinationsIsMutable() {
      *
      * 
      * String representing the destination to import for, all if left empty.
-     * List of possible values can be found here.
-     * [https://support.google.com/merchants/answer/7501026]
+     * List of possible values is given in [Included
+     * destination](https://support.google.com/merchants/answer/7501026).
      * List of allowed string values:
      * "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory
      * _ads", "Free_listings", "Free_local_listings"
@@ -1052,8 +1010,8 @@ public com.google.protobuf.ProtocolStringList getDestinationsList() {
      *
      * 
      * String representing the destination to import for, all if left empty.
-     * List of possible values can be found here.
-     * [https://support.google.com/merchants/answer/7501026]
+     * List of possible values is given in [Included
+     * destination](https://support.google.com/merchants/answer/7501026).
      * List of allowed string values:
      * "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory
      * _ads", "Free_listings", "Free_local_listings"
@@ -1072,8 +1030,8 @@ public int getDestinationsCount() {
      *
      * 
      * String representing the destination to import for, all if left empty.
-     * List of possible values can be found here.
-     * [https://support.google.com/merchants/answer/7501026]
+     * List of possible values is given in [Included
+     * destination](https://support.google.com/merchants/answer/7501026).
      * List of allowed string values:
      * "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory
      * _ads", "Free_listings", "Free_local_listings"
@@ -1093,8 +1051,8 @@ public java.lang.String getDestinations(int index) {
      *
      * 
      * String representing the destination to import for, all if left empty.
-     * List of possible values can be found here.
-     * [https://support.google.com/merchants/answer/7501026]
+     * List of possible values is given in [Included
+     * destination](https://support.google.com/merchants/answer/7501026).
      * List of allowed string values:
      * "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory
      * _ads", "Free_listings", "Free_local_listings"
@@ -1114,8 +1072,8 @@ public com.google.protobuf.ByteString getDestinationsBytes(int index) {
      *
      * 
      * String representing the destination to import for, all if left empty.
-     * List of possible values can be found here.
-     * [https://support.google.com/merchants/answer/7501026]
+     * List of possible values is given in [Included
+     * destination](https://support.google.com/merchants/answer/7501026).
      * List of allowed string values:
      * "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory
      * _ads", "Free_listings", "Free_local_listings"
@@ -1142,8 +1100,8 @@ public Builder setDestinations(int index, java.lang.String value) {
      *
      * 
      * String representing the destination to import for, all if left empty.
-     * List of possible values can be found here.
-     * [https://support.google.com/merchants/answer/7501026]
+     * List of possible values is given in [Included
+     * destination](https://support.google.com/merchants/answer/7501026).
      * List of allowed string values:
      * "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory
      * _ads", "Free_listings", "Free_local_listings"
@@ -1169,8 +1127,8 @@ public Builder addDestinations(java.lang.String value) {
      *
      * 
      * String representing the destination to import for, all if left empty.
-     * List of possible values can be found here.
-     * [https://support.google.com/merchants/answer/7501026]
+     * List of possible values is given in [Included
+     * destination](https://support.google.com/merchants/answer/7501026).
      * List of allowed string values:
      * "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory
      * _ads", "Free_listings", "Free_local_listings"
@@ -1193,8 +1151,8 @@ public Builder addAllDestinations(java.lang.Iterable values) {
      *
      * 
      * String representing the destination to import for, all if left empty.
-     * List of possible values can be found here.
-     * [https://support.google.com/merchants/answer/7501026]
+     * List of possible values is given in [Included
+     * destination](https://support.google.com/merchants/answer/7501026).
      * List of allowed string values:
      * "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory
      * _ads", "Free_listings", "Free_local_listings"
@@ -1216,8 +1174,8 @@ public Builder clearDestinations() {
      *
      * 
      * String representing the destination to import for, all if left empty.
-     * List of possible values can be found here.
-     * [https://support.google.com/merchants/answer/7501026]
+     * List of possible values is given in [Included
+     * destination](https://support.google.com/merchants/answer/7501026).
      * List of allowed string values:
      * "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory
      * _ads", "Free_listings", "Free_local_listings"
@@ -1534,7 +1492,18 @@ public MerchantCenterLink parsePartialFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws com.google.protobuf.InvalidProtocolBufferException {
-          return new MerchantCenterLink(input, extensionRegistry);
+          Builder builder = newBuilder();
+          try {
+            builder.mergeFrom(input, extensionRegistry);
+          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+            throw e.setUnfinishedMessage(builder.buildPartial());
+          } catch (com.google.protobuf.UninitializedMessageException e) {
+            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+          } catch (java.io.IOException e) {
+            throw new com.google.protobuf.InvalidProtocolBufferException(e)
+                .setUnfinishedMessage(builder.buildPartial());
+          }
+          return builder.buildPartial();
         }
       };
 
diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLinkOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLinkOrBuilder.java
index 5c2cbbd1..0fb134c8 100644
--- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLinkOrBuilder.java
+++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLinkOrBuilder.java
@@ -76,8 +76,8 @@ public interface MerchantCenterLinkOrBuilder
    *
    * 
    * String representing the destination to import for, all if left empty.
-   * List of possible values can be found here.
-   * [https://support.google.com/merchants/answer/7501026]
+   * List of possible values is given in [Included
+   * destination](https://support.google.com/merchants/answer/7501026).
    * List of allowed string values:
    * "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory
    * _ads", "Free_listings", "Free_local_listings"
@@ -94,8 +94,8 @@ public interface MerchantCenterLinkOrBuilder
    *
    * 
    * String representing the destination to import for, all if left empty.
-   * List of possible values can be found here.
-   * [https://support.google.com/merchants/answer/7501026]
+   * List of possible values is given in [Included
+   * destination](https://support.google.com/merchants/answer/7501026).
    * List of allowed string values:
    * "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory
    * _ads", "Free_listings", "Free_local_listings"
@@ -112,8 +112,8 @@ public interface MerchantCenterLinkOrBuilder
    *
    * 
    * String representing the destination to import for, all if left empty.
-   * List of possible values can be found here.
-   * [https://support.google.com/merchants/answer/7501026]
+   * List of possible values is given in [Included
+   * destination](https://support.google.com/merchants/answer/7501026).
    * List of allowed string values:
    * "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory
    * _ads", "Free_listings", "Free_local_listings"
@@ -131,8 +131,8 @@ public interface MerchantCenterLinkOrBuilder
    *
    * 
    * String representing the destination to import for, all if left empty.
-   * List of possible values can be found here.
-   * [https://support.google.com/merchants/answer/7501026]
+   * List of possible values is given in [Included
+   * destination](https://support.google.com/merchants/answer/7501026).
    * List of allowed string values:
    * "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory
    * _ads", "Free_listings", "Free_local_listings"
diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLinkingConfig.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLinkingConfig.java
index aa1e095c..38357183 100644
--- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLinkingConfig.java
+++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/MerchantCenterLinkingConfig.java
@@ -54,62 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
     return this.unknownFields;
   }
 
-  private MerchantCenterLinkingConfig(
-      com.google.protobuf.CodedInputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    this();
-    if (extensionRegistry == null) {
-      throw new java.lang.NullPointerException();
-    }
-    int mutable_bitField0_ = 0;
-    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-        com.google.protobuf.UnknownFieldSet.newBuilder();
-    try {
-      boolean done = false;
-      while (!done) {
-        int tag = input.readTag();
-        switch (tag) {
-          case 0:
-            done = true;
-            break;
-          case 10:
-            {
-              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                links_ =
-                    new java.util.ArrayList();
-                mutable_bitField0_ |= 0x00000001;
-              }
-              links_.add(
-                  input.readMessage(
-                      com.google.cloud.retail.v2beta.MerchantCenterLink.parser(),
-                      extensionRegistry));
-              break;
-            }
-          default:
-            {
-              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-        }
-      }
-    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-      throw e.setUnfinishedMessage(this);
-    } catch (com.google.protobuf.UninitializedMessageException e) {
-      throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
-    } catch (java.io.IOException e) {
-      throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-    } finally {
-      if (((mutable_bitField0_ & 0x00000001) != 0)) {
-        links_ = java.util.Collections.unmodifiableList(links_);
-      }
-      this.unknownFields = unknownFields.build();
-      makeExtensionsImmutable();
-    }
-  }
-
   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
     return com.google.cloud.retail.v2beta.CatalogProto
         .internal_static_google_cloud_retail_v2beta_MerchantCenterLinkingConfig_descriptor;
@@ -211,7 +155,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     for (int i = 0; i < links_.size(); i++) {
       output.writeMessage(1, links_.get(i));
     }
-    unknownFields.writeTo(output);
+    getUnknownFields().writeTo(output);
   }
 
   @java.lang.Override
@@ -223,7 +167,7 @@ public int getSerializedSize() {
     for (int i = 0; i < links_.size(); i++) {
       size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, links_.get(i));
     }
-    size += unknownFields.getSerializedSize();
+    size += getUnknownFields().getSerializedSize();
     memoizedSize = size;
     return size;
   }
@@ -240,7 +184,7 @@ public boolean equals(final java.lang.Object obj) {
         (com.google.cloud.retail.v2beta.MerchantCenterLinkingConfig) obj;
 
     if (!getLinksList().equals(other.getLinksList())) return false;
-    if (!unknownFields.equals(other.unknownFields)) return false;
+    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
     return true;
   }
 
@@ -255,7 +199,7 @@ public int hashCode() {
       hash = (37 * hash) + LINKS_FIELD_NUMBER;
       hash = (53 * hash) + getLinksList().hashCode();
     }
-    hash = (29 * hash) + unknownFields.hashCode();
+    hash = (29 * hash) + getUnknownFields().hashCode();
     memoizedHashCode = hash;
     return hash;
   }
@@ -387,19 +331,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
     }
 
     // Construct using com.google.cloud.retail.v2beta.MerchantCenterLinkingConfig.newBuilder()
-    private Builder() {
-      maybeForceBuilderInitialization();
-    }
+    private Builder() {}
 
     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
       super(parent);
-      maybeForceBuilderInitialization();
-    }
-
-    private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-        getLinksFieldBuilder();
-      }
     }
 
     @java.lang.Override
@@ -407,10 +342,11 @@ public Builder clear() {
       super.clear();
       if (linksBuilder_ == null) {
         links_ = java.util.Collections.emptyList();
-        bitField0_ = (bitField0_ & ~0x00000001);
       } else {
+        links_ = null;
         linksBuilder_.clear();
       }
+      bitField0_ = (bitField0_ & ~0x00000001);
       return this;
     }
 
@@ -525,7 +461,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.MerchantCenterLinkingCon
           }
         }
       }
-      this.mergeUnknownFields(other.unknownFields);
+      this.mergeUnknownFields(other.getUnknownFields());
       onChanged();
       return this;
     }
@@ -540,18 +476,45 @@ public Builder mergeFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      com.google.cloud.retail.v2beta.MerchantCenterLinkingConfig parsedMessage = null;
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
       try {
-        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10:
+              {
+                com.google.cloud.retail.v2beta.MerchantCenterLink m =
+                    input.readMessage(
+                        com.google.cloud.retail.v2beta.MerchantCenterLink.parser(),
+                        extensionRegistry);
+                if (linksBuilder_ == null) {
+                  ensureLinksIsMutable();
+                  links_.add(m);
+                } else {
+                  linksBuilder_.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) {
-        parsedMessage =
-            (com.google.cloud.retail.v2beta.MerchantCenterLinkingConfig) e.getUnfinishedMessage();
         throw e.unwrapIOException();
       } finally {
-        if (parsedMessage != null) {
-          mergeFrom(parsedMessage);
-        }
-      }
+        onChanged();
+      } // finally
       return this;
     }
 
@@ -940,7 +903,18 @@ public MerchantCenterLinkingConfig parsePartialFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws com.google.protobuf.InvalidProtocolBufferException {
-          return new MerchantCenterLinkingConfig(input, extensionRegistry);
+          Builder builder = newBuilder();
+          try {
+            builder.mergeFrom(input, extensionRegistry);
+          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+            throw e.setUnfinishedMessage(builder.buildPartial());
+          } catch (com.google.protobuf.UninitializedMessageException e) {
+            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+          } catch (java.io.IOException e) {
+            throw new com.google.protobuf.InvalidProtocolBufferException(e)
+                .setUnfinishedMessage(builder.buildPartial());
+          }
+          return builder.buildPartial();
         }
       };
 
diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Model.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Model.java
new file mode 100644
index 00000000..c7ca9140
--- /dev/null
+++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Model.java
@@ -0,0 +1,5504 @@
+/*
+ * Copyright 2020 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: google/cloud/retail/v2beta/model.proto
+
+package com.google.cloud.retail.v2beta;
+
+/**
+ *
+ *
+ * 
+ * Metadata that describes the training and serving parameters of a
+ * [Model][google.cloud.retail.v2beta.Model]. A
+ * [Model][google.cloud.retail.v2beta.Model] can be associated with a
+ * [ServingConfig][google.cloud.retail.v2beta.ServingConfig] and then queried
+ * through the Predict API.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.Model} + */ +public final class Model extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.Model) + ModelOrBuilder { + private static final long serialVersionUID = 0L; + // Use Model.newBuilder() to construct. + private Model(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Model() { + name_ = ""; + displayName_ = ""; + trainingState_ = 0; + servingState_ = 0; + type_ = ""; + optimizationObjective_ = ""; + periodicTuningState_ = 0; + tuningOperation_ = ""; + dataState_ = 0; + filteringOption_ = 0; + servingConfigLists_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Model(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.Model.class, + com.google.cloud.retail.v2beta.Model.Builder.class); + } + + /** + * + * + *
+   * The serving state of the model.
+   * 
+ * + * Protobuf enum {@code google.cloud.retail.v2beta.Model.ServingState} + */ + public enum ServingState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified serving state.
+     * 
+ * + * SERVING_STATE_UNSPECIFIED = 0; + */ + SERVING_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The model is not serving.
+     * 
+ * + * INACTIVE = 1; + */ + INACTIVE(1), + /** + * + * + *
+     * The model is serving and can be queried.
+     * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+     * The model is trained on tuned hyperparameters and can be
+     * queried.
+     * 
+ * + * TUNED = 3; + */ + TUNED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified serving state.
+     * 
+ * + * SERVING_STATE_UNSPECIFIED = 0; + */ + public static final int SERVING_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The model is not serving.
+     * 
+ * + * INACTIVE = 1; + */ + public static final int INACTIVE_VALUE = 1; + /** + * + * + *
+     * The model is serving and can be queried.
+     * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + /** + * + * + *
+     * The model is trained on tuned hyperparameters and can be
+     * queried.
+     * 
+ * + * TUNED = 3; + */ + public static final int TUNED_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 ServingState 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 ServingState forNumber(int value) { + switch (value) { + case 0: + return SERVING_STATE_UNSPECIFIED; + case 1: + return INACTIVE; + case 2: + return ACTIVE; + case 3: + return TUNED; + 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 ServingState findValueByNumber(int number) { + return ServingState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2beta.Model.getDescriptor().getEnumTypes().get(0); + } + + private static final ServingState[] VALUES = values(); + + public static ServingState 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 ServingState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.Model.ServingState) + } + + /** + * + * + *
+   * The training state of the model.
+   * 
+ * + * Protobuf enum {@code google.cloud.retail.v2beta.Model.TrainingState} + */ + public enum TrainingState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified training state.
+     * 
+ * + * TRAINING_STATE_UNSPECIFIED = 0; + */ + TRAINING_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The model training is paused.
+     * 
+ * + * PAUSED = 1; + */ + PAUSED(1), + /** + * + * + *
+     * The model is training.
+     * 
+ * + * TRAINING = 2; + */ + TRAINING(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified training state.
+     * 
+ * + * TRAINING_STATE_UNSPECIFIED = 0; + */ + public static final int TRAINING_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The model training is paused.
+     * 
+ * + * PAUSED = 1; + */ + public static final int PAUSED_VALUE = 1; + /** + * + * + *
+     * The model is training.
+     * 
+ * + * TRAINING = 2; + */ + public static final int TRAINING_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 TrainingState 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 TrainingState forNumber(int value) { + switch (value) { + case 0: + return TRAINING_STATE_UNSPECIFIED; + case 1: + return PAUSED; + case 2: + return TRAINING; + 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 TrainingState findValueByNumber(int number) { + return TrainingState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2beta.Model.getDescriptor().getEnumTypes().get(1); + } + + private static final TrainingState[] VALUES = values(); + + public static TrainingState 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 TrainingState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.Model.TrainingState) + } + + /** + * + * + *
+   * Describes whether periodic tuning is enabled for this model
+   * or not. Periodic tuning is scheduled at most every three months. You can
+   * start a tuning process manually by using the `TuneModel`
+   * method, which starts a tuning process immediately and resets the quarterly
+   * schedule. Enabling or disabling periodic tuning does not affect any
+   * current tuning processes.
+   * 
+ * + * Protobuf enum {@code google.cloud.retail.v2beta.Model.PeriodicTuningState} + */ + public enum PeriodicTuningState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified default value, should never be explicitly set.
+     * 
+ * + * PERIODIC_TUNING_STATE_UNSPECIFIED = 0; + */ + PERIODIC_TUNING_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The model has periodic tuning disabled. Tuning
+     * can be reenabled by calling the `EnableModelPeriodicTuning`
+     * method or by calling the `TuneModel` method.
+     * 
+ * + * PERIODIC_TUNING_DISABLED = 1; + */ + PERIODIC_TUNING_DISABLED(1), + /** + * + * + *
+     * The model cannot be tuned with periodic tuning OR the
+     * `TuneModel` method. Hide the options in customer UI and
+     * reject any requests through the backend self serve API.
+     * 
+ * + * ALL_TUNING_DISABLED = 3; + */ + ALL_TUNING_DISABLED(3), + /** + * + * + *
+     * The model has periodic tuning enabled. Tuning
+     * can be disabled by calling the `DisableModelPeriodicTuning`
+     * method.
+     * 
+ * + * PERIODIC_TUNING_ENABLED = 2; + */ + PERIODIC_TUNING_ENABLED(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified default value, should never be explicitly set.
+     * 
+ * + * PERIODIC_TUNING_STATE_UNSPECIFIED = 0; + */ + public static final int PERIODIC_TUNING_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The model has periodic tuning disabled. Tuning
+     * can be reenabled by calling the `EnableModelPeriodicTuning`
+     * method or by calling the `TuneModel` method.
+     * 
+ * + * PERIODIC_TUNING_DISABLED = 1; + */ + public static final int PERIODIC_TUNING_DISABLED_VALUE = 1; + /** + * + * + *
+     * The model cannot be tuned with periodic tuning OR the
+     * `TuneModel` method. Hide the options in customer UI and
+     * reject any requests through the backend self serve API.
+     * 
+ * + * ALL_TUNING_DISABLED = 3; + */ + public static final int ALL_TUNING_DISABLED_VALUE = 3; + /** + * + * + *
+     * The model has periodic tuning enabled. Tuning
+     * can be disabled by calling the `DisableModelPeriodicTuning`
+     * method.
+     * 
+ * + * PERIODIC_TUNING_ENABLED = 2; + */ + public static final int PERIODIC_TUNING_ENABLED_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 PeriodicTuningState 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 PeriodicTuningState forNumber(int value) { + switch (value) { + case 0: + return PERIODIC_TUNING_STATE_UNSPECIFIED; + case 1: + return PERIODIC_TUNING_DISABLED; + case 3: + return ALL_TUNING_DISABLED; + case 2: + return PERIODIC_TUNING_ENABLED; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap + internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap + internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public PeriodicTuningState findValueByNumber(int number) { + return PeriodicTuningState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2beta.Model.getDescriptor().getEnumTypes().get(2); + } + + private static final PeriodicTuningState[] VALUES = values(); + + public static PeriodicTuningState 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 PeriodicTuningState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.Model.PeriodicTuningState) + } + + /** + * + * + *
+   * Describes whether this model have sufficient training data
+   * to be continuously trained.
+   * 
+ * + * Protobuf enum {@code google.cloud.retail.v2beta.Model.DataState} + */ + public enum DataState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecified default value, should never be explicitly set.
+     * 
+ * + * DATA_STATE_UNSPECIFIED = 0; + */ + DATA_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The model has sufficient training data.
+     * 
+ * + * DATA_OK = 1; + */ + DATA_OK(1), + /** + * + * + *
+     * The model does not have sufficient training data. Error
+     * messages can be queried via Stackdriver.
+     * 
+ * + * DATA_ERROR = 2; + */ + DATA_ERROR(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecified default value, should never be explicitly set.
+     * 
+ * + * DATA_STATE_UNSPECIFIED = 0; + */ + public static final int DATA_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The model has sufficient training data.
+     * 
+ * + * DATA_OK = 1; + */ + public static final int DATA_OK_VALUE = 1; + /** + * + * + *
+     * The model does not have sufficient training data. Error
+     * messages can be queried via Stackdriver.
+     * 
+ * + * DATA_ERROR = 2; + */ + public static final int DATA_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 DataState 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 DataState forNumber(int value) { + switch (value) { + case 0: + return DATA_STATE_UNSPECIFIED; + case 1: + return DATA_OK; + case 2: + return DATA_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 DataState findValueByNumber(int number) { + return DataState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2beta.Model.getDescriptor().getEnumTypes().get(3); + } + + private static final DataState[] VALUES = values(); + + public static DataState 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 DataState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.Model.DataState) + } + + public interface ServingConfigListOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.Model.ServingConfigList) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Optional. A set of valid serving configs that may be used for
+     * `PAGE_OPTIMIZATION`.
+     * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the servingConfigIds. + */ + java.util.List getServingConfigIdsList(); + /** + * + * + *
+     * Optional. A set of valid serving configs that may be used for
+     * `PAGE_OPTIMIZATION`.
+     * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of servingConfigIds. + */ + int getServingConfigIdsCount(); + /** + * + * + *
+     * Optional. A set of valid serving configs that may be used for
+     * `PAGE_OPTIMIZATION`.
+     * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The servingConfigIds at the given index. + */ + java.lang.String getServingConfigIds(int index); + /** + * + * + *
+     * Optional. A set of valid serving configs that may be used for
+     * `PAGE_OPTIMIZATION`.
+     * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the servingConfigIds at the given index. + */ + com.google.protobuf.ByteString getServingConfigIdsBytes(int index); + } + /** + * + * + *
+   * Represents an ordered combination of valid serving configs, which
+   * can be used for `PAGE_OPTIMIZATION` recommendations.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.Model.ServingConfigList} + */ + public static final class ServingConfigList extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.Model.ServingConfigList) + ServingConfigListOrBuilder { + private static final long serialVersionUID = 0L; + // Use ServingConfigList.newBuilder() to construct. + private ServingConfigList(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ServingConfigList() { + servingConfigIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ServingConfigList(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_ServingConfigList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_ServingConfigList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.Model.ServingConfigList.class, + com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder.class); + } + + public static final int SERVING_CONFIG_IDS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList servingConfigIds_; + /** + * + * + *
+     * Optional. A set of valid serving configs that may be used for
+     * `PAGE_OPTIMIZATION`.
+     * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the servingConfigIds. + */ + public com.google.protobuf.ProtocolStringList getServingConfigIdsList() { + return servingConfigIds_; + } + /** + * + * + *
+     * Optional. A set of valid serving configs that may be used for
+     * `PAGE_OPTIMIZATION`.
+     * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of servingConfigIds. + */ + public int getServingConfigIdsCount() { + return servingConfigIds_.size(); + } + /** + * + * + *
+     * Optional. A set of valid serving configs that may be used for
+     * `PAGE_OPTIMIZATION`.
+     * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The servingConfigIds at the given index. + */ + public java.lang.String getServingConfigIds(int index) { + return servingConfigIds_.get(index); + } + /** + * + * + *
+     * Optional. A set of valid serving configs that may be used for
+     * `PAGE_OPTIMIZATION`.
+     * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the servingConfigIds at the given index. + */ + public com.google.protobuf.ByteString getServingConfigIdsBytes(int index) { + return servingConfigIds_.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 < servingConfigIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, servingConfigIds_.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 < servingConfigIds_.size(); i++) { + dataSize += computeStringSizeNoTag(servingConfigIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getServingConfigIdsList().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.retail.v2beta.Model.ServingConfigList)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.Model.ServingConfigList other = + (com.google.cloud.retail.v2beta.Model.ServingConfigList) obj; + + if (!getServingConfigIdsList().equals(other.getServingConfigIdsList())) return false; + if (!getUnknownFields().equals(other.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 (getServingConfigIdsCount() > 0) { + hash = (37 * hash) + SERVING_CONFIG_IDS_FIELD_NUMBER; + hash = (53 * hash) + getServingConfigIdsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.Model.ServingConfigList parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Model.ServingConfigList parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model.ServingConfigList parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Model.ServingConfigList parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model.ServingConfigList parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Model.ServingConfigList parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model.ServingConfigList parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Model.ServingConfigList parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model.ServingConfigList parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Model.ServingConfigList parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model.ServingConfigList parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Model.ServingConfigList parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.retail.v2beta.Model.ServingConfigList prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Represents an ordered combination of valid serving configs, which
+     * can be used for `PAGE_OPTIMIZATION` recommendations.
+     * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.Model.ServingConfigList} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.Model.ServingConfigList) + com.google.cloud.retail.v2beta.Model.ServingConfigListOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_ServingConfigList_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_ServingConfigList_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.Model.ServingConfigList.class, + com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.Model.ServingConfigList.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + servingConfigIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_ServingConfigList_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.ServingConfigList getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.Model.ServingConfigList.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.ServingConfigList build() { + com.google.cloud.retail.v2beta.Model.ServingConfigList result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.ServingConfigList buildPartial() { + com.google.cloud.retail.v2beta.Model.ServingConfigList result = + new com.google.cloud.retail.v2beta.Model.ServingConfigList(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + servingConfigIds_ = servingConfigIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.servingConfigIds_ = servingConfigIds_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.Model.ServingConfigList) { + return mergeFrom((com.google.cloud.retail.v2beta.Model.ServingConfigList) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.Model.ServingConfigList other) { + if (other == com.google.cloud.retail.v2beta.Model.ServingConfigList.getDefaultInstance()) + return this; + if (!other.servingConfigIds_.isEmpty()) { + if (servingConfigIds_.isEmpty()) { + servingConfigIds_ = other.servingConfigIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServingConfigIdsIsMutable(); + servingConfigIds_.addAll(other.servingConfigIds_); + } + 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(); + ensureServingConfigIdsIsMutable(); + servingConfigIds_.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.LazyStringList servingConfigIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureServingConfigIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + servingConfigIds_ = new com.google.protobuf.LazyStringArrayList(servingConfigIds_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * Optional. A set of valid serving configs that may be used for
+       * `PAGE_OPTIMIZATION`.
+       * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return A list containing the servingConfigIds. + */ + public com.google.protobuf.ProtocolStringList getServingConfigIdsList() { + return servingConfigIds_.getUnmodifiableView(); + } + /** + * + * + *
+       * Optional. A set of valid serving configs that may be used for
+       * `PAGE_OPTIMIZATION`.
+       * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The count of servingConfigIds. + */ + public int getServingConfigIdsCount() { + return servingConfigIds_.size(); + } + /** + * + * + *
+       * Optional. A set of valid serving configs that may be used for
+       * `PAGE_OPTIMIZATION`.
+       * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the element to return. + * @return The servingConfigIds at the given index. + */ + public java.lang.String getServingConfigIds(int index) { + return servingConfigIds_.get(index); + } + /** + * + * + *
+       * Optional. A set of valid serving configs that may be used for
+       * `PAGE_OPTIMIZATION`.
+       * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index of the value to return. + * @return The bytes of the servingConfigIds at the given index. + */ + public com.google.protobuf.ByteString getServingConfigIdsBytes(int index) { + return servingConfigIds_.getByteString(index); + } + /** + * + * + *
+       * Optional. A set of valid serving configs that may be used for
+       * `PAGE_OPTIMIZATION`.
+       * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param index The index to set the value at. + * @param value The servingConfigIds to set. + * @return This builder for chaining. + */ + public Builder setServingConfigIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServingConfigIdsIsMutable(); + servingConfigIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A set of valid serving configs that may be used for
+       * `PAGE_OPTIMIZATION`.
+       * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The servingConfigIds to add. + * @return This builder for chaining. + */ + public Builder addServingConfigIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureServingConfigIdsIsMutable(); + servingConfigIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A set of valid serving configs that may be used for
+       * `PAGE_OPTIMIZATION`.
+       * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param values The servingConfigIds to add. + * @return This builder for chaining. + */ + public Builder addAllServingConfigIds(java.lang.Iterable values) { + ensureServingConfigIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, servingConfigIds_); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A set of valid serving configs that may be used for
+       * `PAGE_OPTIMIZATION`.
+       * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearServingConfigIds() { + servingConfigIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. A set of valid serving configs that may be used for
+       * `PAGE_OPTIMIZATION`.
+       * 
+ * + * repeated string serving_config_ids = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The bytes of the servingConfigIds to add. + * @return This builder for chaining. + */ + public Builder addServingConfigIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureServingConfigIdsIsMutable(); + servingConfigIds_.add(value); + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.Model.ServingConfigList) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.Model.ServingConfigList) + private static final com.google.cloud.retail.v2beta.Model.ServingConfigList DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.Model.ServingConfigList(); + } + + public static com.google.cloud.retail.v2beta.Model.ServingConfigList getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ServingConfigList parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.ServingConfigList getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The fully qualified resource name of the model.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * catalog_id has char limit of 50.
+   * recommendation_model_id has char limit of 40.
+   * 
+ * + * 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 fully qualified resource name of the model.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * catalog_id has char limit of 50.
+   * recommendation_model_id has char limit of 40.
+   * 
+ * + * 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 DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Required. The display name of the model.
+   * Should be human readable, used to display Recommendation Models in the
+   * Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024
+   * 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 model.
+   * Should be human readable, used to display Recommendation Models in the
+   * Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024
+   * 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 TRAINING_STATE_FIELD_NUMBER = 3; + private int trainingState_; + /** + * + * + *
+   * Optional. The training state that the model is in (e.g.
+   * `TRAINING` or `PAUSED`).
+   * Since part of the cost of running the service
+   * is frequency of training - this can be used to determine when to train
+   * model in order to control cost. If not specified: the default value for
+   * `CreateModel` method is `TRAINING`. The default value for
+   * `UpdateModel` method is to keep the state the same as before.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for trainingState. + */ + @java.lang.Override + public int getTrainingStateValue() { + return trainingState_; + } + /** + * + * + *
+   * Optional. The training state that the model is in (e.g.
+   * `TRAINING` or `PAUSED`).
+   * Since part of the cost of running the service
+   * is frequency of training - this can be used to determine when to train
+   * model in order to control cost. If not specified: the default value for
+   * `CreateModel` method is `TRAINING`. The default value for
+   * `UpdateModel` method is to keep the state the same as before.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The trainingState. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.TrainingState getTrainingState() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2beta.Model.TrainingState result = + com.google.cloud.retail.v2beta.Model.TrainingState.valueOf(trainingState_); + return result == null + ? com.google.cloud.retail.v2beta.Model.TrainingState.UNRECOGNIZED + : result; + } + + public static final int SERVING_STATE_FIELD_NUMBER = 4; + private int servingState_; + /** + * + * + *
+   * Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for servingState. + */ + @java.lang.Override + public int getServingStateValue() { + return servingState_; + } + /** + * + * + *
+   * Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The servingState. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.ServingState getServingState() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2beta.Model.ServingState result = + com.google.cloud.retail.v2beta.Model.ServingState.valueOf(servingState_); + return result == null ? com.google.cloud.retail.v2beta.Model.ServingState.UNRECOGNIZED : result; + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp the Recommendation Model was created at.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp the Recommendation Model was created at.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.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 the Recommendation Model was created at.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Timestamp the Recommendation Model was last updated. E.g.
+   * if a Recommendation Model was paused - this would be the time the pause was
+   * initiated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp the Recommendation Model was last updated. E.g.
+   * if a Recommendation Model was paused - this would be the time the pause was
+   * initiated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.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 the Recommendation Model was last updated. E.g.
+   * if a Recommendation Model was paused - this would be the time the pause was
+   * initiated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int TYPE_FIELD_NUMBER = 7; + private volatile java.lang.Object type_; + /** + * + * + *
+   * Required. The type of model e.g. `home-page`.
+   * Currently supported values: `recommended-for-you`, `others-you-may-like`,
+   * `frequently-bought-together`, `page-optimization`, `similar-items`,
+   * `buy-it-again`, and `recently-viewed`(readonly value).
+   * This field together with
+   * [optimization_objective][google.cloud.retail.v2beta.Model.optimization_objective]
+   * describe model metadata to use to control model training and serving.
+   * See https://cloud.google.com/retail/docs/models
+   * for more details on what the model metadata control and which combination
+   * of parameters are valid. For invalid combinations of parameters (e.g. type
+   * = `frequently-bought-together` and optimization_objective = `ctr`), you
+   * receive an error 400 if you try to create/update a recommendation with
+   * this set of knobs.
+   * 
+ * + * string type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The type. + */ + @java.lang.Override + public java.lang.String getType() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The type of model e.g. `home-page`.
+   * Currently supported values: `recommended-for-you`, `others-you-may-like`,
+   * `frequently-bought-together`, `page-optimization`, `similar-items`,
+   * `buy-it-again`, and `recently-viewed`(readonly value).
+   * This field together with
+   * [optimization_objective][google.cloud.retail.v2beta.Model.optimization_objective]
+   * describe model metadata to use to control model training and serving.
+   * See https://cloud.google.com/retail/docs/models
+   * for more details on what the model metadata control and which combination
+   * of parameters are valid. For invalid combinations of parameters (e.g. type
+   * = `frequently-bought-together` and optimization_objective = `ctr`), you
+   * receive an error 400 if you try to create/update a recommendation with
+   * this set of knobs.
+   * 
+ * + * string type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for type. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OPTIMIZATION_OBJECTIVE_FIELD_NUMBER = 8; + private volatile java.lang.Object optimizationObjective_; + /** + * + * + *
+   * Optional. The optimization objective e.g. `cvr`.
+   * Currently supported
+   * values: `ctr`, `cvr`, `revenue-per-order`.
+   *  If not specified, we choose default based on model type.
+   * Default depends on type of recommendation:
+   * `recommended-for-you` => `ctr`
+   * `others-you-may-like` => `ctr`
+   * `frequently-bought-together` => `revenue_per_order`
+   * This field together with
+   * [optimization_objective][google.cloud.retail.v2beta.Model.type]
+   * describe model metadata to use to control model training and serving.
+   * See https://cloud.google.com/retail/docs/models
+   * for more details on what the model metadata control and which combination
+   * of parameters are valid. For invalid combinations of parameters (e.g. type
+   * = `frequently-bought-together` and optimization_objective = `ctr`), you
+   * receive an error 400 if you try to create/update a recommendation with
+   * this set of knobs.
+   * 
+ * + * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The optimizationObjective. + */ + @java.lang.Override + public java.lang.String getOptimizationObjective() { + java.lang.Object ref = optimizationObjective_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optimizationObjective_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The optimization objective e.g. `cvr`.
+   * Currently supported
+   * values: `ctr`, `cvr`, `revenue-per-order`.
+   *  If not specified, we choose default based on model type.
+   * Default depends on type of recommendation:
+   * `recommended-for-you` => `ctr`
+   * `others-you-may-like` => `ctr`
+   * `frequently-bought-together` => `revenue_per_order`
+   * This field together with
+   * [optimization_objective][google.cloud.retail.v2beta.Model.type]
+   * describe model metadata to use to control model training and serving.
+   * See https://cloud.google.com/retail/docs/models
+   * for more details on what the model metadata control and which combination
+   * of parameters are valid. For invalid combinations of parameters (e.g. type
+   * = `frequently-bought-together` and optimization_objective = `ctr`), you
+   * receive an error 400 if you try to create/update a recommendation with
+   * this set of knobs.
+   * 
+ * + * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for optimizationObjective. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOptimizationObjectiveBytes() { + java.lang.Object ref = optimizationObjective_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + optimizationObjective_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PERIODIC_TUNING_STATE_FIELD_NUMBER = 11; + private int periodicTuningState_; + /** + * + * + *
+   * Optional. The state of periodic tuning.
+   * The period we use is 3 months - to do a
+   * one-off tune earlier use the `TuneModel` method. Default value
+   * is `PERIODIC_TUNING_ENABLED`.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for periodicTuningState. + */ + @java.lang.Override + public int getPeriodicTuningStateValue() { + return periodicTuningState_; + } + /** + * + * + *
+   * Optional. The state of periodic tuning.
+   * The period we use is 3 months - to do a
+   * one-off tune earlier use the `TuneModel` method. Default value
+   * is `PERIODIC_TUNING_ENABLED`.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The periodicTuningState. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.PeriodicTuningState getPeriodicTuningState() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2beta.Model.PeriodicTuningState result = + com.google.cloud.retail.v2beta.Model.PeriodicTuningState.valueOf(periodicTuningState_); + return result == null + ? com.google.cloud.retail.v2beta.Model.PeriodicTuningState.UNRECOGNIZED + : result; + } + + public static final int LAST_TUNE_TIME_FIELD_NUMBER = 12; + private com.google.protobuf.Timestamp lastTuneTime_; + /** + * + * + *
+   * Output only. The timestamp when the latest successful tune finished.
+   * 
+ * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastTuneTime field is set. + */ + @java.lang.Override + public boolean hasLastTuneTime() { + return lastTuneTime_ != null; + } + /** + * + * + *
+   * Output only. The timestamp when the latest successful tune finished.
+   * 
+ * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastTuneTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getLastTuneTime() { + return lastTuneTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastTuneTime_; + } + /** + * + * + *
+   * Output only. The timestamp when the latest successful tune finished.
+   * 
+ * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getLastTuneTimeOrBuilder() { + return getLastTuneTime(); + } + + public static final int TUNING_OPERATION_FIELD_NUMBER = 15; + private volatile java.lang.Object tuningOperation_; + /** + * + * + *
+   * Output only. The tune operation associated with the model.
+   * Can be used to determine if there is an ongoing tune for this
+   * recommendation. Empty field implies no tune is goig on.
+   * 
+ * + * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tuningOperation. + */ + @java.lang.Override + public java.lang.String getTuningOperation() { + java.lang.Object ref = tuningOperation_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tuningOperation_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The tune operation associated with the model.
+   * Can be used to determine if there is an ongoing tune for this
+   * recommendation. Empty field implies no tune is goig on.
+   * 
+ * + * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for tuningOperation. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTuningOperationBytes() { + java.lang.Object ref = tuningOperation_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tuningOperation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DATA_STATE_FIELD_NUMBER = 16; + private int dataState_; + /** + * + * + *
+   * Output only. The state of data requirements for this model: `DATA_OK` and
+   * `DATA_ERROR`.
+   * Recommendation model cannot be trained if the data is in
+   * `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even
+   * if serving state is `ACTIVE`: models were trained successfully before, but
+   * cannot be refreshed because model no longer has sufficient
+   * data for training.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for dataState. + */ + @java.lang.Override + public int getDataStateValue() { + return dataState_; + } + /** + * + * + *
+   * Output only. The state of data requirements for this model: `DATA_OK` and
+   * `DATA_ERROR`.
+   * Recommendation model cannot be trained if the data is in
+   * `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even
+   * if serving state is `ACTIVE`: models were trained successfully before, but
+   * cannot be refreshed because model no longer has sufficient
+   * data for training.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataState. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.DataState getDataState() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2beta.Model.DataState result = + com.google.cloud.retail.v2beta.Model.DataState.valueOf(dataState_); + return result == null ? com.google.cloud.retail.v2beta.Model.DataState.UNRECOGNIZED : result; + } + + public static final int FILTERING_OPTION_FIELD_NUMBER = 18; + private int filteringOption_; + /** + * + * + *
+   * Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering
+   * by attributes is enabled for the model.
+   * 
+ * + * + * .google.cloud.retail.v2beta.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for filteringOption. + */ + @java.lang.Override + public int getFilteringOptionValue() { + return filteringOption_; + } + /** + * + * + *
+   * Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering
+   * by attributes is enabled for the model.
+   * 
+ * + * + * .google.cloud.retail.v2beta.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The filteringOption. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.RecommendationsFilteringOption getFilteringOption() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2beta.RecommendationsFilteringOption result = + com.google.cloud.retail.v2beta.RecommendationsFilteringOption.valueOf(filteringOption_); + return result == null + ? com.google.cloud.retail.v2beta.RecommendationsFilteringOption.UNRECOGNIZED + : result; + } + + public static final int SERVING_CONFIG_LISTS_FIELD_NUMBER = 19; + private java.util.List + servingConfigLists_; + /** + * + * + *
+   * Output only. The list of valid serving configs associated with the
+   * PageOptimizationConfig.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getServingConfigListsList() { + return servingConfigLists_; + } + /** + * + * + *
+   * Output only. The list of valid serving configs associated with the
+   * PageOptimizationConfig.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getServingConfigListsOrBuilderList() { + return servingConfigLists_; + } + /** + * + * + *
+   * Output only. The list of valid serving configs associated with the
+   * PageOptimizationConfig.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getServingConfigListsCount() { + return servingConfigLists_.size(); + } + /** + * + * + *
+   * Output only. The list of valid serving configs associated with the
+   * PageOptimizationConfig.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.ServingConfigList getServingConfigLists(int index) { + return servingConfigLists_.get(index); + } + /** + * + * + *
+   * Output only. The list of valid serving configs associated with the
+   * PageOptimizationConfig.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.ServingConfigListOrBuilder + getServingConfigListsOrBuilder(int index) { + return servingConfigLists_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, displayName_); + } + if (trainingState_ + != com.google.cloud.retail.v2beta.Model.TrainingState.TRAINING_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, trainingState_); + } + if (servingState_ + != com.google.cloud.retail.v2beta.Model.ServingState.SERVING_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, servingState_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(6, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optimizationObjective_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, optimizationObjective_); + } + if (periodicTuningState_ + != com.google.cloud.retail.v2beta.Model.PeriodicTuningState + .PERIODIC_TUNING_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(11, periodicTuningState_); + } + if (lastTuneTime_ != null) { + output.writeMessage(12, getLastTuneTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tuningOperation_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 15, tuningOperation_); + } + if (dataState_ + != com.google.cloud.retail.v2beta.Model.DataState.DATA_STATE_UNSPECIFIED.getNumber()) { + output.writeEnum(16, dataState_); + } + if (filteringOption_ + != com.google.cloud.retail.v2beta.RecommendationsFilteringOption + .RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED + .getNumber()) { + output.writeEnum(18, filteringOption_); + } + for (int i = 0; i < servingConfigLists_.size(); i++) { + output.writeMessage(19, servingConfigLists_.get(i)); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(displayName_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, displayName_); + } + if (trainingState_ + != com.google.cloud.retail.v2beta.Model.TrainingState.TRAINING_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, trainingState_); + } + if (servingState_ + != com.google.cloud.retail.v2beta.Model.ServingState.SERVING_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, servingState_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(type_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, type_); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(optimizationObjective_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, optimizationObjective_); + } + if (periodicTuningState_ + != com.google.cloud.retail.v2beta.Model.PeriodicTuningState + .PERIODIC_TUNING_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(11, periodicTuningState_); + } + if (lastTuneTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getLastTuneTime()); + } + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(tuningOperation_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(15, tuningOperation_); + } + if (dataState_ + != com.google.cloud.retail.v2beta.Model.DataState.DATA_STATE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(16, dataState_); + } + if (filteringOption_ + != com.google.cloud.retail.v2beta.RecommendationsFilteringOption + .RECOMMENDATIONS_FILTERING_OPTION_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(18, filteringOption_); + } + for (int i = 0; i < servingConfigLists_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(19, servingConfigLists_.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.retail.v2beta.Model)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.Model other = (com.google.cloud.retail.v2beta.Model) obj; + + if (!getName().equals(other.getName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (trainingState_ != other.trainingState_) return false; + if (servingState_ != other.servingState_) 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 (!getType().equals(other.getType())) return false; + if (!getOptimizationObjective().equals(other.getOptimizationObjective())) return false; + if (periodicTuningState_ != other.periodicTuningState_) return false; + if (hasLastTuneTime() != other.hasLastTuneTime()) return false; + if (hasLastTuneTime()) { + if (!getLastTuneTime().equals(other.getLastTuneTime())) return false; + } + if (!getTuningOperation().equals(other.getTuningOperation())) return false; + if (dataState_ != other.dataState_) return false; + if (filteringOption_ != other.filteringOption_) return false; + if (!getServingConfigListsList().equals(other.getServingConfigListsList())) return false; + if (!getUnknownFields().equals(other.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) + TRAINING_STATE_FIELD_NUMBER; + hash = (53 * hash) + trainingState_; + hash = (37 * hash) + SERVING_STATE_FIELD_NUMBER; + hash = (53 * hash) + servingState_; + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + getType().hashCode(); + hash = (37 * hash) + OPTIMIZATION_OBJECTIVE_FIELD_NUMBER; + hash = (53 * hash) + getOptimizationObjective().hashCode(); + hash = (37 * hash) + PERIODIC_TUNING_STATE_FIELD_NUMBER; + hash = (53 * hash) + periodicTuningState_; + if (hasLastTuneTime()) { + hash = (37 * hash) + LAST_TUNE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getLastTuneTime().hashCode(); + } + hash = (37 * hash) + TUNING_OPERATION_FIELD_NUMBER; + hash = (53 * hash) + getTuningOperation().hashCode(); + hash = (37 * hash) + DATA_STATE_FIELD_NUMBER; + hash = (53 * hash) + dataState_; + hash = (37 * hash) + FILTERING_OPTION_FIELD_NUMBER; + hash = (53 * hash) + filteringOption_; + if (getServingConfigListsCount() > 0) { + hash = (37 * hash) + SERVING_CONFIG_LISTS_FIELD_NUMBER; + hash = (53 * hash) + getServingConfigListsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.Model parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Model parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Model parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.Model parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Model parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Model parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.Model parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.Model parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2beta.Model prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata that describes the training and serving parameters of a
+   * [Model][google.cloud.retail.v2beta.Model]. A
+   * [Model][google.cloud.retail.v2beta.Model] can be associated with a
+   * [ServingConfig][google.cloud.retail.v2beta.ServingConfig] and then queried
+   * through the Predict API.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.Model} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.Model) + com.google.cloud.retail.v2beta.ModelOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.Model.class, + com.google.cloud.retail.v2beta.Model.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.Model.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + displayName_ = ""; + + trainingState_ = 0; + + servingState_ = 0; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + type_ = ""; + + optimizationObjective_ = ""; + + periodicTuningState_ = 0; + + if (lastTuneTimeBuilder_ == null) { + lastTuneTime_ = null; + } else { + lastTuneTime_ = null; + lastTuneTimeBuilder_ = null; + } + tuningOperation_ = ""; + + dataState_ = 0; + + filteringOption_ = 0; + + if (servingConfigListsBuilder_ == null) { + servingConfigLists_ = java.util.Collections.emptyList(); + } else { + servingConfigLists_ = null; + servingConfigListsBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00000001); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.ModelProto + .internal_static_google_cloud_retail_v2beta_Model_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Model getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.Model.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Model build() { + com.google.cloud.retail.v2beta.Model result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Model buildPartial() { + com.google.cloud.retail.v2beta.Model result = new com.google.cloud.retail.v2beta.Model(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.displayName_ = displayName_; + result.trainingState_ = trainingState_; + result.servingState_ = servingState_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.type_ = type_; + result.optimizationObjective_ = optimizationObjective_; + result.periodicTuningState_ = periodicTuningState_; + if (lastTuneTimeBuilder_ == null) { + result.lastTuneTime_ = lastTuneTime_; + } else { + result.lastTuneTime_ = lastTuneTimeBuilder_.build(); + } + result.tuningOperation_ = tuningOperation_; + result.dataState_ = dataState_; + result.filteringOption_ = filteringOption_; + if (servingConfigListsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + servingConfigLists_ = java.util.Collections.unmodifiableList(servingConfigLists_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.servingConfigLists_ = servingConfigLists_; + } else { + result.servingConfigLists_ = servingConfigListsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.Model) { + return mergeFrom((com.google.cloud.retail.v2beta.Model) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.Model other) { + if (other == com.google.cloud.retail.v2beta.Model.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (other.trainingState_ != 0) { + setTrainingStateValue(other.getTrainingStateValue()); + } + if (other.servingState_ != 0) { + setServingStateValue(other.getServingStateValue()); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getType().isEmpty()) { + type_ = other.type_; + onChanged(); + } + if (!other.getOptimizationObjective().isEmpty()) { + optimizationObjective_ = other.optimizationObjective_; + onChanged(); + } + if (other.periodicTuningState_ != 0) { + setPeriodicTuningStateValue(other.getPeriodicTuningStateValue()); + } + if (other.hasLastTuneTime()) { + mergeLastTuneTime(other.getLastTuneTime()); + } + if (!other.getTuningOperation().isEmpty()) { + tuningOperation_ = other.tuningOperation_; + onChanged(); + } + if (other.dataState_ != 0) { + setDataStateValue(other.getDataStateValue()); + } + if (other.filteringOption_ != 0) { + setFilteringOptionValue(other.getFilteringOptionValue()); + } + if (servingConfigListsBuilder_ == null) { + if (!other.servingConfigLists_.isEmpty()) { + if (servingConfigLists_.isEmpty()) { + servingConfigLists_ = other.servingConfigLists_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServingConfigListsIsMutable(); + servingConfigLists_.addAll(other.servingConfigLists_); + } + onChanged(); + } + } else { + if (!other.servingConfigLists_.isEmpty()) { + if (servingConfigListsBuilder_.isEmpty()) { + servingConfigListsBuilder_.dispose(); + servingConfigListsBuilder_ = null; + servingConfigLists_ = other.servingConfigLists_; + bitField0_ = (bitField0_ & ~0x00000001); + servingConfigListsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getServingConfigListsFieldBuilder() + : null; + } else { + servingConfigListsBuilder_.addAllMessages(other.servingConfigLists_); + } + } + } + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + 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(); + + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + trainingState_ = input.readEnum(); + + break; + } // case 24 + case 32: + { + servingState_ = input.readEnum(); + + break; + } // case 32 + case 42: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + type_ = input.readStringRequireUtf8(); + + break; + } // case 58 + case 66: + { + optimizationObjective_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 88: + { + periodicTuningState_ = input.readEnum(); + + break; + } // case 88 + case 98: + { + input.readMessage(getLastTuneTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 98 + case 122: + { + tuningOperation_ = input.readStringRequireUtf8(); + + break; + } // case 122 + case 128: + { + dataState_ = input.readEnum(); + + break; + } // case 128 + case 144: + { + filteringOption_ = input.readEnum(); + + break; + } // case 144 + case 154: + { + com.google.cloud.retail.v2beta.Model.ServingConfigList m = + input.readMessage( + com.google.cloud.retail.v2beta.Model.ServingConfigList.parser(), + extensionRegistry); + if (servingConfigListsBuilder_ == null) { + ensureServingConfigListsIsMutable(); + servingConfigLists_.add(m); + } else { + servingConfigListsBuilder_.addMessage(m); + } + break; + } // case 154 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + 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 fully qualified resource name of the model.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * catalog_id has char limit of 50.
+     * recommendation_model_id has char limit of 40.
+     * 
+ * + * 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 fully qualified resource name of the model.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * catalog_id has char limit of 50.
+     * recommendation_model_id has char limit of 40.
+     * 
+ * + * 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 fully qualified resource name of the model.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * catalog_id has char limit of 50.
+     * recommendation_model_id has char limit of 40.
+     * 
+ * + * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The fully qualified resource name of the model.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * catalog_id has char limit of 50.
+     * recommendation_model_id has char limit of 40.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The fully qualified resource name of the model.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * catalog_id has char limit of 50.
+     * recommendation_model_id has char limit of 40.
+     * 
+ * + * 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; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Required. The display name of the model.
+     * Should be human readable, used to display Recommendation Models in the
+     * Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024
+     * 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 model.
+     * Should be human readable, used to display Recommendation Models in the
+     * Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024
+     * 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 model.
+     * Should be human readable, used to display Recommendation Models in the
+     * Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024
+     * 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; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the model.
+     * Should be human readable, used to display Recommendation Models in the
+     * Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024
+     * characters.
+     * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The display name of the model.
+     * Should be human readable, used to display Recommendation Models in the
+     * Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024
+     * 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; + onChanged(); + return this; + } + + private int trainingState_ = 0; + /** + * + * + *
+     * Optional. The training state that the model is in (e.g.
+     * `TRAINING` or `PAUSED`).
+     * Since part of the cost of running the service
+     * is frequency of training - this can be used to determine when to train
+     * model in order to control cost. If not specified: the default value for
+     * `CreateModel` method is `TRAINING`. The default value for
+     * `UpdateModel` method is to keep the state the same as before.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for trainingState. + */ + @java.lang.Override + public int getTrainingStateValue() { + return trainingState_; + } + /** + * + * + *
+     * Optional. The training state that the model is in (e.g.
+     * `TRAINING` or `PAUSED`).
+     * Since part of the cost of running the service
+     * is frequency of training - this can be used to determine when to train
+     * model in order to control cost. If not specified: the default value for
+     * `CreateModel` method is `TRAINING`. The default value for
+     * `UpdateModel` method is to keep the state the same as before.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for trainingState to set. + * @return This builder for chaining. + */ + public Builder setTrainingStateValue(int value) { + + trainingState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The training state that the model is in (e.g.
+     * `TRAINING` or `PAUSED`).
+     * Since part of the cost of running the service
+     * is frequency of training - this can be used to determine when to train
+     * model in order to control cost. If not specified: the default value for
+     * `CreateModel` method is `TRAINING`. The default value for
+     * `UpdateModel` method is to keep the state the same as before.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The trainingState. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.TrainingState getTrainingState() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2beta.Model.TrainingState result = + com.google.cloud.retail.v2beta.Model.TrainingState.valueOf(trainingState_); + return result == null + ? com.google.cloud.retail.v2beta.Model.TrainingState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The training state that the model is in (e.g.
+     * `TRAINING` or `PAUSED`).
+     * Since part of the cost of running the service
+     * is frequency of training - this can be used to determine when to train
+     * model in order to control cost. If not specified: the default value for
+     * `CreateModel` method is `TRAINING`. The default value for
+     * `UpdateModel` method is to keep the state the same as before.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The trainingState to set. + * @return This builder for chaining. + */ + public Builder setTrainingState(com.google.cloud.retail.v2beta.Model.TrainingState value) { + if (value == null) { + throw new NullPointerException(); + } + + trainingState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The training state that the model is in (e.g.
+     * `TRAINING` or `PAUSED`).
+     * Since part of the cost of running the service
+     * is frequency of training - this can be used to determine when to train
+     * model in order to control cost. If not specified: the default value for
+     * `CreateModel` method is `TRAINING`. The default value for
+     * `UpdateModel` method is to keep the state the same as before.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearTrainingState() { + + trainingState_ = 0; + onChanged(); + return this; + } + + private int servingState_ = 0; + /** + * + * + *
+     * Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for servingState. + */ + @java.lang.Override + public int getServingStateValue() { + return servingState_; + } + /** + * + * + *
+     * Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for servingState to set. + * @return This builder for chaining. + */ + public Builder setServingStateValue(int value) { + + servingState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The servingState. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.ServingState getServingState() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2beta.Model.ServingState result = + com.google.cloud.retail.v2beta.Model.ServingState.valueOf(servingState_); + return result == null + ? com.google.cloud.retail.v2beta.Model.ServingState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The servingState to set. + * @return This builder for chaining. + */ + public Builder setServingState(com.google.cloud.retail.v2beta.Model.ServingState value) { + if (value == null) { + throw new NullPointerException(); + } + + servingState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearServingState() { + + servingState_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp the Recommendation Model was created at.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp the Recommendation Model was created at.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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 the Recommendation Model was created at.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp the Recommendation Model was created at.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp the Recommendation Model was created at.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp the Recommendation Model was created at.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp the Recommendation Model was created at.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp the Recommendation Model was created at.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.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 the Recommendation Model was created at.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp the Recommendation Model was last updated. E.g.
+     * if a Recommendation Model was paused - this would be the time the pause was
+     * initiated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp the Recommendation Model was last updated. E.g.
+     * if a Recommendation Model was paused - this would be the time the pause was
+     * initiated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.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 the Recommendation Model was last updated. E.g.
+     * if a Recommendation Model was paused - this would be the time the pause was
+     * initiated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.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; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp the Recommendation Model was last updated. E.g.
+     * if a Recommendation Model was paused - this would be the time the pause was
+     * initiated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp the Recommendation Model was last updated. E.g.
+     * if a Recommendation Model was paused - this would be the time the pause was
+     * initiated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp the Recommendation Model was last updated. E.g.
+     * if a Recommendation Model was paused - this would be the time the pause was
+     * initiated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp the Recommendation Model was last updated. E.g.
+     * if a Recommendation Model was paused - this would be the time the pause was
+     * initiated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp the Recommendation Model was last updated. E.g.
+     * if a Recommendation Model was paused - this would be the time the pause was
+     * initiated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.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 the Recommendation Model was last updated. E.g.
+     * if a Recommendation Model was paused - this would be the time the pause was
+     * initiated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object type_ = ""; + /** + * + * + *
+     * Required. The type of model e.g. `home-page`.
+     * Currently supported values: `recommended-for-you`, `others-you-may-like`,
+     * `frequently-bought-together`, `page-optimization`, `similar-items`,
+     * `buy-it-again`, and `recently-viewed`(readonly value).
+     * This field together with
+     * [optimization_objective][google.cloud.retail.v2beta.Model.optimization_objective]
+     * describe model metadata to use to control model training and serving.
+     * See https://cloud.google.com/retail/docs/models
+     * for more details on what the model metadata control and which combination
+     * of parameters are valid. For invalid combinations of parameters (e.g. type
+     * = `frequently-bought-together` and optimization_objective = `ctr`), you
+     * receive an error 400 if you try to create/update a recommendation with
+     * this set of knobs.
+     * 
+ * + * string type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The type. + */ + public java.lang.String getType() { + java.lang.Object ref = type_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + type_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The type of model e.g. `home-page`.
+     * Currently supported values: `recommended-for-you`, `others-you-may-like`,
+     * `frequently-bought-together`, `page-optimization`, `similar-items`,
+     * `buy-it-again`, and `recently-viewed`(readonly value).
+     * This field together with
+     * [optimization_objective][google.cloud.retail.v2beta.Model.optimization_objective]
+     * describe model metadata to use to control model training and serving.
+     * See https://cloud.google.com/retail/docs/models
+     * for more details on what the model metadata control and which combination
+     * of parameters are valid. For invalid combinations of parameters (e.g. type
+     * = `frequently-bought-together` and optimization_objective = `ctr`), you
+     * receive an error 400 if you try to create/update a recommendation with
+     * this set of knobs.
+     * 
+ * + * string type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for type. + */ + public com.google.protobuf.ByteString getTypeBytes() { + java.lang.Object ref = type_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + type_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The type of model e.g. `home-page`.
+     * Currently supported values: `recommended-for-you`, `others-you-may-like`,
+     * `frequently-bought-together`, `page-optimization`, `similar-items`,
+     * `buy-it-again`, and `recently-viewed`(readonly value).
+     * This field together with
+     * [optimization_objective][google.cloud.retail.v2beta.Model.optimization_objective]
+     * describe model metadata to use to control model training and serving.
+     * See https://cloud.google.com/retail/docs/models
+     * for more details on what the model metadata control and which combination
+     * of parameters are valid. For invalid combinations of parameters (e.g. type
+     * = `frequently-bought-together` and optimization_objective = `ctr`), you
+     * receive an error 400 if you try to create/update a recommendation with
+     * this set of knobs.
+     * 
+ * + * string type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of model e.g. `home-page`.
+     * Currently supported values: `recommended-for-you`, `others-you-may-like`,
+     * `frequently-bought-together`, `page-optimization`, `similar-items`,
+     * `buy-it-again`, and `recently-viewed`(readonly value).
+     * This field together with
+     * [optimization_objective][google.cloud.retail.v2beta.Model.optimization_objective]
+     * describe model metadata to use to control model training and serving.
+     * See https://cloud.google.com/retail/docs/models
+     * for more details on what the model metadata control and which combination
+     * of parameters are valid. For invalid combinations of parameters (e.g. type
+     * = `frequently-bought-together` and optimization_objective = `ctr`), you
+     * receive an error 400 if you try to create/update a recommendation with
+     * this set of knobs.
+     * 
+ * + * string type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = getDefaultInstance().getType(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The type of model e.g. `home-page`.
+     * Currently supported values: `recommended-for-you`, `others-you-may-like`,
+     * `frequently-bought-together`, `page-optimization`, `similar-items`,
+     * `buy-it-again`, and `recently-viewed`(readonly value).
+     * This field together with
+     * [optimization_objective][google.cloud.retail.v2beta.Model.optimization_objective]
+     * describe model metadata to use to control model training and serving.
+     * See https://cloud.google.com/retail/docs/models
+     * for more details on what the model metadata control and which combination
+     * of parameters are valid. For invalid combinations of parameters (e.g. type
+     * = `frequently-bought-together` and optimization_objective = `ctr`), you
+     * receive an error 400 if you try to create/update a recommendation with
+     * this set of knobs.
+     * 
+ * + * string type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for type to set. + * @return This builder for chaining. + */ + public Builder setTypeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + type_ = value; + onChanged(); + return this; + } + + private java.lang.Object optimizationObjective_ = ""; + /** + * + * + *
+     * Optional. The optimization objective e.g. `cvr`.
+     * Currently supported
+     * values: `ctr`, `cvr`, `revenue-per-order`.
+     *  If not specified, we choose default based on model type.
+     * Default depends on type of recommendation:
+     * `recommended-for-you` => `ctr`
+     * `others-you-may-like` => `ctr`
+     * `frequently-bought-together` => `revenue_per_order`
+     * This field together with
+     * [optimization_objective][google.cloud.retail.v2beta.Model.type]
+     * describe model metadata to use to control model training and serving.
+     * See https://cloud.google.com/retail/docs/models
+     * for more details on what the model metadata control and which combination
+     * of parameters are valid. For invalid combinations of parameters (e.g. type
+     * = `frequently-bought-together` and optimization_objective = `ctr`), you
+     * receive an error 400 if you try to create/update a recommendation with
+     * this set of knobs.
+     * 
+ * + * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The optimizationObjective. + */ + public java.lang.String getOptimizationObjective() { + java.lang.Object ref = optimizationObjective_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + optimizationObjective_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The optimization objective e.g. `cvr`.
+     * Currently supported
+     * values: `ctr`, `cvr`, `revenue-per-order`.
+     *  If not specified, we choose default based on model type.
+     * Default depends on type of recommendation:
+     * `recommended-for-you` => `ctr`
+     * `others-you-may-like` => `ctr`
+     * `frequently-bought-together` => `revenue_per_order`
+     * This field together with
+     * [optimization_objective][google.cloud.retail.v2beta.Model.type]
+     * describe model metadata to use to control model training and serving.
+     * See https://cloud.google.com/retail/docs/models
+     * for more details on what the model metadata control and which combination
+     * of parameters are valid. For invalid combinations of parameters (e.g. type
+     * = `frequently-bought-together` and optimization_objective = `ctr`), you
+     * receive an error 400 if you try to create/update a recommendation with
+     * this set of knobs.
+     * 
+ * + * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for optimizationObjective. + */ + public com.google.protobuf.ByteString getOptimizationObjectiveBytes() { + java.lang.Object ref = optimizationObjective_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + optimizationObjective_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The optimization objective e.g. `cvr`.
+     * Currently supported
+     * values: `ctr`, `cvr`, `revenue-per-order`.
+     *  If not specified, we choose default based on model type.
+     * Default depends on type of recommendation:
+     * `recommended-for-you` => `ctr`
+     * `others-you-may-like` => `ctr`
+     * `frequently-bought-together` => `revenue_per_order`
+     * This field together with
+     * [optimization_objective][google.cloud.retail.v2beta.Model.type]
+     * describe model metadata to use to control model training and serving.
+     * See https://cloud.google.com/retail/docs/models
+     * for more details on what the model metadata control and which combination
+     * of parameters are valid. For invalid combinations of parameters (e.g. type
+     * = `frequently-bought-together` and optimization_objective = `ctr`), you
+     * receive an error 400 if you try to create/update a recommendation with
+     * this set of knobs.
+     * 
+ * + * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The optimizationObjective to set. + * @return This builder for chaining. + */ + public Builder setOptimizationObjective(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + optimizationObjective_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The optimization objective e.g. `cvr`.
+     * Currently supported
+     * values: `ctr`, `cvr`, `revenue-per-order`.
+     *  If not specified, we choose default based on model type.
+     * Default depends on type of recommendation:
+     * `recommended-for-you` => `ctr`
+     * `others-you-may-like` => `ctr`
+     * `frequently-bought-together` => `revenue_per_order`
+     * This field together with
+     * [optimization_objective][google.cloud.retail.v2beta.Model.type]
+     * describe model metadata to use to control model training and serving.
+     * See https://cloud.google.com/retail/docs/models
+     * for more details on what the model metadata control and which combination
+     * of parameters are valid. For invalid combinations of parameters (e.g. type
+     * = `frequently-bought-together` and optimization_objective = `ctr`), you
+     * receive an error 400 if you try to create/update a recommendation with
+     * this set of knobs.
+     * 
+ * + * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearOptimizationObjective() { + + optimizationObjective_ = getDefaultInstance().getOptimizationObjective(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The optimization objective e.g. `cvr`.
+     * Currently supported
+     * values: `ctr`, `cvr`, `revenue-per-order`.
+     *  If not specified, we choose default based on model type.
+     * Default depends on type of recommendation:
+     * `recommended-for-you` => `ctr`
+     * `others-you-may-like` => `ctr`
+     * `frequently-bought-together` => `revenue_per_order`
+     * This field together with
+     * [optimization_objective][google.cloud.retail.v2beta.Model.type]
+     * describe model metadata to use to control model training and serving.
+     * See https://cloud.google.com/retail/docs/models
+     * for more details on what the model metadata control and which combination
+     * of parameters are valid. For invalid combinations of parameters (e.g. type
+     * = `frequently-bought-together` and optimization_objective = `ctr`), you
+     * receive an error 400 if you try to create/update a recommendation with
+     * this set of knobs.
+     * 
+ * + * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for optimizationObjective to set. + * @return This builder for chaining. + */ + public Builder setOptimizationObjectiveBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + optimizationObjective_ = value; + onChanged(); + return this; + } + + private int periodicTuningState_ = 0; + /** + * + * + *
+     * Optional. The state of periodic tuning.
+     * The period we use is 3 months - to do a
+     * one-off tune earlier use the `TuneModel` method. Default value
+     * is `PERIODIC_TUNING_ENABLED`.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for periodicTuningState. + */ + @java.lang.Override + public int getPeriodicTuningStateValue() { + return periodicTuningState_; + } + /** + * + * + *
+     * Optional. The state of periodic tuning.
+     * The period we use is 3 months - to do a
+     * one-off tune earlier use the `TuneModel` method. Default value
+     * is `PERIODIC_TUNING_ENABLED`.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for periodicTuningState to set. + * @return This builder for chaining. + */ + public Builder setPeriodicTuningStateValue(int value) { + + periodicTuningState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The state of periodic tuning.
+     * The period we use is 3 months - to do a
+     * one-off tune earlier use the `TuneModel` method. Default value
+     * is `PERIODIC_TUNING_ENABLED`.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The periodicTuningState. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.PeriodicTuningState getPeriodicTuningState() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2beta.Model.PeriodicTuningState result = + com.google.cloud.retail.v2beta.Model.PeriodicTuningState.valueOf(periodicTuningState_); + return result == null + ? com.google.cloud.retail.v2beta.Model.PeriodicTuningState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The state of periodic tuning.
+     * The period we use is 3 months - to do a
+     * one-off tune earlier use the `TuneModel` method. Default value
+     * is `PERIODIC_TUNING_ENABLED`.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The periodicTuningState to set. + * @return This builder for chaining. + */ + public Builder setPeriodicTuningState( + com.google.cloud.retail.v2beta.Model.PeriodicTuningState value) { + if (value == null) { + throw new NullPointerException(); + } + + periodicTuningState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The state of periodic tuning.
+     * The period we use is 3 months - to do a
+     * one-off tune earlier use the `TuneModel` method. Default value
+     * is `PERIODIC_TUNING_ENABLED`.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearPeriodicTuningState() { + + periodicTuningState_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp lastTuneTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + lastTuneTimeBuilder_; + /** + * + * + *
+     * Output only. The timestamp when the latest successful tune finished.
+     * 
+ * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastTuneTime field is set. + */ + public boolean hasLastTuneTime() { + return lastTuneTimeBuilder_ != null || lastTuneTime_ != null; + } + /** + * + * + *
+     * Output only. The timestamp when the latest successful tune finished.
+     * 
+ * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastTuneTime. + */ + public com.google.protobuf.Timestamp getLastTuneTime() { + if (lastTuneTimeBuilder_ == null) { + return lastTuneTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastTuneTime_; + } else { + return lastTuneTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The timestamp when the latest successful tune finished.
+     * 
+ * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastTuneTime(com.google.protobuf.Timestamp value) { + if (lastTuneTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + lastTuneTime_ = value; + onChanged(); + } else { + lastTuneTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the latest successful tune finished.
+     * 
+ * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLastTuneTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (lastTuneTimeBuilder_ == null) { + lastTuneTime_ = builderForValue.build(); + onChanged(); + } else { + lastTuneTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the latest successful tune finished.
+     * 
+ * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeLastTuneTime(com.google.protobuf.Timestamp value) { + if (lastTuneTimeBuilder_ == null) { + if (lastTuneTime_ != null) { + lastTuneTime_ = + com.google.protobuf.Timestamp.newBuilder(lastTuneTime_) + .mergeFrom(value) + .buildPartial(); + } else { + lastTuneTime_ = value; + } + onChanged(); + } else { + lastTuneTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the latest successful tune finished.
+     * 
+ * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLastTuneTime() { + if (lastTuneTimeBuilder_ == null) { + lastTuneTime_ = null; + onChanged(); + } else { + lastTuneTime_ = null; + lastTuneTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The timestamp when the latest successful tune finished.
+     * 
+ * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getLastTuneTimeBuilder() { + + onChanged(); + return getLastTuneTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The timestamp when the latest successful tune finished.
+     * 
+ * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getLastTuneTimeOrBuilder() { + if (lastTuneTimeBuilder_ != null) { + return lastTuneTimeBuilder_.getMessageOrBuilder(); + } else { + return lastTuneTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : lastTuneTime_; + } + } + /** + * + * + *
+     * Output only. The timestamp when the latest successful tune finished.
+     * 
+ * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getLastTuneTimeFieldBuilder() { + if (lastTuneTimeBuilder_ == null) { + lastTuneTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getLastTuneTime(), getParentForChildren(), isClean()); + lastTuneTime_ = null; + } + return lastTuneTimeBuilder_; + } + + private java.lang.Object tuningOperation_ = ""; + /** + * + * + *
+     * Output only. The tune operation associated with the model.
+     * Can be used to determine if there is an ongoing tune for this
+     * recommendation. Empty field implies no tune is goig on.
+     * 
+ * + * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tuningOperation. + */ + public java.lang.String getTuningOperation() { + java.lang.Object ref = tuningOperation_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + tuningOperation_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The tune operation associated with the model.
+     * Can be used to determine if there is an ongoing tune for this
+     * recommendation. Empty field implies no tune is goig on.
+     * 
+ * + * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for tuningOperation. + */ + public com.google.protobuf.ByteString getTuningOperationBytes() { + java.lang.Object ref = tuningOperation_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + tuningOperation_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The tune operation associated with the model.
+     * Can be used to determine if there is an ongoing tune for this
+     * recommendation. Empty field implies no tune is goig on.
+     * 
+ * + * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The tuningOperation to set. + * @return This builder for chaining. + */ + public Builder setTuningOperation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + tuningOperation_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The tune operation associated with the model.
+     * Can be used to determine if there is an ongoing tune for this
+     * recommendation. Empty field implies no tune is goig on.
+     * 
+ * + * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearTuningOperation() { + + tuningOperation_ = getDefaultInstance().getTuningOperation(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The tune operation associated with the model.
+     * Can be used to determine if there is an ongoing tune for this
+     * recommendation. Empty field implies no tune is goig on.
+     * 
+ * + * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for tuningOperation to set. + * @return This builder for chaining. + */ + public Builder setTuningOperationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + tuningOperation_ = value; + onChanged(); + return this; + } + + private int dataState_ = 0; + /** + * + * + *
+     * Output only. The state of data requirements for this model: `DATA_OK` and
+     * `DATA_ERROR`.
+     * Recommendation model cannot be trained if the data is in
+     * `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even
+     * if serving state is `ACTIVE`: models were trained successfully before, but
+     * cannot be refreshed because model no longer has sufficient
+     * data for training.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for dataState. + */ + @java.lang.Override + public int getDataStateValue() { + return dataState_; + } + /** + * + * + *
+     * Output only. The state of data requirements for this model: `DATA_OK` and
+     * `DATA_ERROR`.
+     * Recommendation model cannot be trained if the data is in
+     * `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even
+     * if serving state is `ACTIVE`: models were trained successfully before, but
+     * cannot be refreshed because model no longer has sufficient
+     * data for training.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for dataState to set. + * @return This builder for chaining. + */ + public Builder setDataStateValue(int value) { + + dataState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The state of data requirements for this model: `DATA_OK` and
+     * `DATA_ERROR`.
+     * Recommendation model cannot be trained if the data is in
+     * `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even
+     * if serving state is `ACTIVE`: models were trained successfully before, but
+     * cannot be refreshed because model no longer has sufficient
+     * data for training.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataState. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model.DataState getDataState() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2beta.Model.DataState result = + com.google.cloud.retail.v2beta.Model.DataState.valueOf(dataState_); + return result == null ? com.google.cloud.retail.v2beta.Model.DataState.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Output only. The state of data requirements for this model: `DATA_OK` and
+     * `DATA_ERROR`.
+     * Recommendation model cannot be trained if the data is in
+     * `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even
+     * if serving state is `ACTIVE`: models were trained successfully before, but
+     * cannot be refreshed because model no longer has sufficient
+     * data for training.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The dataState to set. + * @return This builder for chaining. + */ + public Builder setDataState(com.google.cloud.retail.v2beta.Model.DataState value) { + if (value == null) { + throw new NullPointerException(); + } + + dataState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The state of data requirements for this model: `DATA_OK` and
+     * `DATA_ERROR`.
+     * Recommendation model cannot be trained if the data is in
+     * `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even
+     * if serving state is `ACTIVE`: models were trained successfully before, but
+     * cannot be refreshed because model no longer has sufficient
+     * data for training.
+     * 
+ * + * + * .google.cloud.retail.v2beta.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearDataState() { + + dataState_ = 0; + onChanged(); + return this; + } + + private int filteringOption_ = 0; + /** + * + * + *
+     * Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering
+     * by attributes is enabled for the model.
+     * 
+ * + * + * .google.cloud.retail.v2beta.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for filteringOption. + */ + @java.lang.Override + public int getFilteringOptionValue() { + return filteringOption_; + } + /** + * + * + *
+     * Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering
+     * by attributes is enabled for the model.
+     * 
+ * + * + * .google.cloud.retail.v2beta.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The enum numeric value on the wire for filteringOption to set. + * @return This builder for chaining. + */ + public Builder setFilteringOptionValue(int value) { + + filteringOption_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering
+     * by attributes is enabled for the model.
+     * 
+ * + * + * .google.cloud.retail.v2beta.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The filteringOption. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.RecommendationsFilteringOption getFilteringOption() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2beta.RecommendationsFilteringOption result = + com.google.cloud.retail.v2beta.RecommendationsFilteringOption.valueOf(filteringOption_); + return result == null + ? com.google.cloud.retail.v2beta.RecommendationsFilteringOption.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering
+     * by attributes is enabled for the model.
+     * 
+ * + * + * .google.cloud.retail.v2beta.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The filteringOption to set. + * @return This builder for chaining. + */ + public Builder setFilteringOption( + com.google.cloud.retail.v2beta.RecommendationsFilteringOption value) { + if (value == null) { + throw new NullPointerException(); + } + + filteringOption_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering
+     * by attributes is enabled for the model.
+     * 
+ * + * + * .google.cloud.retail.v2beta.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return This builder for chaining. + */ + public Builder clearFilteringOption() { + + filteringOption_ = 0; + onChanged(); + return this; + } + + private java.util.List + servingConfigLists_ = java.util.Collections.emptyList(); + + private void ensureServingConfigListsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + servingConfigLists_ = + new java.util.ArrayList( + servingConfigLists_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.Model.ServingConfigList, + com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder, + com.google.cloud.retail.v2beta.Model.ServingConfigListOrBuilder> + servingConfigListsBuilder_; + + /** + * + * + *
+     * Output only. The list of valid serving configs associated with the
+     * PageOptimizationConfig.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getServingConfigListsList() { + if (servingConfigListsBuilder_ == null) { + return java.util.Collections.unmodifiableList(servingConfigLists_); + } else { + return servingConfigListsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. The list of valid serving configs associated with the
+     * PageOptimizationConfig.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getServingConfigListsCount() { + if (servingConfigListsBuilder_ == null) { + return servingConfigLists_.size(); + } else { + return servingConfigListsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. The list of valid serving configs associated with the
+     * PageOptimizationConfig.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2beta.Model.ServingConfigList getServingConfigLists(int index) { + if (servingConfigListsBuilder_ == null) { + return servingConfigLists_.get(index); + } else { + return servingConfigListsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. The list of valid serving configs associated with the
+     * PageOptimizationConfig.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setServingConfigLists( + int index, com.google.cloud.retail.v2beta.Model.ServingConfigList value) { + if (servingConfigListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServingConfigListsIsMutable(); + servingConfigLists_.set(index, value); + onChanged(); + } else { + servingConfigListsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The list of valid serving configs associated with the
+     * PageOptimizationConfig.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setServingConfigLists( + int index, com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder builderForValue) { + if (servingConfigListsBuilder_ == null) { + ensureServingConfigListsIsMutable(); + servingConfigLists_.set(index, builderForValue.build()); + onChanged(); + } else { + servingConfigListsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The list of valid serving configs associated with the
+     * PageOptimizationConfig.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addServingConfigLists( + com.google.cloud.retail.v2beta.Model.ServingConfigList value) { + if (servingConfigListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServingConfigListsIsMutable(); + servingConfigLists_.add(value); + onChanged(); + } else { + servingConfigListsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. The list of valid serving configs associated with the
+     * PageOptimizationConfig.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addServingConfigLists( + int index, com.google.cloud.retail.v2beta.Model.ServingConfigList value) { + if (servingConfigListsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServingConfigListsIsMutable(); + servingConfigLists_.add(index, value); + onChanged(); + } else { + servingConfigListsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. The list of valid serving configs associated with the
+     * PageOptimizationConfig.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addServingConfigLists( + com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder builderForValue) { + if (servingConfigListsBuilder_ == null) { + ensureServingConfigListsIsMutable(); + servingConfigLists_.add(builderForValue.build()); + onChanged(); + } else { + servingConfigListsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The list of valid serving configs associated with the
+     * PageOptimizationConfig.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addServingConfigLists( + int index, com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder builderForValue) { + if (servingConfigListsBuilder_ == null) { + ensureServingConfigListsIsMutable(); + servingConfigLists_.add(index, builderForValue.build()); + onChanged(); + } else { + servingConfigListsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. The list of valid serving configs associated with the
+     * PageOptimizationConfig.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllServingConfigLists( + java.lang.Iterable + values) { + if (servingConfigListsBuilder_ == null) { + ensureServingConfigListsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, servingConfigLists_); + onChanged(); + } else { + servingConfigListsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. The list of valid serving configs associated with the
+     * PageOptimizationConfig.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearServingConfigLists() { + if (servingConfigListsBuilder_ == null) { + servingConfigLists_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + servingConfigListsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. The list of valid serving configs associated with the
+     * PageOptimizationConfig.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeServingConfigLists(int index) { + if (servingConfigListsBuilder_ == null) { + ensureServingConfigListsIsMutable(); + servingConfigLists_.remove(index); + onChanged(); + } else { + servingConfigListsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. The list of valid serving configs associated with the
+     * PageOptimizationConfig.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder + getServingConfigListsBuilder(int index) { + return getServingConfigListsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. The list of valid serving configs associated with the
+     * PageOptimizationConfig.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2beta.Model.ServingConfigListOrBuilder + getServingConfigListsOrBuilder(int index) { + if (servingConfigListsBuilder_ == null) { + return servingConfigLists_.get(index); + } else { + return servingConfigListsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. The list of valid serving configs associated with the
+     * PageOptimizationConfig.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getServingConfigListsOrBuilderList() { + if (servingConfigListsBuilder_ != null) { + return servingConfigListsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(servingConfigLists_); + } + } + /** + * + * + *
+     * Output only. The list of valid serving configs associated with the
+     * PageOptimizationConfig.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder + addServingConfigListsBuilder() { + return getServingConfigListsFieldBuilder() + .addBuilder(com.google.cloud.retail.v2beta.Model.ServingConfigList.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The list of valid serving configs associated with the
+     * PageOptimizationConfig.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder + addServingConfigListsBuilder(int index) { + return getServingConfigListsFieldBuilder() + .addBuilder( + index, com.google.cloud.retail.v2beta.Model.ServingConfigList.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. The list of valid serving configs associated with the
+     * PageOptimizationConfig.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getServingConfigListsBuilderList() { + return getServingConfigListsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.Model.ServingConfigList, + com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder, + com.google.cloud.retail.v2beta.Model.ServingConfigListOrBuilder> + getServingConfigListsFieldBuilder() { + if (servingConfigListsBuilder_ == null) { + servingConfigListsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.Model.ServingConfigList, + com.google.cloud.retail.v2beta.Model.ServingConfigList.Builder, + com.google.cloud.retail.v2beta.Model.ServingConfigListOrBuilder>( + servingConfigLists_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + servingConfigLists_ = null; + } + return servingConfigListsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.Model) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.Model) + private static final com.google.cloud.retail.v2beta.Model DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.Model(); + } + + public static com.google.cloud.retail.v2beta.Model getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Model parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.Model getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelName.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelName.java new file mode 100644 index 00000000..d11f6e15 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelName.java @@ -0,0 +1,257 @@ +/* + * Copyright 2022 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.retail.v2beta; + +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 ModelName implements ResourceName { + private static final PathTemplate PROJECT_LOCATION_CATALOG_MODEL = + PathTemplate.createWithoutUrlEncoding( + "projects/{project}/locations/{location}/catalogs/{catalog}/models/{model}"); + private volatile Map fieldValuesMap; + private final String project; + private final String location; + private final String catalog; + private final String model; + + @Deprecated + protected ModelName() { + project = null; + location = null; + catalog = null; + model = null; + } + + private ModelName(Builder builder) { + project = Preconditions.checkNotNull(builder.getProject()); + location = Preconditions.checkNotNull(builder.getLocation()); + catalog = Preconditions.checkNotNull(builder.getCatalog()); + model = Preconditions.checkNotNull(builder.getModel()); + } + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCatalog() { + return catalog; + } + + public String getModel() { + return model; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ModelName of(String project, String location, String catalog, String model) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCatalog(catalog) + .setModel(model) + .build(); + } + + public static String format(String project, String location, String catalog, String model) { + return newBuilder() + .setProject(project) + .setLocation(location) + .setCatalog(catalog) + .setModel(model) + .build() + .toString(); + } + + public static ModelName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PROJECT_LOCATION_CATALOG_MODEL.validatedMatch( + formattedString, "ModelName.parse: formattedString not in valid format"); + return of( + matchMap.get("project"), + matchMap.get("location"), + matchMap.get("catalog"), + matchMap.get("model")); + } + + 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 (ModelName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PROJECT_LOCATION_CATALOG_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 (catalog != null) { + fieldMapBuilder.put("catalog", catalog); + } + 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 PROJECT_LOCATION_CATALOG_MODEL.instantiate( + "project", project, "location", location, "catalog", catalog, "model", model); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ModelName that = ((ModelName) o); + return Objects.equals(this.project, that.project) + && Objects.equals(this.location, that.location) + && Objects.equals(this.catalog, that.catalog) + && Objects.equals(this.model, that.model); + } + 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(catalog); + h *= 1000003; + h ^= Objects.hashCode(model); + return h; + } + + /** Builder for projects/{project}/locations/{location}/catalogs/{catalog}/models/{model}. */ + public static class Builder { + private String project; + private String location; + private String catalog; + private String model; + + protected Builder() {} + + public String getProject() { + return project; + } + + public String getLocation() { + return location; + } + + public String getCatalog() { + return catalog; + } + + public String getModel() { + return model; + } + + public Builder setProject(String project) { + this.project = project; + return this; + } + + public Builder setLocation(String location) { + this.location = location; + return this; + } + + public Builder setCatalog(String catalog) { + this.catalog = catalog; + return this; + } + + public Builder setModel(String model) { + this.model = model; + return this; + } + + private Builder(ModelName modelName) { + this.project = modelName.project; + this.location = modelName.location; + this.catalog = modelName.catalog; + this.model = modelName.model; + } + + public ModelName build() { + return new ModelName(this); + } + } +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelOrBuilder.java new file mode 100644 index 00000000..0b5e244f --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelOrBuilder.java @@ -0,0 +1,593 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model.proto + +package com.google.cloud.retail.v2beta; + +public interface ModelOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.Model) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The fully qualified resource name of the model.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * catalog_id has char limit of 50.
+   * recommendation_model_id has char limit of 40.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The fully qualified resource name of the model.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * catalog_id has char limit of 50.
+   * recommendation_model_id has char limit of 40.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The display name of the model.
+   * Should be human readable, used to display Recommendation Models in the
+   * Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Required. The display name of the model.
+   * Should be human readable, used to display Recommendation Models in the
+   * Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024
+   * characters.
+   * 
+ * + * string display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Optional. The training state that the model is in (e.g.
+   * `TRAINING` or `PAUSED`).
+   * Since part of the cost of running the service
+   * is frequency of training - this can be used to determine when to train
+   * model in order to control cost. If not specified: the default value for
+   * `CreateModel` method is `TRAINING`. The default value for
+   * `UpdateModel` method is to keep the state the same as before.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for trainingState. + */ + int getTrainingStateValue(); + /** + * + * + *
+   * Optional. The training state that the model is in (e.g.
+   * `TRAINING` or `PAUSED`).
+   * Since part of the cost of running the service
+   * is frequency of training - this can be used to determine when to train
+   * model in order to control cost. If not specified: the default value for
+   * `CreateModel` method is `TRAINING`. The default value for
+   * `UpdateModel` method is to keep the state the same as before.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.TrainingState training_state = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The trainingState. + */ + com.google.cloud.retail.v2beta.Model.TrainingState getTrainingState(); + + /** + * + * + *
+   * Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for servingState. + */ + int getServingStateValue(); + /** + * + * + *
+   * Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.ServingState serving_state = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The servingState. + */ + com.google.cloud.retail.v2beta.Model.ServingState getServingState(); + + /** + * + * + *
+   * Output only. Timestamp the Recommendation Model was created at.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp the Recommendation Model was created at.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp the Recommendation Model was created at.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp the Recommendation Model was last updated. E.g.
+   * if a Recommendation Model was paused - this would be the time the pause was
+   * initiated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp the Recommendation Model was last updated. E.g.
+   * if a Recommendation Model was paused - this would be the time the pause was
+   * initiated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp the Recommendation Model was last updated. E.g.
+   * if a Recommendation Model was paused - this would be the time the pause was
+   * initiated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Required. The type of model e.g. `home-page`.
+   * Currently supported values: `recommended-for-you`, `others-you-may-like`,
+   * `frequently-bought-together`, `page-optimization`, `similar-items`,
+   * `buy-it-again`, and `recently-viewed`(readonly value).
+   * This field together with
+   * [optimization_objective][google.cloud.retail.v2beta.Model.optimization_objective]
+   * describe model metadata to use to control model training and serving.
+   * See https://cloud.google.com/retail/docs/models
+   * for more details on what the model metadata control and which combination
+   * of parameters are valid. For invalid combinations of parameters (e.g. type
+   * = `frequently-bought-together` and optimization_objective = `ctr`), you
+   * receive an error 400 if you try to create/update a recommendation with
+   * this set of knobs.
+   * 
+ * + * string type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The type. + */ + java.lang.String getType(); + /** + * + * + *
+   * Required. The type of model e.g. `home-page`.
+   * Currently supported values: `recommended-for-you`, `others-you-may-like`,
+   * `frequently-bought-together`, `page-optimization`, `similar-items`,
+   * `buy-it-again`, and `recently-viewed`(readonly value).
+   * This field together with
+   * [optimization_objective][google.cloud.retail.v2beta.Model.optimization_objective]
+   * describe model metadata to use to control model training and serving.
+   * See https://cloud.google.com/retail/docs/models
+   * for more details on what the model metadata control and which combination
+   * of parameters are valid. For invalid combinations of parameters (e.g. type
+   * = `frequently-bought-together` and optimization_objective = `ctr`), you
+   * receive an error 400 if you try to create/update a recommendation with
+   * this set of knobs.
+   * 
+ * + * string type = 7 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for type. + */ + com.google.protobuf.ByteString getTypeBytes(); + + /** + * + * + *
+   * Optional. The optimization objective e.g. `cvr`.
+   * Currently supported
+   * values: `ctr`, `cvr`, `revenue-per-order`.
+   *  If not specified, we choose default based on model type.
+   * Default depends on type of recommendation:
+   * `recommended-for-you` => `ctr`
+   * `others-you-may-like` => `ctr`
+   * `frequently-bought-together` => `revenue_per_order`
+   * This field together with
+   * [optimization_objective][google.cloud.retail.v2beta.Model.type]
+   * describe model metadata to use to control model training and serving.
+   * See https://cloud.google.com/retail/docs/models
+   * for more details on what the model metadata control and which combination
+   * of parameters are valid. For invalid combinations of parameters (e.g. type
+   * = `frequently-bought-together` and optimization_objective = `ctr`), you
+   * receive an error 400 if you try to create/update a recommendation with
+   * this set of knobs.
+   * 
+ * + * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The optimizationObjective. + */ + java.lang.String getOptimizationObjective(); + /** + * + * + *
+   * Optional. The optimization objective e.g. `cvr`.
+   * Currently supported
+   * values: `ctr`, `cvr`, `revenue-per-order`.
+   *  If not specified, we choose default based on model type.
+   * Default depends on type of recommendation:
+   * `recommended-for-you` => `ctr`
+   * `others-you-may-like` => `ctr`
+   * `frequently-bought-together` => `revenue_per_order`
+   * This field together with
+   * [optimization_objective][google.cloud.retail.v2beta.Model.type]
+   * describe model metadata to use to control model training and serving.
+   * See https://cloud.google.com/retail/docs/models
+   * for more details on what the model metadata control and which combination
+   * of parameters are valid. For invalid combinations of parameters (e.g. type
+   * = `frequently-bought-together` and optimization_objective = `ctr`), you
+   * receive an error 400 if you try to create/update a recommendation with
+   * this set of knobs.
+   * 
+ * + * string optimization_objective = 8 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for optimizationObjective. + */ + com.google.protobuf.ByteString getOptimizationObjectiveBytes(); + + /** + * + * + *
+   * Optional. The state of periodic tuning.
+   * The period we use is 3 months - to do a
+   * one-off tune earlier use the `TuneModel` method. Default value
+   * is `PERIODIC_TUNING_ENABLED`.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for periodicTuningState. + */ + int getPeriodicTuningStateValue(); + /** + * + * + *
+   * Optional. The state of periodic tuning.
+   * The period we use is 3 months - to do a
+   * one-off tune earlier use the `TuneModel` method. Default value
+   * is `PERIODIC_TUNING_ENABLED`.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.PeriodicTuningState periodic_tuning_state = 11 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The periodicTuningState. + */ + com.google.cloud.retail.v2beta.Model.PeriodicTuningState getPeriodicTuningState(); + + /** + * + * + *
+   * Output only. The timestamp when the latest successful tune finished.
+   * 
+ * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the lastTuneTime field is set. + */ + boolean hasLastTuneTime(); + /** + * + * + *
+   * Output only. The timestamp when the latest successful tune finished.
+   * 
+ * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The lastTuneTime. + */ + com.google.protobuf.Timestamp getLastTuneTime(); + /** + * + * + *
+   * Output only. The timestamp when the latest successful tune finished.
+   * 
+ * + * + * .google.protobuf.Timestamp last_tune_time = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getLastTuneTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The tune operation associated with the model.
+   * Can be used to determine if there is an ongoing tune for this
+   * recommendation. Empty field implies no tune is goig on.
+   * 
+ * + * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The tuningOperation. + */ + java.lang.String getTuningOperation(); + /** + * + * + *
+   * Output only. The tune operation associated with the model.
+   * Can be used to determine if there is an ongoing tune for this
+   * recommendation. Empty field implies no tune is goig on.
+   * 
+ * + * string tuning_operation = 15 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for tuningOperation. + */ + com.google.protobuf.ByteString getTuningOperationBytes(); + + /** + * + * + *
+   * Output only. The state of data requirements for this model: `DATA_OK` and
+   * `DATA_ERROR`.
+   * Recommendation model cannot be trained if the data is in
+   * `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even
+   * if serving state is `ACTIVE`: models were trained successfully before, but
+   * cannot be refreshed because model no longer has sufficient
+   * data for training.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for dataState. + */ + int getDataStateValue(); + /** + * + * + *
+   * Output only. The state of data requirements for this model: `DATA_OK` and
+   * `DATA_ERROR`.
+   * Recommendation model cannot be trained if the data is in
+   * `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even
+   * if serving state is `ACTIVE`: models were trained successfully before, but
+   * cannot be refreshed because model no longer has sufficient
+   * data for training.
+   * 
+ * + * + * .google.cloud.retail.v2beta.Model.DataState data_state = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The dataState. + */ + com.google.cloud.retail.v2beta.Model.DataState getDataState(); + + /** + * + * + *
+   * Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering
+   * by attributes is enabled for the model.
+   * 
+ * + * + * .google.cloud.retail.v2beta.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for filteringOption. + */ + int getFilteringOptionValue(); + /** + * + * + *
+   * Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering
+   * by attributes is enabled for the model.
+   * 
+ * + * + * .google.cloud.retail.v2beta.RecommendationsFilteringOption filtering_option = 18 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The filteringOption. + */ + com.google.cloud.retail.v2beta.RecommendationsFilteringOption getFilteringOption(); + + /** + * + * + *
+   * Output only. The list of valid serving configs associated with the
+   * PageOptimizationConfig.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getServingConfigListsList(); + /** + * + * + *
+   * Output only. The list of valid serving configs associated with the
+   * PageOptimizationConfig.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.retail.v2beta.Model.ServingConfigList getServingConfigLists(int index); + /** + * + * + *
+   * Output only. The list of valid serving configs associated with the
+   * PageOptimizationConfig.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getServingConfigListsCount(); + /** + * + * + *
+   * Output only. The list of valid serving configs associated with the
+   * PageOptimizationConfig.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getServingConfigListsOrBuilderList(); + /** + * + * + *
+   * Output only. The list of valid serving configs associated with the
+   * PageOptimizationConfig.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.Model.ServingConfigList serving_config_lists = 19 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.retail.v2beta.Model.ServingConfigListOrBuilder getServingConfigListsOrBuilder( + int index); +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelProto.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelProto.java new file mode 100644 index 00000000..502851d8 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelProto.java @@ -0,0 +1,144 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model.proto + +package com.google.cloud.retail.v2beta; + +public final class ModelProto { + private ModelProto() {} + + 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_retail_v2beta_Model_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_Model_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_Model_ServingConfigList_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_Model_ServingConfigList_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/retail/v2beta/model.proto" + + "\022\032google.cloud.retail.v2beta\032\037google/api" + + "/field_behavior.proto\032\031google/api/resour" + + "ce.proto\032\'google/cloud/retail/v2beta/com" + + "mon.proto\032\037google/protobuf/timestamp.pro" + + "to\"\272\n\n\005Model\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\031\n\014displ" + + "ay_name\030\002 \001(\tB\003\340A\002\022L\n\016training_state\030\003 \001" + + "(\0162/.google.cloud.retail.v2beta.Model.Tr" + + "ainingStateB\003\340A\001\022J\n\rserving_state\030\004 \001(\0162" + + "..google.cloud.retail.v2beta.Model.Servi" + + "ngStateB\003\340A\003\0224\n\013create_time\030\005 \001(\0132\032.goog" + + "le.protobuf.TimestampB\003\340A\003\0224\n\013update_tim" + + "e\030\006 \001(\0132\032.google.protobuf.TimestampB\003\340A\003" + + "\022\021\n\004type\030\007 \001(\tB\003\340A\002\022#\n\026optimization_obje" + + "ctive\030\010 \001(\tB\003\340A\001\022Y\n\025periodic_tuning_stat" + + "e\030\013 \001(\01625.google.cloud.retail.v2beta.Mod" + + "el.PeriodicTuningStateB\003\340A\001\0227\n\016last_tune" + + "_time\030\014 \001(\0132\032.google.protobuf.TimestampB" + + "\003\340A\003\022\035\n\020tuning_operation\030\017 \001(\tB\003\340A\003\022D\n\nd" + + "ata_state\030\020 \001(\0162+.google.cloud.retail.v2" + + "beta.Model.DataStateB\003\340A\003\022Y\n\020filtering_o" + + "ption\030\022 \001(\0162:.google.cloud.retail.v2beta" + + ".RecommendationsFilteringOptionB\003\340A\001\022V\n\024" + + "serving_config_lists\030\023 \003(\01323.google.clou" + + "d.retail.v2beta.Model.ServingConfigListB" + + "\003\340A\003\0324\n\021ServingConfigList\022\037\n\022serving_con" + + "fig_ids\030\001 \003(\tB\003\340A\001\"R\n\014ServingState\022\035\n\031SE" + + "RVING_STATE_UNSPECIFIED\020\000\022\014\n\010INACTIVE\020\001\022" + + "\n\n\006ACTIVE\020\002\022\t\n\005TUNED\020\003\"I\n\rTrainingState\022" + + "\036\n\032TRAINING_STATE_UNSPECIFIED\020\000\022\n\n\006PAUSE" + + "D\020\001\022\014\n\010TRAINING\020\002\"\220\001\n\023PeriodicTuningStat" + + "e\022%\n!PERIODIC_TUNING_STATE_UNSPECIFIED\020\000" + + "\022\034\n\030PERIODIC_TUNING_DISABLED\020\001\022\027\n\023ALL_TU" + + "NING_DISABLED\020\003\022\033\n\027PERIODIC_TUNING_ENABL" + + "ED\020\002\"D\n\tDataState\022\032\n\026DATA_STATE_UNSPECIF" + + "IED\020\000\022\013\n\007DATA_OK\020\001\022\016\n\nDATA_ERROR\020\002:k\352Ah\n" + + "\033retail.googleapis.com/Model\022Iprojects/{" + + "project}/locations/{location}/catalogs/{" + + "catalog}/models/{model}B\323\001\n\036com.google.c" + + "loud.retail.v2betaB\nModelProtoP\001Z@google" + + ".golang.org/genproto/googleapis/cloud/re" + + "tail/v2beta;retail\242\002\006RETAIL\252\002\032Google.Clo" + + "ud.Retail.V2Beta\312\002\032Google\\Cloud\\Retail\\V" + + "2beta\352\002\035Google::Cloud::Retail::V2betab\006p" + + "roto3" + }; + 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.retail.v2beta.CommonProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + }); + internal_static_google_cloud_retail_v2beta_Model_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_retail_v2beta_Model_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_Model_descriptor, + new java.lang.String[] { + "Name", + "DisplayName", + "TrainingState", + "ServingState", + "CreateTime", + "UpdateTime", + "Type", + "OptimizationObjective", + "PeriodicTuningState", + "LastTuneTime", + "TuningOperation", + "DataState", + "FilteringOption", + "ServingConfigLists", + }); + internal_static_google_cloud_retail_v2beta_Model_ServingConfigList_descriptor = + internal_static_google_cloud_retail_v2beta_Model_descriptor.getNestedTypes().get(0); + internal_static_google_cloud_retail_v2beta_Model_ServingConfigList_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_Model_ServingConfigList_descriptor, + new java.lang.String[] { + "ServingConfigIds", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.retail.v2beta.CommonProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelServiceProto.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelServiceProto.java new file mode 100644 index 00000000..45946e14 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ModelServiceProto.java @@ -0,0 +1,280 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +public final class ModelServiceProto { + private ModelServiceProto() {} + + 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_retail_v2beta_CreateModelRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_CreateModelRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_UpdateModelRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_UpdateModelRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_PauseModelRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_PauseModelRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_ResumeModelRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_ResumeModelRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_ListModelsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_ListModelsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_DeleteModelRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_DeleteModelRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_ListModelsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_ListModelsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_TuneModelRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_TuneModelRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_CreateModelMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_CreateModelMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_TuneModelMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_TuneModelMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_retail_v2beta_TuneModelResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_retail_v2beta_TuneModelResponse_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/retail/v2beta/model_servi" + + "ce.proto\022\032google.cloud.retail.v2beta\032\034go" + + "ogle/api/annotations.proto\032\027google/api/c" + + "lient.proto\032\037google/api/field_behavior.p" + + "roto\032\031google/api/resource.proto\032&google/" + + "cloud/retail/v2beta/model.proto\032#google/" + + "longrunning/operations.proto\032\033google/pro" + + "tobuf/empty.proto\032 google/protobuf/field" + + "_mask.proto\"\230\001\n\022CreateModelRequest\0225\n\006pa" + + "rent\030\001 \001(\tB%\340A\002\372A\037\n\035retail.googleapis.co" + + "m/Catalog\0225\n\005model\030\002 \001(\0132!.google.cloud." + + "retail.v2beta.ModelB\003\340A\002\022\024\n\007dry_run\030\003 \001(" + + "\010B\003\340A\001\"\201\001\n\022UpdateModelRequest\0225\n\005model\030\001" + + " \001(\0132!.google.cloud.retail.v2beta.ModelB" + + "\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.proto" + + "buf.FieldMaskB\003\340A\001\"F\n\021PauseModelRequest\022" + + "1\n\004name\030\001 \001(\tB#\340A\002\372A\035\n\033retail.googleapis" + + ".com/Model\"\'\n\022ResumeModelRequest\022\021\n\004name" + + "\030\001 \001(\tB\003\340A\002\"{\n\021ListModelsRequest\0225\n\006pare" + + "nt\030\001 \001(\tB%\340A\002\372A\037\n\035retail.googleapis.com/" + + "Catalog\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_" + + "token\030\003 \001(\tB\003\340A\001\"G\n\022DeleteModelRequest\0221" + + "\n\004name\030\001 \001(\tB#\340A\002\372A\035\n\033retail.googleapis." + + "com/Model\"`\n\022ListModelsResponse\0221\n\006model" + + "s\030\001 \003(\0132!.google.cloud.retail.v2beta.Mod" + + "el\022\027\n\017next_page_token\030\002 \001(\t\"E\n\020TuneModel" + + "Request\0221\n\004name\030\001 \001(\tB#\340A\002\372A\035\n\033retail.go" + + "ogleapis.com/Model\"$\n\023CreateModelMetadat" + + "a\022\r\n\005model\030\001 \001(\t\"\"\n\021TuneModelMetadata\022\r\n" + + "\005model\030\001 \001(\t\"\023\n\021TuneModelResponse2\202\014\n\014Mo" + + "delService\022\213\002\n\013CreateModel\022..google.clou" + + "d.retail.v2beta.CreateModelRequest\032\035.goo" + + "gle.longrunning.Operation\"\254\001\202\323\344\223\002B\"9/v2b" + + "eta/{parent=projects/*/locations/*/catal" + + "ogs/*}/models:\005model\332A\014parent,model\312AR\n " + + "google.cloud.retail.v2beta.Model\022.google" + + ".cloud.retail.v2beta.CreateModelMetadata" + + "\022\261\001\n\nPauseModel\022-.google.cloud.retail.v2" + + "beta.PauseModelRequest\032!.google.cloud.re" + + "tail.v2beta.Model\"Q\202\323\344\223\002D\"?/v2beta/{name" + + "=projects/*/locations/*/catalogs/*/model" + + "s/*}:pause:\001*\332A\004name\022\264\001\n\013ResumeModel\022..g" + + "oogle.cloud.retail.v2beta.ResumeModelReq" + + "uest\032!.google.cloud.retail.v2beta.Model\"" + + "R\202\323\344\223\002E\"@/v2beta/{name=projects/*/locati" + + "ons/*/catalogs/*/models/*}:resume:\001*\332A\004n" + + "ame\022\237\001\n\013DeleteModel\022..google.cloud.retai" + + "l.v2beta.DeleteModelRequest\032\026.google.pro" + + "tobuf.Empty\"H\202\323\344\223\002;*9/v2beta/{name=proje" + + "cts/*/locations/*/catalogs/*/models/*}\332A" + + "\004name\022\267\001\n\nListModels\022-.google.cloud.reta" + + "il.v2beta.ListModelsRequest\032..google.clo" + + "ud.retail.v2beta.ListModelsResponse\"J\202\323\344" + + "\223\002;\0229/v2beta/{parent=projects/*/location" + + "s/*/catalogs/*}/models\332A\006parent\022\304\001\n\013Upda" + + "teModel\022..google.cloud.retail.v2beta.Upd" + + "ateModelRequest\032!.google.cloud.retail.v2" + + "beta.Model\"b\202\323\344\223\002H2?/v2beta/{model.name=" + + "projects/*/locations/*/catalogs/*/models" + + "/*}:\005model\332A\021model,update_mask\022\212\002\n\tTuneM" + + "odel\022,.google.cloud.retail.v2beta.TuneMo" + + "delRequest\032\035.google.longrunning.Operatio" + + "n\"\257\001\202\323\344\223\002C\">/v2beta/{name=projects/*/loc" + + "ations/*/catalogs/*/models/*}:tune:\001*\332A\004" + + "name\312A\\\n,google.cloud.retail.v2beta.Tune" + + "ModelResponse\022,google.cloud.retail.v2bet" + + "a.TuneModelMetadata\032I\312A\025retail.googleapi" + + "s.com\322A.https://www.googleapis.com/auth/" + + "cloud-platformB\332\001\n\036com.google.cloud.reta" + + "il.v2betaB\021ModelServiceProtoP\001Z@google.g" + + "olang.org/genproto/googleapis/cloud/reta" + + "il/v2beta;retail\242\002\006RETAIL\252\002\032Google.Cloud" + + ".Retail.V2Beta\312\002\032Google\\Cloud\\Retail\\V2b" + + "eta\352\002\035Google::Cloud::Retail::V2betab\006pro" + + "to3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.retail.v2beta.ModelProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_retail_v2beta_CreateModelRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_retail_v2beta_CreateModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_CreateModelRequest_descriptor, + new java.lang.String[] { + "Parent", "Model", "DryRun", + }); + internal_static_google_cloud_retail_v2beta_UpdateModelRequest_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_retail_v2beta_UpdateModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_UpdateModelRequest_descriptor, + new java.lang.String[] { + "Model", "UpdateMask", + }); + internal_static_google_cloud_retail_v2beta_PauseModelRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_retail_v2beta_PauseModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_PauseModelRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_retail_v2beta_ResumeModelRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_retail_v2beta_ResumeModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_ResumeModelRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_retail_v2beta_ListModelsRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_retail_v2beta_ListModelsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_ListModelsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_retail_v2beta_DeleteModelRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_retail_v2beta_DeleteModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_DeleteModelRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_retail_v2beta_ListModelsResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_retail_v2beta_ListModelsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_ListModelsResponse_descriptor, + new java.lang.String[] { + "Models", "NextPageToken", + }); + internal_static_google_cloud_retail_v2beta_TuneModelRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_retail_v2beta_TuneModelRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_TuneModelRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_retail_v2beta_CreateModelMetadata_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_retail_v2beta_CreateModelMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_CreateModelMetadata_descriptor, + new java.lang.String[] { + "Model", + }); + internal_static_google_cloud_retail_v2beta_TuneModelMetadata_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_retail_v2beta_TuneModelMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_TuneModelMetadata_descriptor, + new java.lang.String[] { + "Model", + }); + internal_static_google_cloud_retail_v2beta_TuneModelResponse_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_retail_v2beta_TuneModelResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_retail_v2beta_TuneModelResponse_descriptor, + new java.lang.String[] {}); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.retail.v2beta.ModelProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/OutputResult.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/OutputResult.java index 2276b70e..47cfeb1a 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/OutputResult.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/OutputResult.java @@ -52,62 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OutputResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - bigqueryResult_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - bigqueryResult_.add( - input.readMessage( - com.google.cloud.retail.v2beta.BigQueryOutputResult.parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - bigqueryResult_ = java.util.Collections.unmodifiableList(bigqueryResult_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ExportConfigProto .internal_static_google_cloud_retail_v2beta_OutputResult_descriptor; @@ -211,7 +155,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < bigqueryResult_.size(); i++) { output.writeMessage(1, bigqueryResult_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -223,7 +167,7 @@ public int getSerializedSize() { for (int i = 0; i < bigqueryResult_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, bigqueryResult_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -240,7 +184,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.OutputResult) obj; if (!getBigqueryResultList().equals(other.getBigqueryResultList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -255,7 +199,7 @@ public int hashCode() { hash = (37 * hash) + BIGQUERY_RESULT_FIELD_NUMBER; hash = (53 * hash) + getBigqueryResultList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -384,19 +328,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.OutputResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getBigqueryResultFieldBuilder(); - } } @java.lang.Override @@ -404,10 +339,11 @@ public Builder clear() { super.clear(); if (bigqueryResultBuilder_ == null) { bigqueryResult_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + bigqueryResult_ = null; bigqueryResultBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -521,7 +457,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.OutputResult other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -536,17 +472,45 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.OutputResult parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2beta.BigQueryOutputResult m = + input.readMessage( + com.google.cloud.retail.v2beta.BigQueryOutputResult.parser(), + extensionRegistry); + if (bigqueryResultBuilder_ == null) { + ensureBigqueryResultIsMutable(); + bigqueryResult_.add(m); + } else { + bigqueryResultBuilder_.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) { - parsedMessage = (com.google.cloud.retail.v2beta.OutputResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -946,7 +910,18 @@ public OutputResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OutputResult(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PauseModelRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PauseModelRequest.java new file mode 100644 index 00000000..27f64a1a --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PauseModelRequest.java @@ -0,0 +1,643 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +/** + * + * + *
+ * Request for pausing training of a model.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.PauseModelRequest} + */ +public final class PauseModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.PauseModelRequest) + PauseModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use PauseModelRequest.newBuilder() to construct. + private PauseModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PauseModelRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PauseModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_PauseModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_PauseModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.PauseModelRequest.class, + com.google.cloud.retail.v2beta.PauseModelRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the model to pause.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the model to pause.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2beta.PauseModelRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.PauseModelRequest other = + (com.google.cloud.retail.v2beta.PauseModelRequest) 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.retail.v2beta.PauseModelRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.PauseModelRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PauseModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.PauseModelRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PauseModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.PauseModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PauseModelRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.PauseModelRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PauseModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.PauseModelRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.PauseModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.PauseModelRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2beta.PauseModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for pausing training of a model.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.PauseModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.PauseModelRequest) + com.google.cloud.retail.v2beta.PauseModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_PauseModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_PauseModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.PauseModelRequest.class, + com.google.cloud.retail.v2beta.PauseModelRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.PauseModelRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_PauseModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.PauseModelRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.PauseModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.PauseModelRequest build() { + com.google.cloud.retail.v2beta.PauseModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.PauseModelRequest buildPartial() { + com.google.cloud.retail.v2beta.PauseModelRequest result = + new com.google.cloud.retail.v2beta.PauseModelRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.PauseModelRequest) { + return mergeFrom((com.google.cloud.retail.v2beta.PauseModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.PauseModelRequest other) { + if (other == com.google.cloud.retail.v2beta.PauseModelRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + 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(); + + 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 java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the model to pause.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the model to pause.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the model to pause.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the model to pause.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the model to pause.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.PauseModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.PauseModelRequest) + private static final com.google.cloud.retail.v2beta.PauseModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.PauseModelRequest(); + } + + public static com.google.cloud.retail.v2beta.PauseModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PauseModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.PauseModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PauseModelRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PauseModelRequestOrBuilder.java new file mode 100644 index 00000000..229e3f21 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PauseModelRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +public interface PauseModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.PauseModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the model to pause.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the model to pause.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictRequest.java index e1813dce..9a6bfab1 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictRequest.java @@ -54,119 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PredictRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - placement_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2beta.UserEvent.Builder subBuilder = null; - if (userEvent_ != null) { - subBuilder = userEvent_.toBuilder(); - } - userEvent_ = - input.readMessage( - com.google.cloud.retail.v2beta.UserEvent.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(userEvent_); - userEvent_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - pageSize_ = input.readInt32(); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 48: - { - validateOnly_ = input.readBool(); - break; - } - case 58: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - params_ = - com.google.protobuf.MapField.newMapField(ParamsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry params__ = - input.readMessage( - ParamsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - params_.getMutableMap().put(params__.getKey(), params__.getValue()); - break; - } - case 66: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.PredictionServiceProto .internal_static_google_cloud_retail_v2beta_PredictRequest_descriptor; @@ -364,10 +251,10 @@ public com.google.cloud.retail.v2beta.UserEventOrBuilder getUserEventOrBuilder() * * *
-   * Maximum number of results to return per page. Set this property
-   * to the number of prediction results needed. If zero, the service will
-   * choose a reasonable default. The maximum allowed value is 100. Values
-   * above 100 will be coerced to 100.
+   * Maximum number of results to return. Set this property to the number of
+   * prediction results needed. If zero, the service will choose a reasonable
+   * default. The maximum allowed value is 100. Values above 100 will be coerced
+   * to 100.
    * 
* * int32 page_size = 3; @@ -385,14 +272,17 @@ public int getPageSize() { * * *
-   * This field is not used for now; leave it unset.
+   * This field is not used; leave it unset.
    * 
* - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2beta/prediction_service.proto;l=94 * @return The pageToken. */ @java.lang.Override + @java.lang.Deprecated public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -408,14 +298,17 @@ public java.lang.String getPageToken() { * * *
-   * This field is not used for now; leave it unset.
+   * This field is not used; leave it unset.
    * 
* - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2beta/prediction_service.proto;l=94 * @return The bytes for pageToken. */ @java.lang.Override + @java.lang.Deprecated public com.google.protobuf.ByteString getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof java.lang.String) { @@ -942,7 +835,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output, internalGetParams(), ParamsDefaultEntryHolder.defaultEntry, 7); com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 8); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -989,7 +882,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, labels__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1016,7 +909,7 @@ public boolean equals(final java.lang.Object obj) { if (getValidateOnly() != other.getValidateOnly()) return false; if (!internalGetParams().equals(other.internalGetParams())) return false; if (!internalGetLabels().equals(other.internalGetLabels())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1049,7 +942,7 @@ public int hashCode() { hash = (37 * hash) + LABELS_FIELD_NUMBER; hash = (53 * hash) + internalGetLabels().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1202,17 +1095,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.retail.v2beta.PredictRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1350,7 +1236,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.PredictRequest other) { } internalGetMutableParams().mergeFrom(other.internalGetParams()); internalGetMutableLabels().mergeFrom(other.internalGetLabels()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1365,17 +1251,89 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.PredictRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + placement_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getUserEventFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + pageSize_ = input.readInt32(); + + break; + } // case 24 + case 34: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 48: + { + validateOnly_ = input.readBool(); + + break; + } // case 48 + case 58: + { + com.google.protobuf.MapEntry params__ = + input.readMessage( + ParamsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableParams() + .getMutableMap() + .put(params__.getKey(), params__.getValue()); + break; + } // case 58 + case 66: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 66 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2beta.PredictRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1863,10 +1821,10 @@ public com.google.cloud.retail.v2beta.UserEventOrBuilder getUserEventOrBuilder() * * *
-     * Maximum number of results to return per page. Set this property
-     * to the number of prediction results needed. If zero, the service will
-     * choose a reasonable default. The maximum allowed value is 100. Values
-     * above 100 will be coerced to 100.
+     * Maximum number of results to return. Set this property to the number of
+     * prediction results needed. If zero, the service will choose a reasonable
+     * default. The maximum allowed value is 100. Values above 100 will be coerced
+     * to 100.
      * 
* * int32 page_size = 3; @@ -1881,10 +1839,10 @@ public int getPageSize() { * * *
-     * Maximum number of results to return per page. Set this property
-     * to the number of prediction results needed. If zero, the service will
-     * choose a reasonable default. The maximum allowed value is 100. Values
-     * above 100 will be coerced to 100.
+     * Maximum number of results to return. Set this property to the number of
+     * prediction results needed. If zero, the service will choose a reasonable
+     * default. The maximum allowed value is 100. Values above 100 will be coerced
+     * to 100.
      * 
* * int32 page_size = 3; @@ -1902,10 +1860,10 @@ public Builder setPageSize(int value) { * * *
-     * Maximum number of results to return per page. Set this property
-     * to the number of prediction results needed. If zero, the service will
-     * choose a reasonable default. The maximum allowed value is 100. Values
-     * above 100 will be coerced to 100.
+     * Maximum number of results to return. Set this property to the number of
+     * prediction results needed. If zero, the service will choose a reasonable
+     * default. The maximum allowed value is 100. Values above 100 will be coerced
+     * to 100.
      * 
* * int32 page_size = 3; @@ -1924,13 +1882,16 @@ public Builder clearPageSize() { * * *
-     * This field is not used for now; leave it unset.
+     * This field is not used; leave it unset.
      * 
* - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2beta/prediction_service.proto;l=94 * @return The pageToken. */ + @java.lang.Deprecated public java.lang.String getPageToken() { java.lang.Object ref = pageToken_; if (!(ref instanceof java.lang.String)) { @@ -1946,13 +1907,16 @@ public java.lang.String getPageToken() { * * *
-     * This field is not used for now; leave it unset.
+     * This field is not used; leave it unset.
      * 
* - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2beta/prediction_service.proto;l=94 * @return The bytes for pageToken. */ + @java.lang.Deprecated public com.google.protobuf.ByteString getPageTokenBytes() { java.lang.Object ref = pageToken_; if (ref instanceof String) { @@ -1968,14 +1932,17 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-     * This field is not used for now; leave it unset.
+     * This field is not used; leave it unset.
      * 
* - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2beta/prediction_service.proto;l=94 * @param value The pageToken to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setPageToken(java.lang.String value) { if (value == null) { throw new NullPointerException(); @@ -1989,13 +1956,16 @@ public Builder setPageToken(java.lang.String value) { * * *
-     * This field is not used for now; leave it unset.
+     * This field is not used; leave it unset.
      * 
* - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2beta/prediction_service.proto;l=94 * @return This builder for chaining. */ + @java.lang.Deprecated public Builder clearPageToken() { pageToken_ = getDefaultInstance().getPageToken(); @@ -2006,14 +1976,17 @@ public Builder clearPageToken() { * * *
-     * This field is not used for now; leave it unset.
+     * This field is not used; leave it unset.
      * 
* - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2beta/prediction_service.proto;l=94 * @param value The bytes for pageToken to set. * @return This builder for chaining. */ + @java.lang.Deprecated public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); @@ -2947,7 +2920,18 @@ public PredictRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PredictRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictRequestOrBuilder.java index 458b3ad4..8a884631 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictRequestOrBuilder.java @@ -153,10 +153,10 @@ public interface PredictRequestOrBuilder * * *
-   * Maximum number of results to return per page. Set this property
-   * to the number of prediction results needed. If zero, the service will
-   * choose a reasonable default. The maximum allowed value is 100. Values
-   * above 100 will be coerced to 100.
+   * Maximum number of results to return. Set this property to the number of
+   * prediction results needed. If zero, the service will choose a reasonable
+   * default. The maximum allowed value is 100. Values above 100 will be coerced
+   * to 100.
    * 
* * int32 page_size = 3; @@ -169,25 +169,31 @@ public interface PredictRequestOrBuilder * * *
-   * This field is not used for now; leave it unset.
+   * This field is not used; leave it unset.
    * 
* - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2beta/prediction_service.proto;l=94 * @return The pageToken. */ + @java.lang.Deprecated java.lang.String getPageToken(); /** * * *
-   * This field is not used for now; leave it unset.
+   * This field is not used; leave it unset.
    * 
* - * string page_token = 4; + * string page_token = 4 [deprecated = true]; * + * @deprecated google.cloud.retail.v2beta.PredictRequest.page_token is deprecated. See + * google/cloud/retail/v2beta/prediction_service.proto;l=94 * @return The bytes for pageToken. */ + @java.lang.Deprecated com.google.protobuf.ByteString getPageTokenBytes(); /** diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictResponse.java index 7bdf522b..6c477d4f 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictResponse.java @@ -54,88 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PredictResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = - new java.util.ArrayList< - com.google.cloud.retail.v2beta.PredictResponse.PredictionResult>(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage( - com.google.cloud.retail.v2beta.PredictResponse.PredictionResult.parser(), - extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - attributionToken_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - missingIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - missingIds_.add(s); - break; - } - case 32: - { - validateOnly_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - missingIds_ = missingIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.PredictionServiceProto .internal_static_google_cloud_retail_v2beta_PredictResponse_descriptor; @@ -299,69 +217,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PredictionResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - id_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - metadata_ = - com.google.protobuf.MapField.newMapField( - MetadataDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - metadata__ = - input.readMessage( - MetadataDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - metadata_.getMutableMap().put(metadata__.getKey(), metadata__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.PredictionServiceProto .internal_static_google_cloud_retail_v2beta_PredictResponse_PredictionResult_descriptor; @@ -580,7 +435,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io } com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( output, internalGetMetadata(), MetadataDefaultEntryHolder.defaultEntry, 2); - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -602,7 +457,7 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, metadata__); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -620,7 +475,7 @@ public boolean equals(final java.lang.Object obj) { if (!getId().equals(other.getId())) return false; if (!internalGetMetadata().equals(other.internalGetMetadata())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -637,7 +492,7 @@ public int hashCode() { hash = (37 * hash) + METADATA_FIELD_NUMBER; hash = (53 * hash) + internalGetMetadata().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -791,17 +646,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { // Construct using // com.google.cloud.retail.v2beta.PredictResponse.PredictionResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -901,7 +749,7 @@ public Builder mergeFrom( onChanged(); } internalGetMutableMetadata().mergeFrom(other.internalGetMetadata()); - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -916,19 +764,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.PredictResponse.PredictionResult parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.protobuf.MapEntry + metadata__ = + input.readMessage( + MetadataDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableMetadata() + .getMutableMap() + .put(metadata__.getKey(), metadata__.getValue()); + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.PredictResponse.PredictionResult) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1274,7 +1152,19 @@ public PredictionResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PredictionResult(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1531,7 +1421,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (validateOnly_ != false) { output.writeBool(4, validateOnly_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1557,7 +1447,7 @@ public int getSerializedSize() { if (validateOnly_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, validateOnly_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1577,7 +1467,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAttributionToken().equals(other.getAttributionToken())) return false; if (!getMissingIdsList().equals(other.getMissingIdsList())) return false; if (getValidateOnly() != other.getValidateOnly()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1600,7 +1490,7 @@ public int hashCode() { } hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1729,19 +1619,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.PredictResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - } } @java.lang.Override @@ -1749,10 +1630,11 @@ public Builder clear() { super.clear(); if (resultsBuilder_ == null) { results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + results_ = null; resultsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); attributionToken_ = ""; missingIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -1896,7 +1778,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.PredictResponse other) { if (other.getValidateOnly() != false) { setValidateOnly(other.getValidateOnly()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1911,17 +1793,64 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.PredictResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2beta.PredictResponse.PredictionResult m = + input.readMessage( + com.google.cloud.retail.v2beta.PredictResponse.PredictionResult.parser(), + extensionRegistry); + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(m); + } else { + resultsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + attributionToken_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureMissingIdsIsMutable(); + missingIds_.add(s); + break; + } // case 26 + case 32: + { + validateOnly_ = input.readBool(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.PredictResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2704,7 +2633,18 @@ public PredictResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PredictResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceProto.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceProto.java index a4c57077..912cf40a 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceProto.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PredictionServiceProto.java @@ -64,44 +64,45 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "service.proto\022\032google.cloud.retail.v2bet" + "a\032\034google/api/annotations.proto\032\027google/" + "api/client.proto\032\037google/api/field_behav" - + "ior.proto\032+google/cloud/retail/v2beta/us" - + "er_event.proto\032\034google/protobuf/struct.p" - + "roto\"\274\003\n\016PredictRequest\022\026\n\tplacement\030\001 \001" - + "(\tB\003\340A\002\022>\n\nuser_event\030\002 \001(\0132%.google.clo" - + "ud.retail.v2beta.UserEventB\003\340A\002\022\021\n\tpage_" - + "size\030\003 \001(\005\022\022\n\npage_token\030\004 \001(\t\022\016\n\006filter" - + "\030\005 \001(\t\022\025\n\rvalidate_only\030\006 \001(\010\022F\n\006params\030" - + "\007 \003(\01326.google.cloud.retail.v2beta.Predi" - + "ctRequest.ParamsEntry\022F\n\006labels\030\010 \003(\01326." - + "google.cloud.retail.v2beta.PredictReques" - + "t.LabelsEntry\032E\n\013ParamsEntry\022\013\n\003key\030\001 \001(" - + "\t\022%\n\005value\030\002 \001(\0132\026.google.protobuf.Value" - + ":\0028\001\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005valu" - + "e\030\002 \001(\t:\0028\001\"\357\002\n\017PredictResponse\022M\n\007resul" - + "ts\030\001 \003(\0132<.google.cloud.retail.v2beta.Pr" - + "edictResponse.PredictionResult\022\031\n\021attrib" - + "ution_token\030\002 \001(\t\022\023\n\013missing_ids\030\003 \003(\t\022\025" - + "\n\rvalidate_only\030\004 \001(\010\032\305\001\n\020PredictionResu" - + "lt\022\n\n\002id\030\001 \001(\t\022\\\n\010metadata\030\002 \003(\0132J.googl" - + "e.cloud.retail.v2beta.PredictResponse.Pr" - + "edictionResult.MetadataEntry\032G\n\rMetadata" - + "Entry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.goog" - + "le.protobuf.Value:\0028\0012\361\002\n\021PredictionServ" - + "ice\022\220\002\n\007Predict\022*.google.cloud.retail.v2" - + "beta.PredictRequest\032+.google.cloud.retai" - + "l.v2beta.PredictResponse\"\253\001\202\323\344\223\002\244\001\"J/v2b" - + "eta/{placement=projects/*/locations/*/ca" - + "talogs/*/placements/*}:predict:\001*ZS\"N/v2" - + "beta/{placement=projects/*/locations/*/c" - + "atalogs/*/servingConfigs/*}:predict:\001*\032I" - + "\312A\025retail.googleapis.com\322A.https://www.g" - + "oogleapis.com/auth/cloud-platformB\337\001\n\036co" - + "m.google.cloud.retail.v2betaB\026Prediction" - + "ServiceProtoP\001Z@google.golang.org/genpro" - + "to/googleapis/cloud/retail/v2beta;retail" - + "\242\002\006RETAIL\252\002\032Google.Cloud.Retail.V2Beta\312\002" - + "\032Google\\Cloud\\Retail\\V2beta\352\002\035Google::Cl" - + "oud::Retail::V2betab\006proto3" + + "ior.proto\032\031google/api/resource.proto\032+go" + + "ogle/cloud/retail/v2beta/user_event.prot" + + "o\032\034google/protobuf/struct.proto\"\300\003\n\016Pred" + + "ictRequest\022\026\n\tplacement\030\001 \001(\tB\003\340A\002\022>\n\nus" + + "er_event\030\002 \001(\0132%.google.cloud.retail.v2b" + + "eta.UserEventB\003\340A\002\022\021\n\tpage_size\030\003 \001(\005\022\026\n" + + "\npage_token\030\004 \001(\tB\002\030\001\022\016\n\006filter\030\005 \001(\t\022\025\n" + + "\rvalidate_only\030\006 \001(\010\022F\n\006params\030\007 \003(\01326.g" + + "oogle.cloud.retail.v2beta.PredictRequest" + + ".ParamsEntry\022F\n\006labels\030\010 \003(\01326.google.cl" + + "oud.retail.v2beta.PredictRequest.LabelsE" + + "ntry\032E\n\013ParamsEntry\022\013\n\003key\030\001 \001(\t\022%\n\005valu" + + "e\030\002 \001(\0132\026.google.protobuf.Value:\0028\001\032-\n\013L" + + "abelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\002" + + "8\001\"\357\002\n\017PredictResponse\022M\n\007results\030\001 \003(\0132" + + "<.google.cloud.retail.v2beta.PredictResp" + + "onse.PredictionResult\022\031\n\021attribution_tok" + + "en\030\002 \001(\t\022\023\n\013missing_ids\030\003 \003(\t\022\025\n\rvalidat" + + "e_only\030\004 \001(\010\032\305\001\n\020PredictionResult\022\n\n\002id\030" + + "\001 \001(\t\022\\\n\010metadata\030\002 \003(\0132J.google.cloud.r" + + "etail.v2beta.PredictResponse.PredictionR" + + "esult.MetadataEntry\032G\n\rMetadataEntry\022\013\n\003" + + "key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.google.protob" + + "uf.Value:\0028\0012\361\002\n\021PredictionService\022\220\002\n\007P" + + "redict\022*.google.cloud.retail.v2beta.Pred" + + "ictRequest\032+.google.cloud.retail.v2beta." + + "PredictResponse\"\253\001\202\323\344\223\002\244\001\"J/v2beta/{plac" + + "ement=projects/*/locations/*/catalogs/*/" + + "placements/*}:predict:\001*ZS\"N/v2beta/{pla" + + "cement=projects/*/locations/*/catalogs/*" + + "/servingConfigs/*}:predict:\001*\032I\312A\025retail" + + ".googleapis.com\322A.https://www.googleapis" + + ".com/auth/cloud-platformB\337\001\n\036com.google." + + "cloud.retail.v2betaB\026PredictionServicePr" + + "otoP\001Z@google.golang.org/genproto/google" + + "apis/cloud/retail/v2beta;retail\242\002\006RETAIL" + + "\252\002\032Google.Cloud.Retail.V2Beta\312\002\032Google\\C" + + "loud\\Retail\\V2beta\352\002\035Google::Cloud::Reta" + + "il::V2betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -110,6 +111,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.AnnotationsProto.getDescriptor(), com.google.api.ClientProto.getDescriptor(), com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), com.google.cloud.retail.v2beta.UserEventProto.getDescriptor(), com.google.protobuf.StructProto.getDescriptor(), }); @@ -187,6 +189,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.AnnotationsProto.getDescriptor(); com.google.api.ClientProto.getDescriptor(); com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); com.google.cloud.retail.v2beta.UserEventProto.getDescriptor(); com.google.protobuf.StructProto.getDescriptor(); } diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PriceInfo.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PriceInfo.java index 2bc23176..b0928132 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PriceInfo.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PriceInfo.java @@ -52,114 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PriceInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - currencyCode_ = s; - break; - } - case 21: - { - price_ = input.readFloat(); - break; - } - case 29: - { - originalPrice_ = input.readFloat(); - break; - } - case 37: - { - cost_ = input.readFloat(); - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (priceEffectiveTime_ != null) { - subBuilder = priceEffectiveTime_.toBuilder(); - } - priceEffectiveTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(priceEffectiveTime_); - priceEffectiveTime_ = subBuilder.buildPartial(); - } - - break; - } - case 50: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (priceExpireTime_ != null) { - subBuilder = priceExpireTime_.toBuilder(); - } - priceExpireTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(priceExpireTime_); - priceExpireTime_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - com.google.cloud.retail.v2beta.PriceInfo.PriceRange.Builder subBuilder = null; - if (priceRange_ != null) { - subBuilder = priceRange_.toBuilder(); - } - priceRange_ = - input.readMessage( - com.google.cloud.retail.v2beta.PriceInfo.PriceRange.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(priceRange_); - priceRange_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_PriceInfo_descriptor; @@ -315,77 +207,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PriceRange( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2beta.Interval.Builder subBuilder = null; - if (price_ != null) { - subBuilder = price_.toBuilder(); - } - price_ = - input.readMessage( - com.google.cloud.retail.v2beta.Interval.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(price_); - price_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.retail.v2beta.Interval.Builder subBuilder = null; - if (originalPrice_ != null) { - subBuilder = originalPrice_.toBuilder(); - } - originalPrice_ = - input.readMessage( - com.google.cloud.retail.v2beta.Interval.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(originalPrice_); - originalPrice_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_PriceInfo_PriceRange_descriptor; @@ -545,7 +366,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (originalPrice_ != null) { output.writeMessage(2, getOriginalPrice()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -560,7 +381,7 @@ public int getSerializedSize() { if (originalPrice_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOriginalPrice()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -584,7 +405,7 @@ public boolean equals(final java.lang.Object obj) { if (hasOriginalPrice()) { if (!getOriginalPrice().equals(other.getOriginalPrice())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -603,7 +424,7 @@ public int hashCode() { hash = (37 * hash) + ORIGINAL_PRICE_FIELD_NUMBER; hash = (53 * hash) + getOriginalPrice().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -738,17 +559,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.PriceInfo.PriceRange.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -861,7 +675,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.PriceInfo.PriceRange oth if (other.hasOriginalPrice()) { mergeOriginalPrice(other.getOriginalPrice()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -876,18 +690,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.PriceInfo.PriceRange parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getPriceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getOriginalPriceFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.PriceInfo.PriceRange) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1385,7 +1224,19 @@ public PriceRange parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PriceRange(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1822,7 +1673,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (priceRange_ != null) { output.writeMessage(7, getPriceRange()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1852,7 +1703,7 @@ public int getSerializedSize() { if (priceRange_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getPriceRange()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1886,7 +1737,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPriceRange()) { if (!getPriceRange().equals(other.getPriceRange())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1917,7 +1768,7 @@ public int hashCode() { hash = (37 * hash) + PRICE_RANGE_FIELD_NUMBER; hash = (53 * hash) + getPriceRange().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2046,17 +1897,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.PriceInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2205,7 +2049,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.PriceInfo other) { if (other.hasPriceRange()) { mergePriceRange(other.getPriceRange()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2220,17 +2064,74 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.PriceInfo parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + currencyCode_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 21: + { + price_ = input.readFloat(); + + break; + } // case 21 + case 29: + { + originalPrice_ = input.readFloat(); + + break; + } // case 29 + case 37: + { + cost_ = input.readFloat(); + + break; + } // case 37 + case 42: + { + input.readMessage( + getPriceEffectiveTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 50: + { + input.readMessage(getPriceExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + input.readMessage(getPriceRangeFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.PriceInfo) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3483,7 +3384,18 @@ public PriceInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PriceInfo(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Product.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Product.java index 10fc790b..b38b1b3a 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Product.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Product.java @@ -61,6 +61,7 @@ private Product() { conditions_ = com.google.protobuf.LazyStringArrayList.EMPTY; promotions_ = java.util.Collections.emptyList(); variants_ = java.util.Collections.emptyList(); + localInventories_ = java.util.Collections.emptyList(); } @java.lang.Override @@ -74,448 +75,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Product( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - id_ = s; - break; - } - case 24: - { - int rawValue = input.readEnum(); - - type_ = rawValue; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - primaryProductId_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - collectionMemberIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - collectionMemberIds_.add(s); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - gtin_ = s; - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - categories_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - categories_.add(s); - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - title_ = s; - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - brands_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - brands_.add(s); - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - description_ = s; - break; - } - case 90: - { - java.lang.String s = input.readStringRequireUtf8(); - - languageCode_ = s; - break; - } - case 98: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - attributes_ = - com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000008; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.retail.v2beta.CustomAttribute> - attributes__ = - input.readMessage( - AttributesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - attributes_.getMutableMap().put(attributes__.getKey(), attributes__.getValue()); - break; - } - case 106: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - tags_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000010; - } - tags_.add(s); - break; - } - case 114: - { - com.google.cloud.retail.v2beta.PriceInfo.Builder subBuilder = null; - if (priceInfo_ != null) { - subBuilder = priceInfo_.toBuilder(); - } - priceInfo_ = - input.readMessage( - com.google.cloud.retail.v2beta.PriceInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(priceInfo_); - priceInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 122: - { - com.google.cloud.retail.v2beta.Rating.Builder subBuilder = null; - if (rating_ != null) { - subBuilder = rating_.toBuilder(); - } - rating_ = - input.readMessage( - com.google.cloud.retail.v2beta.Rating.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(rating_); - rating_ = subBuilder.buildPartial(); - } - - break; - } - case 130: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (expirationCase_ == 16) { - subBuilder = ((com.google.protobuf.Timestamp) expiration_).toBuilder(); - } - expiration_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.protobuf.Timestamp) expiration_); - expiration_ = subBuilder.buildPartial(); - } - expirationCase_ = 16; - break; - } - case 138: - { - com.google.protobuf.Duration.Builder subBuilder = null; - if (expirationCase_ == 17) { - subBuilder = ((com.google.protobuf.Duration) expiration_).toBuilder(); - } - expiration_ = - input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.protobuf.Duration) expiration_); - expiration_ = subBuilder.buildPartial(); - } - expirationCase_ = 17; - break; - } - case 146: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (availableTime_ != null) { - subBuilder = availableTime_.toBuilder(); - } - availableTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(availableTime_); - availableTime_ = subBuilder.buildPartial(); - } - - break; - } - case 152: - { - int rawValue = input.readEnum(); - - availability_ = rawValue; - break; - } - case 162: - { - com.google.protobuf.Int32Value.Builder subBuilder = null; - if (availableQuantity_ != null) { - subBuilder = availableQuantity_.toBuilder(); - } - availableQuantity_ = - input.readMessage(com.google.protobuf.Int32Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(availableQuantity_); - availableQuantity_ = subBuilder.buildPartial(); - } - - break; - } - case 170: - { - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - fulfillmentInfo_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000020; - } - fulfillmentInfo_.add( - input.readMessage( - com.google.cloud.retail.v2beta.FulfillmentInfo.parser(), extensionRegistry)); - break; - } - case 178: - { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 186: - { - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - images_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000040; - } - images_.add( - input.readMessage( - com.google.cloud.retail.v2beta.Image.parser(), extensionRegistry)); - break; - } - case 194: - { - com.google.cloud.retail.v2beta.Audience.Builder subBuilder = null; - if (audience_ != null) { - subBuilder = audience_.toBuilder(); - } - audience_ = - input.readMessage( - com.google.cloud.retail.v2beta.Audience.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(audience_); - audience_ = subBuilder.buildPartial(); - } - - break; - } - case 202: - { - com.google.cloud.retail.v2beta.ColorInfo.Builder subBuilder = null; - if (colorInfo_ != null) { - subBuilder = colorInfo_.toBuilder(); - } - colorInfo_ = - input.readMessage( - com.google.cloud.retail.v2beta.ColorInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(colorInfo_); - colorInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 210: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - sizes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000080; - } - sizes_.add(s); - break; - } - case 218: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000100) != 0)) { - materials_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000100; - } - materials_.add(s); - break; - } - case 226: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000200) != 0)) { - patterns_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000200; - } - patterns_.add(s); - break; - } - case 234: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000400) != 0)) { - conditions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000400; - } - conditions_.add(s); - break; - } - case 242: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (retrievableFields_ != null) { - subBuilder = retrievableFields_.toBuilder(); - } - retrievableFields_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(retrievableFields_); - retrievableFields_ = subBuilder.buildPartial(); - } - - break; - } - case 250: - { - if (!((mutable_bitField0_ & 0x00001000) != 0)) { - variants_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00001000; - } - variants_.add( - input.readMessage( - com.google.cloud.retail.v2beta.Product.parser(), extensionRegistry)); - break; - } - case 266: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (publishTime_ != null) { - subBuilder = publishTime_.toBuilder(); - } - publishTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(publishTime_); - publishTime_ = subBuilder.buildPartial(); - } - - break; - } - case 274: - { - if (!((mutable_bitField0_ & 0x00000800) != 0)) { - promotions_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000800; - } - promotions_.add( - input.readMessage( - com.google.cloud.retail.v2beta.Promotion.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - collectionMemberIds_ = collectionMemberIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - categories_ = categories_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - brands_ = brands_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - tags_ = tags_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - fulfillmentInfo_ = java.util.Collections.unmodifiableList(fulfillmentInfo_); - } - if (((mutable_bitField0_ & 0x00000040) != 0)) { - images_ = java.util.Collections.unmodifiableList(images_); - } - if (((mutable_bitField0_ & 0x00000080) != 0)) { - sizes_ = sizes_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000100) != 0)) { - materials_ = materials_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000200) != 0)) { - patterns_ = patterns_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000400) != 0)) { - conditions_ = conditions_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00001000) != 0)) { - variants_ = java.util.Collections.unmodifiableList(variants_); - } - if (((mutable_bitField0_ & 0x00000800) != 0)) { - promotions_ = java.util.Collections.unmodifiableList(promotions_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductProto .internal_static_google_cloud_retail_v2beta_Product_descriptor; @@ -1459,7 +1018,7 @@ public com.google.protobuf.ByteString getPrimaryProductIdBytes() { * The [type][google.cloud.retail.v2beta.Product.type] of the members must be * either [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] or * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] otherwise - * and INVALID_ARGUMENT error is thrown. Should not set it for other types. A + * an INVALID_ARGUMENT error is thrown. Should not set it for other types. A * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is * return. *
@@ -1482,7 +1041,7 @@ public com.google.protobuf.ProtocolStringList getCollectionMemberIdsList() { * The [type][google.cloud.retail.v2beta.Product.type] of the members must be * either [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] or * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] otherwise - * and INVALID_ARGUMENT error is thrown. Should not set it for other types. A + * an INVALID_ARGUMENT error is thrown. Should not set it for other types. A * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is * return. *
@@ -1505,7 +1064,7 @@ public int getCollectionMemberIdsCount() { * The [type][google.cloud.retail.v2beta.Product.type] of the members must be * either [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] or * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] otherwise - * and INVALID_ARGUMENT error is thrown. Should not set it for other types. A + * an INVALID_ARGUMENT error is thrown. Should not set it for other types. A * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is * return. *
@@ -1529,7 +1088,7 @@ public java.lang.String getCollectionMemberIds(int index) { * The [type][google.cloud.retail.v2beta.Product.type] of the members must be * either [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] or * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] otherwise - * and INVALID_ARGUMENT error is thrown. Should not set it for other types. A + * an INVALID_ARGUMENT error is thrown. Should not set it for other types. A * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is * return. *
@@ -1628,7 +1187,7 @@ public com.google.protobuf.ByteString getGtinBytes() { * belonging to several parallel categories. Strongly recommended using the * full path for better search / recommendation quality. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * For example, if a shoes product belongs to both * ["Shoes & Accessories" -> "Shoes"] and @@ -1668,7 +1227,7 @@ public com.google.protobuf.ProtocolStringList getCategoriesList() { * belonging to several parallel categories. Strongly recommended using the * full path for better search / recommendation quality. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * For example, if a shoes product belongs to both * ["Shoes & Accessories" -> "Shoes"] and @@ -1708,7 +1267,7 @@ public int getCategoriesCount() { * belonging to several parallel categories. Strongly recommended using the * full path for better search / recommendation quality. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * For example, if a shoes product belongs to both * ["Shoes & Accessories" -> "Shoes"] and @@ -1749,7 +1308,7 @@ public java.lang.String getCategories(int index) { * belonging to several parallel categories. Strongly recommended using the * full path for better search / recommendation quality. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * For example, if a shoes product belongs to both * ["Shoes & Accessories" -> "Shoes"] and @@ -3795,6 +3354,116 @@ public com.google.cloud.retail.v2beta.ProductOrBuilder getVariantsOrBuilder(int return variants_.get(index); } + public static final int LOCAL_INVENTORIES_FIELD_NUMBER = 35; + private java.util.List localInventories_; + /** + * + * + *
+   * Output only. A list of local inventories specific to different places.
+   * This is only available for users who have Retail Search enabled, and it can
+   * be managed by
+   * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+   * and
+   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+   * APIs.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List getLocalInventoriesList() { + return localInventories_; + } + /** + * + * + *
+   * Output only. A list of local inventories specific to different places.
+   * This is only available for users who have Retail Search enabled, and it can
+   * be managed by
+   * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+   * and
+   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+   * APIs.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public java.util.List + getLocalInventoriesOrBuilderList() { + return localInventories_; + } + /** + * + * + *
+   * Output only. A list of local inventories specific to different places.
+   * This is only available for users who have Retail Search enabled, and it can
+   * be managed by
+   * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+   * and
+   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+   * APIs.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public int getLocalInventoriesCount() { + return localInventories_.size(); + } + /** + * + * + *
+   * Output only. A list of local inventories specific to different places.
+   * This is only available for users who have Retail Search enabled, and it can
+   * be managed by
+   * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+   * and
+   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+   * APIs.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.LocalInventory getLocalInventories(int index) { + return localInventories_.get(index); + } + /** + * + * + *
+   * Output only. A list of local inventories specific to different places.
+   * This is only available for users who have Retail Search enabled, and it can
+   * be managed by
+   * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+   * and
+   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+   * APIs.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.LocalInventoryOrBuilder getLocalInventoriesOrBuilder( + int index) { + return localInventories_.get(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -3909,7 +3578,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < promotions_.size(); i++) { output.writeMessage(34, promotions_.get(i)); } - unknownFields.writeTo(output); + for (int i = 0; i < localInventories_.size(); i++) { + output.writeMessage(35, localInventories_.get(i)); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4071,7 +3743,11 @@ public int getSerializedSize() { for (int i = 0; i < promotions_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(34, promotions_.get(i)); } - size += unknownFields.getSerializedSize(); + for (int i = 0; i < localInventories_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(35, localInventories_.get(i)); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4141,6 +3817,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRetrievableFields().equals(other.getRetrievableFields())) return false; } if (!getVariantsList().equals(other.getVariantsList())) return false; + if (!getLocalInventoriesList().equals(other.getLocalInventoriesList())) return false; if (!getExpirationCase().equals(other.getExpirationCase())) return false; switch (expirationCase_) { case 16: @@ -4152,7 +3829,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4267,6 +3944,10 @@ public int hashCode() { hash = (37 * hash) + VARIANTS_FIELD_NUMBER; hash = (53 * hash) + getVariantsList().hashCode(); } + if (getLocalInventoriesCount() > 0) { + hash = (37 * hash) + LOCAL_INVENTORIES_FIELD_NUMBER; + hash = (53 * hash) + getLocalInventoriesList().hashCode(); + } switch (expirationCase_) { case 16: hash = (37 * hash) + EXPIRE_TIME_FIELD_NUMBER; @@ -4279,7 +3960,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4429,27 +4110,21 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.retail.v2beta.Product.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getFulfillmentInfoFieldBuilder(); - getImagesFieldBuilder(); - getPromotionsFieldBuilder(); - getVariantsFieldBuilder(); - } } @java.lang.Override public Builder clear() { super.clear(); + if (expireTimeBuilder_ != null) { + expireTimeBuilder_.clear(); + } + if (ttlBuilder_ != null) { + ttlBuilder_.clear(); + } name_ = ""; id_ = ""; @@ -4503,18 +4178,20 @@ public Builder clear() { } if (fulfillmentInfoBuilder_ == null) { fulfillmentInfo_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); } else { + fulfillmentInfo_ = null; fulfillmentInfoBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000020); uri_ = ""; if (imagesBuilder_ == null) { images_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); } else { + images_ = null; imagesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000040); if (audienceBuilder_ == null) { audience_ = null; } else { @@ -4537,10 +4214,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000400); if (promotionsBuilder_ == null) { promotions_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000800); } else { + promotions_ = null; promotionsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000800); if (publishTimeBuilder_ == null) { publishTime_ = null; } else { @@ -4555,10 +4233,18 @@ public Builder clear() { } if (variantsBuilder_ == null) { variants_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00001000); } else { + variants_ = null; variantsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00001000); + if (localInventoriesBuilder_ == null) { + localInventories_ = java.util.Collections.emptyList(); + } else { + localInventories_ = null; + localInventoriesBuilder_.clear(); + } + bitField0_ = (bitField0_ & ~0x00002000); expirationCase_ = 0; expiration_ = null; return this; @@ -4731,6 +4417,15 @@ public com.google.cloud.retail.v2beta.Product buildPartial() { } else { result.variants_ = variantsBuilder_.build(); } + if (localInventoriesBuilder_ == null) { + if (((bitField0_ & 0x00002000) != 0)) { + localInventories_ = java.util.Collections.unmodifiableList(localInventories_); + bitField0_ = (bitField0_ & ~0x00002000); + } + result.localInventories_ = localInventories_; + } else { + result.localInventories_ = localInventoriesBuilder_.build(); + } result.expirationCase_ = expirationCase_; onBuilt(); return result; @@ -5032,6 +4727,33 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Product other) { } } } + if (localInventoriesBuilder_ == null) { + if (!other.localInventories_.isEmpty()) { + if (localInventories_.isEmpty()) { + localInventories_ = other.localInventories_; + bitField0_ = (bitField0_ & ~0x00002000); + } else { + ensureLocalInventoriesIsMutable(); + localInventories_.addAll(other.localInventories_); + } + onChanged(); + } + } else { + if (!other.localInventories_.isEmpty()) { + if (localInventoriesBuilder_.isEmpty()) { + localInventoriesBuilder_.dispose(); + localInventoriesBuilder_ = null; + localInventories_ = other.localInventories_; + bitField0_ = (bitField0_ & ~0x00002000); + localInventoriesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getLocalInventoriesFieldBuilder() + : null; + } else { + localInventoriesBuilder_.addAllMessages(other.localInventories_); + } + } + } switch (other.getExpirationCase()) { case EXPIRE_TIME: { @@ -5048,7 +4770,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Product other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5063,17 +4785,287 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Product parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + id_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + type_ = input.readEnum(); + + break; + } // case 24 + case 34: + { + primaryProductId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCollectionMemberIdsIsMutable(); + collectionMemberIds_.add(s); + break; + } // case 42 + case 50: + { + gtin_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureCategoriesIsMutable(); + categories_.add(s); + break; + } // case 58 + case 66: + { + title_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureBrandsIsMutable(); + brands_.add(s); + break; + } // case 74 + case 82: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 90: + { + languageCode_ = input.readStringRequireUtf8(); + + break; + } // case 90 + case 98: + { + com.google.protobuf.MapEntry< + java.lang.String, com.google.cloud.retail.v2beta.CustomAttribute> + attributes__ = + input.readMessage( + AttributesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAttributes() + .getMutableMap() + .put(attributes__.getKey(), attributes__.getValue()); + break; + } // case 98 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTagsIsMutable(); + tags_.add(s); + break; + } // case 106 + case 114: + { + input.readMessage(getPriceInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 114 + case 122: + { + input.readMessage(getRatingFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 122 + case 130: + { + input.readMessage(getExpireTimeFieldBuilder().getBuilder(), extensionRegistry); + expirationCase_ = 16; + break; + } // case 130 + case 138: + { + input.readMessage(getTtlFieldBuilder().getBuilder(), extensionRegistry); + expirationCase_ = 17; + break; + } // case 138 + case 146: + { + input.readMessage(getAvailableTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 146 + case 152: + { + availability_ = input.readEnum(); + + break; + } // case 152 + case 162: + { + input.readMessage( + getAvailableQuantityFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 162 + case 170: + { + com.google.cloud.retail.v2beta.FulfillmentInfo m = + input.readMessage( + com.google.cloud.retail.v2beta.FulfillmentInfo.parser(), extensionRegistry); + if (fulfillmentInfoBuilder_ == null) { + ensureFulfillmentInfoIsMutable(); + fulfillmentInfo_.add(m); + } else { + fulfillmentInfoBuilder_.addMessage(m); + } + break; + } // case 170 + case 178: + { + uri_ = input.readStringRequireUtf8(); + + break; + } // case 178 + case 186: + { + com.google.cloud.retail.v2beta.Image m = + input.readMessage( + com.google.cloud.retail.v2beta.Image.parser(), extensionRegistry); + if (imagesBuilder_ == null) { + ensureImagesIsMutable(); + images_.add(m); + } else { + imagesBuilder_.addMessage(m); + } + break; + } // case 186 + case 194: + { + input.readMessage(getAudienceFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 194 + case 202: + { + input.readMessage(getColorInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 202 + case 210: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSizesIsMutable(); + sizes_.add(s); + break; + } // case 210 + case 218: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureMaterialsIsMutable(); + materials_.add(s); + break; + } // case 218 + case 226: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePatternsIsMutable(); + patterns_.add(s); + break; + } // case 226 + case 234: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureConditionsIsMutable(); + conditions_.add(s); + break; + } // case 234 + case 242: + { + input.readMessage( + getRetrievableFieldsFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 242 + case 250: + { + com.google.cloud.retail.v2beta.Product m = + input.readMessage( + com.google.cloud.retail.v2beta.Product.parser(), extensionRegistry); + if (variantsBuilder_ == null) { + ensureVariantsIsMutable(); + variants_.add(m); + } else { + variantsBuilder_.addMessage(m); + } + break; + } // case 250 + case 266: + { + input.readMessage(getPublishTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 266 + case 274: + { + com.google.cloud.retail.v2beta.Promotion m = + input.readMessage( + com.google.cloud.retail.v2beta.Promotion.parser(), extensionRegistry); + if (promotionsBuilder_ == null) { + ensurePromotionsIsMutable(); + promotions_.add(m); + } else { + promotionsBuilder_.addMessage(m); + } + break; + } // case 274 + case 282: + { + com.google.cloud.retail.v2beta.LocalInventory m = + input.readMessage( + com.google.cloud.retail.v2beta.LocalInventory.parser(), extensionRegistry); + if (localInventoriesBuilder_ == null) { + ensureLocalInventoriesIsMutable(); + localInventories_.add(m); + } else { + localInventoriesBuilder_.addMessage(m); + } + break; + } // case 282 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2beta.Product) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6358,7 +6350,7 @@ private void ensureCollectionMemberIdsIsMutable() { * The [type][google.cloud.retail.v2beta.Product.type] of the members must be * either [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] or * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] otherwise - * and INVALID_ARGUMENT error is thrown. Should not set it for other types. A + * an INVALID_ARGUMENT error is thrown. Should not set it for other types. A * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is * return. *
@@ -6381,7 +6373,7 @@ public com.google.protobuf.ProtocolStringList getCollectionMemberIdsList() { * The [type][google.cloud.retail.v2beta.Product.type] of the members must be * either [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] or * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] otherwise - * and INVALID_ARGUMENT error is thrown. Should not set it for other types. A + * an INVALID_ARGUMENT error is thrown. Should not set it for other types. A * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is * return. *
@@ -6404,7 +6396,7 @@ public int getCollectionMemberIdsCount() { * The [type][google.cloud.retail.v2beta.Product.type] of the members must be * either [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] or * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] otherwise - * and INVALID_ARGUMENT error is thrown. Should not set it for other types. A + * an INVALID_ARGUMENT error is thrown. Should not set it for other types. A * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is * return. *
@@ -6428,7 +6420,7 @@ public java.lang.String getCollectionMemberIds(int index) { * The [type][google.cloud.retail.v2beta.Product.type] of the members must be * either [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] or * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] otherwise - * and INVALID_ARGUMENT error is thrown. Should not set it for other types. A + * an INVALID_ARGUMENT error is thrown. Should not set it for other types. A * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is * return. *
@@ -6452,7 +6444,7 @@ public com.google.protobuf.ByteString getCollectionMemberIdsBytes(int index) { * The [type][google.cloud.retail.v2beta.Product.type] of the members must be * either [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] or * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] otherwise - * and INVALID_ARGUMENT error is thrown. Should not set it for other types. A + * an INVALID_ARGUMENT error is thrown. Should not set it for other types. A * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is * return. *
@@ -6483,7 +6475,7 @@ public Builder setCollectionMemberIds(int index, java.lang.String value) { * The [type][google.cloud.retail.v2beta.Product.type] of the members must be * either [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] or * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] otherwise - * and INVALID_ARGUMENT error is thrown. Should not set it for other types. A + * an INVALID_ARGUMENT error is thrown. Should not set it for other types. A * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is * return. *
@@ -6513,7 +6505,7 @@ public Builder addCollectionMemberIds(java.lang.String value) { * The [type][google.cloud.retail.v2beta.Product.type] of the members must be * either [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] or * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] otherwise - * and INVALID_ARGUMENT error is thrown. Should not set it for other types. A + * an INVALID_ARGUMENT error is thrown. Should not set it for other types. A * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is * return. *
@@ -6540,7 +6532,7 @@ public Builder addAllCollectionMemberIds(java.lang.Iterable va * The [type][google.cloud.retail.v2beta.Product.type] of the members must be * either [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] or * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] otherwise - * and INVALID_ARGUMENT error is thrown. Should not set it for other types. A + * an INVALID_ARGUMENT error is thrown. Should not set it for other types. A * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is * return. *
@@ -6566,7 +6558,7 @@ public Builder clearCollectionMemberIds() { * The [type][google.cloud.retail.v2beta.Product.type] of the members must be * either [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] or * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] otherwise - * and INVALID_ARGUMENT error is thrown. Should not set it for other types. A + * an INVALID_ARGUMENT error is thrown. Should not set it for other types. A * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is * return. *
@@ -6775,7 +6767,7 @@ private void ensureCategoriesIsMutable() { * belonging to several parallel categories. Strongly recommended using the * full path for better search / recommendation quality. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * For example, if a shoes product belongs to both * ["Shoes & Accessories" -> "Shoes"] and @@ -6815,7 +6807,7 @@ public com.google.protobuf.ProtocolStringList getCategoriesList() { * belonging to several parallel categories. Strongly recommended using the * full path for better search / recommendation quality. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * For example, if a shoes product belongs to both * ["Shoes & Accessories" -> "Shoes"] and @@ -6855,7 +6847,7 @@ public int getCategoriesCount() { * belonging to several parallel categories. Strongly recommended using the * full path for better search / recommendation quality. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * For example, if a shoes product belongs to both * ["Shoes & Accessories" -> "Shoes"] and @@ -6896,7 +6888,7 @@ public java.lang.String getCategories(int index) { * belonging to several parallel categories. Strongly recommended using the * full path for better search / recommendation quality. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * For example, if a shoes product belongs to both * ["Shoes & Accessories" -> "Shoes"] and @@ -6937,7 +6929,7 @@ public com.google.protobuf.ByteString getCategoriesBytes(int index) { * belonging to several parallel categories. Strongly recommended using the * full path for better search / recommendation quality. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * For example, if a shoes product belongs to both * ["Shoes & Accessories" -> "Shoes"] and @@ -6985,7 +6977,7 @@ public Builder setCategories(int index, java.lang.String value) { * belonging to several parallel categories. Strongly recommended using the * full path for better search / recommendation quality. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * For example, if a shoes product belongs to both * ["Shoes & Accessories" -> "Shoes"] and @@ -7032,7 +7024,7 @@ public Builder addCategories(java.lang.String value) { * belonging to several parallel categories. Strongly recommended using the * full path for better search / recommendation quality. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * For example, if a shoes product belongs to both * ["Shoes & Accessories" -> "Shoes"] and @@ -7076,7 +7068,7 @@ public Builder addAllCategories(java.lang.Iterable values) { * belonging to several parallel categories. Strongly recommended using the * full path for better search / recommendation quality. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * For example, if a shoes product belongs to both * ["Shoes & Accessories" -> "Shoes"] and @@ -7119,7 +7111,7 @@ public Builder clearCategories() { * belonging to several parallel categories. Strongly recommended using the * full path for better search / recommendation quality. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * For example, if a shoes product belongs to both * ["Shoes & Accessories" -> "Shoes"] and @@ -13441,6 +13433,510 @@ public java.util.List getVariant return variantsBuilder_; } + private java.util.List localInventories_ = + java.util.Collections.emptyList(); + + private void ensureLocalInventoriesIsMutable() { + if (!((bitField0_ & 0x00002000) != 0)) { + localInventories_ = + new java.util.ArrayList( + localInventories_); + bitField0_ |= 0x00002000; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.LocalInventory, + com.google.cloud.retail.v2beta.LocalInventory.Builder, + com.google.cloud.retail.v2beta.LocalInventoryOrBuilder> + localInventoriesBuilder_; + + /** + * + * + *
+     * Output only. A list of local inventories specific to different places.
+     * This is only available for users who have Retail Search enabled, and it can
+     * be managed by
+     * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+     * and
+     * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+     * APIs.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List getLocalInventoriesList() { + if (localInventoriesBuilder_ == null) { + return java.util.Collections.unmodifiableList(localInventories_); + } else { + return localInventoriesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Output only. A list of local inventories specific to different places.
+     * This is only available for users who have Retail Search enabled, and it can
+     * be managed by
+     * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+     * and
+     * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+     * APIs.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public int getLocalInventoriesCount() { + if (localInventoriesBuilder_ == null) { + return localInventories_.size(); + } else { + return localInventoriesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Output only. A list of local inventories specific to different places.
+     * This is only available for users who have Retail Search enabled, and it can
+     * be managed by
+     * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+     * and
+     * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+     * APIs.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2beta.LocalInventory getLocalInventories(int index) { + if (localInventoriesBuilder_ == null) { + return localInventories_.get(index); + } else { + return localInventoriesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Output only. A list of local inventories specific to different places.
+     * This is only available for users who have Retail Search enabled, and it can
+     * be managed by
+     * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+     * and
+     * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+     * APIs.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLocalInventories( + int index, com.google.cloud.retail.v2beta.LocalInventory value) { + if (localInventoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocalInventoriesIsMutable(); + localInventories_.set(index, value); + onChanged(); + } else { + localInventoriesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. A list of local inventories specific to different places.
+     * This is only available for users who have Retail Search enabled, and it can
+     * be managed by
+     * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+     * and
+     * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+     * APIs.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setLocalInventories( + int index, com.google.cloud.retail.v2beta.LocalInventory.Builder builderForValue) { + if (localInventoriesBuilder_ == null) { + ensureLocalInventoriesIsMutable(); + localInventories_.set(index, builderForValue.build()); + onChanged(); + } else { + localInventoriesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. A list of local inventories specific to different places.
+     * This is only available for users who have Retail Search enabled, and it can
+     * be managed by
+     * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+     * and
+     * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+     * APIs.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addLocalInventories(com.google.cloud.retail.v2beta.LocalInventory value) { + if (localInventoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocalInventoriesIsMutable(); + localInventories_.add(value); + onChanged(); + } else { + localInventoriesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Output only. A list of local inventories specific to different places.
+     * This is only available for users who have Retail Search enabled, and it can
+     * be managed by
+     * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+     * and
+     * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+     * APIs.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addLocalInventories( + int index, com.google.cloud.retail.v2beta.LocalInventory value) { + if (localInventoriesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureLocalInventoriesIsMutable(); + localInventories_.add(index, value); + onChanged(); + } else { + localInventoriesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Output only. A list of local inventories specific to different places.
+     * This is only available for users who have Retail Search enabled, and it can
+     * be managed by
+     * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+     * and
+     * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+     * APIs.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addLocalInventories( + com.google.cloud.retail.v2beta.LocalInventory.Builder builderForValue) { + if (localInventoriesBuilder_ == null) { + ensureLocalInventoriesIsMutable(); + localInventories_.add(builderForValue.build()); + onChanged(); + } else { + localInventoriesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. A list of local inventories specific to different places.
+     * This is only available for users who have Retail Search enabled, and it can
+     * be managed by
+     * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+     * and
+     * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+     * APIs.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addLocalInventories( + int index, com.google.cloud.retail.v2beta.LocalInventory.Builder builderForValue) { + if (localInventoriesBuilder_ == null) { + ensureLocalInventoriesIsMutable(); + localInventories_.add(index, builderForValue.build()); + onChanged(); + } else { + localInventoriesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Output only. A list of local inventories specific to different places.
+     * This is only available for users who have Retail Search enabled, and it can
+     * be managed by
+     * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+     * and
+     * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+     * APIs.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder addAllLocalInventories( + java.lang.Iterable values) { + if (localInventoriesBuilder_ == null) { + ensureLocalInventoriesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, localInventories_); + onChanged(); + } else { + localInventoriesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Output only. A list of local inventories specific to different places.
+     * This is only available for users who have Retail Search enabled, and it can
+     * be managed by
+     * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+     * and
+     * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+     * APIs.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearLocalInventories() { + if (localInventoriesBuilder_ == null) { + localInventories_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00002000); + onChanged(); + } else { + localInventoriesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Output only. A list of local inventories specific to different places.
+     * This is only available for users who have Retail Search enabled, and it can
+     * be managed by
+     * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+     * and
+     * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+     * APIs.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder removeLocalInventories(int index) { + if (localInventoriesBuilder_ == null) { + ensureLocalInventoriesIsMutable(); + localInventories_.remove(index); + onChanged(); + } else { + localInventoriesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Output only. A list of local inventories specific to different places.
+     * This is only available for users who have Retail Search enabled, and it can
+     * be managed by
+     * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+     * and
+     * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+     * APIs.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2beta.LocalInventory.Builder getLocalInventoriesBuilder( + int index) { + return getLocalInventoriesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Output only. A list of local inventories specific to different places.
+     * This is only available for users who have Retail Search enabled, and it can
+     * be managed by
+     * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+     * and
+     * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+     * APIs.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2beta.LocalInventoryOrBuilder getLocalInventoriesOrBuilder( + int index) { + if (localInventoriesBuilder_ == null) { + return localInventories_.get(index); + } else { + return localInventoriesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Output only. A list of local inventories specific to different places.
+     * This is only available for users who have Retail Search enabled, and it can
+     * be managed by
+     * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+     * and
+     * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+     * APIs.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getLocalInventoriesOrBuilderList() { + if (localInventoriesBuilder_ != null) { + return localInventoriesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(localInventories_); + } + } + /** + * + * + *
+     * Output only. A list of local inventories specific to different places.
+     * This is only available for users who have Retail Search enabled, and it can
+     * be managed by
+     * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+     * and
+     * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+     * APIs.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2beta.LocalInventory.Builder addLocalInventoriesBuilder() { + return getLocalInventoriesFieldBuilder() + .addBuilder(com.google.cloud.retail.v2beta.LocalInventory.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. A list of local inventories specific to different places.
+     * This is only available for users who have Retail Search enabled, and it can
+     * be managed by
+     * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+     * and
+     * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+     * APIs.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.retail.v2beta.LocalInventory.Builder addLocalInventoriesBuilder( + int index) { + return getLocalInventoriesFieldBuilder() + .addBuilder(index, com.google.cloud.retail.v2beta.LocalInventory.getDefaultInstance()); + } + /** + * + * + *
+     * Output only. A list of local inventories specific to different places.
+     * This is only available for users who have Retail Search enabled, and it can
+     * be managed by
+     * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+     * and
+     * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+     * APIs.
+     * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public java.util.List + getLocalInventoriesBuilderList() { + return getLocalInventoriesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.LocalInventory, + com.google.cloud.retail.v2beta.LocalInventory.Builder, + com.google.cloud.retail.v2beta.LocalInventoryOrBuilder> + getLocalInventoriesFieldBuilder() { + if (localInventoriesBuilder_ == null) { + localInventoriesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.retail.v2beta.LocalInventory, + com.google.cloud.retail.v2beta.LocalInventory.Builder, + com.google.cloud.retail.v2beta.LocalInventoryOrBuilder>( + localInventories_, + ((bitField0_ & 0x00002000) != 0), + getParentForChildren(), + isClean()); + localInventories_ = null; + } + return localInventoriesBuilder_; + } + @java.lang.Override public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { return super.setUnknownFields(unknownFields); @@ -13473,7 +13969,18 @@ public Product parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Product(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductDetail.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductDetail.java index d88ebb86..20c8761d 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductDetail.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductDetail.java @@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ProductDetail( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2beta.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = - input.readMessage( - com.google.cloud.retail.v2beta.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.Int32Value.Builder subBuilder = null; - if (quantity_ != null) { - subBuilder = quantity_.toBuilder(); - } - quantity_ = - input.readMessage(com.google.protobuf.Int32Value.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(quantity_); - quantity_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.UserEventProto .internal_static_google_cloud_retail_v2beta_ProductDetail_descriptor; @@ -294,7 +224,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (quantity_ != null) { output.writeMessage(2, getQuantity()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -309,7 +239,7 @@ public int getSerializedSize() { if (quantity_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getQuantity()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -333,7 +263,7 @@ public boolean equals(final java.lang.Object obj) { if (hasQuantity()) { if (!getQuantity().equals(other.getQuantity())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -352,7 +282,7 @@ public int hashCode() { hash = (37 * hash) + QUANTITY_FIELD_NUMBER; hash = (53 * hash) + getQuantity().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -481,17 +411,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ProductDetail.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -601,7 +524,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ProductDetail other) { if (other.hasQuantity()) { mergeQuantity(other.getQuantity()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -616,17 +539,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ProductDetail parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getProductFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getQuantityFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.ProductDetail) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1161,7 +1110,18 @@ public ProductDetail parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductDetail(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductInlineSource.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductInlineSource.java index 7f48e4fc..a4eae1a8 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductInlineSource.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductInlineSource.java @@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ProductInlineSource( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - products_.add( - input.readMessage( - com.google.cloud.retail.v2beta.Product.parser(), extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - products_ = java.util.Collections.unmodifiableList(products_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ImportConfigProto .internal_static_google_cloud_retail_v2beta_ProductInlineSource_descriptor; @@ -227,7 +173,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < products_.size(); i++) { output.writeMessage(1, products_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -239,7 +185,7 @@ public int getSerializedSize() { for (int i = 0; i < products_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, products_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -256,7 +202,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.ProductInlineSource) obj; if (!getProductsList().equals(other.getProductsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -271,7 +217,7 @@ public int hashCode() { hash = (37 * hash) + PRODUCTS_FIELD_NUMBER; hash = (53 * hash) + getProductsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -400,19 +346,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ProductInlineSource.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getProductsFieldBuilder(); - } } @java.lang.Override @@ -420,10 +357,11 @@ public Builder clear() { super.clear(); if (productsBuilder_ == null) { products_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + products_ = null; productsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -538,7 +476,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ProductInlineSource othe } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -553,18 +491,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ProductInlineSource parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2beta.Product m = + input.readMessage( + com.google.cloud.retail.v2beta.Product.parser(), extensionRegistry); + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(m); + } else { + productsBuilder_.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) { - parsedMessage = - (com.google.cloud.retail.v2beta.ProductInlineSource) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1022,7 +986,18 @@ public ProductInlineSource parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductInlineSource(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductInputConfig.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductInputConfig.java index 3784ba84..911b727c 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductInputConfig.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductInputConfig.java @@ -50,95 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ProductInputConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2beta.ProductInlineSource.Builder subBuilder = null; - if (sourceCase_ == 1) { - subBuilder = - ((com.google.cloud.retail.v2beta.ProductInlineSource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.retail.v2beta.ProductInlineSource.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2beta.ProductInlineSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 1; - break; - } - case 18: - { - com.google.cloud.retail.v2beta.GcsSource.Builder subBuilder = null; - if (sourceCase_ == 2) { - subBuilder = ((com.google.cloud.retail.v2beta.GcsSource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.retail.v2beta.GcsSource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2beta.GcsSource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 2; - break; - } - case 26: - { - com.google.cloud.retail.v2beta.BigQuerySource.Builder subBuilder = null; - if (sourceCase_ == 3) { - subBuilder = ((com.google.cloud.retail.v2beta.BigQuerySource) source_).toBuilder(); - } - source_ = - input.readMessage( - com.google.cloud.retail.v2beta.BigQuerySource.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2beta.BigQuerySource) source_); - source_ = subBuilder.buildPartial(); - } - sourceCase_ = 3; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ImportConfigProto .internal_static_google_cloud_retail_v2beta_ProductInputConfig_descriptor; @@ -381,7 +292,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (sourceCase_ == 3) { output.writeMessage(3, (com.google.cloud.retail.v2beta.BigQuerySource) source_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +316,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 3, (com.google.cloud.retail.v2beta.BigQuerySource) source_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -435,7 +346,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -462,7 +373,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -591,22 +502,24 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ProductInputConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (productInlineSourceBuilder_ != null) { + productInlineSourceBuilder_.clear(); + } + if (gcsSourceBuilder_ != null) { + gcsSourceBuilder_.clear(); + } + if (bigQuerySourceBuilder_ != null) { + bigQuerySourceBuilder_.clear(); + } sourceCase_ = 0; source_ = null; return this; @@ -729,7 +642,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ProductInputConfig other break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -744,18 +657,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ProductInputConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getProductInlineSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 1; + break; + } // case 10 + case 18: + { + input.readMessage(getGcsSourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getBigQuerySourceFieldBuilder().getBuilder(), extensionRegistry); + sourceCase_ = 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.ProductInputConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1438,7 +1383,18 @@ public ProductInputConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductInputConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductLevelConfig.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductLevelConfig.java index 1d89687a..d556148c 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductLevelConfig.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductLevelConfig.java @@ -54,59 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ProductLevelConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - ingestionProductType_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - merchantCenterProductIdField_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CatalogProto .internal_static_google_cloud_retail_v2beta_ProductLevelConfig_descriptor; @@ -312,7 +259,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(merchantCenterProductIdField_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, merchantCenterProductIdField_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -329,7 +276,7 @@ public int getSerializedSize() { com.google.protobuf.GeneratedMessageV3.computeStringSize( 2, merchantCenterProductIdField_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -348,7 +295,7 @@ public boolean equals(final java.lang.Object obj) { if (!getIngestionProductType().equals(other.getIngestionProductType())) return false; if (!getMerchantCenterProductIdField().equals(other.getMerchantCenterProductIdField())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -363,7 +310,7 @@ public int hashCode() { hash = (53 * hash) + getIngestionProductType().hashCode(); hash = (37 * hash) + MERCHANT_CENTER_PRODUCT_ID_FIELD_FIELD_NUMBER; hash = (53 * hash) + getMerchantCenterProductIdField().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -493,17 +440,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ProductLevelConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -600,7 +540,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ProductLevelConfig other merchantCenterProductIdField_ = other.merchantCenterProductIdField_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -615,18 +555,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ProductLevelConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + ingestionProductType_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + merchantCenterProductIdField_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.ProductLevelConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1054,7 +1019,18 @@ public ProductLevelConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ProductLevelConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductOrBuilder.java index e05d550a..7eb5c6fa 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductOrBuilder.java @@ -355,7 +355,7 @@ public interface ProductOrBuilder * The [type][google.cloud.retail.v2beta.Product.type] of the members must be * either [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] or * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] otherwise - * and INVALID_ARGUMENT error is thrown. Should not set it for other types. A + * an INVALID_ARGUMENT error is thrown. Should not set it for other types. A * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is * return. *
@@ -376,7 +376,7 @@ public interface ProductOrBuilder * The [type][google.cloud.retail.v2beta.Product.type] of the members must be * either [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] or * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] otherwise - * and INVALID_ARGUMENT error is thrown. Should not set it for other types. A + * an INVALID_ARGUMENT error is thrown. Should not set it for other types. A * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is * return. *
@@ -397,7 +397,7 @@ public interface ProductOrBuilder * The [type][google.cloud.retail.v2beta.Product.type] of the members must be * either [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] or * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] otherwise - * and INVALID_ARGUMENT error is thrown. Should not set it for other types. A + * an INVALID_ARGUMENT error is thrown. Should not set it for other types. A * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is * return. *
@@ -419,7 +419,7 @@ public interface ProductOrBuilder * The [type][google.cloud.retail.v2beta.Product.type] of the members must be * either [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] or * [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] otherwise - * and INVALID_ARGUMENT error is thrown. Should not set it for other types. A + * an INVALID_ARGUMENT error is thrown. Should not set it for other types. A * maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is * return. *
@@ -490,7 +490,7 @@ public interface ProductOrBuilder * belonging to several parallel categories. Strongly recommended using the * full path for better search / recommendation quality. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * For example, if a shoes product belongs to both * ["Shoes & Accessories" -> "Shoes"] and @@ -528,7 +528,7 @@ public interface ProductOrBuilder * belonging to several parallel categories. Strongly recommended using the * full path for better search / recommendation quality. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * For example, if a shoes product belongs to both * ["Shoes & Accessories" -> "Shoes"] and @@ -566,7 +566,7 @@ public interface ProductOrBuilder * belonging to several parallel categories. Strongly recommended using the * full path for better search / recommendation quality. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * For example, if a shoes product belongs to both * ["Shoes & Accessories" -> "Shoes"] and @@ -605,7 +605,7 @@ public interface ProductOrBuilder * belonging to several parallel categories. Strongly recommended using the * full path for better search / recommendation quality. * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * For example, if a shoes product belongs to both * ["Shoes & Accessories" -> "Shoes"] and @@ -2282,5 +2282,97 @@ com.google.cloud.retail.v2beta.CustomAttribute getAttributesOrDefault( */ com.google.cloud.retail.v2beta.ProductOrBuilder getVariantsOrBuilder(int index); + /** + * + * + *
+   * Output only. A list of local inventories specific to different places.
+   * This is only available for users who have Retail Search enabled, and it can
+   * be managed by
+   * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+   * and
+   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+   * APIs.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List getLocalInventoriesList(); + /** + * + * + *
+   * Output only. A list of local inventories specific to different places.
+   * This is only available for users who have Retail Search enabled, and it can
+   * be managed by
+   * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+   * and
+   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+   * APIs.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.retail.v2beta.LocalInventory getLocalInventories(int index); + /** + * + * + *
+   * Output only. A list of local inventories specific to different places.
+   * This is only available for users who have Retail Search enabled, and it can
+   * be managed by
+   * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+   * and
+   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+   * APIs.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + int getLocalInventoriesCount(); + /** + * + * + *
+   * Output only. A list of local inventories specific to different places.
+   * This is only available for users who have Retail Search enabled, and it can
+   * be managed by
+   * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+   * and
+   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+   * APIs.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + java.util.List + getLocalInventoriesOrBuilderList(); + /** + * + * + *
+   * Output only. A list of local inventories specific to different places.
+   * This is only available for users who have Retail Search enabled, and it can
+   * be managed by
+   * [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+   * and
+   * [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+   * APIs.
+   * 
+ * + * + * repeated .google.cloud.retail.v2beta.LocalInventory local_inventories = 35 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.retail.v2beta.LocalInventoryOrBuilder getLocalInventoriesOrBuilder(int index); + public com.google.cloud.retail.v2beta.Product.ExpirationCase getExpirationCase(); } diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductProto.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductProto.java index f0a512f6..88878cdd 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductProto.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ProductProto.java @@ -52,7 +52,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "promotion.proto\032\036google/protobuf/duratio" + "n.proto\032 google/protobuf/field_mask.prot" + "o\032\037google/protobuf/timestamp.proto\032\036goog" - + "le/protobuf/wrappers.proto\"\277\r\n\007Product\0221" + + "le/protobuf/wrappers.proto\"\213\016\n\007Product\0221" + "\n\013expire_time\030\020 \001(\0132\032.google.protobuf.Ti" + "mestampH\000\022-\n\003ttl\030\021 \001(\0132\031.google.protobuf" + ".DurationB\003\340A\004H\000\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\017\n\002i" @@ -85,26 +85,28 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "otobuf.Timestamp\0226\n\022retrievable_fields\030\036" + " \001(\0132\032.google.protobuf.FieldMask\022:\n\010vari" + "ants\030\037 \003(\0132#.google.cloud.retail.v2beta." - + "ProductB\003\340A\003\032^\n\017AttributesEntry\022\013\n\003key\030\001" - + " \001(\t\022:\n\005value\030\002 \001(\0132+.google.cloud.retai" - + "l.v2beta.CustomAttribute:\0028\001\"F\n\004Type\022\024\n\020" - + "TYPE_UNSPECIFIED\020\000\022\013\n\007PRIMARY\020\001\022\013\n\007VARIA" - + "NT\020\002\022\016\n\nCOLLECTION\020\003\"i\n\014Availability\022\034\n\030" - + "AVAILABILITY_UNSPECIFIED\020\000\022\014\n\010IN_STOCK\020\001" - + "\022\020\n\014OUT_OF_STOCK\020\002\022\014\n\010PREORDER\020\003\022\r\n\tBACK" - + "ORDER\020\004:\204\001\352A\200\001\n\035retail.googleapis.com/Pr" - + "oduct\022_projects/{project}/locations/{loc" - + "ation}/catalogs/{catalog}/branches/{bran" - + "ch}/products/{product}B\014\n\nexpirationB\304\002\n" - + "\036com.google.cloud.retail.v2betaB\014Product" - + "ProtoP\001Z@google.golang.org/genproto/goog" - + "leapis/cloud/retail/v2beta;retail\242\002\006RETA" - + "IL\252\002\032Google.Cloud.Retail.V2Beta\312\002\032Google" - + "\\Cloud\\Retail\\V2beta\352\002\035Google::Cloud::Re" - + "tail::V2beta\352Al\n\034retail.googleapis.com/B" - + "ranch\022Lprojects/{project}/locations/{loc" - + "ation}/catalogs/{catalog}/branches/{bran" - + "ch}b\006proto3" + + "ProductB\003\340A\003\022J\n\021local_inventories\030# \003(\0132" + + "*.google.cloud.retail.v2beta.LocalInvent" + + "oryB\003\340A\003\032^\n\017AttributesEntry\022\013\n\003key\030\001 \001(\t" + + "\022:\n\005value\030\002 \001(\0132+.google.cloud.retail.v2" + + "beta.CustomAttribute:\0028\001\"F\n\004Type\022\024\n\020TYPE" + + "_UNSPECIFIED\020\000\022\013\n\007PRIMARY\020\001\022\013\n\007VARIANT\020\002" + + "\022\016\n\nCOLLECTION\020\003\"i\n\014Availability\022\034\n\030AVAI" + + "LABILITY_UNSPECIFIED\020\000\022\014\n\010IN_STOCK\020\001\022\020\n\014" + + "OUT_OF_STOCK\020\002\022\014\n\010PREORDER\020\003\022\r\n\tBACKORDE" + + "R\020\004:\204\001\352A\200\001\n\035retail.googleapis.com/Produc" + + "t\022_projects/{project}/locations/{locatio" + + "n}/catalogs/{catalog}/branches/{branch}/" + + "products/{product}B\014\n\nexpirationB\304\002\n\036com" + + ".google.cloud.retail.v2betaB\014ProductProt" + + "oP\001Z@google.golang.org/genproto/googleap" + + "is/cloud/retail/v2beta;retail\242\002\006RETAIL\252\002" + + "\032Google.Cloud.Retail.V2Beta\312\002\032Google\\Clo" + + "ud\\Retail\\V2beta\352\002\035Google::Cloud::Retail" + + "::V2beta\352Al\n\034retail.googleapis.com/Branc" + + "h\022Lprojects/{project}/locations/{locatio" + + "n}/catalogs/{catalog}/branches/{branch}b" + + "\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -158,6 +160,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "PublishTime", "RetrievableFields", "Variants", + "LocalInventories", "Expiration", }); internal_static_google_cloud_retail_v2beta_Product_AttributesEntry_descriptor = diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Promotion.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Promotion.java index cd63327d..5f8740d8 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Promotion.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Promotion.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Promotion( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - promotionId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.PromotionProto .internal_static_google_cloud_retail_v2beta_Promotion_descriptor; @@ -191,7 +145,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promotionId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, promotionId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -203,7 +157,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(promotionId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, promotionId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -219,7 +173,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2beta.Promotion other = (com.google.cloud.retail.v2beta.Promotion) obj; if (!getPromotionId().equals(other.getPromotionId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -232,7 +186,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PROMOTION_ID_FIELD_NUMBER; hash = (53 * hash) + getPromotionId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -361,17 +315,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.Promotion.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -460,7 +407,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Promotion other) { promotionId_ = other.promotionId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -475,17 +422,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Promotion parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + promotionId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.Promotion) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -657,7 +624,18 @@ public Promotion parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Promotion(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurchaseTransaction.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurchaseTransaction.java index 8309ee66..76c22223 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurchaseTransaction.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurchaseTransaction.java @@ -53,74 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PurchaseTransaction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - id_ = s; - break; - } - case 21: - { - revenue_ = input.readFloat(); - break; - } - case 29: - { - tax_ = input.readFloat(); - break; - } - case 37: - { - cost_ = input.readFloat(); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - currencyCode_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.UserEventProto .internal_static_google_cloud_retail_v2beta_PurchaseTransaction_descriptor; @@ -326,7 +258,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currencyCode_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, currencyCode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -350,7 +282,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(currencyCode_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, currencyCode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -374,7 +306,7 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Float.floatToIntBits(getCost()) != java.lang.Float.floatToIntBits(other.getCost())) return false; if (!getCurrencyCode().equals(other.getCurrencyCode())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -395,7 +327,7 @@ public int hashCode() { hash = (53 * hash) + java.lang.Float.floatToIntBits(getCost()); hash = (37 * hash) + CURRENCY_CODE_FIELD_NUMBER; hash = (53 * hash) + getCurrencyCode().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -524,17 +456,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.PurchaseTransaction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -649,7 +574,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.PurchaseTransaction othe currencyCode_ = other.currencyCode_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -664,18 +589,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.PurchaseTransaction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 21: + { + revenue_ = input.readFloat(); + + break; + } // case 21 + case 29: + { + tax_ = input.readFloat(); + + break; + } // case 29 + case 37: + { + cost_ = input.readFloat(); + + break; + } // case 37 + case 42: + { + currencyCode_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.PurchaseTransaction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1106,7 +1074,18 @@ public PurchaseTransaction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PurchaseTransaction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeMetadata.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeMetadata.java index 8d8fe990..5c1e11c9 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeMetadata.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeMetadata.java @@ -51,45 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PurgeMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.PurgeConfigProto .internal_static_google_cloud_retail_v2beta_PurgeMetadata_descriptor; @@ -119,7 +80,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -128,7 +89,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -144,7 +105,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2beta.PurgeMetadata other = (com.google.cloud.retail.v2beta.PurgeMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -155,7 +116,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -285,17 +246,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.PurgeMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -377,7 +331,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2beta.PurgeMetadata other) { if (other == com.google.cloud.retail.v2beta.PurgeMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -392,17 +346,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.PurgeMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.PurgeMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -438,7 +406,18 @@ public PurgeMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PurgeMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeUserEventsRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeUserEventsRequest.java index 4a926791..4a31af43 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeUserEventsRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeUserEventsRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PurgeUserEventsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 24: - { - force_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.PurgeConfigProto .internal_static_google_cloud_retail_v2beta_PurgeUserEventsRequest_descriptor; @@ -313,7 +255,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (force_ != false) { output.writeBool(3, force_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -331,7 +273,7 @@ public int getSerializedSize() { if (force_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, force_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -350,7 +292,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (!getFilter().equals(other.getFilter())) return false; if (getForce() != other.getForce()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -367,7 +309,7 @@ public int hashCode() { hash = (53 * hash) + getFilter().hashCode(); hash = (37 * hash) + FORCE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -497,17 +439,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.PurgeUserEventsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -610,7 +545,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.PurgeUserEventsRequest o if (other.getForce() != false) { setForce(other.getForce()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -625,18 +560,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.PurgeUserEventsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 24: + { + force_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.PurgeUserEventsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1057,7 +1023,18 @@ public PurgeUserEventsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PurgeUserEventsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeUserEventsResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeUserEventsResponse.java index 4c6f6318..1a7712af 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeUserEventsResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/PurgeUserEventsResponse.java @@ -52,50 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PurgeUserEventsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - purgedEventsCount_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.PurgeConfigProto .internal_static_google_cloud_retail_v2beta_PurgeUserEventsResponse_descriptor; @@ -146,7 +102,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (purgedEventsCount_ != 0L) { output.writeInt64(1, purgedEventsCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -158,7 +114,7 @@ public int getSerializedSize() { if (purgedEventsCount_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, purgedEventsCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -175,7 +131,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.PurgeUserEventsResponse) obj; if (getPurgedEventsCount() != other.getPurgedEventsCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -188,7 +144,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + PURGED_EVENTS_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPurgedEventsCount()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -320,17 +276,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.PurgeUserEventsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -419,7 +368,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.PurgeUserEventsResponse if (other.getPurgedEventsCount() != 0L) { setPurgedEventsCount(other.getPurgedEventsCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -434,18 +383,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.PurgeUserEventsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + purgedEventsCount_ = input.readInt64(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.PurgeUserEventsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -533,7 +501,18 @@ public PurgeUserEventsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PurgeUserEventsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Rating.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Rating.java index c376ff40..81f00990 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Rating.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Rating.java @@ -52,82 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Rating( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - ratingCount_ = input.readInt32(); - break; - } - case 21: - { - averageRating_ = input.readFloat(); - break; - } - case 24: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - ratingHistogram_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - ratingHistogram_.addInt(input.readInt32()); - break; - } - case 26: - { - int length = input.readRawVarint32(); - int limit = input.pushLimit(length); - if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) { - ratingHistogram_ = newIntList(); - mutable_bitField0_ |= 0x00000001; - } - while (input.getBytesUntilLimit() > 0) { - ratingHistogram_.addInt(input.readInt32()); - } - input.popLimit(limit); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - ratingHistogram_.makeImmutable(); // C - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_Rating_descriptor; @@ -276,7 +200,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < ratingHistogram_.size(); i++) { output.writeInt32NoTag(ratingHistogram_.getInt(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -304,7 +228,7 @@ public int getSerializedSize() { } ratingHistogramMemoizedSerializedSize = dataSize; } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -323,7 +247,7 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Float.floatToIntBits(getAverageRating()) != java.lang.Float.floatToIntBits(other.getAverageRating())) return false; if (!getRatingHistogramList().equals(other.getRatingHistogramList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -342,7 +266,7 @@ public int hashCode() { hash = (37 * hash) + RATING_HISTOGRAM_FIELD_NUMBER; hash = (53 * hash) + getRatingHistogramList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -470,17 +394,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.Rating.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -592,7 +509,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Rating other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -607,17 +524,61 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Rating parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + ratingCount_ = input.readInt32(); + + break; + } // case 8 + case 21: + { + averageRating_ = input.readFloat(); + + break; + } // case 21 + case 24: + { + int v = input.readInt32(); + ensureRatingHistogramIsMutable(); + ratingHistogram_.addInt(v); + break; + } // case 24 + case 26: + { + int length = input.readRawVarint32(); + int limit = input.pushLimit(length); + ensureRatingHistogramIsMutable(); + while (input.getBytesUntilLimit() > 0) { + ratingHistogram_.addInt(input.readInt32()); + } + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.Rating) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -935,7 +896,18 @@ public Rating parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Rating(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RejoinUserEventsMetadata.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RejoinUserEventsMetadata.java index 52e8a15c..5db27daf 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RejoinUserEventsMetadata.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RejoinUserEventsMetadata.java @@ -22,7 +22,7 @@ * * *
- * Metadata for RejoinUserEvents method.
+ * Metadata for `RejoinUserEvents` method.
  * 
* * Protobuf type {@code google.cloud.retail.v2beta.RejoinUserEventsMetadata} @@ -50,45 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RejoinUserEventsMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.UserEventServiceProto .internal_static_google_cloud_retail_v2beta_RejoinUserEventsMetadata_descriptor; @@ -118,7 +79,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -127,7 +88,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -143,7 +104,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2beta.RejoinUserEventsMetadata other = (com.google.cloud.retail.v2beta.RejoinUserEventsMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -154,7 +115,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -259,7 +220,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Metadata for RejoinUserEvents method.
+   * Metadata for `RejoinUserEvents` method.
    * 
* * Protobuf type {@code google.cloud.retail.v2beta.RejoinUserEventsMetadata} @@ -284,17 +245,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.RejoinUserEventsMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -377,7 +331,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2beta.RejoinUserEventsMetadata other) { if (other == com.google.cloud.retail.v2beta.RejoinUserEventsMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -392,18 +346,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.RejoinUserEventsMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.RejoinUserEventsMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -439,7 +406,18 @@ public RejoinUserEventsMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RejoinUserEventsMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RejoinUserEventsRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RejoinUserEventsRequest.java index f7170b6f..24d90027 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RejoinUserEventsRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RejoinUserEventsRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RejoinUserEventsRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - parent_ = s; - break; - } - case 16: - { - int rawValue = input.readEnum(); - - userEventRejoinScope_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.UserEventServiceProto .internal_static_google_cloud_retail_v2beta_RejoinUserEventsRequest_descriptor; @@ -127,11 +74,11 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { *
    * The scope of user events to be rejoined with the latest product catalog.
    * If the rejoining aims at reducing number of unjoined events, set
-   * UserEventRejoinScope to UNJOINED_EVENTS.
+   * `UserEventRejoinScope` to `UNJOINED_EVENTS`.
    * If the rejoining aims at correcting product catalog information in joined
-   * events, set UserEventRejoinScope to JOINED_EVENTS.
-   * If all events needs to be rejoined, set UserEventRejoinScope to
-   * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED.
+   * events, set `UserEventRejoinScope` to `JOINED_EVENTS`.
+   * If all events needs to be rejoined, set `UserEventRejoinScope` to
+   * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED`.
    * 
* * Protobuf enum {@code google.cloud.retail.v2beta.RejoinUserEventsRequest.UserEventRejoinScope} @@ -350,8 +297,8 @@ public com.google.protobuf.ByteString getParentBytes() { *
    * The type of the user event rejoin to define the scope and range of the user
    * events to be rejoined with the latest product catalog. Defaults to
-   * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
-   * invalid integer value.
+   * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
+   * an invalid integer value.
    * 
* * @@ -370,8 +317,8 @@ public int getUserEventRejoinScopeValue() { *
    * The type of the user event rejoin to define the scope and range of the user
    * events to be rejoined with the latest product catalog. Defaults to
-   * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
-   * invalid integer value.
+   * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
+   * an invalid integer value.
    * 
* * @@ -415,7 +362,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(2, userEventRejoinScope_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -433,7 +380,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, userEventRejoinScope_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -451,7 +398,7 @@ public boolean equals(final java.lang.Object obj) { if (!getParent().equals(other.getParent())) return false; if (userEventRejoinScope_ != other.userEventRejoinScope_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -466,7 +413,7 @@ public int hashCode() { hash = (53 * hash) + getParent().hashCode(); hash = (37 * hash) + USER_EVENT_REJOIN_SCOPE_FIELD_NUMBER; hash = (53 * hash) + userEventRejoinScope_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -596,17 +543,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.RejoinUserEventsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -702,7 +642,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.RejoinUserEventsRequest if (other.userEventRejoinScope_ != 0) { setUserEventRejoinScopeValue(other.getUserEventRejoinScopeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -717,18 +657,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.RejoinUserEventsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + parent_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 16: + { + userEventRejoinScope_ = input.readEnum(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.RejoinUserEventsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -850,8 +815,8 @@ public Builder setParentBytes(com.google.protobuf.ByteString value) { *
      * The type of the user event rejoin to define the scope and range of the user
      * events to be rejoined with the latest product catalog. Defaults to
-     * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
-     * invalid integer value.
+     * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
+     * an invalid integer value.
      * 
* * @@ -870,8 +835,8 @@ public int getUserEventRejoinScopeValue() { *
      * The type of the user event rejoin to define the scope and range of the user
      * events to be rejoined with the latest product catalog. Defaults to
-     * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
-     * invalid integer value.
+     * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
+     * an invalid integer value.
      * 
* * @@ -893,8 +858,8 @@ public Builder setUserEventRejoinScopeValue(int value) { *
      * The type of the user event rejoin to define the scope and range of the user
      * events to be rejoined with the latest product catalog. Defaults to
-     * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
-     * invalid integer value.
+     * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
+     * an invalid integer value.
      * 
* * @@ -920,8 +885,8 @@ public Builder setUserEventRejoinScopeValue(int value) { *
      * The type of the user event rejoin to define the scope and range of the user
      * events to be rejoined with the latest product catalog. Defaults to
-     * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
-     * invalid integer value.
+     * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
+     * an invalid integer value.
      * 
* * @@ -947,8 +912,8 @@ public Builder setUserEventRejoinScope( *
      * The type of the user event rejoin to define the scope and range of the user
      * events to be rejoined with the latest product catalog. Defaults to
-     * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
-     * invalid integer value.
+     * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
+     * an invalid integer value.
      * 
* * @@ -996,7 +961,18 @@ public RejoinUserEventsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RejoinUserEventsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RejoinUserEventsRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RejoinUserEventsRequestOrBuilder.java index a130669c..004389a6 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RejoinUserEventsRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RejoinUserEventsRequestOrBuilder.java @@ -56,8 +56,8 @@ public interface RejoinUserEventsRequestOrBuilder *
    * The type of the user event rejoin to define the scope and range of the user
    * events to be rejoined with the latest product catalog. Defaults to
-   * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
-   * invalid integer value.
+   * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
+   * an invalid integer value.
    * 
* * @@ -73,8 +73,8 @@ public interface RejoinUserEventsRequestOrBuilder *
    * The type of the user event rejoin to define the scope and range of the user
    * events to be rejoined with the latest product catalog. Defaults to
-   * USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
-   * invalid integer value.
+   * `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
+   * an invalid integer value.
    * 
* * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RejoinUserEventsResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RejoinUserEventsResponse.java index 4267ed3c..ff5a0af8 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RejoinUserEventsResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RejoinUserEventsResponse.java @@ -22,7 +22,7 @@ * * *
- * Response message for RejoinUserEvents method.
+ * Response message for `RejoinUserEvents` method.
  * 
* * Protobuf type {@code google.cloud.retail.v2beta.RejoinUserEventsResponse} @@ -50,50 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RejoinUserEventsResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - rejoinedUserEventsCount_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.UserEventServiceProto .internal_static_google_cloud_retail_v2beta_RejoinUserEventsResponse_descriptor; @@ -144,7 +100,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (rejoinedUserEventsCount_ != 0L) { output.writeInt64(1, rejoinedUserEventsCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -156,7 +112,7 @@ public int getSerializedSize() { if (rejoinedUserEventsCount_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, rejoinedUserEventsCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -173,7 +129,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.RejoinUserEventsResponse) obj; if (getRejoinedUserEventsCount() != other.getRejoinedUserEventsCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -186,7 +142,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + REJOINED_USER_EVENTS_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getRejoinedUserEventsCount()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -291,7 +247,7 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * * *
-   * Response message for RejoinUserEvents method.
+   * Response message for `RejoinUserEvents` method.
    * 
* * Protobuf type {@code google.cloud.retail.v2beta.RejoinUserEventsResponse} @@ -316,17 +272,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.RejoinUserEventsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -415,7 +364,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.RejoinUserEventsResponse if (other.getRejoinedUserEventsCount() != 0L) { setRejoinedUserEventsCount(other.getRejoinedUserEventsCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -430,18 +379,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.RejoinUserEventsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + rejoinedUserEventsCount_ = input.readInt64(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.RejoinUserEventsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -529,7 +497,18 @@ public RejoinUserEventsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RejoinUserEventsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveCatalogAttributeRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveCatalogAttributeRequest.java index c4b063ff..bb103f42 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveCatalogAttributeRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveCatalogAttributeRequest.java @@ -55,59 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveCatalogAttributeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - attributesConfig_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - key_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CatalogServiceProto .internal_static_google_cloud_retail_v2beta_RemoveCatalogAttributeRequest_descriptor; @@ -249,7 +196,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, key_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -264,7 +211,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, key_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -282,7 +229,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAttributesConfig().equals(other.getAttributesConfig())) return false; if (!getKey().equals(other.getKey())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -297,7 +244,7 @@ public int hashCode() { hash = (53 * hash) + getAttributesConfig().hashCode(); hash = (37 * hash) + KEY_FIELD_NUMBER; hash = (53 * hash) + getKey().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -429,17 +376,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.RemoveCatalogAttributeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -538,7 +478,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.RemoveCatalogAttributeRe key_ = other.key_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -553,18 +493,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.RemoveCatalogAttributeRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attributesConfig_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + key_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.RemoveCatalogAttributeRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -833,7 +798,18 @@ public RemoveCatalogAttributeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveCatalogAttributeRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveControlRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveControlRequest.java index 3f477160..26436b9d 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveControlRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveControlRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveControlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - servingConfig_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - controlId_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ServingConfigServiceProto .internal_static_google_cloud_retail_v2beta_RemoveControlRequest_descriptor; @@ -128,7 +75,7 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * *
    * Required. The source ServingConfig resource name . Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
    * 
* * @@ -154,7 +101,7 @@ public java.lang.String getServingConfig() { * *
    * Required. The source ServingConfig resource name . Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
    * 
* * @@ -247,7 +194,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controlId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, controlId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -262,7 +209,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(controlId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, controlId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -280,7 +227,7 @@ public boolean equals(final java.lang.Object obj) { if (!getServingConfig().equals(other.getServingConfig())) return false; if (!getControlId().equals(other.getControlId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -295,7 +242,7 @@ public int hashCode() { hash = (53 * hash) + getServingConfig().hashCode(); hash = (37 * hash) + CONTROL_ID_FIELD_NUMBER; hash = (53 * hash) + getControlId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -424,17 +371,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.RemoveControlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -531,7 +471,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.RemoveControlRequest oth controlId_ = other.controlId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -546,18 +486,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.RemoveControlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + servingConfig_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + controlId_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.RemoveControlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -567,7 +532,7 @@ public Builder mergeFrom( * *
      * Required. The source ServingConfig resource name . Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -592,7 +557,7 @@ public java.lang.String getServingConfig() { * *
      * Required. The source ServingConfig resource name . Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -617,7 +582,7 @@ public com.google.protobuf.ByteString getServingConfigBytes() { * *
      * Required. The source ServingConfig resource name . Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -641,7 +606,7 @@ public Builder setServingConfig(java.lang.String value) { * *
      * Required. The source ServingConfig resource name . Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -661,7 +626,7 @@ public Builder clearServingConfig() { * *
      * Required. The source ServingConfig resource name . Format:
-     * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
      * 
* * @@ -825,7 +790,18 @@ public RemoveControlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveControlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveControlRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveControlRequestOrBuilder.java index 524f449b..635516dc 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveControlRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveControlRequestOrBuilder.java @@ -28,7 +28,7 @@ public interface RemoveControlRequestOrBuilder * *
    * Required. The source ServingConfig resource name . Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
    * 
* * @@ -43,7 +43,7 @@ public interface RemoveControlRequestOrBuilder * *
    * Required. The source ServingConfig resource name . Format:
-   * projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
    * 
* * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesMetadata.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesMetadata.java index 1f869912..30af6beb 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesMetadata.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesMetadata.java @@ -54,45 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveFulfillmentPlacesMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_RemoveFulfillmentPlacesMetadata_descriptor; @@ -122,7 +83,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -131,7 +92,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -147,7 +108,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesMetadata other = (com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -158,7 +119,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -291,17 +252,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -386,7 +340,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesM if (other == com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -401,19 +355,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesMetadata) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -451,7 +417,18 @@ public RemoveFulfillmentPlacesMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveFulfillmentPlacesMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesRequest.java index 0c5b45ff..3e05b9cb 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesRequest.java @@ -57,93 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveFulfillmentPlacesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - product_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - type_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - placeIds_.add(s); - break; - } - case 34: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (removeTime_ != null) { - subBuilder = removeTime_.toBuilder(); - } - removeTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(removeTime_); - removeTime_ = subBuilder.buildPartial(); - } - - break; - } - case 40: - { - allowMissing_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = placeIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_RemoveFulfillmentPlacesRequest_descriptor; @@ -498,7 +411,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (allowMissing_ != false) { output.writeBool(5, allowMissing_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -527,7 +440,7 @@ public int getSerializedSize() { if (allowMissing_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(5, allowMissing_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -551,7 +464,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRemoveTime().equals(other.getRemoveTime())) return false; } if (getAllowMissing() != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -576,7 +489,7 @@ public int hashCode() { } hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -708,17 +621,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -855,7 +761,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesR if (other.getAllowMissing() != false) { setAllowMissing(other.getAllowMissing()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -870,19 +776,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + product_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + type_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePlaceIdsIsMutable(); + placeIds_.add(s); + break; + } // case 26 + case 34: + { + input.readMessage(getRemoveTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 34 + case 40: + { + allowMissing_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1751,7 +1700,18 @@ public RemoveFulfillmentPlacesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveFulfillmentPlacesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesResponse.java index 6391eb91..d2e0052f 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveFulfillmentPlacesResponse.java @@ -54,45 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveFulfillmentPlacesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_RemoveFulfillmentPlacesResponse_descriptor; @@ -122,7 +83,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -131,7 +92,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -147,7 +108,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesResponse other = (com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -158,7 +119,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -291,17 +252,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -386,7 +340,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesR if (other == com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -401,19 +355,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.RemoveFulfillmentPlacesResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -451,7 +417,18 @@ public RemoveFulfillmentPlacesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveFulfillmentPlacesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesMetadata.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesMetadata.java index 312a9a48..029d8b8b 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesMetadata.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesMetadata.java @@ -54,45 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveLocalInventoriesMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_RemoveLocalInventoriesMetadata_descriptor; @@ -122,7 +83,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -131,7 +92,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -147,7 +108,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2beta.RemoveLocalInventoriesMetadata other = (com.google.cloud.retail.v2beta.RemoveLocalInventoriesMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -158,7 +119,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -291,17 +252,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.RemoveLocalInventoriesMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -386,7 +340,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.RemoveLocalInventoriesMe if (other == com.google.cloud.retail.v2beta.RemoveLocalInventoriesMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -401,19 +355,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.RemoveLocalInventoriesMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.RemoveLocalInventoriesMetadata) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -450,7 +416,18 @@ public RemoveLocalInventoriesMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveLocalInventoriesMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesRequest.java index 1fea12bf..c1902ebc 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesRequest.java @@ -55,86 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveLocalInventoriesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - product_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - placeIds_.add(s); - break; - } - case 24: - { - allowMissing_ = input.readBool(); - break; - } - case 42: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (removeTime_ != null) { - subBuilder = removeTime_.toBuilder(); - } - removeTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(removeTime_); - removeTime_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - placeIds_ = placeIds_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_RemoveLocalInventoriesRequest_descriptor; @@ -379,7 +299,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (removeTime_ != null) { output.writeMessage(5, getRemoveTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -405,7 +325,7 @@ public int getSerializedSize() { if (removeTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getRemoveTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -428,7 +348,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRemoveTime().equals(other.getRemoveTime())) return false; } if (getAllowMissing() != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -451,7 +371,7 @@ public int hashCode() { } hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -583,17 +503,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.RemoveLocalInventoriesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -723,7 +636,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.RemoveLocalInventoriesRe if (other.getAllowMissing() != false) { setAllowMissing(other.getAllowMissing()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -738,18 +651,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.RemoveLocalInventoriesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + product_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePlaceIdsIsMutable(); + placeIds_.add(s); + break; + } // case 18 + case 24: + { + allowMissing_ = input.readBool(); + + break; + } // case 24 + case 42: + { + input.readMessage(getRemoveTimeFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.RemoveLocalInventoriesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1374,7 +1325,18 @@ public RemoveLocalInventoriesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveLocalInventoriesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesResponse.java index 27e33fa0..1e351f4c 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/RemoveLocalInventoriesResponse.java @@ -56,45 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RemoveLocalInventoriesResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_RemoveLocalInventoriesResponse_descriptor; @@ -124,7 +85,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -133,7 +94,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -149,7 +110,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2beta.RemoveLocalInventoriesResponse other = (com.google.cloud.retail.v2beta.RemoveLocalInventoriesResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -160,7 +121,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -295,17 +256,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.RemoveLocalInventoriesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -390,7 +344,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.RemoveLocalInventoriesRe if (other == com.google.cloud.retail.v2beta.RemoveLocalInventoriesResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -405,19 +359,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.RemoveLocalInventoriesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.RemoveLocalInventoriesResponse) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -454,7 +420,18 @@ public RemoveLocalInventoriesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RemoveLocalInventoriesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ReplaceCatalogAttributeRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ReplaceCatalogAttributeRequest.java index 7e47d955..50bac95c 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ReplaceCatalogAttributeRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ReplaceCatalogAttributeRequest.java @@ -55,83 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReplaceCatalogAttributeRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - attributesConfig_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2beta.CatalogAttribute.Builder subBuilder = null; - if (catalogAttribute_ != null) { - subBuilder = catalogAttribute_.toBuilder(); - } - catalogAttribute_ = - input.readMessage( - com.google.cloud.retail.v2beta.CatalogAttribute.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(catalogAttribute_); - catalogAttribute_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CatalogServiceProto .internal_static_google_cloud_retail_v2beta_ReplaceCatalogAttributeRequest_descriptor; @@ -340,7 +263,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(3, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -358,7 +281,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -383,7 +306,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -404,7 +327,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -536,17 +459,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ReplaceCatalogAttributeRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -666,7 +582,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ReplaceCatalogAttributeR if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -681,19 +597,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ReplaceCatalogAttributeRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + attributesConfig_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage( + getCatalogAttributeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.ReplaceCatalogAttributeRequest) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1283,7 +1230,18 @@ public ReplaceCatalogAttributeRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReplaceCatalogAttributeRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ResumeModelRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ResumeModelRequest.java new file mode 100644 index 00000000..dff6f15e --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ResumeModelRequest.java @@ -0,0 +1,629 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +/** + * + * + *
+ * Request for resuming training of a model.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.ResumeModelRequest} + */ +public final class ResumeModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.ResumeModelRequest) + ResumeModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ResumeModelRequest.newBuilder() to construct. + private ResumeModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ResumeModelRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ResumeModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_ResumeModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_ResumeModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.ResumeModelRequest.class, + com.google.cloud.retail.v2beta.ResumeModelRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the model to resume.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the model to resume.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2beta.ResumeModelRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.ResumeModelRequest other = + (com.google.cloud.retail.v2beta.ResumeModelRequest) 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.retail.v2beta.ResumeModelRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.ResumeModelRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.ResumeModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.ResumeModelRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.ResumeModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.ResumeModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.ResumeModelRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.ResumeModelRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.ResumeModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.ResumeModelRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.ResumeModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.ResumeModelRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2beta.ResumeModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for resuming training of a model.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.ResumeModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.ResumeModelRequest) + com.google.cloud.retail.v2beta.ResumeModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_ResumeModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_ResumeModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.ResumeModelRequest.class, + com.google.cloud.retail.v2beta.ResumeModelRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.ResumeModelRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_ResumeModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.ResumeModelRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.ResumeModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.ResumeModelRequest build() { + com.google.cloud.retail.v2beta.ResumeModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.ResumeModelRequest buildPartial() { + com.google.cloud.retail.v2beta.ResumeModelRequest result = + new com.google.cloud.retail.v2beta.ResumeModelRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.ResumeModelRequest) { + return mergeFrom((com.google.cloud.retail.v2beta.ResumeModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.ResumeModelRequest other) { + if (other == com.google.cloud.retail.v2beta.ResumeModelRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + 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(); + + 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 java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the model to resume.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the model to resume.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the model to resume.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the model to resume.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the model to resume.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.ResumeModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.ResumeModelRequest) + private static final com.google.cloud.retail.v2beta.ResumeModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.ResumeModelRequest(); + } + + public static com.google.cloud.retail.v2beta.ResumeModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ResumeModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.ResumeModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ResumeModelRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ResumeModelRequestOrBuilder.java new file mode 100644 index 00000000..5fc1df55 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ResumeModelRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +public interface ResumeModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.ResumeModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the model to resume.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the model to resume.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Rule.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Rule.java index 5108a408..69e561cc 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Rule.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/Rule.java @@ -25,8 +25,9 @@ * A rule is a condition-action pair * * A condition defines when a rule is to be triggered. * * An action specifies what occurs on that trigger. - * Currently only boost rules are supported. - * Currently only supported by the search endpoint. + * Currently rules only work for [controls][google.cloud.retail.v2beta.Control] + * with + * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH]. * * * Protobuf type {@code google.cloud.retail.v2beta.Rule} @@ -54,209 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Rule( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2beta.Condition.Builder subBuilder = null; - if (condition_ != null) { - subBuilder = condition_.toBuilder(); - } - condition_ = - input.readMessage( - com.google.cloud.retail.v2beta.Condition.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(condition_); - condition_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.cloud.retail.v2beta.Rule.BoostAction.Builder subBuilder = null; - if (actionCase_ == 2) { - subBuilder = - ((com.google.cloud.retail.v2beta.Rule.BoostAction) action_).toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2beta.Rule.BoostAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2beta.Rule.BoostAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 2; - break; - } - case 26: - { - com.google.cloud.retail.v2beta.Rule.RedirectAction.Builder subBuilder = null; - if (actionCase_ == 3) { - subBuilder = - ((com.google.cloud.retail.v2beta.Rule.RedirectAction) action_).toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2beta.Rule.RedirectAction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2beta.Rule.RedirectAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 3; - break; - } - case 50: - { - com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.Builder subBuilder = null; - if (actionCase_ == 6) { - subBuilder = - ((com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction) action_) - .toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 6; - break; - } - case 58: - { - com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.Builder subBuilder = null; - if (actionCase_ == 7) { - subBuilder = - ((com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction) action_) - .toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 7; - break; - } - case 66: - { - com.google.cloud.retail.v2beta.Rule.ReplacementAction.Builder subBuilder = null; - if (actionCase_ == 8) { - subBuilder = - ((com.google.cloud.retail.v2beta.Rule.ReplacementAction) action_).toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2beta.Rule.ReplacementAction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.retail.v2beta.Rule.ReplacementAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 8; - break; - } - case 74: - { - com.google.cloud.retail.v2beta.Rule.IgnoreAction.Builder subBuilder = null; - if (actionCase_ == 9) { - subBuilder = - ((com.google.cloud.retail.v2beta.Rule.IgnoreAction) action_).toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2beta.Rule.IgnoreAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2beta.Rule.IgnoreAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 9; - break; - } - case 82: - { - com.google.cloud.retail.v2beta.Rule.FilterAction.Builder subBuilder = null; - if (actionCase_ == 10) { - subBuilder = - ((com.google.cloud.retail.v2beta.Rule.FilterAction) action_).toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2beta.Rule.FilterAction.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2beta.Rule.FilterAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 10; - break; - } - case 90: - { - com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.Builder subBuilder = null; - if (actionCase_ == 11) { - subBuilder = - ((com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) action_) - .toBuilder(); - } - action_ = - input.readMessage( - com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom( - (com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) action_); - action_ = subBuilder.buildPartial(); - } - actionCase_ = 11; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_Rule_descriptor; @@ -384,57 +182,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BoostAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 13: - { - boost_ = input.readFloat(); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - productsFilter_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_Rule_BoostAction_descriptor; @@ -572,7 +319,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productsFilter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, productsFilter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -587,7 +334,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(productsFilter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, productsFilter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -606,7 +353,7 @@ public boolean equals(final java.lang.Object obj) { if (java.lang.Float.floatToIntBits(getBoost()) != java.lang.Float.floatToIntBits(other.getBoost())) return false; if (!getProductsFilter().equals(other.getProductsFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -621,7 +368,7 @@ public int hashCode() { hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoost()); hash = (37 * hash) + PRODUCTS_FILTER_FIELD_NUMBER; hash = (53 * hash) + getProductsFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -752,17 +499,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.Rule.BoostAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -860,7 +600,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Rule.BoostAction other) productsFilter_ = other.productsFilter_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -875,18 +615,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Rule.BoostAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 13: + { + boost_ = input.readFloat(); + + break; + } // case 13 + case 18: + { + productsFilter_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.Rule.BoostAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1175,7 +940,19 @@ public BoostAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BoostAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -1297,52 +1074,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FilterAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - filter_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_Rule_FilterAction_descriptor; @@ -1450,7 +1181,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filter_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1462,7 +1193,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filter_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1479,7 +1210,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.Rule.FilterAction) obj; if (!getFilter().equals(other.getFilter())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1492,7 +1223,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + FILTER_FIELD_NUMBER; hash = (53 * hash) + getFilter().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1636,17 +1367,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.Rule.FilterAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1738,7 +1462,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Rule.FilterAction other) filter_ = other.filter_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1753,18 +1477,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Rule.FilterAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + filter_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.Rule.FilterAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1972,7 +1715,19 @@ public FilterAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FilterAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2060,52 +1815,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private RedirectAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - redirectUri_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_Rule_RedirectAction_descriptor; @@ -2187,7 +1896,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirectUri_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, redirectUri_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2199,7 +1908,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(redirectUri_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, redirectUri_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2216,7 +1925,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.Rule.RedirectAction) obj; if (!getRedirectUri().equals(other.getRedirectUri())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2229,7 +1938,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + REDIRECT_URI_FIELD_NUMBER; hash = (53 * hash) + getRedirectUri().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2365,17 +2074,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.Rule.RedirectAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2467,7 +2169,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Rule.RedirectAction othe redirectUri_ = other.redirectUri_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2482,18 +2184,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Rule.RedirectAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + redirectUri_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.Rule.RedirectAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2636,7 +2357,19 @@ public RedirectAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new RedirectAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -2756,59 +2489,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TwowaySynonymsAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - synonyms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - synonyms_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - synonyms_ = synonyms_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_Rule_TwowaySynonymsAction_descriptor; @@ -2910,7 +2590,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < synonyms_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, synonyms_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2927,7 +2607,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getSynonymsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2944,7 +2624,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) obj; if (!getSynonymsList().equals(other.getSynonymsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2959,7 +2639,7 @@ public int hashCode() { hash = (37 * hash) + SYNONYMS_FIELD_NUMBER; hash = (53 * hash) + getSynonymsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3094,17 +2774,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -3207,7 +2880,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Rule.TwowaySynonymsActio } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -3222,18 +2895,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSynonymsIsMutable(); + synonyms_.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) { - parsedMessage = - (com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3458,7 +3151,19 @@ public TwowaySynonymsAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TwowaySynonymsAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3695,85 +3400,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private OnewaySynonymsAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - onewayTerms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - onewayTerms_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - queryTerms_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - synonyms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - synonyms_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) != 0)) { - onewayTerms_ = onewayTerms_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = queryTerms_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - synonyms_ = synonyms_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_Rule_OnewaySynonymsAction_descriptor; @@ -4015,7 +3641,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < synonyms_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, synonyms_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4048,7 +3674,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getSynonymsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4067,7 +3693,7 @@ public boolean equals(final java.lang.Object obj) { if (!getQueryTermsList().equals(other.getQueryTermsList())) return false; if (!getSynonymsList().equals(other.getSynonymsList())) return false; if (!getOnewayTermsList().equals(other.getOnewayTermsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4090,7 +3716,7 @@ public int hashCode() { hash = (37 * hash) + ONEWAY_TERMS_FIELD_NUMBER; hash = (53 * hash) + getOnewayTermsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4226,17 +3852,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -4373,7 +3992,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Rule.OnewaySynonymsActio } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4388,18 +4007,52 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureOnewayTermsIsMutable(); + onewayTerms_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureQueryTermsIsMutable(); + queryTerms_.add(s); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureSynonymsIsMutable(); + synonyms_.add(s); + break; + } // case 34 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2beta.Rule.OnewaySynonymsAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4987,7 +4640,19 @@ public OnewaySynonymsAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new OnewaySynonymsAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5214,85 +4879,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DoNotAssociateAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - terms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - terms_.add(s); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - queryTerms_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - doNotAssociateTerms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - doNotAssociateTerms_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000004) != 0)) { - terms_ = terms_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = queryTerms_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - doNotAssociateTerms_ = doNotAssociateTerms_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_Rule_DoNotAssociateAction_descriptor; @@ -5527,7 +5113,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io com.google.protobuf.GeneratedMessageV3.writeString( output, 3, doNotAssociateTerms_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5560,7 +5146,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getDoNotAssociateTermsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5579,7 +5165,7 @@ public boolean equals(final java.lang.Object obj) { if (!getQueryTermsList().equals(other.getQueryTermsList())) return false; if (!getDoNotAssociateTermsList().equals(other.getDoNotAssociateTermsList())) return false; if (!getTermsList().equals(other.getTermsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5602,7 +5188,7 @@ public int hashCode() { hash = (37 * hash) + TERMS_FIELD_NUMBER; hash = (53 * hash) + getTermsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5736,17 +5322,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -5883,7 +5462,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Rule.DoNotAssociateActio } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5898,18 +5477,52 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTermsIsMutable(); + terms_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureQueryTermsIsMutable(); + queryTerms_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDoNotAssociateTermsIsMutable(); + doNotAssociateTerms_.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) { - parsedMessage = - (com.google.cloud.retail.v2beta.Rule.DoNotAssociateAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6479,7 +6092,19 @@ public DoNotAssociateAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DoNotAssociateAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6650,73 +6275,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ReplacementAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - term_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - queryTerms_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - replacementTerm_ = s; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - queryTerms_ = queryTerms_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_Rule_ReplacementAction_descriptor; @@ -6922,7 +6480,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(replacementTerm_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, replacementTerm_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6945,7 +6503,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(replacementTerm_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, replacementTerm_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6964,7 +6522,7 @@ public boolean equals(final java.lang.Object obj) { if (!getQueryTermsList().equals(other.getQueryTermsList())) return false; if (!getReplacementTerm().equals(other.getReplacementTerm())) return false; if (!getTerm().equals(other.getTerm())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6983,7 +6541,7 @@ public int hashCode() { hash = (53 * hash) + getReplacementTerm().hashCode(); hash = (37 * hash) + TERM_FIELD_NUMBER; hash = (53 * hash) + getTerm().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7117,17 +6675,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.Rule.ReplacementAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -7244,7 +6795,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Rule.ReplacementAction o term_ = other.term_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -7259,18 +6810,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Rule.ReplacementAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + term_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureQueryTermsIsMutable(); + queryTerms_.add(s); + break; + } // case 18 + case 26: + { + replacementTerm_ = input.readStringRequireUtf8(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.Rule.ReplacementAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -7707,7 +7290,19 @@ public ReplacementAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ReplacementAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7817,59 +7412,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private IgnoreAction( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - ignoreTerms_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - ignoreTerms_.add(s); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - ignoreTerms_ = ignoreTerms_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CommonProto .internal_static_google_cloud_retail_v2beta_Rule_IgnoreAction_descriptor; @@ -7963,7 +7505,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < ignoreTerms_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ignoreTerms_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7980,7 +7522,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getIgnoreTermsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7997,7 +7539,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.Rule.IgnoreAction) obj; if (!getIgnoreTermsList().equals(other.getIgnoreTermsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -8012,7 +7554,7 @@ public int hashCode() { hash = (37 * hash) + IGNORE_TERMS_FIELD_NUMBER; hash = (53 * hash) + getIgnoreTermsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8144,17 +7686,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.Rule.IgnoreAction.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -8257,7 +7792,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Rule.IgnoreAction other) } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8272,18 +7807,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Rule.IgnoreAction parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIgnoreTermsIsMutable(); + ignoreTerms_.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) { - parsedMessage = - (com.google.cloud.retail.v2beta.Rule.IgnoreAction) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -8490,7 +8045,19 @@ public IgnoreAction parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new IgnoreAction(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -9087,7 +8654,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (actionCase_ == 11) { output.writeMessage(11, (com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) action_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -9139,7 +8706,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 11, (com.google.cloud.retail.v2beta.Rule.TwowaySynonymsAction) action_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -9187,7 +8754,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -9238,7 +8805,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -9344,8 +8911,9 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build * A rule is a condition-action pair * * A condition defines when a rule is to be triggered. * * An action specifies what occurs on that trigger. - * Currently only boost rules are supported. - * Currently only supported by the search endpoint. + * Currently rules only work for [controls][google.cloud.retail.v2beta.Control] + * with + * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH]. * * * Protobuf type {@code google.cloud.retail.v2beta.Rule} @@ -9370,22 +8938,39 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.Rule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (boostActionBuilder_ != null) { + boostActionBuilder_.clear(); + } + if (redirectActionBuilder_ != null) { + redirectActionBuilder_.clear(); + } + if (onewaySynonymsActionBuilder_ != null) { + onewaySynonymsActionBuilder_.clear(); + } + if (doNotAssociateActionBuilder_ != null) { + doNotAssociateActionBuilder_.clear(); + } + if (replacementActionBuilder_ != null) { + replacementActionBuilder_.clear(); + } + if (ignoreActionBuilder_ != null) { + ignoreActionBuilder_.clear(); + } + if (filterActionBuilder_ != null) { + filterActionBuilder_.clear(); + } + if (twowaySynonymsActionBuilder_ != null) { + twowaySynonymsActionBuilder_.clear(); + } if (conditionBuilder_ == null) { condition_ = null; } else { @@ -9580,7 +9165,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.Rule other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -9595,17 +9180,89 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.Rule parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getConditionFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getBoostActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 2; + break; + } // case 18 + case 26: + { + input.readMessage(getRedirectActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 3; + break; + } // case 26 + case 50: + { + input.readMessage( + getOnewaySynonymsActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 6; + break; + } // case 50 + case 58: + { + input.readMessage( + getDoNotAssociateActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 7; + break; + } // case 58 + case 66: + { + input.readMessage( + getReplacementActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 8; + break; + } // case 66 + case 74: + { + input.readMessage(getIgnoreActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 9; + break; + } // case 74 + case 82: + { + input.readMessage(getFilterActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 10; + break; + } // case 82 + case 90: + { + input.readMessage( + getTwowaySynonymsActionFieldBuilder().getBuilder(), extensionRegistry); + actionCase_ = 11; + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.Rule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -11604,7 +11261,18 @@ public Rule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Rule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequest.java index 7c955a31..602e7060 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequest.java @@ -65,280 +65,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SearchRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - placement_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - branch_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - query_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - visitorId_ = s; - break; - } - case 42: - { - com.google.cloud.retail.v2beta.UserInfo.Builder subBuilder = null; - if (userInfo_ != null) { - subBuilder = userInfo_.toBuilder(); - } - userInfo_ = - input.readMessage( - com.google.cloud.retail.v2beta.UserInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(userInfo_); - userInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 56: - { - pageSize_ = input.readInt32(); - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 72: - { - offset_ = input.readInt32(); - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 90: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 98: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - facetSpecs_ = - new java.util.ArrayList< - com.google.cloud.retail.v2beta.SearchRequest.FacetSpec>(); - mutable_bitField0_ |= 0x00000001; - } - facetSpecs_.add( - input.readMessage( - com.google.cloud.retail.v2beta.SearchRequest.FacetSpec.parser(), - extensionRegistry)); - break; - } - case 106: - { - com.google.cloud.retail.v2beta.SearchRequest.BoostSpec.Builder subBuilder = null; - if (boostSpec_ != null) { - subBuilder = boostSpec_.toBuilder(); - } - boostSpec_ = - input.readMessage( - com.google.cloud.retail.v2beta.SearchRequest.BoostSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(boostSpec_); - boostSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 114: - { - com.google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec.Builder subBuilder = - null; - if (queryExpansionSpec_ != null) { - subBuilder = queryExpansionSpec_.toBuilder(); - } - queryExpansionSpec_ = - input.readMessage( - com.google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(queryExpansionSpec_); - queryExpansionSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 138: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - variantRollupKeys_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - variantRollupKeys_.add(s); - break; - } - case 170: - { - com.google.cloud.retail.v2beta.SearchRequest.DynamicFacetSpec.Builder subBuilder = - null; - if (dynamicFacetSpec_ != null) { - subBuilder = dynamicFacetSpec_.toBuilder(); - } - dynamicFacetSpec_ = - input.readMessage( - com.google.cloud.retail.v2beta.SearchRequest.DynamicFacetSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dynamicFacetSpec_); - dynamicFacetSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 186: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - pageCategories_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - pageCategories_.add(s); - break; - } - case 226: - { - java.lang.String s = input.readStringRequireUtf8(); - - canonicalFilter_ = s; - break; - } - case 248: - { - int rawValue = input.readEnum(); - - searchMode_ = rawValue; - break; - } - case 258: - { - com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Builder subBuilder = - null; - if (personalizationSpec_ != null) { - subBuilder = personalizationSpec_.toBuilder(); - } - personalizationSpec_ = - input.readMessage( - com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(personalizationSpec_); - personalizationSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 274: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - labels_ = - com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000008; - } - com.google.protobuf.MapEntry labels__ = - input.readMessage( - LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry); - labels_.getMutableMap().put(labels__.getKey(), labels__.getValue()); - break; - } - case 282: - { - com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.Builder subBuilder = - null; - if (((bitField0_ & 0x00000001) != 0)) { - subBuilder = spellCorrectionSpec_.toBuilder(); - } - spellCorrectionSpec_ = - input.readMessage( - com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(spellCorrectionSpec_); - spellCorrectionSpec_ = subBuilder.buildPartial(); - } - bitField0_ |= 0x00000001; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - facetSpecs_ = java.util.Collections.unmodifiableList(facetSpecs_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - variantRollupKeys_ = variantRollupKeys_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - pageCategories_ = pageCategories_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.SearchServiceProto .internal_static_google_cloud_retail_v2beta_SearchRequest_descriptor; @@ -380,8 +106,11 @@ public enum SearchMode implements com.google.protobuf.ProtocolMessageEnum { * *
      * Default value. In this case both product search and faceted search will
-     * be performed. Both [SearchResponse.SearchResult] and
-     * [SearchResponse.Facet] will be returned.
+     * be performed. Both
+     * [SearchResponse.SearchResult][google.cloud.retail.v2beta.SearchResponse.SearchResult]
+     * and
+     * [SearchResponse.Facet][google.cloud.retail.v2beta.SearchResponse.Facet]
+     * will be returned.
      * 
* * SEARCH_MODE_UNSPECIFIED = 0; @@ -393,8 +122,11 @@ public enum SearchMode implements com.google.protobuf.ProtocolMessageEnum { *
      * Only product search will be performed. The faceted search will be
      * disabled.
-     * Only [SearchResponse.SearchResult] will be returned.
-     * [SearchResponse.Facet] will not be returned, even if
+     * Only
+     * [SearchResponse.SearchResult][google.cloud.retail.v2beta.SearchResponse.SearchResult]
+     * will be returned.
+     * [SearchResponse.Facet][google.cloud.retail.v2beta.SearchResponse.Facet]
+     * will not be returned, even if
      * [SearchRequest.facet_specs][google.cloud.retail.v2beta.SearchRequest.facet_specs]
      * or
      * [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec]
@@ -415,7 +147,9 @@ public enum SearchMode implements com.google.protobuf.ProtocolMessageEnum {
      * and
      * [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec]
      * should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only
-     * [SearchResponse.Facet] will be returned. [SearchResponse.SearchResult]
+     * [SearchResponse.Facet][google.cloud.retail.v2beta.SearchResponse.Facet]
+     * will be returned.
+     * [SearchResponse.SearchResult][google.cloud.retail.v2beta.SearchResponse.SearchResult]
      * will not be returned.
      * 
* @@ -430,8 +164,11 @@ public enum SearchMode implements com.google.protobuf.ProtocolMessageEnum { * *
      * Default value. In this case both product search and faceted search will
-     * be performed. Both [SearchResponse.SearchResult] and
-     * [SearchResponse.Facet] will be returned.
+     * be performed. Both
+     * [SearchResponse.SearchResult][google.cloud.retail.v2beta.SearchResponse.SearchResult]
+     * and
+     * [SearchResponse.Facet][google.cloud.retail.v2beta.SearchResponse.Facet]
+     * will be returned.
      * 
* * SEARCH_MODE_UNSPECIFIED = 0; @@ -443,8 +180,11 @@ public enum SearchMode implements com.google.protobuf.ProtocolMessageEnum { *
      * Only product search will be performed. The faceted search will be
      * disabled.
-     * Only [SearchResponse.SearchResult] will be returned.
-     * [SearchResponse.Facet] will not be returned, even if
+     * Only
+     * [SearchResponse.SearchResult][google.cloud.retail.v2beta.SearchResponse.SearchResult]
+     * will be returned.
+     * [SearchResponse.Facet][google.cloud.retail.v2beta.SearchResponse.Facet]
+     * will not be returned, even if
      * [SearchRequest.facet_specs][google.cloud.retail.v2beta.SearchRequest.facet_specs]
      * or
      * [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec]
@@ -465,7 +205,9 @@ public enum SearchMode implements com.google.protobuf.ProtocolMessageEnum {
      * and
      * [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec]
      * should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only
-     * [SearchResponse.Facet] will be returned. [SearchResponse.SearchResult]
+     * [SearchResponse.Facet][google.cloud.retail.v2beta.SearchResponse.Facet]
+     * will be returned.
+     * [SearchResponse.SearchResult][google.cloud.retail.v2beta.SearchResponse.SearchResult]
      * will not be returned.
      * 
* @@ -821,87 +563,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FacetSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.Builder subBuilder = - null; - if (facetKey_ != null) { - subBuilder = facetKey_.toBuilder(); - } - facetKey_ = - input.readMessage( - com.google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(facetKey_); - facetKey_ = subBuilder.buildPartial(); - } - - break; - } - case 16: - { - limit_ = input.readInt32(); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - excludedFilterKeys_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - excludedFilterKeys_.add(s); - break; - } - case 32: - { - enableDynamicPosition_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - excludedFilterKeys_ = excludedFilterKeys_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.SearchServiceProto .internal_static_google_cloud_retail_v2beta_SearchRequest_FacetSpec_descriptor; @@ -1516,131 +1177,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FacetKey( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - key_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - intervals_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - intervals_.add( - input.readMessage( - com.google.cloud.retail.v2beta.Interval.parser(), extensionRegistry)); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - restrictedValues_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - restrictedValues_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - query_ = s; - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - prefixes_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - prefixes_.add(s); - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - contains_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - contains_.add(s); - break; - } - case 80: - { - caseInsensitive_ = input.readBool(); - break; - } - case 88: - { - returnMinMax_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - intervals_ = java.util.Collections.unmodifiableList(intervals_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - restrictedValues_ = restrictedValues_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - prefixes_ = prefixes_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - contains_ = contains_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.SearchServiceProto .internal_static_google_cloud_retail_v2beta_SearchRequest_FacetSpec_FacetKey_descriptor; @@ -2381,7 +1917,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (returnMinMax_ != false) { output.writeBool(11, returnMinMax_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -2432,7 +1968,7 @@ public int getSerializedSize() { if (returnMinMax_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(11, returnMinMax_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -2457,7 +1993,7 @@ public boolean equals(final java.lang.Object obj) { if (!getOrderBy().equals(other.getOrderBy())) return false; if (!getQuery().equals(other.getQuery())) return false; if (getReturnMinMax() != other.getReturnMinMax()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2494,7 +2030,7 @@ public int hashCode() { hash = (53 * hash) + getQuery().hashCode(); hash = (37 * hash) + RETURN_MIN_MAX_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getReturnMinMax()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2629,19 +2165,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getIntervalsFieldBuilder(); - } } @java.lang.Override @@ -2651,10 +2178,11 @@ public Builder clear() { if (intervalsBuilder_ == null) { intervals_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + intervals_ = null; intervalsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); restrictedValues_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000002); prefixes_ = com.google.protobuf.LazyStringArrayList.EMPTY; @@ -2858,7 +2386,7 @@ public Builder mergeFrom( if (other.getReturnMinMax() != false) { setReturnMinMax(other.getReturnMinMax()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2873,19 +2401,95 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.cloud.retail.v2beta.Interval m = + input.readMessage( + com.google.cloud.retail.v2beta.Interval.parser(), extensionRegistry); + if (intervalsBuilder_ == null) { + ensureIntervalsIsMutable(); + intervals_.add(m); + } else { + intervalsBuilder_.addMessage(m); + } + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRestrictedValuesIsMutable(); + restrictedValues_.add(s); + break; + } // case 26 + case 34: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + query_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePrefixesIsMutable(); + prefixes_.add(s); + break; + } // case 66 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureContainsIsMutable(); + contains_.add(s); + break; + } // case 74 + case 80: + { + caseInsensitive_ = input.readBool(); + + break; + } // case 80 + case 88: + { + returnMinMax_ = input.readBool(); + + break; + } // case 88 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2beta.SearchRequest.FacetSpec.FacetKey) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4816,7 +4420,19 @@ public FacetKey parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FacetKey(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5123,7 +4739,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (enableDynamicPosition_ != false) { output.writeBool(4, enableDynamicPosition_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5149,7 +4765,7 @@ public int getSerializedSize() { if (enableDynamicPosition_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, enableDynamicPosition_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5172,7 +4788,7 @@ public boolean equals(final java.lang.Object obj) { if (getLimit() != other.getLimit()) return false; if (!getExcludedFilterKeysList().equals(other.getExcludedFilterKeysList())) return false; if (getEnableDynamicPosition() != other.getEnableDynamicPosition()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5195,7 +4811,7 @@ public int hashCode() { } hash = (37 * hash) + ENABLE_DYNAMIC_POSITION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableDynamicPosition()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -5327,17 +4943,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.SearchRequest.FacetSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -5466,7 +5075,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.SearchRequest.FacetSpec if (other.getEnableDynamicPosition() != false) { setEnableDynamicPosition(other.getEnableDynamicPosition()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5481,18 +5090,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.SearchRequest.FacetSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getFacetKeyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 16: + { + limit_ = input.readInt32(); + + break; + } // case 16 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExcludedFilterKeysIsMutable(); + excludedFilterKeys_.add(s); + break; + } // case 26 + case 32: + { + enableDynamicPosition_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.SearchRequest.FacetSpec) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6273,7 +5920,19 @@ public FacetSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FacetSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -6362,52 +6021,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DynamicFacetSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - mode_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.SearchServiceProto .internal_static_google_cloud_retail_v2beta_SearchRequest_DynamicFacetSpec_descriptor; @@ -6645,7 +6258,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, mode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -6659,7 +6272,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -6676,7 +6289,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.SearchRequest.DynamicFacetSpec) obj; if (mode_ != other.mode_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -6689,7 +6302,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + MODE_FIELD_NUMBER; hash = (53 * hash) + mode_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6821,17 +6434,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.SearchRequest.DynamicFacetSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -6925,7 +6531,7 @@ public Builder mergeFrom( if (other.mode_ != 0) { setModeValue(other.getModeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6940,19 +6546,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.SearchRequest.DynamicFacetSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + mode_ = input.readEnum(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.SearchRequest.DynamicFacetSpec) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -7100,7 +6724,19 @@ public DynamicFacetSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DynamicFacetSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7276,71 +6912,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BoostSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - conditionBoostSpecs_ = - new java.util.ArrayList< - com.google.cloud.retail.v2beta.SearchRequest.BoostSpec - .ConditionBoostSpec>(); - mutable_bitField0_ |= 0x00000001; - } - conditionBoostSpecs_.add( - input.readMessage( - com.google.cloud.retail.v2beta.SearchRequest.BoostSpec.ConditionBoostSpec - .parser(), - extensionRegistry)); - break; - } - case 16: - { - bitField0_ |= 0x00000001; - skipBoostSpecValidation_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - conditionBoostSpecs_ = java.util.Collections.unmodifiableList(conditionBoostSpecs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.SearchServiceProto .internal_static_google_cloud_retail_v2beta_SearchRequest_BoostSpec_descriptor; @@ -7464,58 +7035,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ConditionBoostSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - condition_ = s; - break; - } - case 21: - { - boost_ = input.readFloat(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.SearchServiceProto .internal_static_google_cloud_retail_v2beta_SearchRequest_BoostSpec_ConditionBoostSpec_descriptor; @@ -7650,7 +7169,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (java.lang.Float.floatToRawIntBits(boost_) != 0) { output.writeFloat(2, boost_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7665,7 +7184,7 @@ public int getSerializedSize() { if (java.lang.Float.floatToRawIntBits(boost_) != 0) { size += com.google.protobuf.CodedOutputStream.computeFloatSize(2, boost_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7685,7 +7204,7 @@ public boolean equals(final java.lang.Object obj) { if (!getCondition().equals(other.getCondition())) return false; if (java.lang.Float.floatToIntBits(getBoost()) != java.lang.Float.floatToIntBits(other.getBoost())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7700,7 +7219,7 @@ public int hashCode() { hash = (53 * hash) + getCondition().hashCode(); hash = (37 * hash) + BOOST_FIELD_NUMBER; hash = (53 * hash) + java.lang.Float.floatToIntBits(getBoost()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7842,17 +7361,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2beta.SearchRequest.BoostSpec.ConditionBoostSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -7959,7 +7471,7 @@ public Builder mergeFrom( if (other.getBoost() != 0F) { setBoost(other.getBoost()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -7974,20 +7486,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.SearchRequest.BoostSpec.ConditionBoostSpec parsedMessage = - null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + condition_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 21: + { + boost_ = input.readFloat(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.SearchRequest.BoostSpec.ConditionBoostSpec) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -8269,7 +7804,19 @@ public ConditionBoostSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ConditionBoostSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -8454,7 +8001,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeBool(2, skipBoostSpecValidation_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -8471,7 +8018,7 @@ public int getSerializedSize() { if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, skipBoostSpecValidation_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -8492,7 +8039,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSkipBoostSpecValidation()) { if (getSkipBoostSpecValidation() != other.getSkipBoostSpecValidation()) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -8511,7 +8058,7 @@ public int hashCode() { hash = (37 * hash) + SKIP_BOOST_SPEC_VALIDATION_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getSkipBoostSpecValidation()); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -8643,19 +8190,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.SearchRequest.BoostSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getConditionBoostSpecsFieldBuilder(); - } } @java.lang.Override @@ -8663,10 +8201,11 @@ public Builder clear() { super.clear(); if (conditionBoostSpecsBuilder_ == null) { conditionBoostSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + conditionBoostSpecs_ = null; conditionBoostSpecsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); skipBoostSpecValidation_ = false; bitField0_ = (bitField0_ & ~0x00000002); return this; @@ -8794,7 +8333,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.SearchRequest.BoostSpec if (other.hasSkipBoostSpecValidation()) { setSkipBoostSpecValidation(other.getSkipBoostSpecValidation()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -8809,18 +8348,52 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.SearchRequest.BoostSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2beta.SearchRequest.BoostSpec.ConditionBoostSpec m = + input.readMessage( + com.google.cloud.retail.v2beta.SearchRequest.BoostSpec.ConditionBoostSpec + .parser(), + extensionRegistry); + if (conditionBoostSpecsBuilder_ == null) { + ensureConditionBoostSpecsIsMutable(); + conditionBoostSpecs_.add(m); + } else { + conditionBoostSpecsBuilder_.addMessage(m); + } + break; + } // case 10 + case 16: + { + skipBoostSpecValidation_ = input.readBool(); + bitField0_ |= 0x00000002; + break; + } // case 16 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2beta.SearchRequest.BoostSpec) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -9423,7 +8996,19 @@ public BoostSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BoostSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -9520,61 +9105,10 @@ private QueryExpansionSpec() { protected java.lang.Object newInstance(UnusedPrivateParameter unused) { return new QueryExpansionSpec(); } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private QueryExpansionSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - condition_ = rawValue; - break; - } - case 16: - { - pinUnexpandedResults_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -9606,7 +9140,8 @@ public enum Condition implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Unspecified query expansion condition. This defaults to
+       * Unspecified query expansion condition. In this case, server behavior
+       * defaults to
        * [Condition.DISABLED][google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
        * 
* @@ -9642,7 +9177,8 @@ public enum Condition implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Unspecified query expansion condition. This defaults to
+       * Unspecified query expansion condition. In this case, server behavior
+       * defaults to
        * [Condition.DISABLED][google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
        * 
* @@ -9844,7 +9380,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (pinUnexpandedResults_ != false) { output.writeBool(2, pinUnexpandedResults_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -9862,7 +9398,7 @@ public int getSerializedSize() { if (pinUnexpandedResults_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, pinUnexpandedResults_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -9880,7 +9416,7 @@ public boolean equals(final java.lang.Object obj) { if (condition_ != other.condition_) return false; if (getPinUnexpandedResults() != other.getPinUnexpandedResults()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -9895,7 +9431,7 @@ public int hashCode() { hash = (53 * hash) + condition_; hash = (37 * hash) + PIN_UNEXPANDED_RESULTS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getPinUnexpandedResults()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -10030,17 +9566,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -10140,7 +9669,7 @@ public Builder mergeFrom( if (other.getPinUnexpandedResults() != false) { setPinUnexpandedResults(other.getPinUnexpandedResults()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -10155,19 +9684,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + condition_ = input.readEnum(); + + break; + } // case 8 + case 16: + { + pinUnexpandedResults_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -10370,7 +9923,19 @@ public QueryExpansionSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryExpansionSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -10456,52 +10021,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PersonalizationSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - mode_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.SearchServiceProto .internal_static_google_cloud_retail_v2beta_SearchRequest_PersonalizationSpec_descriptor; @@ -10542,7 +10061,8 @@ public enum Mode implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Let CRS decide whether to use personalization.
+       * Let CRS decide whether to use personalization based on quality of user
+       * event data.
        * 
* * AUTO = 1; @@ -10576,7 +10096,8 @@ public enum Mode implements com.google.protobuf.ProtocolMessageEnum { * * *
-       * Let CRS decide whether to use personalization.
+       * Let CRS decide whether to use personalization based on quality of user
+       * event data.
        * 
* * AUTO = 1; @@ -10737,7 +10258,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, mode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -10751,7 +10272,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -10768,7 +10289,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec) obj; if (mode_ != other.mode_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -10781,7 +10302,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + MODE_FIELD_NUMBER; hash = (53 * hash) + mode_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -10915,17 +10436,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -11021,7 +10535,7 @@ public Builder mergeFrom( if (other.mode_ != 0) { setModeValue(other.getModeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -11036,19 +10550,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + mode_ = input.readEnum(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -11186,7 +10718,19 @@ public PersonalizationSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PersonalizationSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -11274,52 +10818,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SpellCorrectionSpec( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - int rawValue = input.readEnum(); - - mode_ = rawValue; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.SearchServiceProto .internal_static_google_cloud_retail_v2beta_SearchRequest_SpellCorrectionSpec_descriptor; @@ -11567,7 +11065,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io .getNumber()) { output.writeEnum(1, mode_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -11581,7 +11079,7 @@ public int getSerializedSize() { .getNumber()) { size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, mode_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -11598,7 +11096,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec) obj; if (mode_ != other.mode_) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -11611,7 +11109,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + MODE_FIELD_NUMBER; hash = (53 * hash) + mode_; - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -11745,17 +11243,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -11851,7 +11342,7 @@ public Builder mergeFrom( if (other.mode_ != 0) { setModeValue(other.getModeValue()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -11866,19 +11357,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + mode_ = input.readEnum(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.SearchRequest.SpellCorrectionSpec) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -12021,7 +11530,19 @@ public SpellCorrectionSpec parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SpellCorrectionSpec(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -12714,7 +12235,7 @@ public com.google.cloud.retail.v2beta.SearchRequest.FacetSpecOrBuilder getFacetS *
* * @deprecated google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2beta/search_service.proto;l=576 + * google/cloud/retail/v2beta/search_service.proto;l=586 * @return Whether the dynamicFacetSpec field is set. */ @java.lang.Override @@ -12737,7 +12258,7 @@ public boolean hasDynamicFacetSpec() { *
* * @deprecated google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2beta/search_service.proto;l=576 + * google/cloud/retail/v2beta/search_service.proto;l=586 * @return The dynamicFacetSpec. */ @java.lang.Override @@ -13230,7 +12751,7 @@ public com.google.protobuf.ByteString getVariantRollupKeysBytes(int index) { * the same as * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories]; * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -13253,7 +12774,7 @@ public com.google.protobuf.ProtocolStringList getPageCategoriesList() { * the same as * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories]; * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -13276,7 +12797,7 @@ public int getPageCategoriesCount() { * the same as * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories]; * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -13300,7 +12821,7 @@ public java.lang.String getPageCategories(int index) { * the same as * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories]; * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -13363,6 +12884,14 @@ public com.google.cloud.retail.v2beta.SearchRequest.SearchMode getSearchMode() { * *
    * The specification for personalization.
+   * Notice that if both
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+   * and
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * are set.
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * will override
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
    * 
* * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 32; @@ -13379,6 +12908,14 @@ public boolean hasPersonalizationSpec() { * *
    * The specification for personalization.
+   * Notice that if both
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+   * and
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * are set.
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * will override
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
    * 
* * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 32; @@ -13397,6 +12934,14 @@ public com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec getPerso * *
    * The specification for personalization.
+   * Notice that if both
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+   * and
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * are set.
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * will override
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
    * 
* * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 32; @@ -13700,7 +13245,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(35, getSpellCorrectionSpec()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -13793,7 +13338,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(35, getSpellCorrectionSpec()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -13848,7 +13393,7 @@ public boolean equals(final java.lang.Object obj) { if (hasSpellCorrectionSpec()) { if (!getSpellCorrectionSpec().equals(other.getSpellCorrectionSpec())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -13921,7 +13466,7 @@ public int hashCode() { hash = (37 * hash) + SPELL_CORRECTION_SPEC_FIELD_NUMBER; hash = (53 * hash) + getSpellCorrectionSpec().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -14119,10 +13664,11 @@ public Builder clear() { if (facetSpecsBuilder_ == null) { facetSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + facetSpecs_ = null; facetSpecsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (dynamicFacetSpecBuilder_ == null) { dynamicFacetSpec_ = null; } else { @@ -14411,7 +13957,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.SearchRequest other) { if (other.hasSpellCorrectionSpec()) { mergeSpellCorrectionSpec(other.getSpellCorrectionSpec()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -14426,17 +13972,176 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.SearchRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + placement_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + branch_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + query_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + visitorId_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + input.readMessage(getUserInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 42 + case 56: + { + pageSize_ = input.readInt32(); + + break; + } // case 56 + case 66: + { + pageToken_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 72: + { + offset_ = input.readInt32(); + + break; + } // case 72 + case 82: + { + filter_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 90: + { + orderBy_ = input.readStringRequireUtf8(); + + break; + } // case 90 + case 98: + { + com.google.cloud.retail.v2beta.SearchRequest.FacetSpec m = + input.readMessage( + com.google.cloud.retail.v2beta.SearchRequest.FacetSpec.parser(), + extensionRegistry); + if (facetSpecsBuilder_ == null) { + ensureFacetSpecsIsMutable(); + facetSpecs_.add(m); + } else { + facetSpecsBuilder_.addMessage(m); + } + break; + } // case 98 + case 106: + { + input.readMessage(getBoostSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 106 + case 114: + { + input.readMessage( + getQueryExpansionSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 114 + case 138: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureVariantRollupKeysIsMutable(); + variantRollupKeys_.add(s); + break; + } // case 138 + case 170: + { + input.readMessage( + getDynamicFacetSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 170 + case 186: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePageCategoriesIsMutable(); + pageCategories_.add(s); + break; + } // case 186 + case 226: + { + canonicalFilter_ = input.readStringRequireUtf8(); + + break; + } // case 226 + case 248: + { + searchMode_ = input.readEnum(); + + break; + } // case 248 + case 258: + { + input.readMessage( + getPersonalizationSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 258 + case 274: + { + com.google.protobuf.MapEntry labels__ = + input.readMessage( + LabelsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableLabels() + .getMutableMap() + .put(labels__.getKey(), labels__.getValue()); + break; + } // case 274 + case 282: + { + input.readMessage( + getSpellCorrectionSpecFieldBuilder().getBuilder(), extensionRegistry); + bitField0_ |= 0x00000010; + break; + } // case 282 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2beta.SearchRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -16245,7 +15950,7 @@ public com.google.cloud.retail.v2beta.SearchRequest.FacetSpec.Builder addFacetSp * * * @deprecated google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2beta/search_service.proto;l=576 + * google/cloud/retail/v2beta/search_service.proto;l=586 * @return Whether the dynamicFacetSpec field is set. */ @java.lang.Deprecated @@ -16267,7 +15972,7 @@ public boolean hasDynamicFacetSpec() { *
* * @deprecated google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2beta/search_service.proto;l=576 + * google/cloud/retail/v2beta/search_service.proto;l=586 * @return The dynamicFacetSpec. */ @java.lang.Deprecated @@ -17719,7 +17424,7 @@ private void ensurePageCategoriesIsMutable() { * the same as * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories]; * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -17742,7 +17447,7 @@ public com.google.protobuf.ProtocolStringList getPageCategoriesList() { * the same as * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories]; * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -17765,7 +17470,7 @@ public int getPageCategoriesCount() { * the same as * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories]; * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -17789,7 +17494,7 @@ public java.lang.String getPageCategories(int index) { * the same as * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories]; * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -17813,7 +17518,7 @@ public com.google.protobuf.ByteString getPageCategoriesBytes(int index) { * the same as * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories]; * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -17844,7 +17549,7 @@ public Builder setPageCategories(int index, java.lang.String value) { * the same as * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories]; * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -17874,7 +17579,7 @@ public Builder addPageCategories(java.lang.String value) { * the same as * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories]; * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -17901,7 +17606,7 @@ public Builder addAllPageCategories(java.lang.Iterable values) * the same as * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories]; * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -17927,7 +17632,7 @@ public Builder clearPageCategories() { * the same as * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories]; * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -18059,6 +17764,14 @@ public Builder clearSearchMode() { * *
      * The specification for personalization.
+     * Notice that if both
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+     * and
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * are set.
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * will override
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
      * 
* * @@ -18075,6 +17788,14 @@ public boolean hasPersonalizationSpec() { * *
      * The specification for personalization.
+     * Notice that if both
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+     * and
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * are set.
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * will override
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
      * 
* * @@ -18098,6 +17819,14 @@ public boolean hasPersonalizationSpec() { * *
      * The specification for personalization.
+     * Notice that if both
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+     * and
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * are set.
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * will override
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
      * 
* * @@ -18123,6 +17852,14 @@ public Builder setPersonalizationSpec( * *
      * The specification for personalization.
+     * Notice that if both
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+     * and
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * are set.
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * will override
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
      * 
* * @@ -18145,6 +17882,14 @@ public Builder setPersonalizationSpec( * *
      * The specification for personalization.
+     * Notice that if both
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+     * and
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * are set.
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * will override
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
      * 
* * @@ -18175,6 +17920,14 @@ public Builder mergePersonalizationSpec( * *
      * The specification for personalization.
+     * Notice that if both
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+     * and
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * are set.
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * will override
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
      * 
* * @@ -18197,6 +17950,14 @@ public Builder clearPersonalizationSpec() { * *
      * The specification for personalization.
+     * Notice that if both
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+     * and
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * are set.
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * will override
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
      * 
* * @@ -18214,6 +17975,14 @@ public Builder clearPersonalizationSpec() { * *
      * The specification for personalization.
+     * Notice that if both
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+     * and
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * are set.
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * will override
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
      * 
* * @@ -18235,6 +18004,14 @@ public Builder clearPersonalizationSpec() { * *
      * The specification for personalization.
+     * Notice that if both
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+     * and
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * are set.
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * will override
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
      * 
* * @@ -18768,7 +18545,18 @@ public SearchRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequestOrBuilder.java index 3b53a971..4cf93287 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequestOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchRequestOrBuilder.java @@ -459,7 +459,7 @@ public interface SearchRequestOrBuilder * * * @deprecated google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2beta/search_service.proto;l=576 + * google/cloud/retail/v2beta/search_service.proto;l=586 * @return Whether the dynamicFacetSpec field is set. */ @java.lang.Deprecated @@ -479,7 +479,7 @@ public interface SearchRequestOrBuilder *
* * @deprecated google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec is deprecated. See - * google/cloud/retail/v2beta/search_service.proto;l=576 + * google/cloud/retail/v2beta/search_service.proto;l=586 * @return The dynamicFacetSpec. */ @java.lang.Deprecated @@ -926,7 +926,7 @@ public interface SearchRequestOrBuilder * the same as * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories]; * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -947,7 +947,7 @@ public interface SearchRequestOrBuilder * the same as * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories]; * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -968,7 +968,7 @@ public interface SearchRequestOrBuilder * the same as * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories]; * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -990,7 +990,7 @@ public interface SearchRequestOrBuilder * the same as * [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories]; * To represent full path of category, use '>' sign to separate different - * hierarchies. If '>' is part of the category name, please replace it with + * hierarchies. If '>' is part of the category name, replace it with * other character(s). * Category pages include special pages such as sales or promotions. For * instance, a special sale page may have the category hierarchy: @@ -1036,6 +1036,14 @@ public interface SearchRequestOrBuilder * *
    * The specification for personalization.
+   * Notice that if both
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+   * and
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * are set.
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * will override
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
    * 
* * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 32; @@ -1049,6 +1057,14 @@ public interface SearchRequestOrBuilder * *
    * The specification for personalization.
+   * Notice that if both
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+   * and
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * are set.
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * will override
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
    * 
* * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 32; @@ -1062,6 +1078,14 @@ public interface SearchRequestOrBuilder * *
    * The specification for personalization.
+   * Notice that if both
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+   * and
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * are set.
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * will override
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
    * 
* * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 32; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchResponse.java index c3b555c5..d5285a32 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchResponse.java @@ -61,163 +61,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SearchResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = - new java.util.ArrayList< - com.google.cloud.retail.v2beta.SearchResponse.SearchResult>(); - mutable_bitField0_ |= 0x00000001; - } - results_.add( - input.readMessage( - com.google.cloud.retail.v2beta.SearchResponse.SearchResult.parser(), - extensionRegistry)); - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - facets_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - facets_.add( - input.readMessage( - com.google.cloud.retail.v2beta.SearchResponse.Facet.parser(), - extensionRegistry)); - break; - } - case 24: - { - totalSize_ = input.readInt32(); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - correctedQuery_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - attributionToken_ = s; - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - nextPageToken_ = s; - break; - } - case 58: - { - com.google.cloud.retail.v2beta.SearchResponse.QueryExpansionInfo.Builder subBuilder = - null; - if (queryExpansionInfo_ != null) { - subBuilder = queryExpansionInfo_.toBuilder(); - } - queryExpansionInfo_ = - input.readMessage( - com.google.cloud.retail.v2beta.SearchResponse.QueryExpansionInfo.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(queryExpansionInfo_); - queryExpansionInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - redirectUri_ = s; - break; - } - case 98: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - appliedControls_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - appliedControls_.add(s); - break; - } - case 114: - { - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - invalidConditionBoostSpecs_ = - new java.util.ArrayList< - com.google.cloud.retail.v2beta.SearchRequest.BoostSpec - .ConditionBoostSpec>(); - mutable_bitField0_ |= 0x00000008; - } - invalidConditionBoostSpecs_.add( - input.readMessage( - com.google.cloud.retail.v2beta.SearchRequest.BoostSpec.ConditionBoostSpec - .parser(), - extensionRegistry)); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - results_ = java.util.Collections.unmodifiableList(results_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - facets_ = java.util.Collections.unmodifiableList(facets_); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - appliedControls_ = appliedControls_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - invalidConditionBoostSpecs_ = - java.util.Collections.unmodifiableList(invalidConditionBoostSpecs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.SearchServiceProto .internal_static_google_cloud_retail_v2beta_SearchResponse_descriptor; @@ -650,6 +493,93 @@ com.google.protobuf.Value getVariantRollupValuesOrDefault( * map<string, .google.protobuf.Value> variant_rollup_values = 5; */ com.google.protobuf.Value getVariantRollupValuesOrThrow(java.lang.String key); + + /** + * + * + *
+     * Specifies previous events related to this product for this user based on
+     * [UserEvent][google.cloud.retail.v2beta.UserEvent] with same
+     * [SearchRequest.visitor_id][google.cloud.retail.v2beta.SearchRequest.visitor_id]
+     * or [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id].
+     * This is set only when
+     * [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.mode]
+     * is
+     * [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
+     * Possible values:
+     * * `purchased`: Indicates that this product has been purchased before.
+     * 
+ * + * repeated string personal_labels = 7; + * + * @return A list containing the personalLabels. + */ + java.util.List getPersonalLabelsList(); + /** + * + * + *
+     * Specifies previous events related to this product for this user based on
+     * [UserEvent][google.cloud.retail.v2beta.UserEvent] with same
+     * [SearchRequest.visitor_id][google.cloud.retail.v2beta.SearchRequest.visitor_id]
+     * or [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id].
+     * This is set only when
+     * [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.mode]
+     * is
+     * [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
+     * Possible values:
+     * * `purchased`: Indicates that this product has been purchased before.
+     * 
+ * + * repeated string personal_labels = 7; + * + * @return The count of personalLabels. + */ + int getPersonalLabelsCount(); + /** + * + * + *
+     * Specifies previous events related to this product for this user based on
+     * [UserEvent][google.cloud.retail.v2beta.UserEvent] with same
+     * [SearchRequest.visitor_id][google.cloud.retail.v2beta.SearchRequest.visitor_id]
+     * or [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id].
+     * This is set only when
+     * [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.mode]
+     * is
+     * [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
+     * Possible values:
+     * * `purchased`: Indicates that this product has been purchased before.
+     * 
+ * + * repeated string personal_labels = 7; + * + * @param index The index of the element to return. + * @return The personalLabels at the given index. + */ + java.lang.String getPersonalLabels(int index); + /** + * + * + *
+     * Specifies previous events related to this product for this user based on
+     * [UserEvent][google.cloud.retail.v2beta.UserEvent] with same
+     * [SearchRequest.visitor_id][google.cloud.retail.v2beta.SearchRequest.visitor_id]
+     * or [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id].
+     * This is set only when
+     * [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.mode]
+     * is
+     * [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
+     * Possible values:
+     * * `purchased`: Indicates that this product has been purchased before.
+     * 
+ * + * repeated string personal_labels = 7; + * + * @param index The index of the value to return. + * @return The bytes of the personalLabels at the given index. + */ + com.google.protobuf.ByteString getPersonalLabelsBytes(int index); } /** * @@ -672,6 +602,7 @@ private SearchResult(com.google.protobuf.GeneratedMessageV3.Builder builder) private SearchResult() { id_ = ""; + personalLabels_ = com.google.protobuf.LazyStringArrayList.EMPTY; } @java.lang.Override @@ -685,110 +616,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SearchResult( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - id_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2beta.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = - input.readMessage( - com.google.cloud.retail.v2beta.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - matchingVariantCount_ = input.readInt32(); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - matchingVariantFields_ = - com.google.protobuf.MapField.newMapField( - MatchingVariantFieldsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry - matchingVariantFields__ = - input.readMessage( - MatchingVariantFieldsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - matchingVariantFields_ - .getMutableMap() - .put(matchingVariantFields__.getKey(), matchingVariantFields__.getValue()); - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - variantRollupValues_ = - com.google.protobuf.MapField.newMapField( - VariantRollupValuesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000002; - } - com.google.protobuf.MapEntry - variantRollupValues__ = - input.readMessage( - VariantRollupValuesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - variantRollupValues_ - .getMutableMap() - .put(variantRollupValues__.getKey(), variantRollupValues__.getValue()); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.SearchServiceProto .internal_static_google_cloud_retail_v2beta_SearchResponse_SearchResult_descriptor; @@ -1331,6 +1158,103 @@ public com.google.protobuf.Value getVariantRollupValuesOrThrow(java.lang.String return map.get(key); } + public static final int PERSONAL_LABELS_FIELD_NUMBER = 7; + private com.google.protobuf.LazyStringList personalLabels_; + /** + * + * + *
+     * Specifies previous events related to this product for this user based on
+     * [UserEvent][google.cloud.retail.v2beta.UserEvent] with same
+     * [SearchRequest.visitor_id][google.cloud.retail.v2beta.SearchRequest.visitor_id]
+     * or [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id].
+     * This is set only when
+     * [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.mode]
+     * is
+     * [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
+     * Possible values:
+     * * `purchased`: Indicates that this product has been purchased before.
+     * 
+ * + * repeated string personal_labels = 7; + * + * @return A list containing the personalLabels. + */ + public com.google.protobuf.ProtocolStringList getPersonalLabelsList() { + return personalLabels_; + } + /** + * + * + *
+     * Specifies previous events related to this product for this user based on
+     * [UserEvent][google.cloud.retail.v2beta.UserEvent] with same
+     * [SearchRequest.visitor_id][google.cloud.retail.v2beta.SearchRequest.visitor_id]
+     * or [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id].
+     * This is set only when
+     * [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.mode]
+     * is
+     * [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
+     * Possible values:
+     * * `purchased`: Indicates that this product has been purchased before.
+     * 
+ * + * repeated string personal_labels = 7; + * + * @return The count of personalLabels. + */ + public int getPersonalLabelsCount() { + return personalLabels_.size(); + } + /** + * + * + *
+     * Specifies previous events related to this product for this user based on
+     * [UserEvent][google.cloud.retail.v2beta.UserEvent] with same
+     * [SearchRequest.visitor_id][google.cloud.retail.v2beta.SearchRequest.visitor_id]
+     * or [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id].
+     * This is set only when
+     * [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.mode]
+     * is
+     * [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
+     * Possible values:
+     * * `purchased`: Indicates that this product has been purchased before.
+     * 
+ * + * repeated string personal_labels = 7; + * + * @param index The index of the element to return. + * @return The personalLabels at the given index. + */ + public java.lang.String getPersonalLabels(int index) { + return personalLabels_.get(index); + } + /** + * + * + *
+     * Specifies previous events related to this product for this user based on
+     * [UserEvent][google.cloud.retail.v2beta.UserEvent] with same
+     * [SearchRequest.visitor_id][google.cloud.retail.v2beta.SearchRequest.visitor_id]
+     * or [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id].
+     * This is set only when
+     * [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.mode]
+     * is
+     * [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
+     * Possible values:
+     * * `purchased`: Indicates that this product has been purchased before.
+     * 
+ * + * repeated string personal_labels = 7; + * + * @param index The index of the value to return. + * @return The bytes of the personalLabels at the given index. + */ + public com.google.protobuf.ByteString getPersonalLabelsBytes(int index) { + return personalLabels_.getByteString(index); + } + private byte memoizedIsInitialized = -1; @java.lang.Override @@ -1364,7 +1288,10 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io internalGetVariantRollupValues(), VariantRollupValuesDefaultEntryHolder.defaultEntry, 5); - unknownFields.writeTo(output); + for (int i = 0; i < personalLabels_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, personalLabels_.getRaw(i)); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1405,7 +1332,15 @@ public int getSerializedSize() { .build(); size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, variantRollupValues__); } - size += unknownFields.getSerializedSize(); + { + int dataSize = 0; + for (int i = 0; i < personalLabels_.size(); i++) { + dataSize += computeStringSizeNoTag(personalLabels_.getRaw(i)); + } + size += dataSize; + size += 1 * getPersonalLabelsList().size(); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1431,7 +1366,8 @@ public boolean equals(final java.lang.Object obj) { return false; if (!internalGetVariantRollupValues().equals(other.internalGetVariantRollupValues())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getPersonalLabelsList().equals(other.getPersonalLabelsList())) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1458,7 +1394,11 @@ public int hashCode() { hash = (37 * hash) + VARIANT_ROLLUP_VALUES_FIELD_NUMBER; hash = (53 * hash) + internalGetVariantRollupValues().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + if (getPersonalLabelsCount() > 0) { + hash = (37 * hash) + PERSONAL_LABELS_FIELD_NUMBER; + hash = (53 * hash) + getPersonalLabelsList().hashCode(); + } + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1614,17 +1554,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.cloud.retail.v2beta.SearchResponse.SearchResult.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1642,6 +1575,8 @@ public Builder clear() { internalGetMutableMatchingVariantFields().clear(); internalGetMutableVariantRollupValues().clear(); + personalLabels_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @@ -1682,6 +1617,11 @@ public com.google.cloud.retail.v2beta.SearchResponse.SearchResult buildPartial() result.matchingVariantFields_.makeImmutable(); result.variantRollupValues_ = internalGetVariantRollupValues(); result.variantRollupValues_.makeImmutable(); + if (((bitField0_ & 0x00000004) != 0)) { + personalLabels_ = personalLabels_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.personalLabels_ = personalLabels_; onBuilt(); return result; } @@ -1748,7 +1688,17 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.SearchResponse.SearchRes internalGetMutableMatchingVariantFields() .mergeFrom(other.internalGetMatchingVariantFields()); internalGetMutableVariantRollupValues().mergeFrom(other.internalGetVariantRollupValues()); - this.mergeUnknownFields(other.unknownFields); + if (!other.personalLabels_.isEmpty()) { + if (personalLabels_.isEmpty()) { + personalLabels_ = other.personalLabels_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensurePersonalLabelsIsMutable(); + personalLabels_.addAll(other.personalLabels_); + } + onChanged(); + } + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1763,18 +1713,81 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.SearchResponse.SearchResult parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + id_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getProductFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + matchingVariantCount_ = input.readInt32(); + + break; + } // case 24 + case 34: + { + com.google.protobuf.MapEntry + matchingVariantFields__ = + input.readMessage( + MatchingVariantFieldsDefaultEntryHolder.defaultEntry + .getParserForType(), + extensionRegistry); + internalGetMutableMatchingVariantFields() + .getMutableMap() + .put(matchingVariantFields__.getKey(), matchingVariantFields__.getValue()); + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry + variantRollupValues__ = + input.readMessage( + VariantRollupValuesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableVariantRollupValues() + .getMutableMap() + .put(variantRollupValues__.getKey(), variantRollupValues__.getValue()); + break; + } // case 42 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePersonalLabelsIsMutable(); + personalLabels_.add(s); + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.SearchResponse.SearchResult) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2830,6 +2843,255 @@ public Builder putAllVariantRollupValues( return this; } + private com.google.protobuf.LazyStringList personalLabels_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensurePersonalLabelsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + personalLabels_ = new com.google.protobuf.LazyStringArrayList(personalLabels_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+       * Specifies previous events related to this product for this user based on
+       * [UserEvent][google.cloud.retail.v2beta.UserEvent] with same
+       * [SearchRequest.visitor_id][google.cloud.retail.v2beta.SearchRequest.visitor_id]
+       * or [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id].
+       * This is set only when
+       * [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.mode]
+       * is
+       * [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
+       * Possible values:
+       * * `purchased`: Indicates that this product has been purchased before.
+       * 
+ * + * repeated string personal_labels = 7; + * + * @return A list containing the personalLabels. + */ + public com.google.protobuf.ProtocolStringList getPersonalLabelsList() { + return personalLabels_.getUnmodifiableView(); + } + /** + * + * + *
+       * Specifies previous events related to this product for this user based on
+       * [UserEvent][google.cloud.retail.v2beta.UserEvent] with same
+       * [SearchRequest.visitor_id][google.cloud.retail.v2beta.SearchRequest.visitor_id]
+       * or [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id].
+       * This is set only when
+       * [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.mode]
+       * is
+       * [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
+       * Possible values:
+       * * `purchased`: Indicates that this product has been purchased before.
+       * 
+ * + * repeated string personal_labels = 7; + * + * @return The count of personalLabels. + */ + public int getPersonalLabelsCount() { + return personalLabels_.size(); + } + /** + * + * + *
+       * Specifies previous events related to this product for this user based on
+       * [UserEvent][google.cloud.retail.v2beta.UserEvent] with same
+       * [SearchRequest.visitor_id][google.cloud.retail.v2beta.SearchRequest.visitor_id]
+       * or [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id].
+       * This is set only when
+       * [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.mode]
+       * is
+       * [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
+       * Possible values:
+       * * `purchased`: Indicates that this product has been purchased before.
+       * 
+ * + * repeated string personal_labels = 7; + * + * @param index The index of the element to return. + * @return The personalLabels at the given index. + */ + public java.lang.String getPersonalLabels(int index) { + return personalLabels_.get(index); + } + /** + * + * + *
+       * Specifies previous events related to this product for this user based on
+       * [UserEvent][google.cloud.retail.v2beta.UserEvent] with same
+       * [SearchRequest.visitor_id][google.cloud.retail.v2beta.SearchRequest.visitor_id]
+       * or [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id].
+       * This is set only when
+       * [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.mode]
+       * is
+       * [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
+       * Possible values:
+       * * `purchased`: Indicates that this product has been purchased before.
+       * 
+ * + * repeated string personal_labels = 7; + * + * @param index The index of the value to return. + * @return The bytes of the personalLabels at the given index. + */ + public com.google.protobuf.ByteString getPersonalLabelsBytes(int index) { + return personalLabels_.getByteString(index); + } + /** + * + * + *
+       * Specifies previous events related to this product for this user based on
+       * [UserEvent][google.cloud.retail.v2beta.UserEvent] with same
+       * [SearchRequest.visitor_id][google.cloud.retail.v2beta.SearchRequest.visitor_id]
+       * or [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id].
+       * This is set only when
+       * [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.mode]
+       * is
+       * [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
+       * Possible values:
+       * * `purchased`: Indicates that this product has been purchased before.
+       * 
+ * + * repeated string personal_labels = 7; + * + * @param index The index to set the value at. + * @param value The personalLabels to set. + * @return This builder for chaining. + */ + public Builder setPersonalLabels(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePersonalLabelsIsMutable(); + personalLabels_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Specifies previous events related to this product for this user based on
+       * [UserEvent][google.cloud.retail.v2beta.UserEvent] with same
+       * [SearchRequest.visitor_id][google.cloud.retail.v2beta.SearchRequest.visitor_id]
+       * or [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id].
+       * This is set only when
+       * [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.mode]
+       * is
+       * [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
+       * Possible values:
+       * * `purchased`: Indicates that this product has been purchased before.
+       * 
+ * + * repeated string personal_labels = 7; + * + * @param value The personalLabels to add. + * @return This builder for chaining. + */ + public Builder addPersonalLabels(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePersonalLabelsIsMutable(); + personalLabels_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Specifies previous events related to this product for this user based on
+       * [UserEvent][google.cloud.retail.v2beta.UserEvent] with same
+       * [SearchRequest.visitor_id][google.cloud.retail.v2beta.SearchRequest.visitor_id]
+       * or [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id].
+       * This is set only when
+       * [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.mode]
+       * is
+       * [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
+       * Possible values:
+       * * `purchased`: Indicates that this product has been purchased before.
+       * 
+ * + * repeated string personal_labels = 7; + * + * @param values The personalLabels to add. + * @return This builder for chaining. + */ + public Builder addAllPersonalLabels(java.lang.Iterable values) { + ensurePersonalLabelsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, personalLabels_); + onChanged(); + return this; + } + /** + * + * + *
+       * Specifies previous events related to this product for this user based on
+       * [UserEvent][google.cloud.retail.v2beta.UserEvent] with same
+       * [SearchRequest.visitor_id][google.cloud.retail.v2beta.SearchRequest.visitor_id]
+       * or [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id].
+       * This is set only when
+       * [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.mode]
+       * is
+       * [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
+       * Possible values:
+       * * `purchased`: Indicates that this product has been purchased before.
+       * 
+ * + * repeated string personal_labels = 7; + * + * @return This builder for chaining. + */ + public Builder clearPersonalLabels() { + personalLabels_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * Specifies previous events related to this product for this user based on
+       * [UserEvent][google.cloud.retail.v2beta.UserEvent] with same
+       * [SearchRequest.visitor_id][google.cloud.retail.v2beta.SearchRequest.visitor_id]
+       * or [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id].
+       * This is set only when
+       * [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.mode]
+       * is
+       * [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
+       * Possible values:
+       * * `purchased`: Indicates that this product has been purchased before.
+       * 
+ * + * repeated string personal_labels = 7; + * + * @param value The bytes of the personalLabels to add. + * @return This builder for chaining. + */ + public Builder addPersonalLabelsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensurePersonalLabelsIsMutable(); + personalLabels_.add(value); + onChanged(); + return this; + } + @java.lang.Override public final Builder setUnknownFields( final com.google.protobuf.UnknownFieldSet unknownFields) { @@ -2864,7 +3126,19 @@ public SearchResult parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchResult(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -3008,82 +3282,13 @@ private Facet() { @java.lang.Override @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new Facet(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private Facet( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Facet(); + } - key_ = s; - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - values_ = - new java.util.ArrayList< - com.google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue>(); - mutable_bitField0_ |= 0x00000001; - } - values_.add( - input.readMessage( - com.google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.parser(), - extensionRegistry)); - break; - } - case 24: - { - dynamicFacet_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - values_ = java.util.Collections.unmodifiableList(values_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { @@ -3260,85 +3465,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private FacetValue( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - java.lang.String s = input.readStringRequireUtf8(); - facetValueCase_ = 1; - facetValue_ = s; - break; - } - case 18: - { - com.google.cloud.retail.v2beta.Interval.Builder subBuilder = null; - if (facetValueCase_ == 2) { - subBuilder = - ((com.google.cloud.retail.v2beta.Interval) facetValue_).toBuilder(); - } - facetValue_ = - input.readMessage( - com.google.cloud.retail.v2beta.Interval.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.cloud.retail.v2beta.Interval) facetValue_); - facetValue_ = subBuilder.buildPartial(); - } - facetValueCase_ = 2; - break; - } - case 24: - { - count_ = input.readInt64(); - break; - } - case 41: - { - minValue_ = input.readDouble(); - break; - } - case 49: - { - maxValue_ = input.readDouble(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.SearchServiceProto .internal_static_google_cloud_retail_v2beta_SearchResponse_Facet_FacetValue_descriptor; @@ -3613,7 +3739,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (java.lang.Double.doubleToRawLongBits(maxValue_) != 0) { output.writeDouble(6, maxValue_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -3639,7 +3765,7 @@ public int getSerializedSize() { if (java.lang.Double.doubleToRawLongBits(maxValue_) != 0) { size += com.google.protobuf.CodedOutputStream.computeDoubleSize(6, maxValue_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -3671,7 +3797,7 @@ public boolean equals(final java.lang.Object obj) { case 0: default: } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -3706,7 +3832,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -3841,22 +3967,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override public Builder clear() { super.clear(); + if (intervalBuilder_ != null) { + intervalBuilder_.clear(); + } count_ = 0L; minValue_ = 0D; @@ -3990,7 +4112,7 @@ public Builder mergeFrom( break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -4005,19 +4127,62 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + facetValueCase_ = 1; + facetValue_ = s; + break; + } // case 10 + case 18: + { + input.readMessage(getIntervalFieldBuilder().getBuilder(), extensionRegistry); + facetValueCase_ = 2; + break; + } // case 18 + case 24: + { + count_ = input.readInt64(); + + break; + } // case 24 + case 41: + { + minValue_ = input.readDouble(); + + break; + } // case 41 + case 49: + { + maxValue_ = input.readDouble(); + + break; + } // case 49 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = - (com.google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -4594,7 +4759,19 @@ public FacetValue parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new FacetValue(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -4778,7 +4955,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (dynamicFacet_ != false) { output.writeBool(3, dynamicFacet_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -4796,7 +4973,7 @@ public int getSerializedSize() { if (dynamicFacet_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, dynamicFacet_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -4815,7 +4992,7 @@ public boolean equals(final java.lang.Object obj) { if (!getKey().equals(other.getKey())) return false; if (!getValuesList().equals(other.getValuesList())) return false; if (getDynamicFacet() != other.getDynamicFacet()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -4834,7 +5011,7 @@ public int hashCode() { } hash = (37 * hash) + DYNAMIC_FACET_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDynamicFacet()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -4966,19 +5143,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.SearchResponse.Facet.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getValuesFieldBuilder(); - } } @java.lang.Override @@ -4988,10 +5156,11 @@ public Builder clear() { if (valuesBuilder_ == null) { values_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + values_ = null; valuesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); dynamicFacet_ = false; return this; @@ -5119,7 +5288,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.SearchResponse.Facet oth if (other.getDynamicFacet() != false) { setDynamicFacet(other.getDynamicFacet()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -5134,18 +5303,57 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.SearchResponse.Facet parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + key_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + com.google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue m = + input.readMessage( + com.google.cloud.retail.v2beta.SearchResponse.Facet.FacetValue.parser(), + extensionRegistry); + if (valuesBuilder_ == null) { + ensureValuesIsMutable(); + values_.add(m); + } else { + valuesBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + dynamicFacet_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.SearchResponse.Facet) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -5735,7 +5943,19 @@ public Facet parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Facet(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -5821,55 +6041,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private QueryExpansionInfo( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 8: - { - expandedQuery_ = input.readBool(); - break; - } - case 16: - { - pinnedResultCount_ = input.readInt64(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.SearchServiceProto .internal_static_google_cloud_retail_v2beta_SearchResponse_QueryExpansionInfo_descriptor; @@ -5944,7 +6115,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (pinnedResultCount_ != 0L) { output.writeInt64(2, pinnedResultCount_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -5959,7 +6130,7 @@ public int getSerializedSize() { if (pinnedResultCount_ != 0L) { size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, pinnedResultCount_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -5977,7 +6148,7 @@ public boolean equals(final java.lang.Object obj) { if (getExpandedQuery() != other.getExpandedQuery()) return false; if (getPinnedResultCount() != other.getPinnedResultCount()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -5992,7 +6163,7 @@ public int hashCode() { hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExpandedQuery()); hash = (37 * hash) + PINNED_RESULT_COUNT_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPinnedResultCount()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -6127,17 +6298,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { // Construct using // com.google.cloud.retail.v2beta.SearchResponse.QueryExpansionInfo.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -6239,7 +6403,7 @@ public Builder mergeFrom( if (other.getPinnedResultCount() != 0L) { setPinnedResultCount(other.getPinnedResultCount()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -6254,19 +6418,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.SearchResponse.QueryExpansionInfo parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + expandedQuery_ = input.readBool(); + + break; + } // case 8 + case 16: + { + pinnedResultCount_ = input.readInt64(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.SearchResponse.QueryExpansionInfo) - e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -6418,7 +6606,19 @@ public QueryExpansionInfo parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new QueryExpansionInfo(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException() + .setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; @@ -7076,7 +7276,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < invalidConditionBoostSpecs_.size(); i++) { output.writeMessage(14, invalidConditionBoostSpecs_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -7122,7 +7322,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 14, invalidConditionBoostSpecs_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -7152,7 +7352,7 @@ public boolean equals(final java.lang.Object obj) { if (!getAppliedControlsList().equals(other.getAppliedControlsList())) return false; if (!getInvalidConditionBoostSpecsList().equals(other.getInvalidConditionBoostSpecsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -7193,7 +7393,7 @@ public int hashCode() { hash = (37 * hash) + INVALID_CONDITION_BOOST_SPECS_FIELD_NUMBER; hash = (53 * hash) + getInvalidConditionBoostSpecsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -7324,21 +7524,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.SearchResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getResultsFieldBuilder(); - getFacetsFieldBuilder(); - getInvalidConditionBoostSpecsFieldBuilder(); - } } @java.lang.Override @@ -7346,16 +7535,18 @@ public Builder clear() { super.clear(); if (resultsBuilder_ == null) { results_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + results_ = null; resultsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (facetsBuilder_ == null) { facets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + facets_ = null; facetsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); totalSize_ = 0; correctedQuery_ = ""; @@ -7376,10 +7567,11 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000004); if (invalidConditionBoostSpecsBuilder_ == null) { invalidConditionBoostSpecs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); } else { + invalidConditionBoostSpecs_ = null; invalidConditionBoostSpecsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000008); return this; } @@ -7613,7 +7805,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.SearchResponse other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -7628,17 +7820,118 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.SearchResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.retail.v2beta.SearchResponse.SearchResult m = + input.readMessage( + com.google.cloud.retail.v2beta.SearchResponse.SearchResult.parser(), + extensionRegistry); + if (resultsBuilder_ == null) { + ensureResultsIsMutable(); + results_.add(m); + } else { + resultsBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.cloud.retail.v2beta.SearchResponse.Facet m = + input.readMessage( + com.google.cloud.retail.v2beta.SearchResponse.Facet.parser(), + extensionRegistry); + if (facetsBuilder_ == null) { + ensureFacetsIsMutable(); + facets_.add(m); + } else { + facetsBuilder_.addMessage(m); + } + break; + } // case 18 + case 24: + { + totalSize_ = input.readInt32(); + + break; + } // case 24 + case 34: + { + correctedQuery_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + attributionToken_ = input.readStringRequireUtf8(); + + break; + } // case 42 + case 50: + { + nextPageToken_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + input.readMessage( + getQueryExpansionInfoFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 82: + { + redirectUri_ = input.readStringRequireUtf8(); + + break; + } // case 82 + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureAppliedControlsIsMutable(); + appliedControls_.add(s); + break; + } // case 98 + case 114: + { + com.google.cloud.retail.v2beta.SearchRequest.BoostSpec.ConditionBoostSpec m = + input.readMessage( + com.google.cloud.retail.v2beta.SearchRequest.BoostSpec.ConditionBoostSpec + .parser(), + extensionRegistry); + if (invalidConditionBoostSpecsBuilder_ == null) { + ensureInvalidConditionBoostSpecsIsMutable(); + invalidConditionBoostSpecs_.add(m); + } else { + invalidConditionBoostSpecsBuilder_.addMessage(m); + } + 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) { - parsedMessage = (com.google.cloud.retail.v2beta.SearchResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -9770,7 +10063,18 @@ public SearchResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SearchResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchServiceProto.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchServiceProto.java index 5b9547a4..471788fc 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchServiceProto.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchServiceProto.java @@ -176,7 +176,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "\t:\0028\001\"[\n\nSearchMode\022\033\n\027SEARCH_MODE_UNSPE" + "CIFIED\020\000\022\027\n\023PRODUCT_SEARCH_ONLY\020\001\022\027\n\023FAC" + "ETED_SEARCH_ONLY\020\002B\030\n\026_spell_correction_" - + "spec\"\344\n\n\016SearchResponse\022H\n\007results\030\001 \003(\013" + + "spec\"\375\n\n\016SearchResponse\022H\n\007results\030\001 \003(\013" + "27.google.cloud.retail.v2beta.SearchResp" + "onse.SearchResult\022@\n\006facets\030\002 \003(\01320.goog" + "le.cloud.retail.v2beta.SearchResponse.Fa" @@ -188,7 +188,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "irect_uri\030\n \001(\t\022\030\n\020applied_controls\030\014 \003(" + "\t\022m\n\035invalid_condition_boost_specs\030\016 \003(\013" + "2F.google.cloud.retail.v2beta.SearchRequ" - + "est.BoostSpec.ConditionBoostSpec\032\204\004\n\014Sea" + + "est.BoostSpec.ConditionBoostSpec\032\235\004\n\014Sea" + "rchResult\022\n\n\002id\030\001 \001(\t\0224\n\007product\030\002 \001(\0132#" + ".google.cloud.retail.v2beta.Product\022\036\n\026m" + "atching_variant_count\030\003 \001(\005\022s\n\027matching_" @@ -197,35 +197,36 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "tchingVariantFieldsEntry\022o\n\025variant_roll" + "up_values\030\005 \003(\0132P.google.cloud.retail.v2" + "beta.SearchResponse.SearchResult.Variant" - + "RollupValuesEntry\032X\n\032MatchingVariantFiel" - + "dsEntry\022\013\n\003key\030\001 \001(\t\022)\n\005value\030\002 \001(\0132\032.go" - + "ogle.protobuf.FieldMask:\0028\001\032R\n\030VariantRo" - + "llupValuesEntry\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 " - + "\001(\0132\026.google.protobuf.Value:\0028\001\032\226\002\n\005Face" - + "t\022\013\n\003key\030\001 \001(\t\022K\n\006values\030\002 \003(\0132;.google." - + "cloud.retail.v2beta.SearchResponse.Facet" - + ".FacetValue\022\025\n\rdynamic_facet\030\003 \001(\010\032\233\001\n\nF" - + "acetValue\022\017\n\005value\030\001 \001(\tH\000\0228\n\010interval\030\002" - + " \001(\0132$.google.cloud.retail.v2beta.Interv" - + "alH\000\022\r\n\005count\030\003 \001(\003\022\021\n\tmin_value\030\005 \001(\001\022\021" - + "\n\tmax_value\030\006 \001(\001B\r\n\013facet_value\032I\n\022Quer" - + "yExpansionInfo\022\026\n\016expanded_query\030\001 \001(\010\022\033" - + "\n\023pinned_result_count\030\002 \001(\0032\350\002\n\rSearchSe" - + "rvice\022\213\002\n\006Search\022).google.cloud.retail.v" - + "2beta.SearchRequest\032*.google.cloud.retai" - + "l.v2beta.SearchResponse\"\251\001\202\323\344\223\002\242\001\"I/v2be" - + "ta/{placement=projects/*/locations/*/cat" - + "alogs/*/placements/*}:search:\001*ZR\"M/v2be" - + "ta/{placement=projects/*/locations/*/cat" - + "alogs/*/servingConfigs/*}:search:\001*\032I\312A\025" - + "retail.googleapis.com\322A.https://www.goog" - + "leapis.com/auth/cloud-platformB\333\001\n\036com.g" - + "oogle.cloud.retail.v2betaB\022SearchService" - + "ProtoP\001Z@google.golang.org/genproto/goog" - + "leapis/cloud/retail/v2beta;retail\242\002\006RETA" - + "IL\252\002\032Google.Cloud.Retail.V2Beta\312\002\032Google" - + "\\Cloud\\Retail\\V2beta\352\002\035Google::Cloud::Re" - + "tail::V2betab\006proto3" + + "RollupValuesEntry\022\027\n\017personal_labels\030\007 \003" + + "(\t\032X\n\032MatchingVariantFieldsEntry\022\013\n\003key\030" + + "\001 \001(\t\022)\n\005value\030\002 \001(\0132\032.google.protobuf.F" + + "ieldMask:\0028\001\032R\n\030VariantRollupValuesEntry" + + "\022\013\n\003key\030\001 \001(\t\022%\n\005value\030\002 \001(\0132\026.google.pr" + + "otobuf.Value:\0028\001\032\226\002\n\005Facet\022\013\n\003key\030\001 \001(\t\022" + + "K\n\006values\030\002 \003(\0132;.google.cloud.retail.v2" + + "beta.SearchResponse.Facet.FacetValue\022\025\n\r" + + "dynamic_facet\030\003 \001(\010\032\233\001\n\nFacetValue\022\017\n\005va" + + "lue\030\001 \001(\tH\000\0228\n\010interval\030\002 \001(\0132$.google.c" + + "loud.retail.v2beta.IntervalH\000\022\r\n\005count\030\003" + + " \001(\003\022\021\n\tmin_value\030\005 \001(\001\022\021\n\tmax_value\030\006 \001" + + "(\001B\r\n\013facet_value\032I\n\022QueryExpansionInfo\022" + + "\026\n\016expanded_query\030\001 \001(\010\022\033\n\023pinned_result" + + "_count\030\002 \001(\0032\350\002\n\rSearchService\022\213\002\n\006Searc" + + "h\022).google.cloud.retail.v2beta.SearchReq" + + "uest\032*.google.cloud.retail.v2beta.Search" + + "Response\"\251\001\202\323\344\223\002\242\001\"I/v2beta/{placement=p" + + "rojects/*/locations/*/catalogs/*/placeme" + + "nts/*}:search:\001*ZR\"M/v2beta/{placement=p" + + "rojects/*/locations/*/catalogs/*/serving" + + "Configs/*}:search:\001*\032I\312A\025retail.googleap" + + "is.com\322A.https://www.googleapis.com/auth" + + "/cloud-platformB\333\001\n\036com.google.cloud.ret" + + "ail.v2betaB\022SearchServiceProtoP\001Z@google" + + ".golang.org/genproto/googleapis/cloud/re" + + "tail/v2beta;retail\242\002\006RETAIL\252\002\032Google.Clo" + + "ud.Retail.V2Beta\312\002\032Google\\Cloud\\Retail\\V" + + "2beta\352\002\035Google::Cloud::Retail::V2betab\006p" + + "roto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -383,6 +384,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "MatchingVariantCount", "MatchingVariantFields", "VariantRollupValues", + "PersonalLabels", }); internal_static_google_cloud_retail_v2beta_SearchResponse_SearchResult_MatchingVariantFieldsEntry_descriptor = internal_static_google_cloud_retail_v2beta_SearchResponse_SearchResult_descriptor diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchSolutionUseCase.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchSolutionUseCase.java index 240a6fb8..c4196b1f 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchSolutionUseCase.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SearchSolutionUseCase.java @@ -33,7 +33,7 @@ public enum SearchSolutionUseCase implements com.google.protobuf.ProtocolMessage * *
    * The value when it's unspecified. In this case, server behavior defaults to
-   * [SEARCH_SOLUTION_USE_CASE_SEARCH][].
+   * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH].
    * 
* * SEARCH_SOLUTION_USE_CASE_UNSPECIFIED = 0; @@ -69,7 +69,7 @@ public enum SearchSolutionUseCase implements com.google.protobuf.ProtocolMessage * *
    * The value when it's unspecified. In this case, server behavior defaults to
-   * [SEARCH_SOLUTION_USE_CASE_SEARCH][].
+   * [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH].
    * 
* * SEARCH_SOLUTION_USE_CASE_UNSPECIFIED = 0; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfig.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfig.java index a60a2edf..79863a24 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfig.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfig.java @@ -24,8 +24,6 @@ *
  * Configures metadata that is used to generate serving time results (e.g.
  * search results or recommendation predictions).
- * The ServingConfig is passed in the search and predict request and together
- * with the Catalog.default_branch, generates results.
  * 
* * Protobuf type {@code google.cloud.retail.v2beta.ServingConfig} @@ -55,6 +53,7 @@ private ServingConfig() { replacementControlIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; ignoreControlIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; diversityLevel_ = ""; + diversityType_ = 0; enableCategoryFilterLevel_ = ""; solutionTypes_ = java.util.Collections.emptyList(); } @@ -70,251 +69,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ServingConfig( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - name_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - modelId_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - priceRerankingLevel_ = s; - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - facetControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - facetControlIds_.add(s); - break; - } - case 50: - { - com.google.cloud.retail.v2beta.SearchRequest.DynamicFacetSpec.Builder subBuilder = - null; - if (dynamicFacetSpec_ != null) { - subBuilder = dynamicFacetSpec_.toBuilder(); - } - dynamicFacetSpec_ = - input.readMessage( - com.google.cloud.retail.v2beta.SearchRequest.DynamicFacetSpec.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(dynamicFacetSpec_); - dynamicFacetSpec_ = subBuilder.buildPartial(); - } - - break; - } - case 58: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - boostControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - boostControlIds_.add(s); - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - diversityLevel_ = s; - break; - } - case 74: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - filterControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - filterControlIds_.add(s); - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - redirectControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - redirectControlIds_.add(s); - break; - } - case 98: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000020) != 0)) { - onewaySynonymsControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000020; - } - onewaySynonymsControlIds_.add(s); - break; - } - case 106: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000040) != 0)) { - doNotAssociateControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000040; - } - doNotAssociateControlIds_.add(s); - break; - } - case 114: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000080) != 0)) { - replacementControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000080; - } - replacementControlIds_.add(s); - break; - } - case 122: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000100) != 0)) { - ignoreControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000100; - } - ignoreControlIds_.add(s); - break; - } - case 130: - { - java.lang.String s = input.readStringRequireUtf8(); - - enableCategoryFilterLevel_ = s; - break; - } - case 146: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000010) != 0)) { - twowaySynonymsControlIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000010; - } - twowaySynonymsControlIds_.add(s); - break; - } - case 152: - { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000200) != 0)) { - solutionTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; - } - solutionTypes_.add(rawValue); - break; - } - case 154: - { - int length = input.readRawVarint32(); - int oldLimit = input.pushLimit(length); - while (input.getBytesUntilLimit() > 0) { - int rawValue = input.readEnum(); - if (!((mutable_bitField0_ & 0x00000200) != 0)) { - solutionTypes_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000200; - } - solutionTypes_.add(rawValue); - } - input.popLimit(oldLimit); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - facetControlIds_ = facetControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - boostControlIds_ = boostControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - filterControlIds_ = filterControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - redirectControlIds_ = redirectControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000020) != 0)) { - onewaySynonymsControlIds_ = onewaySynonymsControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000040) != 0)) { - doNotAssociateControlIds_ = doNotAssociateControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000080) != 0)) { - replacementControlIds_ = replacementControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000100) != 0)) { - ignoreControlIds_ = ignoreControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000010) != 0)) { - twowaySynonymsControlIds_ = twowaySynonymsControlIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000200) != 0)) { - solutionTypes_ = java.util.Collections.unmodifiableList(solutionTypes_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ServingConfigProto .internal_static_google_cloud_retail_v2beta_ServingConfig_descriptor; @@ -330,6 +84,164 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.cloud.retail.v2beta.ServingConfig.Builder.class); } + /** + * + * + *
+   * What type of diversity - data or rule based.
+   * If none is specified, default to rule based.
+   * 
+ * + * Protobuf enum {@code google.cloud.retail.v2beta.ServingConfig.DiversityType} + */ + public enum DiversityType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value.
+     * 
+ * + * DIVERSITY_TYPE_UNSPECIFIED = 0; + */ + DIVERSITY_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Rule based diversity.
+     * 
+ * + * RULE_BASED_DIVERSITY = 2; + */ + RULE_BASED_DIVERSITY(2), + /** + * + * + *
+     * Data driven diversity.
+     * 
+ * + * DATA_DRIVEN_DIVERSITY = 3; + */ + DATA_DRIVEN_DIVERSITY(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value.
+     * 
+ * + * DIVERSITY_TYPE_UNSPECIFIED = 0; + */ + public static final int DIVERSITY_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Rule based diversity.
+     * 
+ * + * RULE_BASED_DIVERSITY = 2; + */ + public static final int RULE_BASED_DIVERSITY_VALUE = 2; + /** + * + * + *
+     * Data driven diversity.
+     * 
+ * + * DATA_DRIVEN_DIVERSITY = 3; + */ + public static final int DATA_DRIVEN_DIVERSITY_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 DiversityType 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 DiversityType forNumber(int value) { + switch (value) { + case 0: + return DIVERSITY_TYPE_UNSPECIFIED; + case 2: + return RULE_BASED_DIVERSITY; + case 3: + return DATA_DRIVEN_DIVERSITY; + 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 DiversityType findValueByNumber(int number) { + return DiversityType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ServingConfig.getDescriptor().getEnumTypes().get(0); + } + + private static final DiversityType[] VALUES = values(); + + public static DiversityType 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 DiversityType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.retail.v2beta.ServingConfig.DiversityType) + } + public static final int NAME_FIELD_NUMBER = 1; private volatile java.lang.Object name_; /** @@ -442,7 +354,8 @@ public com.google.protobuf.ByteString getDisplayNameBytes() { * * *
-   * The id of the model to use at serving time.
+   * The id of the model in the same
+   * [Catalog][google.cloud.retail.v2beta.Catalog] to use at serving time.
    * Currently only RecommendationModels are supported:
    * https://cloud.google.com/retail/recommendations-ai/docs/create-models
    * Can be changed but only to a compatible model (e.g.
@@ -473,7 +386,8 @@ public java.lang.String getModelId() {
    *
    *
    * 
-   * The id of the model to use at serving time.
+   * The id of the model in the same
+   * [Catalog][google.cloud.retail.v2beta.Catalog] to use at serving time.
    * Currently only RecommendationModels are supported:
    * https://cloud.google.com/retail/recommendations-ai/docs/create-models
    * Can be changed but only to a compatible model (e.g.
@@ -513,12 +427,12 @@ public com.google.protobuf.ByteString getModelIdBytes() {
    * highest-priced items first. This setting could result in a decrease in
    * click-through and conversion rates.
    *  Allowed values are:
-   * * 'no-price-reranking'
-   * * 'low-price-raranking'
-   * * 'medium-price-reranking'
-   * * 'high-price-reranking'
+   * * `no-price-reranking`
+   * * `low-price-raranking`
+   * * `medium-price-reranking`
+   * * `high-price-reranking`
    * If not specified, we choose default based on model type. Default value:
-   * 'no-price-reranking'.
+   * `no-price-reranking`.
    * Can only be set if
    * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
    * is
@@ -551,12 +465,12 @@ public java.lang.String getPriceRerankingLevel() {
    * highest-priced items first. This setting could result in a decrease in
    * click-through and conversion rates.
    *  Allowed values are:
-   * * 'no-price-reranking'
-   * * 'low-price-raranking'
-   * * 'medium-price-reranking'
-   * * 'high-price-reranking'
+   * * `no-price-reranking`
+   * * `low-price-raranking`
+   * * `medium-price-reranking`
+   * * `high-price-reranking`
    * If not specified, we choose default based on model type. Default value:
-   * 'no-price-reranking'.
+   * `no-price-reranking`.
    * Can only be set if
    * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
    * is
@@ -1496,14 +1410,14 @@ public com.google.protobuf.ByteString getIgnoreControlIdsBytes(int index) {
    *
    * 
    * How much diversity to use in recommendation model results e.g.
-   * 'medium-diversity' or 'high-diversity'. Currently supported values:
-   * * 'no-diversity'
-   * * 'low-diversity'
-   * * 'medium-diversity'
-   * * 'high-diversity'
-   * * 'auto-diversity'
+   * `medium-diversity` or `high-diversity`. Currently supported values:
+   * * `no-diversity`
+   * * `low-diversity`
+   * * `medium-diversity`
+   * * `high-diversity`
+   * * `auto-diversity`
    * If not specified, we choose default based on recommendation model
-   * type. Default value: 'no-diversity'.
+   * type. Default value: `no-diversity`.
    * Can only be set if
    * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
    * is
@@ -1531,14 +1445,14 @@ public java.lang.String getDiversityLevel() {
    *
    * 
    * How much diversity to use in recommendation model results e.g.
-   * 'medium-diversity' or 'high-diversity'. Currently supported values:
-   * * 'no-diversity'
-   * * 'low-diversity'
-   * * 'medium-diversity'
-   * * 'high-diversity'
-   * * 'auto-diversity'
+   * `medium-diversity` or `high-diversity`. Currently supported values:
+   * * `no-diversity`
+   * * `low-diversity`
+   * * `medium-diversity`
+   * * `high-diversity`
+   * * `auto-diversity`
    * If not specified, we choose default based on recommendation model
-   * type. Default value: 'no-diversity'.
+   * type. Default value: `no-diversity`.
    * Can only be set if
    * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
    * is
@@ -1562,18 +1476,56 @@ public com.google.protobuf.ByteString getDiversityLevelBytes() {
     }
   }
 
+  public static final int DIVERSITY_TYPE_FIELD_NUMBER = 20;
+  private int diversityType_;
+  /**
+   *
+   *
+   * 
+   * What kind of diversity to use - data driven or rule based.
+   * 
+ * + * .google.cloud.retail.v2beta.ServingConfig.DiversityType diversity_type = 20; + * + * @return The enum numeric value on the wire for diversityType. + */ + @java.lang.Override + public int getDiversityTypeValue() { + return diversityType_; + } + /** + * + * + *
+   * What kind of diversity to use - data driven or rule based.
+   * 
+ * + * .google.cloud.retail.v2beta.ServingConfig.DiversityType diversity_type = 20; + * + * @return The diversityType. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.ServingConfig.DiversityType getDiversityType() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2beta.ServingConfig.DiversityType result = + com.google.cloud.retail.v2beta.ServingConfig.DiversityType.valueOf(diversityType_); + return result == null + ? com.google.cloud.retail.v2beta.ServingConfig.DiversityType.UNRECOGNIZED + : result; + } + public static final int ENABLE_CATEGORY_FILTER_LEVEL_FIELD_NUMBER = 16; private volatile java.lang.Object enableCategoryFilterLevel_; /** * * *
-   * Whether to add additional category filters on the 'similar-items' model.
+   * Whether to add additional category filters on the `similar-items` model.
    * If not specified, we enable it by default.
    *  Allowed values are:
-   * * 'no-category-match': No additional filtering of original results from
+   * * `no-category-match`: No additional filtering of original results from
    *   the model and the customer's filters.
-   * * 'relaxed-category-match': Only keep results with categories that match
+   * * `relaxed-category-match`: Only keep results with categories that match
    *   at least one item categories in the PredictRequests's context item.
    *   * If customer also sends filters in the PredictRequest, then the results
    *   will satisfy both conditions (user given and category match).
@@ -1603,12 +1555,12 @@ public java.lang.String getEnableCategoryFilterLevel() {
    *
    *
    * 
-   * Whether to add additional category filters on the 'similar-items' model.
+   * Whether to add additional category filters on the `similar-items` model.
    * If not specified, we enable it by default.
    *  Allowed values are:
-   * * 'no-category-match': No additional filtering of original results from
+   * * `no-category-match`: No additional filtering of original results from
    *   the model and the customer's filters.
-   * * 'relaxed-category-match': Only keep results with categories that match
+   * * `relaxed-category-match`: Only keep results with categories that match
    *   at least one item categories in the PredictRequests's context item.
    *   * If customer also sends filters in the PredictRequest, then the results
    *   will satisfy both conditions (user given and category match).
@@ -1635,6 +1587,94 @@ public com.google.protobuf.ByteString getEnableCategoryFilterLevelBytes() {
     }
   }
 
+  public static final int PERSONALIZATION_SPEC_FIELD_NUMBER = 21;
+  private com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalizationSpec_;
+  /**
+   *
+   *
+   * 
+   * The specification for personalization spec.
+   * Can only be set if
+   * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
+   * is
+   * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
+   * Notice that if both
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+   * and
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * are set.
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * will override
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
+   * 
+ * + * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 21; + * + * + * @return Whether the personalizationSpec field is set. + */ + @java.lang.Override + public boolean hasPersonalizationSpec() { + return personalizationSpec_ != null; + } + /** + * + * + *
+   * The specification for personalization spec.
+   * Can only be set if
+   * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
+   * is
+   * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
+   * Notice that if both
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+   * and
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * are set.
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * will override
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
+   * 
+ * + * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 21; + * + * + * @return The personalizationSpec. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec getPersonalizationSpec() { + return personalizationSpec_ == null + ? com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.getDefaultInstance() + : personalizationSpec_; + } + /** + * + * + *
+   * The specification for personalization spec.
+   * Can only be set if
+   * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
+   * is
+   * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
+   * Notice that if both
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+   * and
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * are set.
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * will override
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
+   * 
+ * + * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 21; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpecOrBuilder + getPersonalizationSpecOrBuilder() { + return getPersonalizationSpec(); + } + public static final int SOLUTION_TYPES_FIELD_NUMBER = 19; private java.util.List solutionTypes_; private static final com.google.protobuf.Internal.ListAdapter.Converter< @@ -1822,7 +1862,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < solutionTypes_.size(); i++) { output.writeEnumNoTag(solutionTypes_.get(i)); } - unknownFields.writeTo(output); + if (diversityType_ + != com.google.cloud.retail.v2beta.ServingConfig.DiversityType.DIVERSITY_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(20, diversityType_); + } + if (personalizationSpec_ != null) { + output.writeMessage(21, getPersonalizationSpec()); + } + getUnknownFields().writeTo(output); } @java.lang.Override @@ -1938,7 +1986,16 @@ public int getSerializedSize() { } solutionTypesMemoizedSerializedSize = dataSize; } - size += unknownFields.getSerializedSize(); + if (diversityType_ + != com.google.cloud.retail.v2beta.ServingConfig.DiversityType.DIVERSITY_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(20, diversityType_); + } + if (personalizationSpec_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(21, getPersonalizationSpec()); + } + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1975,9 +2032,14 @@ public boolean equals(final java.lang.Object obj) { if (!getReplacementControlIdsList().equals(other.getReplacementControlIdsList())) return false; if (!getIgnoreControlIdsList().equals(other.getIgnoreControlIdsList())) return false; if (!getDiversityLevel().equals(other.getDiversityLevel())) return false; + if (diversityType_ != other.diversityType_) return false; if (!getEnableCategoryFilterLevel().equals(other.getEnableCategoryFilterLevel())) return false; + if (hasPersonalizationSpec() != other.hasPersonalizationSpec()) return false; + if (hasPersonalizationSpec()) { + if (!getPersonalizationSpec().equals(other.getPersonalizationSpec())) return false; + } if (!solutionTypes_.equals(other.solutionTypes_)) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -2038,13 +2100,19 @@ public int hashCode() { } hash = (37 * hash) + DIVERSITY_LEVEL_FIELD_NUMBER; hash = (53 * hash) + getDiversityLevel().hashCode(); + hash = (37 * hash) + DIVERSITY_TYPE_FIELD_NUMBER; + hash = (53 * hash) + diversityType_; hash = (37 * hash) + ENABLE_CATEGORY_FILTER_LEVEL_FIELD_NUMBER; hash = (53 * hash) + getEnableCategoryFilterLevel().hashCode(); + if (hasPersonalizationSpec()) { + hash = (37 * hash) + PERSONALIZATION_SPEC_FIELD_NUMBER; + hash = (53 * hash) + getPersonalizationSpec().hashCode(); + } if (getSolutionTypesCount() > 0) { hash = (37 * hash) + SOLUTION_TYPES_FIELD_NUMBER; hash = (53 * hash) + solutionTypes_.hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -2150,8 +2218,6 @@ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.Build *
    * Configures metadata that is used to generate serving time results (e.g.
    * search results or recommendation predictions).
-   * The ServingConfig is passed in the search and predict request and together
-   * with the Catalog.default_branch, generates results.
    * 
* * Protobuf type {@code google.cloud.retail.v2beta.ServingConfig} @@ -2176,17 +2242,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.ServingConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -2226,8 +2285,16 @@ public Builder clear() { bitField0_ = (bitField0_ & ~0x00000100); diversityLevel_ = ""; + diversityType_ = 0; + enableCategoryFilterLevel_ = ""; + if (personalizationSpecBuilder_ == null) { + personalizationSpec_ = null; + } else { + personalizationSpec_ = null; + personalizationSpecBuilder_ = null; + } solutionTypes_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000200); return this; @@ -2313,7 +2380,13 @@ public com.google.cloud.retail.v2beta.ServingConfig buildPartial() { } result.ignoreControlIds_ = ignoreControlIds_; result.diversityLevel_ = diversityLevel_; + result.diversityType_ = diversityType_; result.enableCategoryFilterLevel_ = enableCategoryFilterLevel_; + if (personalizationSpecBuilder_ == null) { + result.personalizationSpec_ = personalizationSpec_; + } else { + result.personalizationSpec_ = personalizationSpecBuilder_.build(); + } if (((bitField0_ & 0x00000200) != 0)) { solutionTypes_ = java.util.Collections.unmodifiableList(solutionTypes_); bitField0_ = (bitField0_ & ~0x00000200); @@ -2481,10 +2554,16 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ServingConfig other) { diversityLevel_ = other.diversityLevel_; onChanged(); } + if (other.diversityType_ != 0) { + setDiversityTypeValue(other.getDiversityTypeValue()); + } if (!other.getEnableCategoryFilterLevel().isEmpty()) { enableCategoryFilterLevel_ = other.enableCategoryFilterLevel_; onChanged(); } + if (other.hasPersonalizationSpec()) { + mergePersonalizationSpec(other.getPersonalizationSpec()); + } if (!other.solutionTypes_.isEmpty()) { if (solutionTypes_.isEmpty()) { solutionTypes_ = other.solutionTypes_; @@ -2495,7 +2574,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.ServingConfig other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -2510,17 +2589,169 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.ServingConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + name_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + modelId_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + priceRerankingLevel_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFacetControlIdsIsMutable(); + facetControlIds_.add(s); + break; + } // case 42 + case 50: + { + input.readMessage( + getDynamicFacetSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 50 + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureBoostControlIdsIsMutable(); + boostControlIds_.add(s); + break; + } // case 58 + case 66: + { + diversityLevel_ = input.readStringRequireUtf8(); + + break; + } // case 66 + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureFilterControlIdsIsMutable(); + filterControlIds_.add(s); + break; + } // case 74 + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureRedirectControlIdsIsMutable(); + redirectControlIds_.add(s); + break; + } // case 82 + case 98: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureOnewaySynonymsControlIdsIsMutable(); + onewaySynonymsControlIds_.add(s); + break; + } // case 98 + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDoNotAssociateControlIdsIsMutable(); + doNotAssociateControlIds_.add(s); + break; + } // case 106 + case 114: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureReplacementControlIdsIsMutable(); + replacementControlIds_.add(s); + break; + } // case 114 + case 122: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureIgnoreControlIdsIsMutable(); + ignoreControlIds_.add(s); + break; + } // case 122 + case 130: + { + enableCategoryFilterLevel_ = input.readStringRequireUtf8(); + + break; + } // case 130 + case 146: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureTwowaySynonymsControlIdsIsMutable(); + twowaySynonymsControlIds_.add(s); + break; + } // case 146 + case 152: + { + int tmpRaw = input.readEnum(); + ensureSolutionTypesIsMutable(); + solutionTypes_.add(tmpRaw); + break; + } // case 152 + case 154: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int tmpRaw = input.readEnum(); + ensureSolutionTypesIsMutable(); + solutionTypes_.add(tmpRaw); + } + input.popLimit(oldLimit); + break; + } // case 154 + case 160: + { + diversityType_ = input.readEnum(); + + break; + } // case 160 + case 170: + { + input.readMessage( + getPersonalizationSpecFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 170 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.cloud.retail.v2beta.ServingConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2763,7 +2994,8 @@ public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { * * *
-     * The id of the model to use at serving time.
+     * The id of the model in the same
+     * [Catalog][google.cloud.retail.v2beta.Catalog] to use at serving time.
      * Currently only RecommendationModels are supported:
      * https://cloud.google.com/retail/recommendations-ai/docs/create-models
      * Can be changed but only to a compatible model (e.g.
@@ -2793,7 +3025,8 @@ public java.lang.String getModelId() {
      *
      *
      * 
-     * The id of the model to use at serving time.
+     * The id of the model in the same
+     * [Catalog][google.cloud.retail.v2beta.Catalog] to use at serving time.
      * Currently only RecommendationModels are supported:
      * https://cloud.google.com/retail/recommendations-ai/docs/create-models
      * Can be changed but only to a compatible model (e.g.
@@ -2823,7 +3056,8 @@ public com.google.protobuf.ByteString getModelIdBytes() {
      *
      *
      * 
-     * The id of the model to use at serving time.
+     * The id of the model in the same
+     * [Catalog][google.cloud.retail.v2beta.Catalog] to use at serving time.
      * Currently only RecommendationModels are supported:
      * https://cloud.google.com/retail/recommendations-ai/docs/create-models
      * Can be changed but only to a compatible model (e.g.
@@ -2852,7 +3086,8 @@ public Builder setModelId(java.lang.String value) {
      *
      *
      * 
-     * The id of the model to use at serving time.
+     * The id of the model in the same
+     * [Catalog][google.cloud.retail.v2beta.Catalog] to use at serving time.
      * Currently only RecommendationModels are supported:
      * https://cloud.google.com/retail/recommendations-ai/docs/create-models
      * Can be changed but only to a compatible model (e.g.
@@ -2877,7 +3112,8 @@ public Builder clearModelId() {
      *
      *
      * 
-     * The id of the model to use at serving time.
+     * The id of the model in the same
+     * [Catalog][google.cloud.retail.v2beta.Catalog] to use at serving time.
      * Currently only RecommendationModels are supported:
      * https://cloud.google.com/retail/recommendations-ai/docs/create-models
      * Can be changed but only to a compatible model (e.g.
@@ -2915,12 +3151,12 @@ public Builder setModelIdBytes(com.google.protobuf.ByteString value) {
      * highest-priced items first. This setting could result in a decrease in
      * click-through and conversion rates.
      *  Allowed values are:
-     * * 'no-price-reranking'
-     * * 'low-price-raranking'
-     * * 'medium-price-reranking'
-     * * 'high-price-reranking'
+     * * `no-price-reranking`
+     * * `low-price-raranking`
+     * * `medium-price-reranking`
+     * * `high-price-reranking`
      * If not specified, we choose default based on model type. Default value:
-     * 'no-price-reranking'.
+     * `no-price-reranking`.
      * Can only be set if
      * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
      * is
@@ -2952,12 +3188,12 @@ public java.lang.String getPriceRerankingLevel() {
      * highest-priced items first. This setting could result in a decrease in
      * click-through and conversion rates.
      *  Allowed values are:
-     * * 'no-price-reranking'
-     * * 'low-price-raranking'
-     * * 'medium-price-reranking'
-     * * 'high-price-reranking'
+     * * `no-price-reranking`
+     * * `low-price-raranking`
+     * * `medium-price-reranking`
+     * * `high-price-reranking`
      * If not specified, we choose default based on model type. Default value:
-     * 'no-price-reranking'.
+     * `no-price-reranking`.
      * Can only be set if
      * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
      * is
@@ -2989,12 +3225,12 @@ public com.google.protobuf.ByteString getPriceRerankingLevelBytes() {
      * highest-priced items first. This setting could result in a decrease in
      * click-through and conversion rates.
      *  Allowed values are:
-     * * 'no-price-reranking'
-     * * 'low-price-raranking'
-     * * 'medium-price-reranking'
-     * * 'high-price-reranking'
+     * * `no-price-reranking`
+     * * `low-price-raranking`
+     * * `medium-price-reranking`
+     * * `high-price-reranking`
      * If not specified, we choose default based on model type. Default value:
-     * 'no-price-reranking'.
+     * `no-price-reranking`.
      * Can only be set if
      * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
      * is
@@ -3025,12 +3261,12 @@ public Builder setPriceRerankingLevel(java.lang.String value) {
      * highest-priced items first. This setting could result in a decrease in
      * click-through and conversion rates.
      *  Allowed values are:
-     * * 'no-price-reranking'
-     * * 'low-price-raranking'
-     * * 'medium-price-reranking'
-     * * 'high-price-reranking'
+     * * `no-price-reranking`
+     * * `low-price-raranking`
+     * * `medium-price-reranking`
+     * * `high-price-reranking`
      * If not specified, we choose default based on model type. Default value:
-     * 'no-price-reranking'.
+     * `no-price-reranking`.
      * Can only be set if
      * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
      * is
@@ -3057,12 +3293,12 @@ public Builder clearPriceRerankingLevel() {
      * highest-priced items first. This setting could result in a decrease in
      * click-through and conversion rates.
      *  Allowed values are:
-     * * 'no-price-reranking'
-     * * 'low-price-raranking'
-     * * 'medium-price-reranking'
-     * * 'high-price-reranking'
+     * * `no-price-reranking`
+     * * `low-price-raranking`
+     * * `medium-price-reranking`
+     * * `high-price-reranking`
      * If not specified, we choose default based on model type. Default value:
-     * 'no-price-reranking'.
+     * `no-price-reranking`.
      * Can only be set if
      * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
      * is
@@ -5518,14 +5754,14 @@ public Builder addIgnoreControlIdsBytes(com.google.protobuf.ByteString value) {
      *
      * 
      * How much diversity to use in recommendation model results e.g.
-     * 'medium-diversity' or 'high-diversity'. Currently supported values:
-     * * 'no-diversity'
-     * * 'low-diversity'
-     * * 'medium-diversity'
-     * * 'high-diversity'
-     * * 'auto-diversity'
+     * `medium-diversity` or `high-diversity`. Currently supported values:
+     * * `no-diversity`
+     * * `low-diversity`
+     * * `medium-diversity`
+     * * `high-diversity`
+     * * `auto-diversity`
      * If not specified, we choose default based on recommendation model
-     * type. Default value: 'no-diversity'.
+     * type. Default value: `no-diversity`.
      * Can only be set if
      * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
      * is
@@ -5552,14 +5788,14 @@ public java.lang.String getDiversityLevel() {
      *
      * 
      * How much diversity to use in recommendation model results e.g.
-     * 'medium-diversity' or 'high-diversity'. Currently supported values:
-     * * 'no-diversity'
-     * * 'low-diversity'
-     * * 'medium-diversity'
-     * * 'high-diversity'
-     * * 'auto-diversity'
+     * `medium-diversity` or `high-diversity`. Currently supported values:
+     * * `no-diversity`
+     * * `low-diversity`
+     * * `medium-diversity`
+     * * `high-diversity`
+     * * `auto-diversity`
      * If not specified, we choose default based on recommendation model
-     * type. Default value: 'no-diversity'.
+     * type. Default value: `no-diversity`.
      * Can only be set if
      * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
      * is
@@ -5586,14 +5822,14 @@ public com.google.protobuf.ByteString getDiversityLevelBytes() {
      *
      * 
      * How much diversity to use in recommendation model results e.g.
-     * 'medium-diversity' or 'high-diversity'. Currently supported values:
-     * * 'no-diversity'
-     * * 'low-diversity'
-     * * 'medium-diversity'
-     * * 'high-diversity'
-     * * 'auto-diversity'
+     * `medium-diversity` or `high-diversity`. Currently supported values:
+     * * `no-diversity`
+     * * `low-diversity`
+     * * `medium-diversity`
+     * * `high-diversity`
+     * * `auto-diversity`
      * If not specified, we choose default based on recommendation model
-     * type. Default value: 'no-diversity'.
+     * type. Default value: `no-diversity`.
      * Can only be set if
      * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
      * is
@@ -5619,14 +5855,14 @@ public Builder setDiversityLevel(java.lang.String value) {
      *
      * 
      * How much diversity to use in recommendation model results e.g.
-     * 'medium-diversity' or 'high-diversity'. Currently supported values:
-     * * 'no-diversity'
-     * * 'low-diversity'
-     * * 'medium-diversity'
-     * * 'high-diversity'
-     * * 'auto-diversity'
+     * `medium-diversity` or `high-diversity`. Currently supported values:
+     * * `no-diversity`
+     * * `low-diversity`
+     * * `medium-diversity`
+     * * `high-diversity`
+     * * `auto-diversity`
      * If not specified, we choose default based on recommendation model
-     * type. Default value: 'no-diversity'.
+     * type. Default value: `no-diversity`.
      * Can only be set if
      * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
      * is
@@ -5648,14 +5884,14 @@ public Builder clearDiversityLevel() {
      *
      * 
      * How much diversity to use in recommendation model results e.g.
-     * 'medium-diversity' or 'high-diversity'. Currently supported values:
-     * * 'no-diversity'
-     * * 'low-diversity'
-     * * 'medium-diversity'
-     * * 'high-diversity'
-     * * 'auto-diversity'
+     * `medium-diversity` or `high-diversity`. Currently supported values:
+     * * `no-diversity`
+     * * `low-diversity`
+     * * `medium-diversity`
+     * * `high-diversity`
+     * * `auto-diversity`
      * If not specified, we choose default based on recommendation model
-     * type. Default value: 'no-diversity'.
+     * type. Default value: `no-diversity`.
      * Can only be set if
      * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
      * is
@@ -5678,17 +5914,111 @@ public Builder setDiversityLevelBytes(com.google.protobuf.ByteString value) {
       return this;
     }
 
+    private int diversityType_ = 0;
+    /**
+     *
+     *
+     * 
+     * What kind of diversity to use - data driven or rule based.
+     * 
+ * + * .google.cloud.retail.v2beta.ServingConfig.DiversityType diversity_type = 20; + * + * @return The enum numeric value on the wire for diversityType. + */ + @java.lang.Override + public int getDiversityTypeValue() { + return diversityType_; + } + /** + * + * + *
+     * What kind of diversity to use - data driven or rule based.
+     * 
+ * + * .google.cloud.retail.v2beta.ServingConfig.DiversityType diversity_type = 20; + * + * @param value The enum numeric value on the wire for diversityType to set. + * @return This builder for chaining. + */ + public Builder setDiversityTypeValue(int value) { + + diversityType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * What kind of diversity to use - data driven or rule based.
+     * 
+ * + * .google.cloud.retail.v2beta.ServingConfig.DiversityType diversity_type = 20; + * + * @return The diversityType. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.ServingConfig.DiversityType getDiversityType() { + @SuppressWarnings("deprecation") + com.google.cloud.retail.v2beta.ServingConfig.DiversityType result = + com.google.cloud.retail.v2beta.ServingConfig.DiversityType.valueOf(diversityType_); + return result == null + ? com.google.cloud.retail.v2beta.ServingConfig.DiversityType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * What kind of diversity to use - data driven or rule based.
+     * 
+ * + * .google.cloud.retail.v2beta.ServingConfig.DiversityType diversity_type = 20; + * + * @param value The diversityType to set. + * @return This builder for chaining. + */ + public Builder setDiversityType( + com.google.cloud.retail.v2beta.ServingConfig.DiversityType value) { + if (value == null) { + throw new NullPointerException(); + } + + diversityType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * What kind of diversity to use - data driven or rule based.
+     * 
+ * + * .google.cloud.retail.v2beta.ServingConfig.DiversityType diversity_type = 20; + * + * @return This builder for chaining. + */ + public Builder clearDiversityType() { + + diversityType_ = 0; + onChanged(); + return this; + } + private java.lang.Object enableCategoryFilterLevel_ = ""; /** * * *
-     * Whether to add additional category filters on the 'similar-items' model.
+     * Whether to add additional category filters on the `similar-items` model.
      * If not specified, we enable it by default.
      *  Allowed values are:
-     * * 'no-category-match': No additional filtering of original results from
+     * * `no-category-match`: No additional filtering of original results from
      *   the model and the customer's filters.
-     * * 'relaxed-category-match': Only keep results with categories that match
+     * * `relaxed-category-match`: Only keep results with categories that match
      *   at least one item categories in the PredictRequests's context item.
      *   * If customer also sends filters in the PredictRequest, then the results
      *   will satisfy both conditions (user given and category match).
@@ -5717,12 +6047,12 @@ public java.lang.String getEnableCategoryFilterLevel() {
      *
      *
      * 
-     * Whether to add additional category filters on the 'similar-items' model.
+     * Whether to add additional category filters on the `similar-items` model.
      * If not specified, we enable it by default.
      *  Allowed values are:
-     * * 'no-category-match': No additional filtering of original results from
+     * * `no-category-match`: No additional filtering of original results from
      *   the model and the customer's filters.
-     * * 'relaxed-category-match': Only keep results with categories that match
+     * * `relaxed-category-match`: Only keep results with categories that match
      *   at least one item categories in the PredictRequests's context item.
      *   * If customer also sends filters in the PredictRequest, then the results
      *   will satisfy both conditions (user given and category match).
@@ -5751,12 +6081,12 @@ public com.google.protobuf.ByteString getEnableCategoryFilterLevelBytes() {
      *
      *
      * 
-     * Whether to add additional category filters on the 'similar-items' model.
+     * Whether to add additional category filters on the `similar-items` model.
      * If not specified, we enable it by default.
      *  Allowed values are:
-     * * 'no-category-match': No additional filtering of original results from
+     * * `no-category-match`: No additional filtering of original results from
      *   the model and the customer's filters.
-     * * 'relaxed-category-match': Only keep results with categories that match
+     * * `relaxed-category-match`: Only keep results with categories that match
      *   at least one item categories in the PredictRequests's context item.
      *   * If customer also sends filters in the PredictRequest, then the results
      *   will satisfy both conditions (user given and category match).
@@ -5784,12 +6114,12 @@ public Builder setEnableCategoryFilterLevel(java.lang.String value) {
      *
      *
      * 
-     * Whether to add additional category filters on the 'similar-items' model.
+     * Whether to add additional category filters on the `similar-items` model.
      * If not specified, we enable it by default.
      *  Allowed values are:
-     * * 'no-category-match': No additional filtering of original results from
+     * * `no-category-match`: No additional filtering of original results from
      *   the model and the customer's filters.
-     * * 'relaxed-category-match': Only keep results with categories that match
+     * * `relaxed-category-match`: Only keep results with categories that match
      *   at least one item categories in the PredictRequests's context item.
      *   * If customer also sends filters in the PredictRequest, then the results
      *   will satisfy both conditions (user given and category match).
@@ -5813,12 +6143,12 @@ public Builder clearEnableCategoryFilterLevel() {
      *
      *
      * 
-     * Whether to add additional category filters on the 'similar-items' model.
+     * Whether to add additional category filters on the `similar-items` model.
      * If not specified, we enable it by default.
      *  Allowed values are:
-     * * 'no-category-match': No additional filtering of original results from
+     * * `no-category-match`: No additional filtering of original results from
      *   the model and the customer's filters.
-     * * 'relaxed-category-match': Only keep results with categories that match
+     * * `relaxed-category-match`: Only keep results with categories that match
      *   at least one item categories in the PredictRequests's context item.
      *   * If customer also sends filters in the PredictRequest, then the results
      *   will satisfy both conditions (user given and category match).
@@ -5844,6 +6174,324 @@ public Builder setEnableCategoryFilterLevelBytes(com.google.protobuf.ByteString
       return this;
     }
 
+    private com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalizationSpec_;
+    private com.google.protobuf.SingleFieldBuilderV3<
+            com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec,
+            com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Builder,
+            com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpecOrBuilder>
+        personalizationSpecBuilder_;
+    /**
+     *
+     *
+     * 
+     * The specification for personalization spec.
+     * Can only be set if
+     * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
+     * is
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
+     * Notice that if both
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+     * and
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * are set.
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * will override
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
+     * 
+ * + * + * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 21; + * + * + * @return Whether the personalizationSpec field is set. + */ + public boolean hasPersonalizationSpec() { + return personalizationSpecBuilder_ != null || personalizationSpec_ != null; + } + /** + * + * + *
+     * The specification for personalization spec.
+     * Can only be set if
+     * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
+     * is
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
+     * Notice that if both
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+     * and
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * are set.
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * will override
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
+     * 
+ * + * + * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 21; + * + * + * @return The personalizationSpec. + */ + public com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec + getPersonalizationSpec() { + if (personalizationSpecBuilder_ == null) { + return personalizationSpec_ == null + ? com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.getDefaultInstance() + : personalizationSpec_; + } else { + return personalizationSpecBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The specification for personalization spec.
+     * Can only be set if
+     * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
+     * is
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
+     * Notice that if both
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+     * and
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * are set.
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * will override
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
+     * 
+ * + * + * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 21; + * + */ + public Builder setPersonalizationSpec( + com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec value) { + if (personalizationSpecBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + personalizationSpec_ = value; + onChanged(); + } else { + personalizationSpecBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The specification for personalization spec.
+     * Can only be set if
+     * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
+     * is
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
+     * Notice that if both
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+     * and
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * are set.
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * will override
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
+     * 
+ * + * + * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 21; + * + */ + public Builder setPersonalizationSpec( + com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Builder builderForValue) { + if (personalizationSpecBuilder_ == null) { + personalizationSpec_ = builderForValue.build(); + onChanged(); + } else { + personalizationSpecBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The specification for personalization spec.
+     * Can only be set if
+     * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
+     * is
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
+     * Notice that if both
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+     * and
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * are set.
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * will override
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
+     * 
+ * + * + * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 21; + * + */ + public Builder mergePersonalizationSpec( + com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec value) { + if (personalizationSpecBuilder_ == null) { + if (personalizationSpec_ != null) { + personalizationSpec_ = + com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.newBuilder( + personalizationSpec_) + .mergeFrom(value) + .buildPartial(); + } else { + personalizationSpec_ = value; + } + onChanged(); + } else { + personalizationSpecBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The specification for personalization spec.
+     * Can only be set if
+     * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
+     * is
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
+     * Notice that if both
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+     * and
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * are set.
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * will override
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
+     * 
+ * + * + * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 21; + * + */ + public Builder clearPersonalizationSpec() { + if (personalizationSpecBuilder_ == null) { + personalizationSpec_ = null; + onChanged(); + } else { + personalizationSpec_ = null; + personalizationSpecBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The specification for personalization spec.
+     * Can only be set if
+     * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
+     * is
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
+     * Notice that if both
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+     * and
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * are set.
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * will override
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
+     * 
+ * + * + * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 21; + * + */ + public com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Builder + getPersonalizationSpecBuilder() { + + onChanged(); + return getPersonalizationSpecFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The specification for personalization spec.
+     * Can only be set if
+     * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
+     * is
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
+     * Notice that if both
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+     * and
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * are set.
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * will override
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
+     * 
+ * + * + * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 21; + * + */ + public com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpecOrBuilder + getPersonalizationSpecOrBuilder() { + if (personalizationSpecBuilder_ != null) { + return personalizationSpecBuilder_.getMessageOrBuilder(); + } else { + return personalizationSpec_ == null + ? com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.getDefaultInstance() + : personalizationSpec_; + } + } + /** + * + * + *
+     * The specification for personalization spec.
+     * Can only be set if
+     * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
+     * is
+     * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
+     * Notice that if both
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+     * and
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * are set.
+     * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+     * will override
+     * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
+     * 
+ * + * + * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 21; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec, + com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Builder, + com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpecOrBuilder> + getPersonalizationSpecFieldBuilder() { + if (personalizationSpecBuilder_ == null) { + personalizationSpecBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec, + com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Builder, + com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpecOrBuilder>( + getPersonalizationSpec(), getParentForChildren(), isClean()); + personalizationSpec_ = null; + } + return personalizationSpecBuilder_; + } + private java.util.List solutionTypes_ = java.util.Collections.emptyList(); private void ensureSolutionTypesIsMutable() { @@ -6133,7 +6781,18 @@ public ServingConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ServingConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigOrBuilder.java index 11b10102..c534449c 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigOrBuilder.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigOrBuilder.java @@ -85,7 +85,8 @@ public interface ServingConfigOrBuilder * * *
-   * The id of the model to use at serving time.
+   * The id of the model in the same
+   * [Catalog][google.cloud.retail.v2beta.Catalog] to use at serving time.
    * Currently only RecommendationModels are supported:
    * https://cloud.google.com/retail/recommendations-ai/docs/create-models
    * Can be changed but only to a compatible model (e.g.
@@ -105,7 +106,8 @@ public interface ServingConfigOrBuilder
    *
    *
    * 
-   * The id of the model to use at serving time.
+   * The id of the model in the same
+   * [Catalog][google.cloud.retail.v2beta.Catalog] to use at serving time.
    * Currently only RecommendationModels are supported:
    * https://cloud.google.com/retail/recommendations-ai/docs/create-models
    * Can be changed but only to a compatible model (e.g.
@@ -132,12 +134,12 @@ public interface ServingConfigOrBuilder
    * highest-priced items first. This setting could result in a decrease in
    * click-through and conversion rates.
    *  Allowed values are:
-   * * 'no-price-reranking'
-   * * 'low-price-raranking'
-   * * 'medium-price-reranking'
-   * * 'high-price-reranking'
+   * * `no-price-reranking`
+   * * `low-price-raranking`
+   * * `medium-price-reranking`
+   * * `high-price-reranking`
    * If not specified, we choose default based on model type. Default value:
-   * 'no-price-reranking'.
+   * `no-price-reranking`.
    * Can only be set if
    * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
    * is
@@ -159,12 +161,12 @@ public interface ServingConfigOrBuilder
    * highest-priced items first. This setting could result in a decrease in
    * click-through and conversion rates.
    *  Allowed values are:
-   * * 'no-price-reranking'
-   * * 'low-price-raranking'
-   * * 'medium-price-reranking'
-   * * 'high-price-reranking'
+   * * `no-price-reranking`
+   * * `low-price-raranking`
+   * * `medium-price-reranking`
+   * * `high-price-reranking`
    * If not specified, we choose default based on model type. Default value:
-   * 'no-price-reranking'.
+   * `no-price-reranking`.
    * Can only be set if
    * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
    * is
@@ -988,14 +990,14 @@ public interface ServingConfigOrBuilder
    *
    * 
    * How much diversity to use in recommendation model results e.g.
-   * 'medium-diversity' or 'high-diversity'. Currently supported values:
-   * * 'no-diversity'
-   * * 'low-diversity'
-   * * 'medium-diversity'
-   * * 'high-diversity'
-   * * 'auto-diversity'
+   * `medium-diversity` or `high-diversity`. Currently supported values:
+   * * `no-diversity`
+   * * `low-diversity`
+   * * `medium-diversity`
+   * * `high-diversity`
+   * * `auto-diversity`
    * If not specified, we choose default based on recommendation model
-   * type. Default value: 'no-diversity'.
+   * type. Default value: `no-diversity`.
    * Can only be set if
    * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
    * is
@@ -1012,14 +1014,14 @@ public interface ServingConfigOrBuilder
    *
    * 
    * How much diversity to use in recommendation model results e.g.
-   * 'medium-diversity' or 'high-diversity'. Currently supported values:
-   * * 'no-diversity'
-   * * 'low-diversity'
-   * * 'medium-diversity'
-   * * 'high-diversity'
-   * * 'auto-diversity'
+   * `medium-diversity` or `high-diversity`. Currently supported values:
+   * * `no-diversity`
+   * * `low-diversity`
+   * * `medium-diversity`
+   * * `high-diversity`
+   * * `auto-diversity`
    * If not specified, we choose default based on recommendation model
-   * type. Default value: 'no-diversity'.
+   * type. Default value: `no-diversity`.
    * Can only be set if
    * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
    * is
@@ -1036,12 +1038,37 @@ public interface ServingConfigOrBuilder
    *
    *
    * 
-   * Whether to add additional category filters on the 'similar-items' model.
+   * What kind of diversity to use - data driven or rule based.
+   * 
+ * + * .google.cloud.retail.v2beta.ServingConfig.DiversityType diversity_type = 20; + * + * @return The enum numeric value on the wire for diversityType. + */ + int getDiversityTypeValue(); + /** + * + * + *
+   * What kind of diversity to use - data driven or rule based.
+   * 
+ * + * .google.cloud.retail.v2beta.ServingConfig.DiversityType diversity_type = 20; + * + * @return The diversityType. + */ + com.google.cloud.retail.v2beta.ServingConfig.DiversityType getDiversityType(); + + /** + * + * + *
+   * Whether to add additional category filters on the `similar-items` model.
    * If not specified, we enable it by default.
    *  Allowed values are:
-   * * 'no-category-match': No additional filtering of original results from
+   * * `no-category-match`: No additional filtering of original results from
    *   the model and the customer's filters.
-   * * 'relaxed-category-match': Only keep results with categories that match
+   * * `relaxed-category-match`: Only keep results with categories that match
    *   at least one item categories in the PredictRequests's context item.
    *   * If customer also sends filters in the PredictRequest, then the results
    *   will satisfy both conditions (user given and category match).
@@ -1060,12 +1087,12 @@ public interface ServingConfigOrBuilder
    *
    *
    * 
-   * Whether to add additional category filters on the 'similar-items' model.
+   * Whether to add additional category filters on the `similar-items` model.
    * If not specified, we enable it by default.
    *  Allowed values are:
-   * * 'no-category-match': No additional filtering of original results from
+   * * `no-category-match`: No additional filtering of original results from
    *   the model and the customer's filters.
-   * * 'relaxed-category-match': Only keep results with categories that match
+   * * `relaxed-category-match`: Only keep results with categories that match
    *   at least one item categories in the PredictRequests's context item.
    *   * If customer also sends filters in the PredictRequest, then the results
    *   will satisfy both conditions (user given and category match).
@@ -1081,6 +1108,81 @@ public interface ServingConfigOrBuilder
    */
   com.google.protobuf.ByteString getEnableCategoryFilterLevelBytes();
 
+  /**
+   *
+   *
+   * 
+   * The specification for personalization spec.
+   * Can only be set if
+   * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
+   * is
+   * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
+   * Notice that if both
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+   * and
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * are set.
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * will override
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
+   * 
+ * + * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 21; + * + * + * @return Whether the personalizationSpec field is set. + */ + boolean hasPersonalizationSpec(); + /** + * + * + *
+   * The specification for personalization spec.
+   * Can only be set if
+   * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
+   * is
+   * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
+   * Notice that if both
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+   * and
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * are set.
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * will override
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
+   * 
+ * + * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 21; + * + * + * @return The personalizationSpec. + */ + com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec getPersonalizationSpec(); + /** + * + * + *
+   * The specification for personalization spec.
+   * Can only be set if
+   * [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
+   * is
+   * [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
+   * Notice that if both
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+   * and
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * are set.
+   * [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+   * will override
+   * [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
+   * 
+ * + * .google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec personalization_spec = 21; + * + */ + com.google.cloud.retail.v2beta.SearchRequest.PersonalizationSpecOrBuilder + getPersonalizationSpecOrBuilder(); + /** * * diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigProto.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigProto.java index 3db5ac08..2bc7681b 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigProto.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/ServingConfigProto.java @@ -45,7 +45,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "oogle/api/field_behavior.proto\032\031google/a" + "pi/resource.proto\032\'google/cloud/retail/v" + "2beta/common.proto\032/google/cloud/retail/" - + "v2beta/search_service.proto\"\364\005\n\rServingC" + + "v2beta/search_service.proto\"\210\010\n\rServingC" + "onfig\022\021\n\004name\030\001 \001(\tB\003\340A\005\022\031\n\014display_name" + "\030\002 \001(\tB\003\340A\002\022\020\n\010model_id\030\003 \001(\t\022\035\n\025price_r" + "eranking_level\030\004 \001(\t\022\031\n\021facet_control_id" @@ -58,19 +58,26 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "trol_ids\030\014 \003(\t\022$\n\034do_not_associate_contr" + "ol_ids\030\r \003(\t\022\037\n\027replacement_control_ids\030" + "\016 \003(\t\022\032\n\022ignore_control_ids\030\017 \003(\t\022\027\n\017div" - + "ersity_level\030\010 \001(\t\022$\n\034enable_category_fi" - + "lter_level\030\020 \001(\t\022H\n\016solution_types\030\023 \003(\016" - + "2(.google.cloud.retail.v2beta.SolutionTy" - + "peB\006\340A\002\340A\005:\205\001\352A\201\001\n#retail.googleapis.com" - + "/ServingConfig\022Zprojects/{project}/locat" - + "ions/{location}/catalogs/{catalog}/servi" - + "ngConfigs/{serving_config}B\333\001\n\036com.googl" - + "e.cloud.retail.v2betaB\022ServingConfigProt" - + "oP\001Z@google.golang.org/genproto/googleap" - + "is/cloud/retail/v2beta;retail\242\002\006RETAIL\252\002" - + "\032Google.Cloud.Retail.V2Beta\312\002\032Google\\Clo" - + "ud\\Retail\\V2beta\352\002\035Google::Cloud::Retail" - + "::V2betab\006proto3" + + "ersity_level\030\010 \001(\t\022O\n\016diversity_type\030\024 \001" + + "(\01627.google.cloud.retail.v2beta.ServingC" + + "onfig.DiversityType\022$\n\034enable_category_f" + + "ilter_level\030\020 \001(\t\022[\n\024personalization_spe" + + "c\030\025 \001(\0132=.google.cloud.retail.v2beta.Sea" + + "rchRequest.PersonalizationSpec\022H\n\016soluti" + + "on_types\030\023 \003(\0162(.google.cloud.retail.v2b" + + "eta.SolutionTypeB\006\340A\002\340A\005\"d\n\rDiversityTyp" + + "e\022\036\n\032DIVERSITY_TYPE_UNSPECIFIED\020\000\022\030\n\024RUL" + + "E_BASED_DIVERSITY\020\002\022\031\n\025DATA_DRIVEN_DIVER" + + "SITY\020\003:\205\001\352A\201\001\n#retail.googleapis.com/Ser" + + "vingConfig\022Zprojects/{project}/locations" + + "/{location}/catalogs/{catalog}/servingCo" + + "nfigs/{serving_config}B\333\001\n\036com.google.cl" + + "oud.retail.v2betaB\022ServingConfigProtoP\001Z" + + "@google.golang.org/genproto/googleapis/c" + + "loud/retail/v2beta;retail\242\002\006RETAIL\252\002\032Goo" + + "gle.Cloud.Retail.V2Beta\312\002\032Google\\Cloud\\R" + + "etail\\V2beta\352\002\035Google::Cloud::Retail::V2" + + "betab\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -102,7 +109,9 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "ReplacementControlIds", "IgnoreControlIds", "DiversityLevel", + "DiversityType", "EnableCategoryFilterLevel", + "PersonalizationSpec", "SolutionTypes", }); com.google.protobuf.ExtensionRegistry registry = diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetDefaultBranchRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetDefaultBranchRequest.java index 5dc552c9..5c511916 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetDefaultBranchRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetDefaultBranchRequest.java @@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetDefaultBranchRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - catalog_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - branchId_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - note_ = s; - break; - } - case 32: - { - force_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CatalogServiceProto .internal_static_google_cloud_retail_v2beta_SetDefaultBranchRequest_descriptor; @@ -347,7 +282,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (force_ != false) { output.writeBool(4, force_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -368,7 +303,7 @@ public int getSerializedSize() { if (force_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, force_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -388,7 +323,7 @@ public boolean equals(final java.lang.Object obj) { if (!getBranchId().equals(other.getBranchId())) return false; if (!getNote().equals(other.getNote())) return false; if (getForce() != other.getForce()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -407,7 +342,7 @@ public int hashCode() { hash = (53 * hash) + getNote().hashCode(); hash = (37 * hash) + FORCE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getForce()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -537,17 +472,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.SetDefaultBranchRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -657,7 +585,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.SetDefaultBranchRequest if (other.getForce() != false) { setForce(other.getForce()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -672,18 +600,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.SetDefaultBranchRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + catalog_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + branchId_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + note_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 32: + { + force_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.SetDefaultBranchRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1145,7 +1110,18 @@ public SetDefaultBranchRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetDefaultBranchRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryMetadata.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryMetadata.java index 09dcdc8d..be03d4e4 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryMetadata.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryMetadata.java @@ -53,45 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetInventoryMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_SetInventoryMetadata_descriptor; @@ -121,7 +82,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -130,7 +91,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -146,7 +107,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2beta.SetInventoryMetadata other = (com.google.cloud.retail.v2beta.SetInventoryMetadata) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -157,7 +118,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -289,17 +250,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.SetInventoryMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -382,7 +336,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2beta.SetInventoryMetadata other) { if (other == com.google.cloud.retail.v2beta.SetInventoryMetadata.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -397,18 +351,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.SetInventoryMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.SetInventoryMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -444,7 +411,18 @@ public SetInventoryMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetInventoryMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryRequest.java index 63a4f0c7..112734c4 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryRequest.java @@ -52,96 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetInventoryRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2beta.Product.Builder subBuilder = null; - if (inventory_ != null) { - subBuilder = inventory_.toBuilder(); - } - inventory_ = - input.readMessage( - com.google.cloud.retail.v2beta.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(inventory_); - inventory_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (setMask_ != null) { - subBuilder = setMask_.toBuilder(); - } - setMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(setMask_); - setMask_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (setTime_ != null) { - subBuilder = setTime_.toBuilder(); - } - setTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(setTime_); - setTime_ = subBuilder.buildPartial(); - } - - break; - } - case 32: - { - allowMissing_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_SetInventoryRequest_descriptor; @@ -508,7 +418,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (allowMissing_ != false) { output.writeBool(4, allowMissing_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -529,7 +439,7 @@ public int getSerializedSize() { if (allowMissing_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, allowMissing_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -558,7 +468,7 @@ public boolean equals(final java.lang.Object obj) { if (!getSetTime().equals(other.getSetTime())) return false; } if (getAllowMissing() != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -583,7 +493,7 @@ public int hashCode() { } hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -714,17 +624,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.SetInventoryRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -855,7 +758,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.SetInventoryRequest othe if (other.getAllowMissing() != false) { setAllowMissing(other.getAllowMissing()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -870,18 +773,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.SetInventoryRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getInventoryFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getSetMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + input.readMessage(getSetTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 26 + case 32: + { + allowMissing_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.SetInventoryRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2013,7 +1953,18 @@ public SetInventoryRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetInventoryRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryResponse.java index 79fc8cee..c705f56d 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryResponse.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/SetInventoryResponse.java @@ -53,45 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetInventoryResponse( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_SetInventoryResponse_descriptor; @@ -121,7 +82,7 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -130,7 +91,7 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -146,7 +107,7 @@ public boolean equals(final java.lang.Object obj) { com.google.cloud.retail.v2beta.SetInventoryResponse other = (com.google.cloud.retail.v2beta.SetInventoryResponse) obj; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -157,7 +118,7 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -289,17 +250,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.SetInventoryResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -382,7 +336,7 @@ public Builder mergeFrom(com.google.protobuf.Message other) { public Builder mergeFrom(com.google.cloud.retail.v2beta.SetInventoryResponse other) { if (other == com.google.cloud.retail.v2beta.SetInventoryResponse.getDefaultInstance()) return this; - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -397,18 +351,31 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.SetInventoryResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.SetInventoryResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -444,7 +411,18 @@ public SetInventoryResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetInventoryResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/TuneModelMetadata.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/TuneModelMetadata.java new file mode 100644 index 00000000..d331da0b --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/TuneModelMetadata.java @@ -0,0 +1,629 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +/** + * + * + *
+ * Metadata associated with a tune operation.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.TuneModelMetadata} + */ +public final class TuneModelMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.TuneModelMetadata) + TuneModelMetadataOrBuilder { + private static final long serialVersionUID = 0L; + // Use TuneModelMetadata.newBuilder() to construct. + private TuneModelMetadata(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TuneModelMetadata() { + model_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TuneModelMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_TuneModelMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_TuneModelMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.TuneModelMetadata.class, + com.google.cloud.retail.v2beta.TuneModelMetadata.Builder.class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + private volatile java.lang.Object model_; + /** + * + * + *
+   * The resource name of the model that this tune applies to.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * string model = 1; + * + * @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 tune applies to.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * string model = 1; + * + * @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; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, model_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(model_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, model_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2beta.TuneModelMetadata)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.TuneModelMetadata other = + (com.google.cloud.retail.v2beta.TuneModelMetadata) obj; + + if (!getModel().equals(other.getModel())) return false; + if (!getUnknownFields().equals(other.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(); + hash = (29 * hash) + getUnknownFields().hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.retail.v2beta.TuneModelMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.TuneModelMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.TuneModelMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.TuneModelMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.TuneModelMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.TuneModelMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.TuneModelMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.TuneModelMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.TuneModelMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.TuneModelMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.TuneModelMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.TuneModelMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2beta.TuneModelMetadata prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Metadata associated with a tune operation.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.TuneModelMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.TuneModelMetadata) + com.google.cloud.retail.v2beta.TuneModelMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_TuneModelMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_TuneModelMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.TuneModelMetadata.class, + com.google.cloud.retail.v2beta.TuneModelMetadata.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.TuneModelMetadata.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + model_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_TuneModelMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.TuneModelMetadata getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.TuneModelMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.TuneModelMetadata build() { + com.google.cloud.retail.v2beta.TuneModelMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.TuneModelMetadata buildPartial() { + com.google.cloud.retail.v2beta.TuneModelMetadata result = + new com.google.cloud.retail.v2beta.TuneModelMetadata(this); + result.model_ = model_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.TuneModelMetadata) { + return mergeFrom((com.google.cloud.retail.v2beta.TuneModelMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.TuneModelMetadata other) { + if (other == com.google.cloud.retail.v2beta.TuneModelMetadata.getDefaultInstance()) + return this; + if (!other.getModel().isEmpty()) { + model_ = other.model_; + 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: + { + model_ = input.readStringRequireUtf8(); + + 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 java.lang.Object model_ = ""; + /** + * + * + *
+     * The resource name of the model that this tune applies to.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * string model = 1; + * + * @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 tune applies to.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * string model = 1; + * + * @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 tune applies to.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * string model = 1; + * + * @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; + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the model that this tune applies to.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * string model = 1; + * + * @return This builder for chaining. + */ + public Builder clearModel() { + + model_ = getDefaultInstance().getModel(); + onChanged(); + return this; + } + /** + * + * + *
+     * The resource name of the model that this tune applies to.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * string model = 1; + * + * @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; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.TuneModelMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.TuneModelMetadata) + private static final com.google.cloud.retail.v2beta.TuneModelMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.TuneModelMetadata(); + } + + public static com.google.cloud.retail.v2beta.TuneModelMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TuneModelMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.TuneModelMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/TuneModelMetadataOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/TuneModelMetadataOrBuilder.java new file mode 100644 index 00000000..428f9a35 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/TuneModelMetadataOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +public interface TuneModelMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.TuneModelMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The resource name of the model that this tune applies to.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * string model = 1; + * + * @return The model. + */ + java.lang.String getModel(); + /** + * + * + *
+   * The resource name of the model that this tune applies to.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * string model = 1; + * + * @return The bytes for model. + */ + com.google.protobuf.ByteString getModelBytes(); +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/TuneModelRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/TuneModelRequest.java new file mode 100644 index 00000000..a8dc0ac8 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/TuneModelRequest.java @@ -0,0 +1,645 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +/** + * + * + *
+ * Request to manually start a tuning process now (instead of waiting for
+ * the periodically scheduled tuning to happen).
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.TuneModelRequest} + */ +public final class TuneModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.TuneModelRequest) + TuneModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use TuneModelRequest.newBuilder() to construct. + private TuneModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TuneModelRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TuneModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_TuneModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_TuneModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.TuneModelRequest.class, + com.google.cloud.retail.v2beta.TuneModelRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the model to tune.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the model to tune.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2beta.TuneModelRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.TuneModelRequest other = + (com.google.cloud.retail.v2beta.TuneModelRequest) 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.retail.v2beta.TuneModelRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.TuneModelRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.TuneModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.TuneModelRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.TuneModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.TuneModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.TuneModelRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.TuneModelRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.TuneModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.TuneModelRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.TuneModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.TuneModelRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2beta.TuneModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request to manually start a tuning process now (instead of waiting for
+   * the periodically scheduled tuning to happen).
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.TuneModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.TuneModelRequest) + com.google.cloud.retail.v2beta.TuneModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_TuneModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_TuneModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.TuneModelRequest.class, + com.google.cloud.retail.v2beta.TuneModelRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.TuneModelRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_TuneModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.TuneModelRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.TuneModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.TuneModelRequest build() { + com.google.cloud.retail.v2beta.TuneModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.TuneModelRequest buildPartial() { + com.google.cloud.retail.v2beta.TuneModelRequest result = + new com.google.cloud.retail.v2beta.TuneModelRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.TuneModelRequest) { + return mergeFrom((com.google.cloud.retail.v2beta.TuneModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.TuneModelRequest other) { + if (other == com.google.cloud.retail.v2beta.TuneModelRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + 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(); + + 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 java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the model to tune.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the model to tune.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the model to tune.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the model to tune.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the model to tune.
+     * Format:
+     * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.TuneModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.TuneModelRequest) + private static final com.google.cloud.retail.v2beta.TuneModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.TuneModelRequest(); + } + + public static com.google.cloud.retail.v2beta.TuneModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TuneModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.TuneModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/TuneModelRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/TuneModelRequestOrBuilder.java new file mode 100644 index 00000000..085a6422 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/TuneModelRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +public interface TuneModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.TuneModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the model to tune.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the model to tune.
+   * Format:
+   * `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/TuneModelResponse.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/TuneModelResponse.java new file mode 100644 index 00000000..36e24a98 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/TuneModelResponse.java @@ -0,0 +1,436 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +/** + * + * + *
+ * Response associated with a tune operation.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.TuneModelResponse} + */ +public final class TuneModelResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.TuneModelResponse) + TuneModelResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use TuneModelResponse.newBuilder() to construct. + private TuneModelResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TuneModelResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TuneModelResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_TuneModelResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_TuneModelResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.TuneModelResponse.class, + com.google.cloud.retail.v2beta.TuneModelResponse.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.retail.v2beta.TuneModelResponse)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.TuneModelResponse other = + (com.google.cloud.retail.v2beta.TuneModelResponse) 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.retail.v2beta.TuneModelResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.TuneModelResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.TuneModelResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.TuneModelResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.TuneModelResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.TuneModelResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.TuneModelResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.TuneModelResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.TuneModelResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.TuneModelResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.TuneModelResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.TuneModelResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2beta.TuneModelResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response associated with a tune operation.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.TuneModelResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.TuneModelResponse) + com.google.cloud.retail.v2beta.TuneModelResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_TuneModelResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_TuneModelResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.TuneModelResponse.class, + com.google.cloud.retail.v2beta.TuneModelResponse.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.TuneModelResponse.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_TuneModelResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.TuneModelResponse getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.TuneModelResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.TuneModelResponse build() { + com.google.cloud.retail.v2beta.TuneModelResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.TuneModelResponse buildPartial() { + com.google.cloud.retail.v2beta.TuneModelResponse result = + new com.google.cloud.retail.v2beta.TuneModelResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.TuneModelResponse) { + return mergeFrom((com.google.cloud.retail.v2beta.TuneModelResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.TuneModelResponse other) { + if (other == com.google.cloud.retail.v2beta.TuneModelResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.getUnknownFields()); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.unwrapIOException(); + } finally { + onChanged(); + } // finally + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.TuneModelResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.TuneModelResponse) + private static final com.google.cloud.retail.v2beta.TuneModelResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.TuneModelResponse(); + } + + public static com.google.cloud.retail.v2beta.TuneModelResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TuneModelResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.TuneModelResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/TuneModelResponseOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/TuneModelResponseOrBuilder.java new file mode 100644 index 00000000..080c1450 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/TuneModelResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +public interface TuneModelResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.TuneModelResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateAttributesConfigRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateAttributesConfigRequest.java index dcd9c5ce..eff590fe 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateAttributesConfigRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateAttributesConfigRequest.java @@ -52,76 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateAttributesConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2beta.AttributesConfig.Builder subBuilder = null; - if (attributesConfig_ != null) { - subBuilder = attributesConfig_.toBuilder(); - } - attributesConfig_ = - input.readMessage( - com.google.cloud.retail.v2beta.AttributesConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(attributesConfig_); - attributesConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CatalogServiceProto .internal_static_google_cloud_retail_v2beta_UpdateAttributesConfigRequest_descriptor; @@ -272,7 +202,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -287,7 +217,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -311,7 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -330,7 +260,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -462,17 +392,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.UpdateAttributesConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -585,7 +508,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.UpdateAttributesConfigRe if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -600,18 +523,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.UpdateAttributesConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getAttributesConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.UpdateAttributesConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1080,7 +1029,18 @@ public UpdateAttributesConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateAttributesConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateCatalogRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateCatalogRequest.java index 227a7261..dc4da5ca 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateCatalogRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateCatalogRequest.java @@ -52,76 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateCatalogRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2beta.Catalog.Builder subBuilder = null; - if (catalog_ != null) { - subBuilder = catalog_.toBuilder(); - } - catalog_ = - input.readMessage( - com.google.cloud.retail.v2beta.Catalog.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(catalog_); - catalog_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CatalogServiceProto .internal_static_google_cloud_retail_v2beta_UpdateCatalogRequest_descriptor; @@ -281,7 +211,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -296,7 +226,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -320,7 +250,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -339,7 +269,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -470,17 +400,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.UpdateCatalogRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -591,7 +514,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.UpdateCatalogRequest oth if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -606,18 +529,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.UpdateCatalogRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getCatalogFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.UpdateCatalogRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1111,7 +1059,18 @@ public UpdateCatalogRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateCatalogRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateCompletionConfigRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateCompletionConfigRequest.java index fd4a5755..c3c8662c 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateCompletionConfigRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateCompletionConfigRequest.java @@ -52,76 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateCompletionConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2beta.CompletionConfig.Builder subBuilder = null; - if (completionConfig_ != null) { - subBuilder = completionConfig_.toBuilder(); - } - completionConfig_ = - input.readMessage( - com.google.cloud.retail.v2beta.CompletionConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(completionConfig_); - completionConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.CatalogServiceProto .internal_static_google_cloud_retail_v2beta_UpdateCompletionConfigRequest_descriptor; @@ -296,7 +226,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -311,7 +241,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -335,7 +265,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -354,7 +284,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -486,17 +416,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.UpdateCompletionConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -609,7 +532,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.UpdateCompletionConfigRe if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -624,18 +547,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.UpdateCompletionConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage( + getCompletionConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.UpdateCompletionConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1176,7 +1125,18 @@ public UpdateCompletionConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateCompletionConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateControlRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateControlRequest.java index 73cf1368..715a69dc 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateControlRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateControlRequest.java @@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateControlRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2beta.Control.Builder subBuilder = null; - if (control_ != null) { - subBuilder = control_.toBuilder(); - } - control_ = - input.readMessage( - com.google.cloud.retail.v2beta.Control.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(control_); - control_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ControlServiceProto .internal_static_google_cloud_retail_v2beta_UpdateControlRequest_descriptor; @@ -267,7 +197,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -282,7 +212,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -306,7 +236,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -325,7 +255,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -454,17 +384,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.UpdateControlRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -575,7 +498,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.UpdateControlRequest oth if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -590,18 +513,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.UpdateControlRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getControlFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.UpdateControlRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1059,7 +1007,18 @@ public UpdateControlRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateControlRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateModelRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateModelRequest.java new file mode 100644 index 00000000..f9559ba0 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateModelRequest.java @@ -0,0 +1,1008 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +/** + * + * + *
+ * Request for updating an existing model.
+ * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.UpdateModelRequest} + */ +public final class UpdateModelRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.retail.v2beta.UpdateModelRequest) + UpdateModelRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateModelRequest.newBuilder() to construct. + private UpdateModelRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateModelRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateModelRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_UpdateModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_UpdateModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.UpdateModelRequest.class, + com.google.cloud.retail.v2beta.UpdateModelRequest.Builder.class); + } + + public static final int MODEL_FIELD_NUMBER = 1; + private com.google.cloud.retail.v2beta.Model model_; + /** + * + * + *
+   * Required. The body of the updated
+   * [Model][google.cloud.retail.v2beta.Model].
+   * 
+ * + * .google.cloud.retail.v2beta.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the model field is set. + */ + @java.lang.Override + public boolean hasModel() { + return model_ != null; + } + /** + * + * + *
+   * Required. The body of the updated
+   * [Model][google.cloud.retail.v2beta.Model].
+   * 
+ * + * .google.cloud.retail.v2beta.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The model. + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.Model getModel() { + return model_ == null ? com.google.cloud.retail.v2beta.Model.getDefaultInstance() : model_; + } + /** + * + * + *
+   * Required. The body of the updated
+   * [Model][google.cloud.retail.v2beta.Model].
+   * 
+ * + * .google.cloud.retail.v2beta.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.retail.v2beta.ModelOrBuilder getModelOrBuilder() { + return getModel(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 2; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Optional. Indicates which fields in the provided 'model' to
+   * update. If not set, by default updates all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Optional. Indicates which fields in the provided 'model' to
+   * update. If not set, by default updates all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Optional. Indicates which fields in the provided 'model' to
+   * update. If not set, by default updates all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (model_ != null) { + output.writeMessage(1, getModel()); + } + if (updateMask_ != null) { + output.writeMessage(2, getUpdateMask()); + } + getUnknownFields().writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (model_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getModel()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); + } + size += getUnknownFields().getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.retail.v2beta.UpdateModelRequest)) { + return super.equals(obj); + } + com.google.cloud.retail.v2beta.UpdateModelRequest other = + (com.google.cloud.retail.v2beta.UpdateModelRequest) obj; + + if (hasModel() != other.hasModel()) return false; + if (hasModel()) { + if (!getModel().equals(other.getModel())) 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 (hasModel()) { + hash = (37 * hash) + MODEL_FIELD_NUMBER; + hash = (53 * hash) + getModel().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.retail.v2beta.UpdateModelRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.UpdateModelRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.UpdateModelRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.UpdateModelRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.UpdateModelRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.retail.v2beta.UpdateModelRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.UpdateModelRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.UpdateModelRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.UpdateModelRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.UpdateModelRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.retail.v2beta.UpdateModelRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.retail.v2beta.UpdateModelRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.retail.v2beta.UpdateModelRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request for updating an existing model.
+   * 
+ * + * Protobuf type {@code google.cloud.retail.v2beta.UpdateModelRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.retail.v2beta.UpdateModelRequest) + com.google.cloud.retail.v2beta.UpdateModelRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_UpdateModelRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_UpdateModelRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.retail.v2beta.UpdateModelRequest.class, + com.google.cloud.retail.v2beta.UpdateModelRequest.Builder.class); + } + + // Construct using com.google.cloud.retail.v2beta.UpdateModelRequest.newBuilder() + private Builder() {} + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (modelBuilder_ == null) { + model_ = null; + } else { + model_ = null; + modelBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.retail.v2beta.ModelServiceProto + .internal_static_google_cloud_retail_v2beta_UpdateModelRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.UpdateModelRequest getDefaultInstanceForType() { + return com.google.cloud.retail.v2beta.UpdateModelRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.UpdateModelRequest build() { + com.google.cloud.retail.v2beta.UpdateModelRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.UpdateModelRequest buildPartial() { + com.google.cloud.retail.v2beta.UpdateModelRequest result = + new com.google.cloud.retail.v2beta.UpdateModelRequest(this); + if (modelBuilder_ == null) { + result.model_ = model_; + } else { + result.model_ = modelBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.retail.v2beta.UpdateModelRequest) { + return mergeFrom((com.google.cloud.retail.v2beta.UpdateModelRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.retail.v2beta.UpdateModelRequest other) { + if (other == com.google.cloud.retail.v2beta.UpdateModelRequest.getDefaultInstance()) + return this; + if (other.hasModel()) { + mergeModel(other.getModel()); + } + 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(getModelFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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 com.google.cloud.retail.v2beta.Model model_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.Model, + com.google.cloud.retail.v2beta.Model.Builder, + com.google.cloud.retail.v2beta.ModelOrBuilder> + modelBuilder_; + /** + * + * + *
+     * Required. The body of the updated
+     * [Model][google.cloud.retail.v2beta.Model].
+     * 
+ * + * .google.cloud.retail.v2beta.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the model field is set. + */ + public boolean hasModel() { + return modelBuilder_ != null || model_ != null; + } + /** + * + * + *
+     * Required. The body of the updated
+     * [Model][google.cloud.retail.v2beta.Model].
+     * 
+ * + * .google.cloud.retail.v2beta.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The model. + */ + public com.google.cloud.retail.v2beta.Model getModel() { + if (modelBuilder_ == null) { + return model_ == null ? com.google.cloud.retail.v2beta.Model.getDefaultInstance() : model_; + } else { + return modelBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The body of the updated
+     * [Model][google.cloud.retail.v2beta.Model].
+     * 
+ * + * .google.cloud.retail.v2beta.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setModel(com.google.cloud.retail.v2beta.Model value) { + if (modelBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + model_ = value; + onChanged(); + } else { + modelBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The body of the updated
+     * [Model][google.cloud.retail.v2beta.Model].
+     * 
+ * + * .google.cloud.retail.v2beta.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setModel(com.google.cloud.retail.v2beta.Model.Builder builderForValue) { + if (modelBuilder_ == null) { + model_ = builderForValue.build(); + onChanged(); + } else { + modelBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The body of the updated
+     * [Model][google.cloud.retail.v2beta.Model].
+     * 
+ * + * .google.cloud.retail.v2beta.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeModel(com.google.cloud.retail.v2beta.Model value) { + if (modelBuilder_ == null) { + if (model_ != null) { + model_ = + com.google.cloud.retail.v2beta.Model.newBuilder(model_) + .mergeFrom(value) + .buildPartial(); + } else { + model_ = value; + } + onChanged(); + } else { + modelBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The body of the updated
+     * [Model][google.cloud.retail.v2beta.Model].
+     * 
+ * + * .google.cloud.retail.v2beta.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearModel() { + if (modelBuilder_ == null) { + model_ = null; + onChanged(); + } else { + model_ = null; + modelBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The body of the updated
+     * [Model][google.cloud.retail.v2beta.Model].
+     * 
+ * + * .google.cloud.retail.v2beta.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2beta.Model.Builder getModelBuilder() { + + onChanged(); + return getModelFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The body of the updated
+     * [Model][google.cloud.retail.v2beta.Model].
+     * 
+ * + * .google.cloud.retail.v2beta.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.retail.v2beta.ModelOrBuilder getModelOrBuilder() { + if (modelBuilder_ != null) { + return modelBuilder_.getMessageOrBuilder(); + } else { + return model_ == null ? com.google.cloud.retail.v2beta.Model.getDefaultInstance() : model_; + } + } + /** + * + * + *
+     * Required. The body of the updated
+     * [Model][google.cloud.retail.v2beta.Model].
+     * 
+ * + * .google.cloud.retail.v2beta.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.Model, + com.google.cloud.retail.v2beta.Model.Builder, + com.google.cloud.retail.v2beta.ModelOrBuilder> + getModelFieldBuilder() { + if (modelBuilder_ == null) { + modelBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.retail.v2beta.Model, + com.google.cloud.retail.v2beta.Model.Builder, + com.google.cloud.retail.v2beta.ModelOrBuilder>( + getModel(), getParentForChildren(), isClean()); + model_ = null; + } + return modelBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Optional. Indicates which fields in the provided 'model' to
+     * update. If not set, by default updates all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Optional. Indicates which fields in the provided 'model' to
+     * update. If not set, by default updates all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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(); + } + } + /** + * + * + *
+     * Optional. Indicates which fields in the provided 'model' to
+     * update. If not set, by default updates all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Indicates which fields in the provided 'model' to
+     * update. If not set, by default updates all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Indicates which fields in the provided 'model' to
+     * update. If not set, by default updates all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Indicates which fields in the provided 'model' to
+     * update. If not set, by default updates all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Indicates which fields in the provided 'model' to
+     * update. If not set, by default updates all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Indicates which fields in the provided 'model' to
+     * update. If not set, by default updates all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Optional. Indicates which fields in the provided 'model' to
+     * update. If not set, by default updates all fields.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.retail.v2beta.UpdateModelRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.retail.v2beta.UpdateModelRequest) + private static final com.google.cloud.retail.v2beta.UpdateModelRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.retail.v2beta.UpdateModelRequest(); + } + + public static com.google.cloud.retail.v2beta.UpdateModelRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateModelRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.retail.v2beta.UpdateModelRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateModelRequestOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateModelRequestOrBuilder.java new file mode 100644 index 00000000..b9db7fd3 --- /dev/null +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateModelRequestOrBuilder.java @@ -0,0 +1,107 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/retail/v2beta/model_service.proto + +package com.google.cloud.retail.v2beta; + +public interface UpdateModelRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.retail.v2beta.UpdateModelRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The body of the updated
+   * [Model][google.cloud.retail.v2beta.Model].
+   * 
+ * + * .google.cloud.retail.v2beta.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the model field is set. + */ + boolean hasModel(); + /** + * + * + *
+   * Required. The body of the updated
+   * [Model][google.cloud.retail.v2beta.Model].
+   * 
+ * + * .google.cloud.retail.v2beta.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The model. + */ + com.google.cloud.retail.v2beta.Model getModel(); + /** + * + * + *
+   * Required. The body of the updated
+   * [Model][google.cloud.retail.v2beta.Model].
+   * 
+ * + * .google.cloud.retail.v2beta.Model model = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.retail.v2beta.ModelOrBuilder getModelOrBuilder(); + + /** + * + * + *
+   * Optional. Indicates which fields in the provided 'model' to
+   * update. If not set, by default updates all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Optional. Indicates which fields in the provided 'model' to
+   * update. If not set, by default updates all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Optional. Indicates which fields in the provided 'model' to
+   * update. If not set, by default updates all fields.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateProductRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateProductRequest.java index 3b0abe1c..fbe8e2de 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateProductRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateProductRequest.java @@ -52,81 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateProductRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2beta.Product.Builder subBuilder = null; - if (product_ != null) { - subBuilder = product_.toBuilder(); - } - product_ = - input.readMessage( - com.google.cloud.retail.v2beta.Product.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(product_); - product_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - case 24: - { - allowMissing_ = input.readBool(); - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ProductServiceProto .internal_static_google_cloud_retail_v2beta_UpdateProductRequest_descriptor; @@ -333,7 +258,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (allowMissing_ != false) { output.writeBool(3, allowMissing_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -351,7 +276,7 @@ public int getSerializedSize() { if (allowMissing_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, allowMissing_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -376,7 +301,7 @@ public boolean equals(final java.lang.Object obj) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } if (getAllowMissing() != other.getAllowMissing()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -397,7 +322,7 @@ public int hashCode() { } hash = (37 * hash) + ALLOW_MISSING_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAllowMissing()); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -528,17 +453,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.UpdateProductRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -655,7 +573,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.UpdateProductRequest oth if (other.getAllowMissing() != false) { setAllowMissing(other.getAllowMissing()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -670,18 +588,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.UpdateProductRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getProductFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 24: + { + allowMissing_ = input.readBool(); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.UpdateProductRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1305,7 +1254,18 @@ public UpdateProductRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateProductRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateServingConfigRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateServingConfigRequest.java index c023ba71..8640255b 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateServingConfigRequest.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UpdateServingConfigRequest.java @@ -50,76 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdateServingConfigRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - com.google.cloud.retail.v2beta.ServingConfig.Builder subBuilder = null; - if (servingConfig_ != null) { - subBuilder = servingConfig_.toBuilder(); - } - servingConfig_ = - input.readMessage( - com.google.cloud.retail.v2beta.ServingConfig.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(servingConfig_); - servingConfig_ = subBuilder.buildPartial(); - } - - break; - } - case 18: - { - com.google.protobuf.FieldMask.Builder subBuilder = null; - if (updateMask_ != null) { - subBuilder = updateMask_.toBuilder(); - } - updateMask_ = - input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(updateMask_); - updateMask_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.ServingConfigServiceProto .internal_static_google_cloud_retail_v2beta_UpdateServingConfigRequest_descriptor; @@ -267,7 +197,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (updateMask_ != null) { output.writeMessage(2, getUpdateMask()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -282,7 +212,7 @@ public int getSerializedSize() { if (updateMask_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUpdateMask()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -306,7 +236,7 @@ public boolean equals(final java.lang.Object obj) { if (hasUpdateMask()) { if (!getUpdateMask().equals(other.getUpdateMask())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -325,7 +255,7 @@ public int hashCode() { hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; hash = (53 * hash) + getUpdateMask().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -455,17 +385,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.cloud.retail.v2beta.UpdateServingConfigRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -576,7 +499,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.UpdateServingConfigReque if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -591,18 +514,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.cloud.retail.v2beta.UpdateServingConfigRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + input.readMessage(getServingConfigFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 10 + case 18: + { + input.readMessage(getUpdateMaskFieldBuilder().getBuilder(), extensionRegistry); + + 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) { - parsedMessage = - (com.google.cloud.retail.v2beta.UpdateServingConfigRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1061,7 +1009,18 @@ public UpdateServingConfigRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdateServingConfigRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEvent.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEvent.java index ac7828cd..da3ad50e 100644 --- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEvent.java +++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEvent.java @@ -66,250 +66,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UserEvent( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - int mutable_bitField0_ = 0; - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - com.google.protobuf.UnknownFieldSet.newBuilder(); - 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(); - - eventType_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - visitorId_ = s; - break; - } - case 26: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (eventTime_ != null) { - subBuilder = eventTime_.toBuilder(); - } - eventTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(eventTime_); - eventTime_ = subBuilder.buildPartial(); - } - - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - experimentIds_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - experimentIds_.add(s); - break; - } - case 42: - { - java.lang.String s = input.readStringRequireUtf8(); - - attributionToken_ = s; - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - productDetails_ = - new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - productDetails_.add( - input.readMessage( - com.google.cloud.retail.v2beta.ProductDetail.parser(), extensionRegistry)); - break; - } - case 58: - { - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - attributes_ = - com.google.protobuf.MapField.newMapField( - AttributesDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000004; - } - com.google.protobuf.MapEntry< - java.lang.String, com.google.cloud.retail.v2beta.CustomAttribute> - attributes__ = - input.readMessage( - AttributesDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - attributes_.getMutableMap().put(attributes__.getKey(), attributes__.getValue()); - break; - } - case 66: - { - java.lang.String s = input.readStringRequireUtf8(); - - cartId_ = s; - break; - } - case 74: - { - com.google.cloud.retail.v2beta.PurchaseTransaction.Builder subBuilder = null; - if (purchaseTransaction_ != null) { - subBuilder = purchaseTransaction_.toBuilder(); - } - purchaseTransaction_ = - input.readMessage( - com.google.cloud.retail.v2beta.PurchaseTransaction.parser(), - extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(purchaseTransaction_); - purchaseTransaction_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - java.lang.String s = input.readStringRequireUtf8(); - - searchQuery_ = s; - break; - } - case 90: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - pageCategories_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - pageCategories_.add(s); - break; - } - case 98: - { - com.google.cloud.retail.v2beta.UserInfo.Builder subBuilder = null; - if (userInfo_ != null) { - subBuilder = userInfo_.toBuilder(); - } - userInfo_ = - input.readMessage( - com.google.cloud.retail.v2beta.UserInfo.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(userInfo_); - userInfo_ = subBuilder.buildPartial(); - } - - break; - } - case 106: - { - java.lang.String s = input.readStringRequireUtf8(); - - uri_ = s; - break; - } - case 114: - { - java.lang.String s = input.readStringRequireUtf8(); - - referrerUri_ = s; - break; - } - case 122: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageViewId_ = s; - break; - } - case 130: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 138: - { - java.lang.String s = input.readStringRequireUtf8(); - - orderBy_ = s; - break; - } - case 144: - { - offset_ = input.readInt32(); - break; - } - case 170: - { - java.lang.String s = input.readStringRequireUtf8(); - - sessionId_ = s; - break; - } - case 178: - { - com.google.cloud.retail.v2beta.CompletionDetail.Builder subBuilder = null; - if (completionDetail_ != null) { - subBuilder = completionDetail_.toBuilder(); - } - completionDetail_ = - input.readMessage( - com.google.cloud.retail.v2beta.CompletionDetail.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(completionDetail_); - completionDetail_ = subBuilder.buildPartial(); - } - - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - if (((mutable_bitField0_ & 0x00000001) != 0)) { - experimentIds_ = experimentIds_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - productDetails_ = java.util.Collections.unmodifiableList(productDetails_); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - pageCategories_ = pageCategories_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.retail.v2beta.UserEventProto .internal_static_google_cloud_retail_v2beta_UserEvent_descriptor; @@ -1446,7 +1202,7 @@ public int getOffset() { *
    * The categories associated with a category page.
    * To represent full path of category, use '>' sign to separate different
-   * hierarchies. If '>' is part of the category name, please replace it with
+   * hierarchies. If '>' is part of the category name, replace it with
    * other character(s).
    * Category pages include special pages such as sales or promotions. For
    * instance, a special sale page may have the category hierarchy:
@@ -1471,7 +1227,7 @@ public com.google.protobuf.ProtocolStringList getPageCategoriesList() {
    * 
    * The categories associated with a category page.
    * To represent full path of category, use '>' sign to separate different
-   * hierarchies. If '>' is part of the category name, please replace it with
+   * hierarchies. If '>' is part of the category name, replace it with
    * other character(s).
    * Category pages include special pages such as sales or promotions. For
    * instance, a special sale page may have the category hierarchy:
@@ -1496,7 +1252,7 @@ public int getPageCategoriesCount() {
    * 
    * The categories associated with a category page.
    * To represent full path of category, use '>' sign to separate different
-   * hierarchies. If '>' is part of the category name, please replace it with
+   * hierarchies. If '>' is part of the category name, replace it with
    * other character(s).
    * Category pages include special pages such as sales or promotions. For
    * instance, a special sale page may have the category hierarchy:
@@ -1522,7 +1278,7 @@ public java.lang.String getPageCategories(int index) {
    * 
    * The categories associated with a category page.
    * To represent full path of category, use '>' sign to separate different
-   * hierarchies. If '>' is part of the category name, please replace it with
+   * hierarchies. If '>' is part of the category name, replace it with
    * other character(s).
    * Category pages include special pages such as sales or promotions. For
    * instance, a special sale page may have the category hierarchy:
@@ -1835,7 +1591,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     if (completionDetail_ != null) {
       output.writeMessage(22, getCompletionDetail());
     }
-    unknownFields.writeTo(output);
+    getUnknownFields().writeTo(output);
   }
 
   @java.lang.Override
@@ -1922,7 +1678,7 @@ public int getSerializedSize() {
     if (completionDetail_ != null) {
       size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, getCompletionDetail());
     }
-    size += unknownFields.getSerializedSize();
+    size += getUnknownFields().getSerializedSize();
     memoizedSize = size;
     return size;
   }
@@ -1969,7 +1725,7 @@ public boolean equals(final java.lang.Object obj) {
     if (!getUri().equals(other.getUri())) return false;
     if (!getReferrerUri().equals(other.getReferrerUri())) return false;
     if (!getPageViewId().equals(other.getPageViewId())) return false;
-    if (!unknownFields.equals(other.unknownFields)) return false;
+    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
     return true;
   }
 
@@ -2036,7 +1792,7 @@ public int hashCode() {
     hash = (53 * hash) + getReferrerUri().hashCode();
     hash = (37 * hash) + PAGE_VIEW_ID_FIELD_NUMBER;
     hash = (53 * hash) + getPageViewId().hashCode();
-    hash = (29 * hash) + unknownFields.hashCode();
+    hash = (29 * hash) + getUnknownFields().hashCode();
     memoizedHashCode = hash;
     return hash;
   }
@@ -2186,19 +1942,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
     }
 
     // Construct using com.google.cloud.retail.v2beta.UserEvent.newBuilder()
-    private Builder() {
-      maybeForceBuilderInitialization();
-    }
+    private Builder() {}
 
     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
       super(parent);
-      maybeForceBuilderInitialization();
-    }
-
-    private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-        getProductDetailsFieldBuilder();
-      }
     }
 
     @java.lang.Override
@@ -2222,10 +1969,11 @@ public Builder clear() {
 
       if (productDetailsBuilder_ == null) {
         productDetails_ = java.util.Collections.emptyList();
-        bitField0_ = (bitField0_ & ~0x00000002);
       } else {
+        productDetails_ = null;
         productDetailsBuilder_.clear();
       }
+      bitField0_ = (bitField0_ & ~0x00000002);
       if (completionDetailBuilder_ == null) {
         completionDetail_ = null;
       } else {
@@ -2500,7 +2248,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.UserEvent other) {
         pageViewId_ = other.pageViewId_;
         onChanged();
       }
-      this.mergeUnknownFields(other.unknownFields);
+      this.mergeUnknownFields(other.getUnknownFields());
       onChanged();
       return this;
     }
@@ -2515,17 +2263,169 @@ public Builder mergeFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      com.google.cloud.retail.v2beta.UserEvent parsedMessage = null;
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
       try {
-        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10:
+              {
+                eventType_ = input.readStringRequireUtf8();
+
+                break;
+              } // case 10
+            case 18:
+              {
+                visitorId_ = input.readStringRequireUtf8();
+
+                break;
+              } // case 18
+            case 26:
+              {
+                input.readMessage(getEventTimeFieldBuilder().getBuilder(), extensionRegistry);
+
+                break;
+              } // case 26
+            case 34:
+              {
+                java.lang.String s = input.readStringRequireUtf8();
+                ensureExperimentIdsIsMutable();
+                experimentIds_.add(s);
+                break;
+              } // case 34
+            case 42:
+              {
+                attributionToken_ = input.readStringRequireUtf8();
+
+                break;
+              } // case 42
+            case 50:
+              {
+                com.google.cloud.retail.v2beta.ProductDetail m =
+                    input.readMessage(
+                        com.google.cloud.retail.v2beta.ProductDetail.parser(), extensionRegistry);
+                if (productDetailsBuilder_ == null) {
+                  ensureProductDetailsIsMutable();
+                  productDetails_.add(m);
+                } else {
+                  productDetailsBuilder_.addMessage(m);
+                }
+                break;
+              } // case 50
+            case 58:
+              {
+                com.google.protobuf.MapEntry<
+                        java.lang.String, com.google.cloud.retail.v2beta.CustomAttribute>
+                    attributes__ =
+                        input.readMessage(
+                            AttributesDefaultEntryHolder.defaultEntry.getParserForType(),
+                            extensionRegistry);
+                internalGetMutableAttributes()
+                    .getMutableMap()
+                    .put(attributes__.getKey(), attributes__.getValue());
+                break;
+              } // case 58
+            case 66:
+              {
+                cartId_ = input.readStringRequireUtf8();
+
+                break;
+              } // case 66
+            case 74:
+              {
+                input.readMessage(
+                    getPurchaseTransactionFieldBuilder().getBuilder(), extensionRegistry);
+
+                break;
+              } // case 74
+            case 82:
+              {
+                searchQuery_ = input.readStringRequireUtf8();
+
+                break;
+              } // case 82
+            case 90:
+              {
+                java.lang.String s = input.readStringRequireUtf8();
+                ensurePageCategoriesIsMutable();
+                pageCategories_.add(s);
+                break;
+              } // case 90
+            case 98:
+              {
+                input.readMessage(getUserInfoFieldBuilder().getBuilder(), extensionRegistry);
+
+                break;
+              } // case 98
+            case 106:
+              {
+                uri_ = input.readStringRequireUtf8();
+
+                break;
+              } // case 106
+            case 114:
+              {
+                referrerUri_ = input.readStringRequireUtf8();
+
+                break;
+              } // case 114
+            case 122:
+              {
+                pageViewId_ = input.readStringRequireUtf8();
+
+                break;
+              } // case 122
+            case 130:
+              {
+                filter_ = input.readStringRequireUtf8();
+
+                break;
+              } // case 130
+            case 138:
+              {
+                orderBy_ = input.readStringRequireUtf8();
+
+                break;
+              } // case 138
+            case 144:
+              {
+                offset_ = input.readInt32();
+
+                break;
+              } // case 144
+            case 170:
+              {
+                sessionId_ = input.readStringRequireUtf8();
+
+                break;
+              } // case 170
+            case 178:
+              {
+                input.readMessage(
+                    getCompletionDetailFieldBuilder().getBuilder(), extensionRegistry);
+
+                break;
+              } // case 178
+            default:
+              {
+                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                  done = true; // was an endgroup tag
+                }
+                break;
+              } // default:
+          } // switch (tag)
+        } // while (!done)
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        parsedMessage = (com.google.cloud.retail.v2beta.UserEvent) e.getUnfinishedMessage();
         throw e.unwrapIOException();
       } finally {
-        if (parsedMessage != null) {
-          mergeFrom(parsedMessage);
-        }
-      }
+        onChanged();
+      } // finally
       return this;
     }
 
@@ -5484,7 +5384,7 @@ private void ensurePageCategoriesIsMutable() {
      * 
      * The categories associated with a category page.
      * To represent full path of category, use '>' sign to separate different
-     * hierarchies. If '>' is part of the category name, please replace it with
+     * hierarchies. If '>' is part of the category name, replace it with
      * other character(s).
      * Category pages include special pages such as sales or promotions. For
      * instance, a special sale page may have the category hierarchy:
@@ -5509,7 +5409,7 @@ public com.google.protobuf.ProtocolStringList getPageCategoriesList() {
      * 
      * The categories associated with a category page.
      * To represent full path of category, use '>' sign to separate different
-     * hierarchies. If '>' is part of the category name, please replace it with
+     * hierarchies. If '>' is part of the category name, replace it with
      * other character(s).
      * Category pages include special pages such as sales or promotions. For
      * instance, a special sale page may have the category hierarchy:
@@ -5534,7 +5434,7 @@ public int getPageCategoriesCount() {
      * 
      * The categories associated with a category page.
      * To represent full path of category, use '>' sign to separate different
-     * hierarchies. If '>' is part of the category name, please replace it with
+     * hierarchies. If '>' is part of the category name, replace it with
      * other character(s).
      * Category pages include special pages such as sales or promotions. For
      * instance, a special sale page may have the category hierarchy:
@@ -5560,7 +5460,7 @@ public java.lang.String getPageCategories(int index) {
      * 
      * The categories associated with a category page.
      * To represent full path of category, use '>' sign to separate different
-     * hierarchies. If '>' is part of the category name, please replace it with
+     * hierarchies. If '>' is part of the category name, replace it with
      * other character(s).
      * Category pages include special pages such as sales or promotions. For
      * instance, a special sale page may have the category hierarchy:
@@ -5586,7 +5486,7 @@ public com.google.protobuf.ByteString getPageCategoriesBytes(int index) {
      * 
      * The categories associated with a category page.
      * To represent full path of category, use '>' sign to separate different
-     * hierarchies. If '>' is part of the category name, please replace it with
+     * hierarchies. If '>' is part of the category name, replace it with
      * other character(s).
      * Category pages include special pages such as sales or promotions. For
      * instance, a special sale page may have the category hierarchy:
@@ -5619,7 +5519,7 @@ public Builder setPageCategories(int index, java.lang.String value) {
      * 
      * The categories associated with a category page.
      * To represent full path of category, use '>' sign to separate different
-     * hierarchies. If '>' is part of the category name, please replace it with
+     * hierarchies. If '>' is part of the category name, replace it with
      * other character(s).
      * Category pages include special pages such as sales or promotions. For
      * instance, a special sale page may have the category hierarchy:
@@ -5651,7 +5551,7 @@ public Builder addPageCategories(java.lang.String value) {
      * 
      * The categories associated with a category page.
      * To represent full path of category, use '>' sign to separate different
-     * hierarchies. If '>' is part of the category name, please replace it with
+     * hierarchies. If '>' is part of the category name, replace it with
      * other character(s).
      * Category pages include special pages such as sales or promotions. For
      * instance, a special sale page may have the category hierarchy:
@@ -5680,7 +5580,7 @@ public Builder addAllPageCategories(java.lang.Iterable values)
      * 
      * The categories associated with a category page.
      * To represent full path of category, use '>' sign to separate different
-     * hierarchies. If '>' is part of the category name, please replace it with
+     * hierarchies. If '>' is part of the category name, replace it with
      * other character(s).
      * Category pages include special pages such as sales or promotions. For
      * instance, a special sale page may have the category hierarchy:
@@ -5708,7 +5608,7 @@ public Builder clearPageCategories() {
      * 
      * The categories associated with a category page.
      * To represent full path of category, use '>' sign to separate different
-     * hierarchies. If '>' is part of the category name, please replace it with
+     * hierarchies. If '>' is part of the category name, replace it with
      * other character(s).
      * Category pages include special pages such as sales or promotions. For
      * instance, a special sale page may have the category hierarchy:
@@ -6331,7 +6231,18 @@ public UserEvent parsePartialFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws com.google.protobuf.InvalidProtocolBufferException {
-          return new UserEvent(input, extensionRegistry);
+          Builder builder = newBuilder();
+          try {
+            builder.mergeFrom(input, extensionRegistry);
+          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+            throw e.setUnfinishedMessage(builder.buildPartial());
+          } catch (com.google.protobuf.UninitializedMessageException e) {
+            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+          } catch (java.io.IOException e) {
+            throw new com.google.protobuf.InvalidProtocolBufferException(e)
+                .setUnfinishedMessage(builder.buildPartial());
+          }
+          return builder.buildPartial();
         }
       };
 
diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventImportSummary.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventImportSummary.java
index 71c2f42b..02beca77 100644
--- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventImportSummary.java
+++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventImportSummary.java
@@ -51,55 +51,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
     return this.unknownFields;
   }
 
-  private UserEventImportSummary(
-      com.google.protobuf.CodedInputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    this();
-    if (extensionRegistry == null) {
-      throw new java.lang.NullPointerException();
-    }
-    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-        com.google.protobuf.UnknownFieldSet.newBuilder();
-    try {
-      boolean done = false;
-      while (!done) {
-        int tag = input.readTag();
-        switch (tag) {
-          case 0:
-            done = true;
-            break;
-          case 8:
-            {
-              joinedEventsCount_ = input.readInt64();
-              break;
-            }
-          case 16:
-            {
-              unjoinedEventsCount_ = input.readInt64();
-              break;
-            }
-          default:
-            {
-              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-        }
-      }
-    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-      throw e.setUnfinishedMessage(this);
-    } catch (com.google.protobuf.UninitializedMessageException e) {
-      throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
-    } catch (java.io.IOException e) {
-      throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-    } finally {
-      this.unknownFields = unknownFields.build();
-      makeExtensionsImmutable();
-    }
-  }
-
   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
     return com.google.cloud.retail.v2beta.ImportConfigProto
         .internal_static_google_cloud_retail_v2beta_UserEventImportSummary_descriptor;
@@ -172,7 +123,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     if (unjoinedEventsCount_ != 0L) {
       output.writeInt64(2, unjoinedEventsCount_);
     }
-    unknownFields.writeTo(output);
+    getUnknownFields().writeTo(output);
   }
 
   @java.lang.Override
@@ -187,7 +138,7 @@ public int getSerializedSize() {
     if (unjoinedEventsCount_ != 0L) {
       size += com.google.protobuf.CodedOutputStream.computeInt64Size(2, unjoinedEventsCount_);
     }
-    size += unknownFields.getSerializedSize();
+    size += getUnknownFields().getSerializedSize();
     memoizedSize = size;
     return size;
   }
@@ -205,7 +156,7 @@ public boolean equals(final java.lang.Object obj) {
 
     if (getJoinedEventsCount() != other.getJoinedEventsCount()) return false;
     if (getUnjoinedEventsCount() != other.getUnjoinedEventsCount()) return false;
-    if (!unknownFields.equals(other.unknownFields)) return false;
+    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
     return true;
   }
 
@@ -220,7 +171,7 @@ public int hashCode() {
     hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getJoinedEventsCount());
     hash = (37 * hash) + UNJOINED_EVENTS_COUNT_FIELD_NUMBER;
     hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getUnjoinedEventsCount());
-    hash = (29 * hash) + unknownFields.hashCode();
+    hash = (29 * hash) + getUnknownFields().hashCode();
     memoizedHashCode = hash;
     return hash;
   }
@@ -351,17 +302,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
     }
 
     // Construct using com.google.cloud.retail.v2beta.UserEventImportSummary.newBuilder()
-    private Builder() {
-      maybeForceBuilderInitialization();
-    }
+    private Builder() {}
 
     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
       super(parent);
-      maybeForceBuilderInitialization();
-    }
-
-    private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
     }
 
     @java.lang.Override
@@ -456,7 +400,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.UserEventImportSummary o
       if (other.getUnjoinedEventsCount() != 0L) {
         setUnjoinedEventsCount(other.getUnjoinedEventsCount());
       }
-      this.mergeUnknownFields(other.unknownFields);
+      this.mergeUnknownFields(other.getUnknownFields());
       onChanged();
       return this;
     }
@@ -471,18 +415,43 @@ public Builder mergeFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      com.google.cloud.retail.v2beta.UserEventImportSummary parsedMessage = null;
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
       try {
-        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 8:
+              {
+                joinedEventsCount_ = input.readInt64();
+
+                break;
+              } // case 8
+            case 16:
+              {
+                unjoinedEventsCount_ = input.readInt64();
+
+                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) {
-        parsedMessage =
-            (com.google.cloud.retail.v2beta.UserEventImportSummary) e.getUnfinishedMessage();
         throw e.unwrapIOException();
       } finally {
-        if (parsedMessage != null) {
-          mergeFrom(parsedMessage);
-        }
-      }
+        onChanged();
+      } // finally
       return this;
     }
 
@@ -625,7 +594,18 @@ public UserEventImportSummary parsePartialFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws com.google.protobuf.InvalidProtocolBufferException {
-          return new UserEventImportSummary(input, extensionRegistry);
+          Builder builder = newBuilder();
+          try {
+            builder.mergeFrom(input, extensionRegistry);
+          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+            throw e.setUnfinishedMessage(builder.buildPartial());
+          } catch (com.google.protobuf.UninitializedMessageException e) {
+            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+          } catch (java.io.IOException e) {
+            throw new com.google.protobuf.InvalidProtocolBufferException(e)
+                .setUnfinishedMessage(builder.buildPartial());
+          }
+          return builder.buildPartial();
         }
       };
 
diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventInlineSource.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventInlineSource.java
index f6e20c7f..57e6844e 100644
--- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventInlineSource.java
+++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventInlineSource.java
@@ -52,60 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
     return this.unknownFields;
   }
 
-  private UserEventInlineSource(
-      com.google.protobuf.CodedInputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    this();
-    if (extensionRegistry == null) {
-      throw new java.lang.NullPointerException();
-    }
-    int mutable_bitField0_ = 0;
-    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-        com.google.protobuf.UnknownFieldSet.newBuilder();
-    try {
-      boolean done = false;
-      while (!done) {
-        int tag = input.readTag();
-        switch (tag) {
-          case 0:
-            done = true;
-            break;
-          case 10:
-            {
-              if (!((mutable_bitField0_ & 0x00000001) != 0)) {
-                userEvents_ = new java.util.ArrayList();
-                mutable_bitField0_ |= 0x00000001;
-              }
-              userEvents_.add(
-                  input.readMessage(
-                      com.google.cloud.retail.v2beta.UserEvent.parser(), extensionRegistry));
-              break;
-            }
-          default:
-            {
-              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-        }
-      }
-    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-      throw e.setUnfinishedMessage(this);
-    } catch (com.google.protobuf.UninitializedMessageException e) {
-      throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
-    } catch (java.io.IOException e) {
-      throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-    } finally {
-      if (((mutable_bitField0_ & 0x00000001) != 0)) {
-        userEvents_ = java.util.Collections.unmodifiableList(userEvents_);
-      }
-      this.unknownFields = unknownFields.build();
-      makeExtensionsImmutable();
-    }
-  }
-
   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
     return com.google.cloud.retail.v2beta.ImportConfigProto
         .internal_static_google_cloud_retail_v2beta_UserEventInlineSource_descriptor;
@@ -217,7 +163,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     for (int i = 0; i < userEvents_.size(); i++) {
       output.writeMessage(1, userEvents_.get(i));
     }
-    unknownFields.writeTo(output);
+    getUnknownFields().writeTo(output);
   }
 
   @java.lang.Override
@@ -229,7 +175,7 @@ public int getSerializedSize() {
     for (int i = 0; i < userEvents_.size(); i++) {
       size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, userEvents_.get(i));
     }
-    size += unknownFields.getSerializedSize();
+    size += getUnknownFields().getSerializedSize();
     memoizedSize = size;
     return size;
   }
@@ -246,7 +192,7 @@ public boolean equals(final java.lang.Object obj) {
         (com.google.cloud.retail.v2beta.UserEventInlineSource) obj;
 
     if (!getUserEventsList().equals(other.getUserEventsList())) return false;
-    if (!unknownFields.equals(other.unknownFields)) return false;
+    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
     return true;
   }
 
@@ -261,7 +207,7 @@ public int hashCode() {
       hash = (37 * hash) + USER_EVENTS_FIELD_NUMBER;
       hash = (53 * hash) + getUserEventsList().hashCode();
     }
-    hash = (29 * hash) + unknownFields.hashCode();
+    hash = (29 * hash) + getUnknownFields().hashCode();
     memoizedHashCode = hash;
     return hash;
   }
@@ -390,19 +336,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
     }
 
     // Construct using com.google.cloud.retail.v2beta.UserEventInlineSource.newBuilder()
-    private Builder() {
-      maybeForceBuilderInitialization();
-    }
+    private Builder() {}
 
     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
       super(parent);
-      maybeForceBuilderInitialization();
-    }
-
-    private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
-        getUserEventsFieldBuilder();
-      }
     }
 
     @java.lang.Override
@@ -410,10 +347,11 @@ public Builder clear() {
       super.clear();
       if (userEventsBuilder_ == null) {
         userEvents_ = java.util.Collections.emptyList();
-        bitField0_ = (bitField0_ & ~0x00000001);
       } else {
+        userEvents_ = null;
         userEventsBuilder_.clear();
       }
+      bitField0_ = (bitField0_ & ~0x00000001);
       return this;
     }
 
@@ -528,7 +466,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.UserEventInlineSource ot
           }
         }
       }
-      this.mergeUnknownFields(other.unknownFields);
+      this.mergeUnknownFields(other.getUnknownFields());
       onChanged();
       return this;
     }
@@ -543,18 +481,44 @@ public Builder mergeFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      com.google.cloud.retail.v2beta.UserEventInlineSource parsedMessage = null;
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
       try {
-        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10:
+              {
+                com.google.cloud.retail.v2beta.UserEvent m =
+                    input.readMessage(
+                        com.google.cloud.retail.v2beta.UserEvent.parser(), extensionRegistry);
+                if (userEventsBuilder_ == null) {
+                  ensureUserEventsIsMutable();
+                  userEvents_.add(m);
+                } else {
+                  userEventsBuilder_.addMessage(m);
+                }
+                break;
+              } // case 10
+            default:
+              {
+                if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+                  done = true; // was an endgroup tag
+                }
+                break;
+              } // default:
+          } // switch (tag)
+        } // while (!done)
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-        parsedMessage =
-            (com.google.cloud.retail.v2beta.UserEventInlineSource) e.getUnfinishedMessage();
         throw e.unwrapIOException();
       } finally {
-        if (parsedMessage != null) {
-          mergeFrom(parsedMessage);
-        }
-      }
+        onChanged();
+      } // finally
       return this;
     }
 
@@ -978,7 +942,18 @@ public UserEventInlineSource parsePartialFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws com.google.protobuf.InvalidProtocolBufferException {
-          return new UserEventInlineSource(input, extensionRegistry);
+          Builder builder = newBuilder();
+          try {
+            builder.mergeFrom(input, extensionRegistry);
+          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+            throw e.setUnfinishedMessage(builder.buildPartial());
+          } catch (com.google.protobuf.UninitializedMessageException e) {
+            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+          } catch (java.io.IOException e) {
+            throw new com.google.protobuf.InvalidProtocolBufferException(e)
+                .setUnfinishedMessage(builder.buildPartial());
+          }
+          return builder.buildPartial();
         }
       };
 
diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventInputConfig.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventInputConfig.java
index 15924501..05cdb585 100644
--- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventInputConfig.java
+++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventInputConfig.java
@@ -50,96 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
     return this.unknownFields;
   }
 
-  private UserEventInputConfig(
-      com.google.protobuf.CodedInputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    this();
-    if (extensionRegistry == null) {
-      throw new java.lang.NullPointerException();
-    }
-    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-        com.google.protobuf.UnknownFieldSet.newBuilder();
-    try {
-      boolean done = false;
-      while (!done) {
-        int tag = input.readTag();
-        switch (tag) {
-          case 0:
-            done = true;
-            break;
-          case 10:
-            {
-              com.google.cloud.retail.v2beta.UserEventInlineSource.Builder subBuilder = null;
-              if (sourceCase_ == 1) {
-                subBuilder =
-                    ((com.google.cloud.retail.v2beta.UserEventInlineSource) source_).toBuilder();
-              }
-              source_ =
-                  input.readMessage(
-                      com.google.cloud.retail.v2beta.UserEventInlineSource.parser(),
-                      extensionRegistry);
-              if (subBuilder != null) {
-                subBuilder.mergeFrom(
-                    (com.google.cloud.retail.v2beta.UserEventInlineSource) source_);
-                source_ = subBuilder.buildPartial();
-              }
-              sourceCase_ = 1;
-              break;
-            }
-          case 18:
-            {
-              com.google.cloud.retail.v2beta.GcsSource.Builder subBuilder = null;
-              if (sourceCase_ == 2) {
-                subBuilder = ((com.google.cloud.retail.v2beta.GcsSource) source_).toBuilder();
-              }
-              source_ =
-                  input.readMessage(
-                      com.google.cloud.retail.v2beta.GcsSource.parser(), extensionRegistry);
-              if (subBuilder != null) {
-                subBuilder.mergeFrom((com.google.cloud.retail.v2beta.GcsSource) source_);
-                source_ = subBuilder.buildPartial();
-              }
-              sourceCase_ = 2;
-              break;
-            }
-          case 26:
-            {
-              com.google.cloud.retail.v2beta.BigQuerySource.Builder subBuilder = null;
-              if (sourceCase_ == 3) {
-                subBuilder = ((com.google.cloud.retail.v2beta.BigQuerySource) source_).toBuilder();
-              }
-              source_ =
-                  input.readMessage(
-                      com.google.cloud.retail.v2beta.BigQuerySource.parser(), extensionRegistry);
-              if (subBuilder != null) {
-                subBuilder.mergeFrom((com.google.cloud.retail.v2beta.BigQuerySource) source_);
-                source_ = subBuilder.buildPartial();
-              }
-              sourceCase_ = 3;
-              break;
-            }
-          default:
-            {
-              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-        }
-      }
-    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-      throw e.setUnfinishedMessage(this);
-    } catch (com.google.protobuf.UninitializedMessageException e) {
-      throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
-    } catch (java.io.IOException e) {
-      throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-    } finally {
-      this.unknownFields = unknownFields.build();
-      makeExtensionsImmutable();
-    }
-  }
-
   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
     return com.google.cloud.retail.v2beta.ImportConfigProto
         .internal_static_google_cloud_retail_v2beta_UserEventInputConfig_descriptor;
@@ -400,7 +310,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     if (sourceCase_ == 3) {
       output.writeMessage(3, (com.google.cloud.retail.v2beta.BigQuerySource) source_);
     }
-    unknownFields.writeTo(output);
+    getUnknownFields().writeTo(output);
   }
 
   @java.lang.Override
@@ -424,7 +334,7 @@ public int getSerializedSize() {
           com.google.protobuf.CodedOutputStream.computeMessageSize(
               3, (com.google.cloud.retail.v2beta.BigQuerySource) source_);
     }
-    size += unknownFields.getSerializedSize();
+    size += getUnknownFields().getSerializedSize();
     memoizedSize = size;
     return size;
   }
@@ -454,7 +364,7 @@ public boolean equals(final java.lang.Object obj) {
       case 0:
       default:
     }
-    if (!unknownFields.equals(other.unknownFields)) return false;
+    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
     return true;
   }
 
@@ -481,7 +391,7 @@ public int hashCode() {
       case 0:
       default:
     }
-    hash = (29 * hash) + unknownFields.hashCode();
+    hash = (29 * hash) + getUnknownFields().hashCode();
     memoizedHashCode = hash;
     return hash;
   }
@@ -610,22 +520,24 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
     }
 
     // Construct using com.google.cloud.retail.v2beta.UserEventInputConfig.newBuilder()
-    private Builder() {
-      maybeForceBuilderInitialization();
-    }
+    private Builder() {}
 
     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
       super(parent);
-      maybeForceBuilderInitialization();
-    }
-
-    private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
     }
 
     @java.lang.Override
     public Builder clear() {
       super.clear();
+      if (userEventInlineSourceBuilder_ != null) {
+        userEventInlineSourceBuilder_.clear();
+      }
+      if (gcsSourceBuilder_ != null) {
+        gcsSourceBuilder_.clear();
+      }
+      if (bigQuerySourceBuilder_ != null) {
+        bigQuerySourceBuilder_.clear();
+      }
       sourceCase_ = 0;
       source_ = null;
       return this;
@@ -748,7 +660,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.UserEventInputConfig oth
             break;
           }
       }
-      this.mergeUnknownFields(other.unknownFields);
+      this.mergeUnknownFields(other.getUnknownFields());
       onChanged();
       return this;
     }
@@ -763,18 +675,50 @@ public Builder mergeFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      com.google.cloud.retail.v2beta.UserEventInputConfig parsedMessage = null;
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
       try {
-        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10:
+              {
+                input.readMessage(
+                    getUserEventInlineSourceFieldBuilder().getBuilder(), extensionRegistry);
+                sourceCase_ = 1;
+                break;
+              } // case 10
+            case 18:
+              {
+                input.readMessage(getGcsSourceFieldBuilder().getBuilder(), extensionRegistry);
+                sourceCase_ = 2;
+                break;
+              } // case 18
+            case 26:
+              {
+                input.readMessage(getBigQuerySourceFieldBuilder().getBuilder(), extensionRegistry);
+                sourceCase_ = 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) {
-        parsedMessage =
-            (com.google.cloud.retail.v2beta.UserEventInputConfig) e.getUnfinishedMessage();
         throw e.unwrapIOException();
       } finally {
-        if (parsedMessage != null) {
-          mergeFrom(parsedMessage);
-        }
-      }
+        onChanged();
+      } // finally
       return this;
     }
 
@@ -1512,7 +1456,18 @@ public UserEventInputConfig parsePartialFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws com.google.protobuf.InvalidProtocolBufferException {
-          return new UserEventInputConfig(input, extensionRegistry);
+          Builder builder = newBuilder();
+          try {
+            builder.mergeFrom(input, extensionRegistry);
+          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+            throw e.setUnfinishedMessage(builder.buildPartial());
+          } catch (com.google.protobuf.UninitializedMessageException e) {
+            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+          } catch (java.io.IOException e) {
+            throw new com.google.protobuf.InvalidProtocolBufferException(e)
+                .setUnfinishedMessage(builder.buildPartial());
+          }
+          return builder.buildPartial();
         }
       };
 
diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventOrBuilder.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventOrBuilder.java
index 7f39e4b6..d491e095 100644
--- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventOrBuilder.java
+++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventOrBuilder.java
@@ -835,7 +835,7 @@ com.google.cloud.retail.v2beta.CustomAttribute getAttributesOrDefault(
    * 
    * The categories associated with a category page.
    * To represent full path of category, use '>' sign to separate different
-   * hierarchies. If '>' is part of the category name, please replace it with
+   * hierarchies. If '>' is part of the category name, replace it with
    * other character(s).
    * Category pages include special pages such as sales or promotions. For
    * instance, a special sale page may have the category hierarchy:
@@ -858,7 +858,7 @@ com.google.cloud.retail.v2beta.CustomAttribute getAttributesOrDefault(
    * 
    * The categories associated with a category page.
    * To represent full path of category, use '>' sign to separate different
-   * hierarchies. If '>' is part of the category name, please replace it with
+   * hierarchies. If '>' is part of the category name, replace it with
    * other character(s).
    * Category pages include special pages such as sales or promotions. For
    * instance, a special sale page may have the category hierarchy:
@@ -881,7 +881,7 @@ com.google.cloud.retail.v2beta.CustomAttribute getAttributesOrDefault(
    * 
    * The categories associated with a category page.
    * To represent full path of category, use '>' sign to separate different
-   * hierarchies. If '>' is part of the category name, please replace it with
+   * hierarchies. If '>' is part of the category name, replace it with
    * other character(s).
    * Category pages include special pages such as sales or promotions. For
    * instance, a special sale page may have the category hierarchy:
@@ -905,7 +905,7 @@ com.google.cloud.retail.v2beta.CustomAttribute getAttributesOrDefault(
    * 
    * The categories associated with a category page.
    * To represent full path of category, use '>' sign to separate different
-   * hierarchies. If '>' is part of the category name, please replace it with
+   * hierarchies. If '>' is part of the category name, replace it with
    * other character(s).
    * Category pages include special pages such as sales or promotions. For
    * instance, a special sale page may have the category hierarchy:
diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceProto.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceProto.java
index 0c9207db..b8802e9a 100644
--- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceProto.java
+++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserEventServiceProto.java
@@ -60,64 +60,64 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
           + "service.proto\022\032google.cloud.retail.v2bet"
           + "a\032\034google/api/annotations.proto\032\027google/"
           + "api/client.proto\032\037google/api/field_behav"
-          + "ior.proto\032\031google/api/httpbody.proto\032.go"
-          + "ogle/cloud/retail/v2beta/import_config.p"
-          + "roto\032-google/cloud/retail/v2beta/purge_c"
-          + "onfig.proto\032+google/cloud/retail/v2beta/"
-          + "user_event.proto\032#google/longrunning/ope"
-          + "rations.proto\"l\n\025WriteUserEventRequest\022\023"
-          + "\n\006parent\030\001 \001(\tB\003\340A\002\022>\n\nuser_event\030\002 \001(\0132"
-          + "%.google.cloud.retail.v2beta.UserEventB\003"
-          + "\340A\002\"a\n\027CollectUserEventRequest\022\023\n\006parent"
-          + "\030\001 \001(\tB\003\340A\002\022\027\n\nuser_event\030\002 \001(\tB\003\340A\002\022\013\n\003"
-          + "uri\030\003 \001(\t\022\013\n\003ets\030\004 \001(\003\"\202\002\n\027RejoinUserEve"
-          + "ntsRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022i\n\027user_"
-          + "event_rejoin_scope\030\002 \001(\0162H.google.cloud."
-          + "retail.v2beta.RejoinUserEventsRequest.Us"
-          + "erEventRejoinScope\"g\n\024UserEventRejoinSco"
-          + "pe\022\'\n#USER_EVENT_REJOIN_SCOPE_UNSPECIFIE"
-          + "D\020\000\022\021\n\rJOINED_EVENTS\020\001\022\023\n\017UNJOINED_EVENT"
-          + "S\020\002\">\n\030RejoinUserEventsResponse\022\"\n\032rejoi"
-          + "ned_user_events_count\030\001 \001(\003\"\032\n\030RejoinUse"
-          + "rEventsMetadata2\373\t\n\020UserEventService\022\303\001\n"
-          + "\016WriteUserEvent\0221.google.cloud.retail.v2"
-          + "beta.WriteUserEventRequest\032%.google.clou"
-          + "d.retail.v2beta.UserEvent\"W\202\323\344\223\002Q\"C/v2be"
-          + "ta/{parent=projects/*/locations/*/catalo"
-          + "gs/*}/userEvents:write:\nuser_event\022\254\001\n\020C"
-          + "ollectUserEvent\0223.google.cloud.retail.v2"
-          + "beta.CollectUserEventRequest\032\024.google.ap"
-          + "i.HttpBody\"M\202\323\344\223\002G\022E/v2beta/{parent=proj"
-          + "ects/*/locations/*/catalogs/*}/userEvent"
-          + "s:collect\022\226\002\n\017PurgeUserEvents\0222.google.c"
-          + "loud.retail.v2beta.PurgeUserEventsReques"
-          + "t\032\035.google.longrunning.Operation\"\257\001\202\323\344\223\002"
-          + "H\"C/v2beta/{parent=projects/*/locations/"
-          + "*/catalogs/*}/userEvents:purge:\001*\312A^\n2go"
-          + "ogle.cloud.retail.v2beta.PurgeUserEvents"
-          + "Response\022(google.cloud.retail.v2beta.Pur"
-          + "geMetadata\022\233\002\n\020ImportUserEvents\0223.google"
-          + ".cloud.retail.v2beta.ImportUserEventsReq"
-          + "uest\032\035.google.longrunning.Operation\"\262\001\202\323"
-          + "\344\223\002I\"D/v2beta/{parent=projects/*/locatio"
-          + "ns/*/catalogs/*}/userEvents:import:\001*\312A`"
-          + "\n3google.cloud.retail.v2beta.ImportUserE"
-          + "ventsResponse\022)google.cloud.retail.v2bet"
-          + "a.ImportMetadata\022\357\001\n\020RejoinUserEvents\0223."
-          + "google.cloud.retail.v2beta.RejoinUserEve"
-          + "ntsRequest\032\035.google.longrunning.Operatio"
-          + "n\"\206\001\202\323\344\223\002I\"D/v2beta/{parent=projects/*/l"
-          + "ocations/*/catalogs/*}/userEvents:rejoin"
-          + ":\001*\312A4\n\030RejoinUserEventsResponse\022\030Rejoin"
-          + "UserEventsMetadata\032I\312A\025retail.googleapis"
-          + ".com\322A.https://www.googleapis.com/auth/c"
-          + "loud-platformB\336\001\n\036com.google.cloud.retai"
-          + "l.v2betaB\025UserEventServiceProtoP\001Z@googl"
-          + "e.golang.org/genproto/googleapis/cloud/r"
-          + "etail/v2beta;retail\242\002\006RETAIL\252\002\032Google.Cl"
-          + "oud.Retail.V2Beta\312\002\032Google\\Cloud\\Retail\\"
-          + "V2beta\352\002\035Google::Cloud::Retail::V2betab\006"
-          + "proto3"
+          + "ior.proto\032\031google/api/httpbody.proto\032\031go"
+          + "ogle/api/resource.proto\032.google/cloud/re"
+          + "tail/v2beta/import_config.proto\032-google/"
+          + "cloud/retail/v2beta/purge_config.proto\032+"
+          + "google/cloud/retail/v2beta/user_event.pr"
+          + "oto\032#google/longrunning/operations.proto"
+          + "\"l\n\025WriteUserEventRequest\022\023\n\006parent\030\001 \001("
+          + "\tB\003\340A\002\022>\n\nuser_event\030\002 \001(\0132%.google.clou"
+          + "d.retail.v2beta.UserEventB\003\340A\002\"a\n\027Collec"
+          + "tUserEventRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\027"
+          + "\n\nuser_event\030\002 \001(\tB\003\340A\002\022\013\n\003uri\030\003 \001(\t\022\013\n\003"
+          + "ets\030\004 \001(\003\"\202\002\n\027RejoinUserEventsRequest\022\023\n"
+          + "\006parent\030\001 \001(\tB\003\340A\002\022i\n\027user_event_rejoin_"
+          + "scope\030\002 \001(\0162H.google.cloud.retail.v2beta"
+          + ".RejoinUserEventsRequest.UserEventRejoin"
+          + "Scope\"g\n\024UserEventRejoinScope\022\'\n#USER_EV"
+          + "ENT_REJOIN_SCOPE_UNSPECIFIED\020\000\022\021\n\rJOINED"
+          + "_EVENTS\020\001\022\023\n\017UNJOINED_EVENTS\020\002\">\n\030Rejoin"
+          + "UserEventsResponse\022\"\n\032rejoined_user_even"
+          + "ts_count\030\001 \001(\003\"\032\n\030RejoinUserEventsMetada"
+          + "ta2\373\t\n\020UserEventService\022\303\001\n\016WriteUserEve"
+          + "nt\0221.google.cloud.retail.v2beta.WriteUse"
+          + "rEventRequest\032%.google.cloud.retail.v2be"
+          + "ta.UserEvent\"W\202\323\344\223\002Q\"C/v2beta/{parent=pr"
+          + "ojects/*/locations/*/catalogs/*}/userEve"
+          + "nts:write:\nuser_event\022\254\001\n\020CollectUserEve"
+          + "nt\0223.google.cloud.retail.v2beta.CollectU"
+          + "serEventRequest\032\024.google.api.HttpBody\"M\202"
+          + "\323\344\223\002G\022E/v2beta/{parent=projects/*/locati"
+          + "ons/*/catalogs/*}/userEvents:collect\022\226\002\n"
+          + "\017PurgeUserEvents\0222.google.cloud.retail.v"
+          + "2beta.PurgeUserEventsRequest\032\035.google.lo"
+          + "ngrunning.Operation\"\257\001\202\323\344\223\002H\"C/v2beta/{p"
+          + "arent=projects/*/locations/*/catalogs/*}"
+          + "/userEvents:purge:\001*\312A^\n2google.cloud.re"
+          + "tail.v2beta.PurgeUserEventsResponse\022(goo"
+          + "gle.cloud.retail.v2beta.PurgeMetadata\022\233\002"
+          + "\n\020ImportUserEvents\0223.google.cloud.retail"
+          + ".v2beta.ImportUserEventsRequest\032\035.google"
+          + ".longrunning.Operation\"\262\001\202\323\344\223\002I\"D/v2beta"
+          + "/{parent=projects/*/locations/*/catalogs"
+          + "/*}/userEvents:import:\001*\312A`\n3google.clou"
+          + "d.retail.v2beta.ImportUserEventsResponse"
+          + "\022)google.cloud.retail.v2beta.ImportMetad"
+          + "ata\022\357\001\n\020RejoinUserEvents\0223.google.cloud."
+          + "retail.v2beta.RejoinUserEventsRequest\032\035."
+          + "google.longrunning.Operation\"\206\001\202\323\344\223\002I\"D/"
+          + "v2beta/{parent=projects/*/locations/*/ca"
+          + "talogs/*}/userEvents:rejoin:\001*\312A4\n\030Rejoi"
+          + "nUserEventsResponse\022\030RejoinUserEventsMet"
+          + "adata\032I\312A\025retail.googleapis.com\322A.https:"
+          + "//www.googleapis.com/auth/cloud-platform"
+          + "B\336\001\n\036com.google.cloud.retail.v2betaB\025Use"
+          + "rEventServiceProtoP\001Z@google.golang.org/"
+          + "genproto/googleapis/cloud/retail/v2beta;"
+          + "retail\242\002\006RETAIL\252\002\032Google.Cloud.Retail.V2"
+          + "Beta\312\002\032Google\\Cloud\\Retail\\V2beta\352\002\035Goog"
+          + "le::Cloud::Retail::V2betab\006proto3"
     };
     descriptor =
         com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom(
@@ -127,6 +127,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
               com.google.api.ClientProto.getDescriptor(),
               com.google.api.FieldBehaviorProto.getDescriptor(),
               com.google.api.HttpBodyProto.getDescriptor(),
+              com.google.api.ResourceProto.getDescriptor(),
               com.google.cloud.retail.v2beta.ImportConfigProto.getDescriptor(),
               com.google.cloud.retail.v2beta.PurgeConfigProto.getDescriptor(),
               com.google.cloud.retail.v2beta.UserEventProto.getDescriptor(),
@@ -183,6 +184,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() {
     com.google.api.ClientProto.getDescriptor();
     com.google.api.FieldBehaviorProto.getDescriptor();
     com.google.api.HttpBodyProto.getDescriptor();
+    com.google.api.ResourceProto.getDescriptor();
     com.google.cloud.retail.v2beta.ImportConfigProto.getDescriptor();
     com.google.cloud.retail.v2beta.PurgeConfigProto.getDescriptor();
     com.google.cloud.retail.v2beta.UserEventProto.getDescriptor();
diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserInfo.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserInfo.java
index 3e624a5e..bd7b4ae9 100644
--- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserInfo.java
+++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/UserInfo.java
@@ -54,71 +54,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
     return this.unknownFields;
   }
 
-  private UserInfo(
-      com.google.protobuf.CodedInputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    this();
-    if (extensionRegistry == null) {
-      throw new java.lang.NullPointerException();
-    }
-    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-        com.google.protobuf.UnknownFieldSet.newBuilder();
-    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();
-
-              userId_ = s;
-              break;
-            }
-          case 18:
-            {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              ipAddress_ = s;
-              break;
-            }
-          case 26:
-            {
-              java.lang.String s = input.readStringRequireUtf8();
-
-              userAgent_ = s;
-              break;
-            }
-          case 32:
-            {
-              directUserRequest_ = input.readBool();
-              break;
-            }
-          default:
-            {
-              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-        }
-      }
-    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-      throw e.setUnfinishedMessage(this);
-    } catch (com.google.protobuf.UninitializedMessageException e) {
-      throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
-    } catch (java.io.IOException e) {
-      throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-    } finally {
-      this.unknownFields = unknownFields.build();
-      makeExtensionsImmutable();
-    }
-  }
-
   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
     return com.google.cloud.retail.v2beta.CommonProto
         .internal_static_google_cloud_retail_v2beta_UserInfo_descriptor;
@@ -388,7 +323,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     if (directUserRequest_ != false) {
       output.writeBool(4, directUserRequest_);
     }
-    unknownFields.writeTo(output);
+    getUnknownFields().writeTo(output);
   }
 
   @java.lang.Override
@@ -409,7 +344,7 @@ public int getSerializedSize() {
     if (directUserRequest_ != false) {
       size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, directUserRequest_);
     }
-    size += unknownFields.getSerializedSize();
+    size += getUnknownFields().getSerializedSize();
     memoizedSize = size;
     return size;
   }
@@ -428,7 +363,7 @@ public boolean equals(final java.lang.Object obj) {
     if (!getIpAddress().equals(other.getIpAddress())) return false;
     if (!getUserAgent().equals(other.getUserAgent())) return false;
     if (getDirectUserRequest() != other.getDirectUserRequest()) return false;
-    if (!unknownFields.equals(other.unknownFields)) return false;
+    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
     return true;
   }
 
@@ -447,7 +382,7 @@ public int hashCode() {
     hash = (53 * hash) + getUserAgent().hashCode();
     hash = (37 * hash) + DIRECT_USER_REQUEST_FIELD_NUMBER;
     hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDirectUserRequest());
-    hash = (29 * hash) + unknownFields.hashCode();
+    hash = (29 * hash) + getUnknownFields().hashCode();
     memoizedHashCode = hash;
     return hash;
   }
@@ -576,17 +511,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
     }
 
     // Construct using com.google.cloud.retail.v2beta.UserInfo.newBuilder()
-    private Builder() {
-      maybeForceBuilderInitialization();
-    }
+    private Builder() {}
 
     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
       super(parent);
-      maybeForceBuilderInitialization();
-    }
-
-    private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
     }
 
     @java.lang.Override
@@ -695,7 +623,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.UserInfo other) {
       if (other.getDirectUserRequest() != false) {
         setDirectUserRequest(other.getDirectUserRequest());
       }
-      this.mergeUnknownFields(other.unknownFields);
+      this.mergeUnknownFields(other.getUnknownFields());
       onChanged();
       return this;
     }
@@ -710,17 +638,55 @@ public Builder mergeFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      com.google.cloud.retail.v2beta.UserInfo parsedMessage = null;
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
       try {
-        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10:
+              {
+                userId_ = input.readStringRequireUtf8();
+
+                break;
+              } // case 10
+            case 18:
+              {
+                ipAddress_ = input.readStringRequireUtf8();
+
+                break;
+              } // case 18
+            case 26:
+              {
+                userAgent_ = input.readStringRequireUtf8();
+
+                break;
+              } // case 26
+            case 32:
+              {
+                directUserRequest_ = input.readBool();
+
+                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) {
-        parsedMessage = (com.google.cloud.retail.v2beta.UserInfo) e.getUnfinishedMessage();
         throw e.unwrapIOException();
       } finally {
-        if (parsedMessage != null) {
-          mergeFrom(parsedMessage);
-        }
-      }
+        onChanged();
+      } // finally
       return this;
     }
 
@@ -1287,7 +1253,18 @@ public UserInfo parsePartialFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws com.google.protobuf.InvalidProtocolBufferException {
-          return new UserInfo(input, extensionRegistry);
+          Builder builder = newBuilder();
+          try {
+            builder.mergeFrom(input, extensionRegistry);
+          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+            throw e.setUnfinishedMessage(builder.buildPartial());
+          } catch (com.google.protobuf.UninitializedMessageException e) {
+            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+          } catch (java.io.IOException e) {
+            throw new com.google.protobuf.InvalidProtocolBufferException(e)
+                .setUnfinishedMessage(builder.buildPartial());
+          }
+          return builder.buildPartial();
         }
       };
 
diff --git a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/WriteUserEventRequest.java b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/WriteUserEventRequest.java
index 3531f731..ae96e972 100644
--- a/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/WriteUserEventRequest.java
+++ b/proto-google-cloud-retail-v2beta/src/main/java/com/google/cloud/retail/v2beta/WriteUserEventRequest.java
@@ -52,68 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
     return this.unknownFields;
   }
 
-  private WriteUserEventRequest(
-      com.google.protobuf.CodedInputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    this();
-    if (extensionRegistry == null) {
-      throw new java.lang.NullPointerException();
-    }
-    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-        com.google.protobuf.UnknownFieldSet.newBuilder();
-    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();
-
-              parent_ = s;
-              break;
-            }
-          case 18:
-            {
-              com.google.cloud.retail.v2beta.UserEvent.Builder subBuilder = null;
-              if (userEvent_ != null) {
-                subBuilder = userEvent_.toBuilder();
-              }
-              userEvent_ =
-                  input.readMessage(
-                      com.google.cloud.retail.v2beta.UserEvent.parser(), extensionRegistry);
-              if (subBuilder != null) {
-                subBuilder.mergeFrom(userEvent_);
-                userEvent_ = subBuilder.buildPartial();
-              }
-
-              break;
-            }
-          default:
-            {
-              if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) {
-                done = true;
-              }
-              break;
-            }
-        }
-      }
-    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
-      throw e.setUnfinishedMessage(this);
-    } catch (com.google.protobuf.UninitializedMessageException e) {
-      throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this);
-    } catch (java.io.IOException e) {
-      throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this);
-    } finally {
-      this.unknownFields = unknownFields.build();
-      makeExtensionsImmutable();
-    }
-  }
-
   public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
     return com.google.cloud.retail.v2beta.UserEventServiceProto
         .internal_static_google_cloud_retail_v2beta_WriteUserEventRequest_descriptor;
@@ -254,7 +192,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     if (userEvent_ != null) {
       output.writeMessage(2, getUserEvent());
     }
-    unknownFields.writeTo(output);
+    getUnknownFields().writeTo(output);
   }
 
   @java.lang.Override
@@ -269,7 +207,7 @@ public int getSerializedSize() {
     if (userEvent_ != null) {
       size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUserEvent());
     }
-    size += unknownFields.getSerializedSize();
+    size += getUnknownFields().getSerializedSize();
     memoizedSize = size;
     return size;
   }
@@ -290,7 +228,7 @@ public boolean equals(final java.lang.Object obj) {
     if (hasUserEvent()) {
       if (!getUserEvent().equals(other.getUserEvent())) return false;
     }
-    if (!unknownFields.equals(other.unknownFields)) return false;
+    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
     return true;
   }
 
@@ -307,7 +245,7 @@ public int hashCode() {
       hash = (37 * hash) + USER_EVENT_FIELD_NUMBER;
       hash = (53 * hash) + getUserEvent().hashCode();
     }
-    hash = (29 * hash) + unknownFields.hashCode();
+    hash = (29 * hash) + getUnknownFields().hashCode();
     memoizedHashCode = hash;
     return hash;
   }
@@ -436,17 +374,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
     }
 
     // Construct using com.google.cloud.retail.v2beta.WriteUserEventRequest.newBuilder()
-    private Builder() {
-      maybeForceBuilderInitialization();
-    }
+    private Builder() {}
 
     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
       super(parent);
-      maybeForceBuilderInitialization();
-    }
-
-    private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
     }
 
     @java.lang.Override
@@ -550,7 +481,7 @@ public Builder mergeFrom(com.google.cloud.retail.v2beta.WriteUserEventRequest ot
       if (other.hasUserEvent()) {
         mergeUserEvent(other.getUserEvent());
       }
-      this.mergeUnknownFields(other.unknownFields);
+      this.mergeUnknownFields(other.getUnknownFields());
       onChanged();
       return this;
     }
@@ -565,18 +496,43 @@ public Builder mergeFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      com.google.cloud.retail.v2beta.WriteUserEventRequest parsedMessage = null;
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
       try {
-        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            case 10:
+              {
+                parent_ = input.readStringRequireUtf8();
+
+                break;
+              } // case 10
+            case 18:
+              {
+                input.readMessage(getUserEventFieldBuilder().getBuilder(), extensionRegistry);
+
+                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) {
-        parsedMessage =
-            (com.google.cloud.retail.v2beta.WriteUserEventRequest) e.getUnfinishedMessage();
         throw e.unwrapIOException();
       } finally {
-        if (parsedMessage != null) {
-          mergeFrom(parsedMessage);
-        }
-      }
+        onChanged();
+      } // finally
       return this;
     }
 
@@ -926,7 +882,18 @@ public WriteUserEventRequest parsePartialFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws com.google.protobuf.InvalidProtocolBufferException {
-          return new WriteUserEventRequest(input, extensionRegistry);
+          Builder builder = newBuilder();
+          try {
+            builder.mergeFrom(input, extensionRegistry);
+          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+            throw e.setUnfinishedMessage(builder.buildPartial());
+          } catch (com.google.protobuf.UninitializedMessageException e) {
+            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+          } catch (java.io.IOException e) {
+            throw new com.google.protobuf.InvalidProtocolBufferException(e)
+                .setUnfinishedMessage(builder.buildPartial());
+          }
+          return builder.buildPartial();
         }
       };
 
diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog.proto
index 0c2cab63..c95e3ac9 100644
--- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog.proto
+++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog.proto
@@ -141,6 +141,19 @@ message CatalogAttribute {
     SEARCHABLE_DISABLED = 2;
   }
 
+  // The status of the exact-searchable option of a catalog attribute.
+  enum ExactSearchableOption {
+    // Value used when unset. Defaults to
+    // [EXACT_SEARCHABLE_DISABLED][google.cloud.retail.v2beta.CatalogAttribute.ExactSearchableOption.EXACT_SEARCHABLE_DISABLED].
+    EXACT_SEARCHABLE_OPTION_UNSPECIFIED = 0;
+
+    // Exact searchable option enabled for an attribute.
+    EXACT_SEARCHABLE_ENABLED = 1;
+
+    // Exact searchable option disabled for an attribute.
+    EXACT_SEARCHABLE_DISABLED = 2;
+  }
+
   // Required. Attribute name.
   // For example: `color`, `brands`, `attributes.custom_attribute`, such as
   // `attributes.xyz`.
@@ -211,6 +224,11 @@ message CatalogAttribute {
   // This option works for categorical features only,
   // does not work for numerical features, inventory filtering.
   RecommendationsFilteringOption recommendations_filtering_option = 8;
+
+  // If EXACT_SEARCHABLE_ENABLED, attribute values will be exact searchable.
+  // This property only applies to textual custom attributes and requires
+  // indexable set to enabled to enable exact-searchable.
+  ExactSearchableOption exact_searchable_option = 11;
 }
 
 // Catalog level attribute config.
@@ -348,8 +366,8 @@ message MerchantCenterLink {
   string branch_id = 2;
 
   // String representing the destination to import for, all if left empty.
-  // List of possible values can be found here.
-  // [https://support.google.com/merchants/answer/7501026]
+  // List of possible values is given in [Included
+  // destination](https://support.google.com/merchants/answer/7501026).
   // List of allowed string values:
   // "Shopping_ads", "Buy_on_google_listings", "Display_ads", "Local_inventory
   // _ads", "Free_listings", "Free_local_listings"
diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog_service.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog_service.proto
index fb6f8bca..7001c211 100644
--- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog_service.proto
+++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/catalog_service.proto
@@ -186,6 +186,17 @@ service CatalogService {
     };
   }
 
+  // Removes all specified
+  // [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s from the
+  // [AttributesConfig][google.cloud.retail.v2beta.AttributesConfig].
+  rpc BatchRemoveCatalogAttributes(BatchRemoveCatalogAttributesRequest)
+      returns (BatchRemoveCatalogAttributesResponse) {
+    option (google.api.http) = {
+      post: "/v2beta/{attributes_config=projects/*/locations/*/catalogs/*/attributesConfig}:batchRemoveCatalogAttributes"
+      body: "*"
+    };
+  }
+
   // Replaces the specified
   // [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] in the
   // [AttributesConfig][google.cloud.retail.v2beta.AttributesConfig] by updating
@@ -341,7 +352,7 @@ message GetDefaultBranchResponse {
 // method.
 message GetCompletionConfigRequest {
   // Required. Full CompletionConfig resource name. Format:
-  // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig
+  // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/completionConfig`
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
     (google.api.resource_reference) = {
@@ -449,6 +460,39 @@ message RemoveCatalogAttributeRequest {
   string key = 2 [(google.api.field_behavior) = REQUIRED];
 }
 
+// Request for
+// [CatalogService.BatchRemoveCatalogAttributes][google.cloud.retail.v2beta.CatalogService.BatchRemoveCatalogAttributes]
+// method.
+message BatchRemoveCatalogAttributesRequest {
+  // Required. The attributes config resource shared by all catalog attributes
+  // being deleted. Format:
+  // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/attributesConfig`
+  string attributes_config = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = {
+      type: "retail.googleapis.com/AttributesConfig"
+    }
+  ];
+
+  // Required. The attribute name keys of the
+  // [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute]s to delete.
+  // A maximum of 1000 catalog attributes can be deleted in a batch.
+  repeated string attribute_keys = 2 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Response of the
+// [CatalogService.BatchRemoveCatalogAttributes][google.cloud.retail.v2beta.CatalogService.BatchRemoveCatalogAttributes].
+message BatchRemoveCatalogAttributesResponse {
+  // Catalog attributes that were deleted. Only attributes that are not [in
+  // use][CatalogAttribute.in_use] by products can be deleted.
+  repeated string deleted_catalog_attributes = 1;
+
+  // Catalog attributes that were reset. Attributes that are [in
+  // use][CatalogAttribute.in_use] by products cannot be deleted, however their
+  // configuration properties will reset to default values upon removal request.
+  repeated string reset_catalog_attributes = 2;
+}
+
 // Request for
 // [CatalogService.ReplaceCatalogAttribute][google.cloud.retail.v2beta.CatalogService.ReplaceCatalogAttribute]
 // method.
diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/common.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/common.proto
index 3a500afc..fd124763 100644
--- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/common.proto
+++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/common.proto
@@ -72,7 +72,7 @@ enum RecommendationsFilteringOption {
 // The use case of Cloud Retail Search.
 enum SearchSolutionUseCase {
   // The value when it's unspecified. In this case, server behavior defaults to
-  // [SEARCH_SOLUTION_USE_CASE_SEARCH][].
+  // [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH].
   SEARCH_SOLUTION_USE_CASE_UNSPECIFIED = 0;
 
   // Search use case. Expects the traffic has a non-empty
@@ -97,8 +97,8 @@ message Condition {
     // Value cannot be empty.
     // Value can have at most 3 terms if specified as a partial match. Each
     // space separated string is considered as one term.
-    // Example) "a b c" is 3 terms and allowed, " a b c d" is 4 terms and not
-    // allowed for partial match.
+    // For example, "a b c" is 3 terms and allowed, but " a b c d" is 4 terms
+    // and not allowed for a partial match.
     string value = 1;
 
     // Whether this is supposed to be a full or partial match.
@@ -127,10 +127,12 @@ message Condition {
 }
 
 // A rule is a condition-action pair
+//
 // * A condition defines when a rule is to be triggered.
 // * An action specifies what occurs on that trigger.
-// Currently only boost rules are supported.
-// Currently only supported by the search endpoint.
+// Currently rules only work for [controls][google.cloud.retail.v2beta.Control]
+// with
+// [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
 message Rule {
   // A boost action to apply to results matching condition specified above.
   message BoostAction {
diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/completion_service.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/completion_service.proto
index 0d6480a1..4db03664 100644
--- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/completion_service.proto
+++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/completion_service.proto
@@ -36,7 +36,7 @@ option ruby_package = "Google::Cloud::Retail::V2beta";
 // Auto-completion service for retail.
 //
 // This feature is only available for users who have Retail Search enabled.
-// Please enable Retail Search on Cloud Console before using this feature.
+// Enable Retail Search on Cloud Console before using this feature.
 service CompletionService {
   option (google.api.default_host) = "retail.googleapis.com";
   option (google.api.oauth_scopes) =
@@ -45,7 +45,7 @@ service CompletionService {
   // Completes the specified prefix with keyword suggestions.
   //
   // This feature is only available for users who have Retail Search enabled.
-  // Please enable Retail Search on Cloud Console before using this feature.
+  // Enable Retail Search on Cloud Console before using this feature.
   rpc CompleteQuery(CompleteQueryRequest) returns (CompleteQueryResponse) {
     option (google.api.http) = {
       get: "/v2beta/{catalog=projects/*/locations/*/catalogs/*}:completeQuery"
@@ -60,7 +60,7 @@ service CompletionService {
   // are indexed successfully and ready for serving. The process takes hours.
   //
   // This feature is only available for users who have Retail Search enabled.
-  // Please enable Retail Search on Cloud Console before using this feature.
+  // Enable Retail Search on Cloud Console before using this feature.
   rpc ImportCompletionData(ImportCompletionDataRequest)
       returns (google.longrunning.Operation) {
     option (google.api.http) = {
diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/control.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/control.proto
index 2cd59be4..238f0f5f 100644
--- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/control.proto
+++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/control.proto
@@ -30,8 +30,9 @@ option objc_class_prefix = "RETAIL";
 option php_namespace = "Google\\Cloud\\Retail\\V2beta";
 option ruby_package = "Google::Cloud::Retail::V2beta";
 
-// Configures dynamic serving time metadata that is used to pre and post
-// process search/recommendation model results.
+// Configures dynamic metadata that can be linked to a
+// [ServingConfig][google.cloud.retail.v2beta.ServingConfig] and affect search
+// or recommendation results at serving time.
 message Control {
   option (google.api.resource) = {
     type: "retail.googleapis.com/Control"
@@ -45,7 +46,10 @@ message Control {
   // INVALID_ARGUMENT will be returned if either condition is violated.
   oneof control {
     // A facet specification to perform faceted search.
-    SearchRequest.FacetSpec facet_spec = 3;
+    //
+    // Note that this field is deprecated and will throw NOT_IMPLEMENTED if
+    // used for creating a control.
+    SearchRequest.FacetSpec facet_spec = 3 [deprecated = true];
 
     // A rule control - a condition-action pair.
     // Enacts a set action when the condition is triggered.
@@ -63,22 +67,34 @@ message Control {
   // characters. Otherwise, an INVALID_ARGUMENT error is thrown.
   string display_name = 2 [(google.api.field_behavior) = REQUIRED];
 
-  // Output only. List of serving configuration ids that that are associated
-  // with this control. Note the association is managed via the ServingConfig,
-  // this is an output only denormalizeed  view. Assumed to be in the same
-  // catalog.
+  // Output only. List of [serving
+  // configuration][google.cloud.retail.v2beta.ServingConfig] ids that are
+  // associated with this control in the same
+  // [Catalog][google.cloud.retail.v2beta.Catalog].
+  //
+  // Note the association is managed via the
+  // [ServingConfig][google.cloud.retail.v2beta.ServingConfig], this is an
+  // output only denormalized view.
   repeated string associated_serving_config_ids = 5
       [(google.api.field_behavior) = OUTPUT_ONLY];
 
-  // Required. Immutable. The solution types that the serving config is used
-  // for. Currently we support setting only one type of solution at creation
-  // time.
+  // Required. Immutable. The solution types that the control is used for.
+  // Currently we support setting only one type of solution at creation time.
   //
   // Only `SOLUTION_TYPE_SEARCH` value is supported at the moment.
   // If no solution type is provided at creation time, will default to
-  // SOLUTION_TYPE_SEARCH.
+  // [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2beta.SolutionType.SOLUTION_TYPE_SEARCH].
   repeated SolutionType solution_types = 6 [
     (google.api.field_behavior) = REQUIRED,
     (google.api.field_behavior) = IMMUTABLE
   ];
+
+  // Specifies the use case for the control.
+  // Affects what condition fields can be set.
+  // Only settable by search controls.
+  // Will default to
+  // [SEARCH_SOLUTION_USE_CASE_SEARCH][google.cloud.retail.v2beta.SearchSolutionUseCase.SEARCH_SOLUTION_USE_CASE_SEARCH]
+  // if not specified. Currently only allow one search_solution_use_case per
+  // control.
+  repeated SearchSolutionUseCase search_solution_use_case = 7;
 }
diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/control_service.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/control_service.proto
index 3ec62e6c..a0a9d2e7 100644
--- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/control_service.proto
+++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/control_service.proto
@@ -66,7 +66,7 @@ service ControlService {
   //
   // [Control][google.cloud.retail.v2beta.Control] cannot be set to a different
   // oneof field, if so an INVALID_ARGUMENT is returned. If the
-  // [Control][google.cloud.retail.v2beta.Control] to delete does not exist, a
+  // [Control][google.cloud.retail.v2beta.Control] to update does not exist, a
   // NOT_FOUND error is returned.
   rpc UpdateControl(UpdateControlRequest) returns (Control) {
     option (google.api.http) = {
@@ -84,7 +84,8 @@ service ControlService {
     option (google.api.method_signature) = "name";
   }
 
-  // Lists all Controls linked to this catalog.
+  // Lists all Controls by their parent
+  // [Catalog][google.cloud.retail.v2beta.Catalog].
   rpc ListControls(ListControlsRequest) returns (ListControlsResponse) {
     option (google.api.http) = {
       get: "/v2beta/{parent=projects/*/locations/*/catalogs/*}/controls"
@@ -140,7 +141,7 @@ message DeleteControlRequest {
 
 // Request for GetControl method.
 message GetControlRequest {
-  // Required. The resource name of the Control to delete. Format:
+  // Required. The resource name of the Control to get. Format:
   // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/controls/{control_id}`
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/export_config.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/export_config.proto
index 52ef46a4..de24f419 100644
--- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/export_config.proto
+++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/export_config.proto
@@ -16,6 +16,8 @@ syntax = "proto3";
 
 package google.cloud.retail.v2beta;
 
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
 import "google/protobuf/timestamp.proto";
 import "google/rpc/status.proto";
 
@@ -40,7 +42,7 @@ message ExportErrorsConfig {
   }
 }
 
-// Metadata related to the progress of the Export operation. This will be
+// Metadata related to the progress of the Export operation. This is
 // returned by the google.longrunning.Operation.metadata field.
 message ExportMetadata {
   // Operation create time.
diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/import_config.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/import_config.proto
index 4e53ca63..e544f647 100644
--- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/import_config.proto
+++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/import_config.proto
@@ -35,7 +35,6 @@ option php_namespace = "Google\\Cloud\\Retail\\V2beta";
 option ruby_package = "Google::Cloud::Retail::V2beta";
 
 // Google Cloud Storage location for input content.
-// format.
 message GcsSource {
   // Required. Google Cloud Storage URIs to input files. URI can be up to
   // 2000 characters long. URIs can match the full object path (for example,
@@ -66,12 +65,12 @@ message GcsSource {
   //
   // Supported values for control imports:
   //
-  // * 'control' (default): One JSON
+  // * `control` (default): One JSON
   // [Control][google.cloud.retail.v2beta.Control] per line.
   //
   // Supported values for catalog attribute imports:
   //
-  // * 'catalog_attribute' (default): One CSV
+  // * `catalog_attribute` (default): One CSV
   // [CatalogAttribute][google.cloud.retail.v2beta.CatalogAttribute] per line.
   string data_schema = 2;
 }
@@ -83,9 +82,8 @@ message BigQuerySource {
   oneof partition {
     // BigQuery time partitioned table's _PARTITIONDATE in YYYY-MM-DD format.
     //
-    // Only supported when
-    // [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-    // is set to `FULL`.
+    // Only supported in
+    // [ImportProductsRequest][google.cloud.retail.v2beta.ImportProductsRequest].
     google.type.Date partition_date = 6;
   }
 
@@ -124,8 +122,7 @@ message BigQuerySource {
   // * `user_event_ga360`:
   //   The schema is available here:
   //   https://support.google.com/analytics/answer/3437719.
-  // * `user_event_ga4`: This feature is in private preview. Please contact the
-  //   support team for importing Google Analytics 4 events.
+  // * `user_event_ga4`:
   //   The schema is available here:
   //   https://support.google.com/analytics/answer/7029846.
   //
@@ -156,7 +153,7 @@ message ImportErrorsConfig {
   // Required. Errors destination.
   oneof destination {
     // Google Cloud Storage prefix for import errors. This must be an empty,
-    // existing Cloud Storage directory. Import errors will be written to
+    // existing Cloud Storage directory. Import errors are written to
     // sharded files in this directory, one per line, as a JSON-encoded
     // `google.rpc.Status` message.
     string gcs_prefix = 1;
@@ -176,16 +173,6 @@ message ImportProductsRequest {
 
     // Calculates diff and replaces the entire product dataset. Existing
     // products may be deleted if they are not present in the source location.
-    //
-    // Can only be set while using
-    // [BigQuerySource][google.cloud.retail.v2beta.BigQuerySource]. And the
-    // BigQuery dataset must be created in the data location "us (multiple
-    // regions in United States)", otherwise a PERMISSION_DENIED error is
-    // thrown.
-    //
-    // Add the IAM permission "BigQuery Data Viewer" for
-    // cloud-retail-customer-data-access@system.gserviceaccount.com before
-    // using this feature otherwise an error is thrown.
     FULL = 2;
   }
 
@@ -208,8 +195,8 @@ message ImportProductsRequest {
   // The desired location of errors incurred during the Import.
   ImportErrorsConfig errors_config = 3;
 
-  // Indicates which fields in the provided imported 'products' to update. If
-  // not set, will by default update all fields.
+  // Indicates which fields in the provided imported `products` to update. If
+  // not set, all fields are updated.
   google.protobuf.FieldMask update_mask = 4;
 
   // The mode of reconciliation between existing products and the products to be
@@ -218,21 +205,16 @@ message ImportProductsRequest {
   ReconciliationMode reconciliation_mode = 5;
 
   // Full Pub/Sub topic name for receiving notification. If this field is set,
-  // when the import is finished, a notification will be sent to
-  // specified Pub/Sub topic. The message data will be JSON string of a
+  // when the import is finished, a notification is sent to
+  // specified Pub/Sub topic. The message data is JSON string of a
   // [Operation][google.longrunning.Operation].
   //
   // Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`. It has
   // to be within the same project as
   // [ImportProductsRequest.parent][google.cloud.retail.v2beta.ImportProductsRequest.parent].
-  // Make sure that both
-  // `cloud-retail-customer-data-access@system.gserviceaccount.com` and
-  // `service-@gcp-sa-retail.iam.gserviceaccount.com`
-  // have the `pubsub.topics.publish` IAM permission on the topic.
-  //
-  // Only supported when
-  // [ImportProductsRequest.reconciliation_mode][google.cloud.retail.v2beta.ImportProductsRequest.reconciliation_mode]
-  // is set to `FULL`.
+  // Make sure that `service-@gcp-sa-retail.iam.gserviceaccount.com` has the
+  // `pubsub.topics.publish` IAM permission on the topic.
   string notification_pubsub_topic = 7;
 }
 
@@ -268,8 +250,8 @@ message ImportCompletionDataRequest {
       [(google.api.field_behavior) = REQUIRED];
 
   // Pub/Sub topic for receiving notification. If this field is set,
-  // when the import is finished, a notification will be sent to
-  // specified Pub/Sub topic. The message data will be JSON string of a
+  // when the import is finished, a notification is sent to
+  // specified Pub/Sub topic. The message data is JSON string of a
   // [Operation][google.longrunning.Operation].
   // Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
   string notification_pubsub_topic = 3;
@@ -329,7 +311,7 @@ message CompletionDataInputConfig {
   }
 }
 
-// Metadata related to the progress of the Import operation. This will be
+// Metadata related to the progress of the Import operation. This is
 // returned by the google.longrunning.Operation.metadata field.
 message ImportMetadata {
   // Operation create time.
@@ -349,8 +331,8 @@ message ImportMetadata {
   string request_id = 5 [deprecated = true];
 
   // Pub/Sub topic for receiving notification. If this field is set,
-  // when the import is finished, a notification will be sent to
-  // specified Pub/Sub topic. The message data will be JSON string of a
+  // when the import is finished, a notification is sent to
+  // specified Pub/Sub topic. The message data is JSON string of a
   // [Operation][google.longrunning.Operation].
   // Format of the Pub/Sub topic is `projects/{project}/topics/{topic}`.
   string notification_pubsub_topic = 6;
diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/model.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/model.proto
new file mode 100644
index 00000000..ea4bd30c
--- /dev/null
+++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/model.proto
@@ -0,0 +1,238 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.retail.v2beta;
+
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/cloud/retail/v2beta/common.proto";
+import "google/protobuf/timestamp.proto";
+
+option csharp_namespace = "Google.Cloud.Retail.V2Beta";
+option go_package = "google.golang.org/genproto/googleapis/cloud/retail/v2beta;retail";
+option java_multiple_files = true;
+option java_outer_classname = "ModelProto";
+option java_package = "com.google.cloud.retail.v2beta";
+option objc_class_prefix = "RETAIL";
+option php_namespace = "Google\\Cloud\\Retail\\V2beta";
+option ruby_package = "Google::Cloud::Retail::V2beta";
+
+// Metadata that describes the training and serving parameters of a
+// [Model][google.cloud.retail.v2beta.Model]. A
+// [Model][google.cloud.retail.v2beta.Model] can be associated with a
+// [ServingConfig][google.cloud.retail.v2beta.ServingConfig] and then queried
+// through the Predict API.
+message Model {
+  option (google.api.resource) = {
+    type: "retail.googleapis.com/Model"
+    pattern: "projects/{project}/locations/{location}/catalogs/{catalog}/models/{model}"
+  };
+
+  // Represents an ordered combination of valid serving configs, which
+  // can be used for `PAGE_OPTIMIZATION` recommendations.
+  message ServingConfigList {
+    // Optional. A set of valid serving configs that may be used for
+    // `PAGE_OPTIMIZATION`.
+    repeated string serving_config_ids = 1
+        [(google.api.field_behavior) = OPTIONAL];
+  }
+
+  // The serving state of the model.
+  enum ServingState {
+    // Unspecified serving state.
+    SERVING_STATE_UNSPECIFIED = 0;
+
+    // The model is not serving.
+    INACTIVE = 1;
+
+    // The model is serving and can be queried.
+    ACTIVE = 2;
+
+    // The model is trained on tuned hyperparameters and can be
+    // queried.
+    TUNED = 3;
+  }
+
+  // The training state of the model.
+  enum TrainingState {
+    // Unspecified training state.
+    TRAINING_STATE_UNSPECIFIED = 0;
+
+    // The model training is paused.
+    PAUSED = 1;
+
+    // The model is training.
+    TRAINING = 2;
+  }
+
+  // Describes whether periodic tuning is enabled for this model
+  // or not. Periodic tuning is scheduled at most every three months. You can
+  // start a tuning process manually by using the `TuneModel`
+  // method, which starts a tuning process immediately and resets the quarterly
+  // schedule. Enabling or disabling periodic tuning does not affect any
+  // current tuning processes.
+  enum PeriodicTuningState {
+    // Unspecified default value, should never be explicitly set.
+    PERIODIC_TUNING_STATE_UNSPECIFIED = 0;
+
+    // The model has periodic tuning disabled. Tuning
+    // can be reenabled by calling the `EnableModelPeriodicTuning`
+    // method or by calling the `TuneModel` method.
+    PERIODIC_TUNING_DISABLED = 1;
+
+    // The model cannot be tuned with periodic tuning OR the
+    // `TuneModel` method. Hide the options in customer UI and
+    // reject any requests through the backend self serve API.
+    ALL_TUNING_DISABLED = 3;
+
+    // The model has periodic tuning enabled. Tuning
+    // can be disabled by calling the `DisableModelPeriodicTuning`
+    // method.
+    PERIODIC_TUNING_ENABLED = 2;
+  }
+
+  // Describes whether this model have sufficient training data
+  // to be continuously trained.
+  enum DataState {
+    // Unspecified default value, should never be explicitly set.
+    DATA_STATE_UNSPECIFIED = 0;
+
+    // The model has sufficient training data.
+    DATA_OK = 1;
+
+    // The model does not have sufficient training data. Error
+    // messages can be queried via Stackdriver.
+    DATA_ERROR = 2;
+  }
+
+  // Required. The fully qualified resource name of the model.
+  //
+  // Format:
+  // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+  // catalog_id has char limit of 50.
+  // recommendation_model_id has char limit of 40.
+  string name = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Required. The display name of the model.
+  //
+  // Should be human readable, used to display Recommendation Models in the
+  // Retail Cloud Console Dashboard. UTF-8 encoded string with limit of 1024
+  // characters.
+  string display_name = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. The training state that the model is in (e.g.
+  // `TRAINING` or `PAUSED`).
+  //
+  // Since part of the cost of running the service
+  // is frequency of training - this can be used to determine when to train
+  // model in order to control cost. If not specified: the default value for
+  // `CreateModel` method is `TRAINING`. The default value for
+  // `UpdateModel` method is to keep the state the same as before.
+  TrainingState training_state = 3 [(google.api.field_behavior) = OPTIONAL];
+
+  // Output only. The serving state of the model: `ACTIVE`, `NOT_ACTIVE`.
+  ServingState serving_state = 4 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. Timestamp the Recommendation Model was created at.
+  google.protobuf.Timestamp create_time = 5
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. Timestamp the Recommendation Model was last updated. E.g.
+  // if a Recommendation Model was paused - this would be the time the pause was
+  // initiated.
+  google.protobuf.Timestamp update_time = 6
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Required. The type of model e.g. `home-page`.
+  //
+  // Currently supported values: `recommended-for-you`, `others-you-may-like`,
+  // `frequently-bought-together`, `page-optimization`, `similar-items`,
+  // `buy-it-again`, and `recently-viewed`(readonly value).
+  //
+  // This field together with
+  // [optimization_objective][google.cloud.retail.v2beta.Model.optimization_objective]
+  // describe model metadata to use to control model training and serving.
+  // See https://cloud.google.com/retail/docs/models
+  // for more details on what the model metadata control and which combination
+  // of parameters are valid. For invalid combinations of parameters (e.g. type
+  // = `frequently-bought-together` and optimization_objective = `ctr`), you
+  // receive an error 400 if you try to create/update a recommendation with
+  // this set of knobs.
+  string type = 7 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. The optimization objective e.g. `cvr`.
+  //
+  // Currently supported
+  // values: `ctr`, `cvr`, `revenue-per-order`.
+  //
+  //  If not specified, we choose default based on model type.
+  // Default depends on type of recommendation:
+  //
+  // `recommended-for-you` => `ctr`
+  //
+  // `others-you-may-like` => `ctr`
+  //
+  // `frequently-bought-together` => `revenue_per_order`
+  //
+  // This field together with
+  // [optimization_objective][google.cloud.retail.v2beta.Model.type]
+  // describe model metadata to use to control model training and serving.
+  // See https://cloud.google.com/retail/docs/models
+  // for more details on what the model metadata control and which combination
+  // of parameters are valid. For invalid combinations of parameters (e.g. type
+  // = `frequently-bought-together` and optimization_objective = `ctr`), you
+  // receive an error 400 if you try to create/update a recommendation with
+  // this set of knobs.
+  string optimization_objective = 8 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. The state of periodic tuning.
+  //
+  // The period we use is 3 months - to do a
+  // one-off tune earlier use the `TuneModel` method. Default value
+  // is `PERIODIC_TUNING_ENABLED`.
+  PeriodicTuningState periodic_tuning_state = 11
+      [(google.api.field_behavior) = OPTIONAL];
+
+  // Output only. The timestamp when the latest successful tune finished.
+  google.protobuf.Timestamp last_tune_time = 12
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. The tune operation associated with the model.
+  //
+  // Can be used to determine if there is an ongoing tune for this
+  // recommendation. Empty field implies no tune is goig on.
+  string tuning_operation = 15 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. The state of data requirements for this model: `DATA_OK` and
+  // `DATA_ERROR`.
+  //
+  // Recommendation model cannot be trained if the data is in
+  // `DATA_ERROR` state. Recommendation model can have `DATA_ERROR` state even
+  // if serving state is `ACTIVE`: models were trained successfully before, but
+  // cannot be refreshed because model no longer has sufficient
+  // data for training.
+  DataState data_state = 16 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Optional. If `RECOMMENDATIONS_FILTERING_ENABLED`, recommendation filtering
+  // by attributes is enabled for the model.
+  RecommendationsFilteringOption filtering_option = 18
+      [(google.api.field_behavior) = OPTIONAL];
+
+  // Output only. The list of valid serving configs associated with the
+  // PageOptimizationConfig.
+  repeated ServingConfigList serving_config_lists = 19
+      [(google.api.field_behavior) = OUTPUT_ONLY];
+}
diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/model_service.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/model_service.proto
new file mode 100644
index 00000000..3a9a3c5a
--- /dev/null
+++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/model_service.proto
@@ -0,0 +1,244 @@
+// Copyright 2022 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+//     http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.cloud.retail.v2beta;
+
+import "google/api/annotations.proto";
+import "google/api/client.proto";
+import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
+import "google/cloud/retail/v2beta/model.proto";
+import "google/longrunning/operations.proto";
+import "google/protobuf/empty.proto";
+import "google/protobuf/field_mask.proto";
+
+option csharp_namespace = "Google.Cloud.Retail.V2Beta";
+option go_package = "google.golang.org/genproto/googleapis/cloud/retail/v2beta;retail";
+option java_multiple_files = true;
+option java_outer_classname = "ModelServiceProto";
+option java_package = "com.google.cloud.retail.v2beta";
+option objc_class_prefix = "RETAIL";
+option php_namespace = "Google\\Cloud\\Retail\\V2beta";
+option ruby_package = "Google::Cloud::Retail::V2beta";
+
+// Service for performing CRUD operations on models.
+// Recommendation models contain all the metadata necessary to generate a set of
+// models for the `Predict()` API. A model is queried
+// indirectly via a ServingConfig, which associates a model with a
+// given Placement (e.g. Frequently Bought Together on Home Page).
+//
+// This service allows you to do the following:
+//
+// * Initiate training of a model.
+// * Pause training of an existing model.
+// * List all the available models along with their metadata.
+// * Control their tuning schedule.
+service ModelService {
+  option (google.api.default_host) = "retail.googleapis.com";
+  option (google.api.oauth_scopes) =
+      "https://www.googleapis.com/auth/cloud-platform";
+
+  // Creates a new model.
+  rpc CreateModel(CreateModelRequest) returns (google.longrunning.Operation) {
+    option (google.api.http) = {
+      post: "/v2beta/{parent=projects/*/locations/*/catalogs/*}/models"
+      body: "model"
+    };
+    option (google.api.method_signature) = "parent,model";
+    option (google.longrunning.operation_info) = {
+      response_type: "google.cloud.retail.v2beta.Model"
+      metadata_type: "google.cloud.retail.v2beta.CreateModelMetadata"
+    };
+  }
+
+  // Pauses the training of an existing model.
+  rpc PauseModel(PauseModelRequest) returns (Model) {
+    option (google.api.http) = {
+      post: "/v2beta/{name=projects/*/locations/*/catalogs/*/models/*}:pause"
+      body: "*"
+    };
+    option (google.api.method_signature) = "name";
+  }
+
+  // Resumes the training of an existing model.
+  rpc ResumeModel(ResumeModelRequest) returns (Model) {
+    option (google.api.http) = {
+      post: "/v2beta/{name=projects/*/locations/*/catalogs/*/models/*}:resume"
+      body: "*"
+    };
+    option (google.api.method_signature) = "name";
+  }
+
+  // Deletes an existing model.
+  rpc DeleteModel(DeleteModelRequest) returns (google.protobuf.Empty) {
+    option (google.api.http) = {
+      delete: "/v2beta/{name=projects/*/locations/*/catalogs/*/models/*}"
+    };
+    option (google.api.method_signature) = "name";
+  }
+
+  // Lists all the models linked to this event store.
+  rpc ListModels(ListModelsRequest) returns (ListModelsResponse) {
+    option (google.api.http) = {
+      get: "/v2beta/{parent=projects/*/locations/*/catalogs/*}/models"
+    };
+    option (google.api.method_signature) = "parent";
+  }
+
+  // Update of model metadata. Only fields that
+  // currently can be updated are: `filtering_option` and
+  // `periodic_tuning_state`.
+  // If other values are provided, this API method ignores them.
+  rpc UpdateModel(UpdateModelRequest) returns (Model) {
+    option (google.api.http) = {
+      patch: "/v2beta/{model.name=projects/*/locations/*/catalogs/*/models/*}"
+      body: "model"
+    };
+    option (google.api.method_signature) = "model,update_mask";
+  }
+
+  // Tunes an existing model.
+  rpc TuneModel(TuneModelRequest) returns (google.longrunning.Operation) {
+    option (google.api.http) = {
+      post: "/v2beta/{name=projects/*/locations/*/catalogs/*/models/*}:tune"
+      body: "*"
+    };
+    option (google.api.method_signature) = "name";
+    option (google.longrunning.operation_info) = {
+      response_type: "google.cloud.retail.v2beta.TuneModelResponse"
+      metadata_type: "google.cloud.retail.v2beta.TuneModelMetadata"
+    };
+  }
+}
+
+// Request for creating a model.
+message CreateModelRequest {
+  // Required. The parent resource under which to create the model. Format:
+  // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = { type: "retail.googleapis.com/Catalog" }
+  ];
+
+  // Required. The payload of the [Model][google.cloud.retail.v2beta.Model]  to
+  // create.
+  Model model = 2 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. Whether to run a dry run to validate the request (without
+  // actually creating the model).
+  bool dry_run = 3 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Request for updating an existing model.
+message UpdateModelRequest {
+  // Required. The body of the updated
+  // [Model][google.cloud.retail.v2beta.Model].
+  Model model = 1 [(google.api.field_behavior) = REQUIRED];
+
+  // Optional. Indicates which fields in the provided 'model' to
+  // update. If not set, by default updates all fields.
+  google.protobuf.FieldMask update_mask = 2
+      [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Request for pausing training of a model.
+message PauseModelRequest {
+  // Required. The name of the model to pause.
+  // Format:
+  // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = { type: "retail.googleapis.com/Model" }
+  ];
+}
+
+// Request for resuming training of a model.
+message ResumeModelRequest {
+  // Required. The name of the model to resume.
+  // Format:
+  // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+  string name = 1 [(google.api.field_behavior) = REQUIRED];
+}
+
+// Request for listing models associated with a resource.
+message ListModelsRequest {
+  // Required. The parent for which to list models.
+  // Format:
+  // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
+  string parent = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = { type: "retail.googleapis.com/Catalog" }
+  ];
+
+  // Optional. Maximum number of results to return. If unspecified, defaults
+  // to 50. Max allowed value is 1000.
+  int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL];
+
+  // Optional. A page token, received from a previous `ListModels`
+  // call. Provide this to retrieve the subsequent page.
+  string page_token = 3 [(google.api.field_behavior) = OPTIONAL];
+}
+
+// Request for deleting a model.
+message DeleteModelRequest {
+  // Required. The resource name of the
+  // [Model][google.cloud.retail.v2beta.Model] to delete. Format:
+  // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = { type: "retail.googleapis.com/Model" }
+  ];
+}
+
+// Response to a ListModelRequest.
+message ListModelsResponse {
+  // List of Models.
+  repeated Model models = 1;
+
+  // Pagination token, if not returned indicates the last page.
+  string next_page_token = 2;
+}
+
+// Request to manually start a tuning process now (instead of waiting for
+// the periodically scheduled tuning to happen).
+message TuneModelRequest {
+  // Required. The resource name of the model to tune.
+  // Format:
+  // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+  string name = 1 [
+    (google.api.field_behavior) = REQUIRED,
+    (google.api.resource_reference) = { type: "retail.googleapis.com/Model" }
+  ];
+}
+
+// Metadata associated with a create operation.
+message CreateModelMetadata {
+  // The resource name of the model that this create applies to.
+  // Format:
+  // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+  string model = 1;
+}
+
+// Metadata associated with a tune operation.
+message TuneModelMetadata {
+  // The resource name of the model that this tune applies to.
+  // Format:
+  // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/models/{model_id}`
+  string model = 1;
+}
+
+// Response associated with a tune operation.
+message TuneModelResponse {}
diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/prediction_service.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/prediction_service.proto
index d4d18ee1..1ac3026d 100644
--- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/prediction_service.proto
+++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/prediction_service.proto
@@ -19,6 +19,7 @@ package google.cloud.retail.v2beta;
 import "google/api/annotations.proto";
 import "google/api/client.proto";
 import "google/api/field_behavior.proto";
+import "google/api/resource.proto";
 import "google/cloud/retail/v2beta/user_event.proto";
 import "google/protobuf/struct.proto";
 
@@ -84,14 +85,14 @@ message PredictRequest {
   // [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id] unset.
   UserEvent user_event = 2 [(google.api.field_behavior) = REQUIRED];
 
-  // Maximum number of results to return per page. Set this property
-  // to the number of prediction results needed. If zero, the service will
-  // choose a reasonable default. The maximum allowed value is 100. Values
-  // above 100 will be coerced to 100.
+  // Maximum number of results to return. Set this property to the number of
+  // prediction results needed. If zero, the service will choose a reasonable
+  // default. The maximum allowed value is 100. Values above 100 will be coerced
+  // to 100.
   int32 page_size = 3;
 
-  // This field is not used for now; leave it unset.
-  string page_token = 4;
+  // This field is not used; leave it unset.
+  string page_token = 4 [deprecated = true];
 
   // Filter for restricting prediction results with a length limit of 5,000
   // characters. Accepts values for tags and the `filterOutOfStockItems` flag.
diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product.proto
index 9490e09f..8b100901 100644
--- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product.proto
+++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product.proto
@@ -199,7 +199,7 @@ message Product {
   // The [type][google.cloud.retail.v2beta.Product.type] of the members must be
   // either [Type.PRIMARY][google.cloud.retail.v2beta.Product.Type.PRIMARY] or
   // [Type.VARIANT][google.cloud.retail.v2beta.Product.Type.VARIANT] otherwise
-  // and INVALID_ARGUMENT error is thrown. Should not set it for other types. A
+  // an INVALID_ARGUMENT error is thrown. Should not set it for other types. A
   // maximum of 1000 values are allowed. Otherwise, an INVALID_ARGUMENT error is
   // return.
   repeated string collection_member_ids = 5;
@@ -230,7 +230,7 @@ message Product {
   //
   //
   // To represent full path of category, use '>' sign to separate different
-  // hierarchies. If '>' is part of the category name, please replace it with
+  // hierarchies. If '>' is part of the category name, replace it with
   // other character(s).
   //
   // For example, if a shoes product belongs to both
@@ -563,4 +563,15 @@ message Product {
   // [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct].
   // Do not set this field in API requests.
   repeated Product variants = 31 [(google.api.field_behavior) = OUTPUT_ONLY];
+
+  // Output only. A list of local inventories specific to different places.
+  //
+  // This is only available for users who have Retail Search enabled, and it can
+  // be managed by
+  // [ProductService.AddLocalInventories][google.cloud.retail.v2beta.ProductService.AddLocalInventories]
+  // and
+  // [ProductService.RemoveLocalInventories][google.cloud.retail.v2beta.ProductService.RemoveLocalInventories]
+  // APIs.
+  repeated LocalInventory local_inventories = 35
+      [(google.api.field_behavior) = OUTPUT_ONLY];
 }
diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product_service.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product_service.proto
index a9bfd965..0c099433 100644
--- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product_service.proto
+++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/product_service.proto
@@ -111,9 +111,9 @@ service ProductService {
   //
   // This process is asynchronous and does not require the
   // [Product][google.cloud.retail.v2beta.Product] to exist before updating
-  // fulfillment information. If the request is valid, the update will be
-  // enqueued and processed downstream. As a consequence, when a response is
-  // returned, updates are not immediately manifested in the
+  // fulfillment information. If the request is valid, the update is enqueued
+  // and processed downstream. As a consequence, when a response is returned,
+  // updates are not immediately manifested in the
   // [Product][google.cloud.retail.v2beta.Product] queried by
   // [ProductService.GetProduct][google.cloud.retail.v2beta.ProductService.GetProduct]
   // or
@@ -123,10 +123,10 @@ service ProductService {
   // [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct]
   // and
   // [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct],
-  // the specified inventory field value(s) will overwrite any existing value(s)
+  // the specified inventory field value(s) overwrite any existing value(s)
   // while ignoring the last update time for this field. Furthermore, the last
-  // update time for the specified inventory fields will be overwritten to the
-  // time of the
+  // update times for the specified inventory fields are overwritten by the
+  // times of the
   // [ProductService.CreateProduct][google.cloud.retail.v2beta.ProductService.CreateProduct]
   // or
   // [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct]
@@ -134,11 +134,11 @@ service ProductService {
   //
   // If no inventory fields are set in
   // [CreateProductRequest.product][google.cloud.retail.v2beta.CreateProductRequest.product],
-  // then any pre-existing inventory information for this product will be used.
+  // then any pre-existing inventory information for this product is used.
   //
   // If no inventory fields are set in
   // [SetInventoryRequest.set_mask][google.cloud.retail.v2beta.SetInventoryRequest.set_mask],
-  // then any existing inventory information will be preserved.
+  // then any existing inventory information is preserved.
   //
   // Pre-existing inventory information can only be updated with
   // [ProductService.SetInventory][google.cloud.retail.v2beta.ProductService.SetInventory],
@@ -146,8 +146,17 @@ service ProductService {
   // and
   // [ProductService.RemoveFulfillmentPlaces][google.cloud.retail.v2beta.ProductService.RemoveFulfillmentPlaces].
   //
+  // The returned [Operation][google.longrunning.Operation]s is obsolete after
+  // one day, and the [GetOperation][google.longrunning.Operations.GetOperation]
+  // API returns `NOT_FOUND` afterwards.
+  //
+  // If conflicting updates are issued, the
+  // [Operation][google.longrunning.Operation]s associated with the stale
+  // updates are not marked as [done][google.longrunning.Operation.done] until
+  // they are obsolete.
+  //
   // This feature is only available for users who have Retail Search enabled.
-  // Please enable Retail Search on Cloud Console before using this feature.
+  // Enable Retail Search on Cloud Console before using this feature.
   rpc SetInventory(SetInventoryRequest) returns (google.longrunning.Operation) {
     option (google.api.http) = {
       post: "/v2beta/{inventory.name=projects/*/locations/*/catalogs/*/branches/*/products/**}:setInventory"
@@ -173,8 +182,17 @@ service ProductService {
   // or
   // [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
   //
+  // The returned [Operation][google.longrunning.Operation]s will be obsolete
+  // after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]
+  // API will return NOT_FOUND afterwards.
+  //
+  // If conflicting updates are issued, the
+  // [Operation][google.longrunning.Operation]s associated with the stale
+  // updates will not be marked as [done][google.longrunning.Operation.done]
+  // until being obsolete.
+  //
   // This feature is only available for users who have Retail Search enabled.
-  // Please enable Retail Search on Cloud Console before using this feature.
+  // Enable Retail Search on Cloud Console before using this feature.
   rpc AddFulfillmentPlaces(AddFulfillmentPlacesRequest)
       returns (google.longrunning.Operation) {
     option (google.api.http) = {
@@ -201,8 +219,17 @@ service ProductService {
   // or
   // [ProductService.ListProducts][google.cloud.retail.v2beta.ProductService.ListProducts].
   //
+  // The returned [Operation][google.longrunning.Operation]s will be obsolete
+  // after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]
+  // API will return NOT_FOUND afterwards.
+  //
+  // If conflicting updates are issued, the
+  // [Operation][google.longrunning.Operation]s associated with the stale
+  // updates will not be marked as [done][google.longrunning.Operation.done]
+  // until being obsolete.
+  //
   // This feature is only available for users who have Retail Search enabled.
-  // Please enable Retail Search on Cloud Console before using this feature.
+  // Enable Retail Search on Cloud Console before using this feature.
   rpc RemoveFulfillmentPlaces(RemoveFulfillmentPlacesRequest)
       returns (google.longrunning.Operation) {
     option (google.api.http) = {
@@ -236,8 +263,17 @@ service ProductService {
   // [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct]
   // has no effect on local inventories.
   //
+  // The returned [Operation][google.longrunning.Operation]s will be obsolete
+  // after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]
+  // API will return NOT_FOUND afterwards.
+  //
+  // If conflicting updates are issued, the
+  // [Operation][google.longrunning.Operation]s associated with the stale
+  // updates will not be marked as [done][google.longrunning.Operation.done]
+  // until being obsolete.
+  //
   // This feature is only available for users who have Retail Search enabled.
-  // Please enable Retail Search on Cloud Console before using this feature.
+  // Enable Retail Search on Cloud Console before using this feature.
   rpc AddLocalInventories(AddLocalInventoriesRequest)
       returns (google.longrunning.Operation) {
     option (google.api.http) = {
@@ -269,8 +305,17 @@ service ProductService {
   // [ProductService.UpdateProduct][google.cloud.retail.v2beta.ProductService.UpdateProduct]
   // has no effect on local inventories.
   //
+  // The returned [Operation][google.longrunning.Operation]s will be obsolete
+  // after 1 day, and [GetOperation][google.longrunning.Operations.GetOperation]
+  // API will return NOT_FOUND afterwards.
+  //
+  // If conflicting updates are issued, the
+  // [Operation][google.longrunning.Operation]s associated with the stale
+  // updates will not be marked as [done][google.longrunning.Operation.done]
+  // until being obsolete.
+  //
   // This feature is only available for users who have Retail Search enabled.
-  // Please enable Retail Search on Cloud Console before using this feature.
+  // Enable Retail Search on Cloud Console before using this feature.
   rpc RemoveLocalInventories(RemoveLocalInventoriesRequest)
       returns (google.longrunning.Operation) {
     option (google.api.http) = {
diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/search_service.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/search_service.proto
index bf0764fd..5a100441 100644
--- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/search_service.proto
+++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/search_service.proto
@@ -37,7 +37,7 @@ option ruby_package = "Google::Cloud::Retail::V2beta";
 // Service for search.
 //
 // This feature is only available for users who have Retail Search enabled.
-// Please enable Retail Search on Cloud Console before using this feature.
+// Enable Retail Search on Cloud Console before using this feature.
 service SearchService {
   option (google.api.default_host) = "retail.googleapis.com";
   option (google.api.oauth_scopes) =
@@ -46,7 +46,7 @@ service SearchService {
   // Performs a search.
   //
   // This feature is only available for users who have Retail Search enabled.
-  // Please enable Retail Search on Cloud Console before using this feature.
+  // Enable Retail Search on Cloud Console before using this feature.
   rpc Search(SearchRequest) returns (SearchResponse) {
     option (google.api.http) = {
       post: "/v2beta/{placement=projects/*/locations/*/catalogs/*/placements/*}:search"
@@ -364,7 +364,8 @@ message SearchRequest {
   message QueryExpansionSpec {
     // Enum describing under which condition query expansion should occur.
     enum Condition {
-      // Unspecified query expansion condition. This defaults to
+      // Unspecified query expansion condition. In this case, server behavior
+      // defaults to
       // [Condition.DISABLED][google.cloud.retail.v2beta.SearchRequest.QueryExpansionSpec.Condition.DISABLED].
       CONDITION_UNSPECIFIED = 0;
 
@@ -395,7 +396,8 @@ message SearchRequest {
       // [Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
       MODE_UNSPECIFIED = 0;
 
-      // Let CRS decide whether to use personalization.
+      // Let CRS decide whether to use personalization based on quality of user
+      // event data.
       AUTO = 1;
 
       // Disable personalization.
@@ -436,15 +438,21 @@ message SearchRequest {
   // The search mode of each search request.
   enum SearchMode {
     // Default value. In this case both product search and faceted search will
-    // be performed. Both [SearchResponse.SearchResult] and
-    // [SearchResponse.Facet] will be returned.
+    // be performed. Both
+    // [SearchResponse.SearchResult][google.cloud.retail.v2beta.SearchResponse.SearchResult]
+    // and
+    // [SearchResponse.Facet][google.cloud.retail.v2beta.SearchResponse.Facet]
+    // will be returned.
     SEARCH_MODE_UNSPECIFIED = 0;
 
     // Only product search will be performed. The faceted search will be
     // disabled.
     //
-    // Only [SearchResponse.SearchResult] will be returned.
-    // [SearchResponse.Facet] will not be returned, even if
+    // Only
+    // [SearchResponse.SearchResult][google.cloud.retail.v2beta.SearchResponse.SearchResult]
+    // will be returned.
+    // [SearchResponse.Facet][google.cloud.retail.v2beta.SearchResponse.Facet]
+    // will not be returned, even if
     // [SearchRequest.facet_specs][google.cloud.retail.v2beta.SearchRequest.facet_specs]
     // or
     // [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec]
@@ -459,7 +467,9 @@ message SearchRequest {
     // and
     // [SearchRequest.dynamic_facet_spec][google.cloud.retail.v2beta.SearchRequest.dynamic_facet_spec]
     // should be set. Otherwise, an INVALID_ARGUMENT error is returned. Only
-    // [SearchResponse.Facet] will be returned. [SearchResponse.SearchResult]
+    // [SearchResponse.Facet][google.cloud.retail.v2beta.SearchResponse.Facet]
+    // will be returned.
+    // [SearchResponse.SearchResult][google.cloud.retail.v2beta.SearchResponse.SearchResult]
     // will not be returned.
     FACETED_SEARCH_ONLY = 2;
   }
@@ -671,7 +681,7 @@ message SearchRequest {
   // [UserEvent.page_categories][google.cloud.retail.v2beta.UserEvent.page_categories];
   //
   // To represent full path of category, use '>' sign to separate different
-  // hierarchies. If '>' is part of the category name, please replace it with
+  // hierarchies. If '>' is part of the category name, replace it with
   // other character(s).
   //
   // Category pages include special pages such as sales or promotions. For
@@ -684,6 +694,15 @@ message SearchRequest {
   SearchMode search_mode = 31;
 
   // The specification for personalization.
+  //
+  // Notice that if both
+  // [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+  // and
+  // [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+  // are set.
+  // [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+  // will override
+  // [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
   PersonalizationSpec personalization_spec = 32;
 
   // The labels applied to a resource must meet the following requirements:
@@ -787,6 +806,21 @@ message SearchResponse {
     // `{key: "pickupInStore.store1" value { number_value: 10 }}` means a there
     // are 10 variants in this product are available in the store "store1".
     map variant_rollup_values = 5;
+
+    // Specifies previous events related to this product for this user based on
+    // [UserEvent][google.cloud.retail.v2beta.UserEvent] with same
+    // [SearchRequest.visitor_id][google.cloud.retail.v2beta.SearchRequest.visitor_id]
+    // or [UserInfo.user_id][google.cloud.retail.v2beta.UserInfo.user_id].
+    //
+    // This is set only when
+    // [SearchRequest.PersonalizationSpec.mode][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.mode]
+    // is
+    // [SearchRequest.PersonalizationSpec.Mode.AUTO][google.cloud.retail.v2beta.SearchRequest.PersonalizationSpec.Mode.AUTO].
+    //
+    // Possible values:
+    //
+    // * `purchased`: Indicates that this product has been purchased before.
+    repeated string personal_labels = 7;
   }
 
   // A facet result.
diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config.proto
index 431a4a41..35d1cf85 100644
--- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config.proto
+++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config.proto
@@ -32,14 +32,25 @@ option ruby_package = "Google::Cloud::Retail::V2beta";
 
 // Configures metadata that is used to generate serving time results (e.g.
 // search results or recommendation predictions).
-// The ServingConfig is passed in the search and predict request and together
-// with the Catalog.default_branch, generates results.
 message ServingConfig {
   option (google.api.resource) = {
     type: "retail.googleapis.com/ServingConfig"
     pattern: "projects/{project}/locations/{location}/catalogs/{catalog}/servingConfigs/{serving_config}"
   };
 
+  // What type of diversity - data or rule based.
+  // If none is specified, default to rule based.
+  enum DiversityType {
+    // Default value.
+    DIVERSITY_TYPE_UNSPECIFIED = 0;
+
+    // Rule based diversity.
+    RULE_BASED_DIVERSITY = 2;
+
+    // Data driven diversity.
+    DATA_DRIVEN_DIVERSITY = 3;
+  }
+
   // Immutable. Fully qualified name
   // `projects/*/locations/global/catalogs/*/servingConfig/*`
   string name = 1 [(google.api.field_behavior) = IMMUTABLE];
@@ -51,7 +62,8 @@ message ServingConfig {
   // characters. Otherwise, an INVALID_ARGUMENT error is returned.
   string display_name = 2 [(google.api.field_behavior) = REQUIRED];
 
-  // The id of the model to use at serving time.
+  // The id of the model in the same
+  // [Catalog][google.cloud.retail.v2beta.Catalog] to use at serving time.
   // Currently only RecommendationModels are supported:
   // https://cloud.google.com/retail/recommendations-ai/docs/create-models
   // Can be changed but only to a compatible model (e.g.
@@ -70,13 +82,13 @@ message ServingConfig {
   // click-through and conversion rates.
   //  Allowed values are:
   //
-  // * 'no-price-reranking'
-  // * 'low-price-raranking'
-  // * 'medium-price-reranking'
-  // * 'high-price-reranking'
+  // * `no-price-reranking`
+  // * `low-price-raranking`
+  // * `medium-price-reranking`
+  // * `high-price-reranking`
   //
   // If not specified, we choose default based on model type. Default value:
-  // 'no-price-reranking'.
+  // `no-price-reranking`.
   //
   // Can only be set if
   // [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
@@ -205,16 +217,16 @@ message ServingConfig {
   repeated string ignore_control_ids = 15;
 
   // How much diversity to use in recommendation model results e.g.
-  // 'medium-diversity' or 'high-diversity'. Currently supported values:
+  // `medium-diversity` or `high-diversity`. Currently supported values:
   //
-  // * 'no-diversity'
-  // * 'low-diversity'
-  // * 'medium-diversity'
-  // * 'high-diversity'
-  // * 'auto-diversity'
+  // * `no-diversity`
+  // * `low-diversity`
+  // * `medium-diversity`
+  // * `high-diversity`
+  // * `auto-diversity`
   //
   // If not specified, we choose default based on recommendation model
-  // type. Default value: 'no-diversity'.
+  // type. Default value: `no-diversity`.
   //
   // Can only be set if
   // [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
@@ -222,13 +234,16 @@ message ServingConfig {
   // [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
   string diversity_level = 8;
 
-  // Whether to add additional category filters on the 'similar-items' model.
+  // What kind of diversity to use - data driven or rule based.
+  DiversityType diversity_type = 20;
+
+  // Whether to add additional category filters on the `similar-items` model.
   // If not specified, we enable it by default.
   //  Allowed values are:
   //
-  // * 'no-category-match': No additional filtering of original results from
+  // * `no-category-match`: No additional filtering of original results from
   //   the model and the customer's filters.
-  // * 'relaxed-category-match': Only keep results with categories that match
+  // * `relaxed-category-match`: Only keep results with categories that match
   //   at least one item categories in the PredictRequests's context item.
   //   * If customer also sends filters in the PredictRequest, then the results
   //   will satisfy both conditions (user given and category match).
@@ -239,6 +254,23 @@ message ServingConfig {
   // [SOLUTION_TYPE_RECOMMENDATION][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_RECOMMENDATION].
   string enable_category_filter_level = 16;
 
+  // The specification for personalization spec.
+  //
+  // Can only be set if
+  // [solution_types][google.cloud.retail.v2beta.ServingConfig.solution_types]
+  // is
+  // [SOLUTION_TYPE_SEARCH][google.cloud.retail.v2main.SolutionType.SOLUTION_TYPE_SEARCH].
+  //
+  // Notice that if both
+  // [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec]
+  // and
+  // [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+  // are set.
+  // [SearchRequest.personalization_spec][google.cloud.retail.v2beta.SearchRequest.personalization_spec]
+  // will override
+  // [ServingConfig.personalization_spec][google.cloud.retail.v2beta.ServingConfig.personalization_spec].
+  SearchRequest.PersonalizationSpec personalization_spec = 21;
+
   // Required. Immutable. Specifies the solution types that a serving config can
   // be associated with. Currently we support setting only one type of solution.
   repeated SolutionType solution_types = 19 [
diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config_service.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config_service.proto
index e2d5319a..46bdcd9b 100644
--- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config_service.proto
+++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/serving_config_service.proto
@@ -158,7 +158,7 @@ message UpdateServingConfigRequest {
 // Request for DeleteServingConfig method.
 message DeleteServingConfigRequest {
   // Required. The resource name of the ServingConfig to delete. Format:
-  // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+  // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
     (google.api.resource_reference) = {
@@ -170,7 +170,7 @@ message DeleteServingConfigRequest {
 // Request for GetServingConfig method.
 message GetServingConfigRequest {
   // Required. The resource name of the ServingConfig to get. Format:
-  // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+  // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
   string name = 1 [
     (google.api.field_behavior) = REQUIRED,
     (google.api.resource_reference) = {
@@ -182,7 +182,7 @@ message GetServingConfigRequest {
 // Request for ListServingConfigs method.
 message ListServingConfigsRequest {
   // Required. The catalog resource name. Format:
-  // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}
+  // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}`
   string parent = 1 [
     (google.api.field_behavior) = REQUIRED,
     (google.api.resource_reference) = { type: "retail.googleapis.com/Catalog" }
@@ -210,7 +210,7 @@ message ListServingConfigsResponse {
 // Request for AddControl method.
 message AddControlRequest {
   // Required. The source ServingConfig resource name . Format:
-  // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+  // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
   string serving_config = 1 [
     (google.api.field_behavior) = REQUIRED,
     (google.api.resource_reference) = {
@@ -226,7 +226,7 @@ message AddControlRequest {
 // Request for RemoveControl method.
 message RemoveControlRequest {
   // Required. The source ServingConfig resource name . Format:
-  // projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}
+  // `projects/{project_number}/locations/{location_id}/catalogs/{catalog_id}/servingConfigs/{serving_config_id}`
   string serving_config = 1 [
     (google.api.field_behavior) = REQUIRED,
     (google.api.resource_reference) = {
diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/user_event.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/user_event.proto
index 06c8e64c..3d88483e 100644
--- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/user_event.proto
+++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/user_event.proto
@@ -227,7 +227,7 @@ message UserEvent {
   // The categories associated with a category page.
   //
   // To represent full path of category, use '>' sign to separate different
-  // hierarchies. If '>' is part of the category name, please replace it with
+  // hierarchies. If '>' is part of the category name, replace it with
   // other character(s).
   //
   // Category pages include special pages such as sales or promotions. For
diff --git a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/user_event_service.proto b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/user_event_service.proto
index c647a45b..74dccdff 100644
--- a/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/user_event_service.proto
+++ b/proto-google-cloud-retail-v2beta/src/main/proto/google/cloud/retail/v2beta/user_event_service.proto
@@ -20,6 +20,7 @@ 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/retail/v2beta/import_config.proto";
 import "google/cloud/retail/v2beta/purge_config.proto";
 import "google/cloud/retail/v2beta/user_event.proto";
@@ -79,9 +80,9 @@ service UserEventService {
   // synchronous. Events that already exist are skipped.
   // Use this method for backfilling historical user events.
   //
-  // Operation.response is of type ImportResponse. Note that it is
+  // `Operation.response` is of type `ImportResponse`. Note that it is
   // possible for a subset of the items to be successfully inserted.
-  // Operation.metadata is of type ImportMetadata.
+  // `Operation.metadata` is of type `ImportMetadata`.
   rpc ImportUserEvents(ImportUserEventsRequest)
       returns (google.longrunning.Operation) {
     option (google.api.http) = {
@@ -94,14 +95,14 @@ service UserEventService {
     };
   }
 
-  // Starts a user event rejoin operation with latest product catalog. Events
-  // will not be annotated with detailed product information if product is
-  // missing from the catalog at the time the user event is ingested, and these
-  // events are stored as unjoined events with a limited usage on training and
-  // serving. This method can be used to start a join operation on specified
-  // events with latest version of product catalog. It can also be used to
-  // correct events joined with the wrong product catalog. A rejoin operation
-  // can take hours or days to complete.
+  // Starts a user-event rejoin operation with latest product catalog. Events
+  // are not annotated with detailed product information for products that are
+  // missing from the catalog when the user event is ingested. These
+  // events are stored as unjoined events with limited usage on training and
+  // serving. You can use this method to start a join operation on specified
+  // events with the latest version of product catalog. You can also use this
+  // method to correct events joined with the wrong product catalog. A rejoin
+  // operation can take hours or days to complete.
   rpc RejoinUserEvents(RejoinUserEventsRequest)
       returns (google.longrunning.Operation) {
     option (google.api.http) = {
@@ -151,11 +152,11 @@ message CollectUserEventRequest {
 message RejoinUserEventsRequest {
   // The scope of user events to be rejoined with the latest product catalog.
   // If the rejoining aims at reducing number of unjoined events, set
-  // UserEventRejoinScope to UNJOINED_EVENTS.
+  // `UserEventRejoinScope` to `UNJOINED_EVENTS`.
   // If the rejoining aims at correcting product catalog information in joined
-  // events, set UserEventRejoinScope to JOINED_EVENTS.
-  // If all events needs to be rejoined, set UserEventRejoinScope to
-  // USER_EVENT_REJOIN_SCOPE_UNSPECIFIED.
+  // events, set `UserEventRejoinScope` to `JOINED_EVENTS`.
+  // If all events needs to be rejoined, set `UserEventRejoinScope` to
+  // `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED`.
   enum UserEventRejoinScope {
     // Rejoin all events with the latest product catalog, including both joined
     // events and unjoined events.
@@ -174,16 +175,16 @@ message RejoinUserEventsRequest {
 
   // The type of the user event rejoin to define the scope and range of the user
   // events to be rejoined with the latest product catalog. Defaults to
-  // USER_EVENT_REJOIN_SCOPE_UNSPECIFIED if this field is not set, or set to an
-  // invalid integer value.
+  // `USER_EVENT_REJOIN_SCOPE_UNSPECIFIED` if this field is not set, or set to
+  // an invalid integer value.
   UserEventRejoinScope user_event_rejoin_scope = 2;
 }
 
-// Response message for RejoinUserEvents method.
+// Response message for `RejoinUserEvents` method.
 message RejoinUserEventsResponse {
   // Number of user events that were joined with latest product catalog.
   int64 rejoined_user_events_count = 1;
 }
 
-// Metadata for RejoinUserEvents method.
+// Metadata for `RejoinUserEvents` method.
 message RejoinUserEventsMetadata {}
diff --git a/renovate.json b/renovate.json
index 2f75abf6..bcd21c8f 100644
--- a/renovate.json
+++ b/renovate.json
@@ -10,6 +10,7 @@
     ":maintainLockFilesDisabled",
     ":autodetectPinVersions"
   ],
+  "ignorePaths": [".kokoro/requirements.txt"],
   "packageRules": [
     {
       "packagePatterns": [
diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml
index 3cc391fb..7582424b 100644
--- a/samples/install-without-bom/pom.xml
+++ b/samples/install-without-bom/pom.xml
@@ -29,7 +29,7 @@
     
       com.google.cloud
       google-cloud-retail
-      2.4.0
+      2.5.0
     
     
 
diff --git a/samples/interactive-tutorials/pom.xml b/samples/interactive-tutorials/pom.xml
index addc399e..a10d526e 100644
--- a/samples/interactive-tutorials/pom.xml
+++ b/samples/interactive-tutorials/pom.xml
@@ -31,7 +31,7 @@
       
         com.google.cloud
         libraries-bom
-        26.1.1
+        26.1.2
         pom
         import
       
@@ -42,7 +42,7 @@
     
       com.google.cloud
       google-cloud-retail
-      2.4.0
+      2.5.0
     
     
       junit
@@ -53,12 +53,12 @@
     
       com.google.cloud
       google-cloud-bigquery
-      2.16.0
+      2.16.1
     
     
       com.google.cloud
       google-cloud-storage
-      2.11.3
+      2.12.0
     
     
       com.google.code.gson
diff --git a/samples/interactive-tutorials/src/main/java/events/ImportUserEventsBigQuery.java b/samples/interactive-tutorials/src/main/java/events/ImportUserEventsBigQuery.java
index 73c98d75..4f66b047 100644
--- a/samples/interactive-tutorials/src/main/java/events/ImportUserEventsBigQuery.java
+++ b/samples/interactive-tutorials/src/main/java/events/ImportUserEventsBigQuery.java
@@ -21,6 +21,7 @@
 package events;
 
 import com.google.api.gax.rpc.NotFoundException;
+import com.google.cloud.ServiceOptions;
 import com.google.cloud.bigquery.BigQueryException;
 import com.google.cloud.retail.v2.BigQuerySource;
 import com.google.cloud.retail.v2.ImportMetadata;
@@ -37,16 +38,19 @@
 public class ImportUserEventsBigQuery {
 
   public static void main(String[] args) throws IOException, InterruptedException {
-    // TODO(developer): Replace these variables before running the sample.
-    String projectId = "your-project-id";
+    // TODO(developer): Set projectId to your Google Cloud Platform project ID.
+    String projectId = ServiceOptions.getDefaultProjectId();
     String defaultCatalog =
         String.format("projects/%s/locations/global/catalogs/default_catalog", projectId);
-    // TO CHECK ERROR HANDLING PASTE THE INVALID CATALOG NAME HERE:
+    // To check error handling use invalid catalog name here:
     // defaultCatalog = "invalid_catalog_name";
+
+    // TODO(developer): Set datasetId to your datasetId
     String datasetId = "user_events";
+    // TODO(developer): Set tableId to your tableId
     String tableId = "events";
-    // TO CHECK ERROR HANDLING USE THE TABLE OF INVALID USER EVENTS:
-    // tableId = "events_some_invalid";
+    // To check error handling use table of invalid user events here:
+    // tableId = "events_some_invalid"
 
     importUserEventsFromBigQuery(projectId, defaultCatalog, datasetId, tableId);
   }
diff --git a/samples/interactive-tutorials/src/main/java/events/ImportUserEventsGcs.java b/samples/interactive-tutorials/src/main/java/events/ImportUserEventsGcs.java
index 6abb57bd..3128f9ba 100644
--- a/samples/interactive-tutorials/src/main/java/events/ImportUserEventsGcs.java
+++ b/samples/interactive-tutorials/src/main/java/events/ImportUserEventsGcs.java
@@ -22,6 +22,7 @@
 
 import com.google.api.gax.rpc.InvalidArgumentException;
 import com.google.api.gax.rpc.PermissionDeniedException;
+import com.google.cloud.ServiceOptions;
 import com.google.cloud.retail.v2.GcsSource;
 import com.google.cloud.retail.v2.ImportErrorsConfig;
 import com.google.cloud.retail.v2.ImportMetadata;
@@ -39,7 +40,7 @@ public class ImportUserEventsGcs {
 
   public static void main(String[] args) throws IOException, InterruptedException {
     // TODO(developer): Replace these variables before running the sample.
-    String projectId = "your-project-id";
+    String projectId = ServiceOptions.getDefaultProjectId();
     String defaultCatalog =
         String.format("projects/%s/locations/global/catalogs/default_catalog", projectId);
     // TO CHECK ERROR HANDLING PASTE THE INVALID CATALOG NAME HERE:
diff --git a/samples/interactive-tutorials/src/main/java/events/ImportUserEventsInline.java b/samples/interactive-tutorials/src/main/java/events/ImportUserEventsInline.java
index 44cf661e..d7e88229 100644
--- a/samples/interactive-tutorials/src/main/java/events/ImportUserEventsInline.java
+++ b/samples/interactive-tutorials/src/main/java/events/ImportUserEventsInline.java
@@ -21,6 +21,7 @@
 package events;
 
 import com.google.api.gax.longrunning.OperationFuture;
+import com.google.cloud.ServiceOptions;
 import com.google.cloud.bigquery.BigQueryException;
 import com.google.cloud.retail.v2.ImportMetadata;
 import com.google.cloud.retail.v2.ImportUserEventsRequest;
@@ -43,7 +44,7 @@ public class ImportUserEventsInline {
   public static void main(String[] args)
       throws IOException, ExecutionException, InterruptedException {
     // TODO(developer): Replace these variables before running the sample.
-    String projectId = "your-project-id";
+    String projectId = ServiceOptions.getDefaultProjectId();
     String defaultCatalog =
         String.format("projects/%s/locations/global/catalogs/default_catalog", projectId);
 
diff --git a/samples/interactive-tutorials/src/main/java/events/PurgeUserEvent.java b/samples/interactive-tutorials/src/main/java/events/PurgeUserEvent.java
index 31e3d680..c1011104 100644
--- a/samples/interactive-tutorials/src/main/java/events/PurgeUserEvent.java
+++ b/samples/interactive-tutorials/src/main/java/events/PurgeUserEvent.java
@@ -15,7 +15,7 @@
  */
 
 /*
- * Purge user events into a catalog from inline source using Retail API
+ * Deleting user event using Retail API.
  */
 
 package events;
@@ -23,6 +23,7 @@
 import static setup.SetupCleanup.writeUserEvent;
 
 import com.google.api.gax.longrunning.OperationFuture;
+import com.google.cloud.ServiceOptions;
 import com.google.cloud.retail.v2.PurgeMetadata;
 import com.google.cloud.retail.v2.PurgeUserEventsRequest;
 import com.google.cloud.retail.v2.PurgeUserEventsResponse;
@@ -35,11 +36,11 @@ public class PurgeUserEvent {
 
   public static void main(String[] args)
       throws IOException, ExecutionException, InterruptedException {
-    // TODO(developer): Replace these variables before running the sample.
-    String projectId = "your-project-id";
+    // TODO(developer): Set projectId to your Google Cloud Platform project ID.
+    String projectId = ServiceOptions.getDefaultProjectId();
     String defaultCatalog =
         String.format("projects/%s/locations/global/catalogs/default_catalog", projectId);
-    // visitorId generated randomly.
+    // visitorId is generated randomly
     String visitorId = UUID.randomUUID().toString();
 
     callPurgeUserEvents(defaultCatalog, visitorId);
@@ -56,9 +57,11 @@ public static void callPurgeUserEvents(String defaultCatalog, String visitorId)
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       PurgeUserEventsRequest purgeUserEventsRequest =
           PurgeUserEventsRequest.newBuilder()
-              // TO CHECK ERROR HANDLING SET INVALID FILTER HERE:
+              // To check error handling set invalid filter here:
               .setFilter(String.format("visitorId=\"%s\"", visitorId))
               .setParent(defaultCatalog)
+              // Setting the force field to true deletes user events. If set to false will return
+              // number of events to be deleted without actually deleting them
               .setForce(true)
               .build();
       System.out.printf("Purge user events request: %s%n", purgeUserEventsRequest);
diff --git a/samples/interactive-tutorials/src/main/java/events/RejoinUserEvent.java b/samples/interactive-tutorials/src/main/java/events/RejoinUserEvent.java
index d97cb8fd..ef624d3c 100644
--- a/samples/interactive-tutorials/src/main/java/events/RejoinUserEvent.java
+++ b/samples/interactive-tutorials/src/main/java/events/RejoinUserEvent.java
@@ -15,7 +15,7 @@
  */
 
 /*
- * Rejoin user events into a catalog from inline source using Retail API
+ * Starts a user event rejoin operation using Retail API.
  */
 
 package events;
@@ -24,6 +24,7 @@
 import static setup.SetupCleanup.writeUserEvent;
 
 import com.google.api.gax.longrunning.OperationFuture;
+import com.google.cloud.ServiceOptions;
 import com.google.cloud.retail.v2.RejoinUserEventsMetadata;
 import com.google.cloud.retail.v2.RejoinUserEventsRequest;
 import com.google.cloud.retail.v2.RejoinUserEventsRequest.UserEventRejoinScope;
@@ -37,11 +38,11 @@ public class RejoinUserEvent {
 
   public static void main(String[] args)
       throws IOException, ExecutionException, InterruptedException {
-    // TODO(developer): Replace these variables before running the sample.
-    String projectId = "your-project-id";
+    // TODO(developer): Set projectId to your Google Cloud Platform project ID.
+    String projectId = ServiceOptions.getDefaultProjectId();
     String defaultCatalog =
         String.format("projects/%s/locations/global/catalogs/default_catalog", projectId);
-    // visitorId generated randomly.
+    // visitorId is generated randomly
     String visitorId = UUID.randomUUID().toString();
 
     callRejoinUserEvents(defaultCatalog, visitorId);
diff --git a/samples/interactive-tutorials/src/main/java/events/WriteUserEvent.java b/samples/interactive-tutorials/src/main/java/events/WriteUserEvent.java
index b4b20a59..b95dd710 100644
--- a/samples/interactive-tutorials/src/main/java/events/WriteUserEvent.java
+++ b/samples/interactive-tutorials/src/main/java/events/WriteUserEvent.java
@@ -15,13 +15,14 @@
  */
 
 /*
- * Write user events into a catalog from inline source using Retail API
+ * Write user event using Retail API.
  */
 
 package events;
 
 import static setup.SetupCleanup.purgeUserEvent;
 
+import com.google.cloud.ServiceOptions;
 import com.google.cloud.retail.v2.UserEvent;
 import com.google.cloud.retail.v2.UserEventServiceClient;
 import com.google.cloud.retail.v2.WriteUserEventRequest;
@@ -35,11 +36,11 @@ public class WriteUserEvent {
 
   public static void main(String[] args)
       throws IOException, ExecutionException, InterruptedException {
-    // TODO(developer): Replace these variables before running the sample.
-    String projectId = "your-project-id";
+    // TODO(developer): Set projectId to your Google Cloud Platform project ID.
+    String projectId = ServiceOptions.getDefaultProjectId();
     String defaultCatalog =
         String.format("projects/%s/locations/global/catalogs/default_catalog", projectId);
-    // visitorId generated randomly.
+    // visitorId is generated randomly
     String visitorId = UUID.randomUUID().toString();
 
     writeUserEvent(defaultCatalog, visitorId);
diff --git a/samples/interactive-tutorials/src/main/java/events/setup/UpdateUserEventsJson.java b/samples/interactive-tutorials/src/main/java/events/setup/UpdateUserEventsJson.java
index e1fd5590..99c31edf 100644
--- a/samples/interactive-tutorials/src/main/java/events/setup/UpdateUserEventsJson.java
+++ b/samples/interactive-tutorials/src/main/java/events/setup/UpdateUserEventsJson.java
@@ -29,10 +29,10 @@
 public class UpdateUserEventsJson {
 
   public static void main(String[] args) throws IOException {
-    // TODO(developer): Replace these variables before running the sample.
     String filePath = "src/main/resources/user_events.json";
-
+    String invalidFilePath = "src/main/resources/user_events_some_invalid.json";
     updateEventsTimestamp(filePath);
+    updateEventsTimestamp(invalidFilePath);
   }
 
   public static void updateEventsTimestamp(String jsonFile) throws IOException {
diff --git a/samples/interactive-tutorials/src/main/java/product/AddFulfillmentPlaces.java b/samples/interactive-tutorials/src/main/java/product/AddFulfillmentPlaces.java
index 2c6a63cc..0f871965 100644
--- a/samples/interactive-tutorials/src/main/java/product/AddFulfillmentPlaces.java
+++ b/samples/interactive-tutorials/src/main/java/product/AddFulfillmentPlaces.java
@@ -25,7 +25,7 @@
 import com.google.cloud.retail.v2.ProductServiceClient;
 import java.io.IOException;
 import java.util.UUID;
-import java.util.concurrent.TimeUnit;
+import java.util.concurrent.ExecutionException;
 
 public class AddFulfillmentPlaces {
 
@@ -56,6 +56,15 @@ public static void addFulfillmentPlaces(String productName, String placeId)
             .setAllowMissing(true)
             .build();
 
+    // To send an out-of-order request assign the invalid AddTime here:
+    // Instant instant = LocalDateTime.now().minusDays(1).toInstant(ZoneOffset.UTC);
+    // Timestamp previousDay = Timestamp.newBuilder()
+    //          .setSeconds(instant.getEpochSecond())
+    //          .setNanos(instant.getNano())
+    //          .build();
+    // addFulfillmentPlacesRequest =
+    // addFulfillmentPlacesRequest.toBuilder().setAddTime(previousDay).build();
+
     System.out.println("Add fulfillment request " + addFulfillmentPlacesRequest);
 
     // Initialize client that will be used to send requests. This client only
@@ -63,11 +72,12 @@ public static void addFulfillmentPlaces(String productName, String placeId)
     // completing all of your requests, call the "close" method on the client to
     // safely clean up any remaining background resources.
     try (ProductServiceClient serviceClient = ProductServiceClient.create()) {
-      serviceClient.addFulfillmentPlacesAsync(addFulfillmentPlacesRequest);
       // This is a long-running operation and its result is not immediately
       // present with get operations,thus we simulate wait with sleep method.
-      System.out.println("Add fulfillment places, wait 45 seconds: ");
-      TimeUnit.SECONDS.sleep(45);
+      System.out.println("Waiting for operation to finish...");
+      serviceClient.addFulfillmentPlacesAsync(addFulfillmentPlacesRequest).getPollingFuture().get();
+    } catch (ExecutionException e) {
+      System.out.printf("Exception occurred during longrunning operation: %s%n", e.getMessage());
     }
   }
 }
diff --git a/samples/interactive-tutorials/src/main/java/product/CrudProduct.java b/samples/interactive-tutorials/src/main/java/product/CrudProduct.java
index cadd649d..c4018301 100644
--- a/samples/interactive-tutorials/src/main/java/product/CrudProduct.java
+++ b/samples/interactive-tutorials/src/main/java/product/CrudProduct.java
@@ -15,13 +15,12 @@
  */
 
 /*
- * Create product in a catalog using Retail API
+ * Create, update, get and delete product in a catalog using Retail API.
  */
 
 package product;
 
 import com.google.api.gax.rpc.NotFoundException;
-import com.google.cloud.ServiceOptions;
 import com.google.cloud.retail.v2.CreateProductRequest;
 import com.google.cloud.retail.v2.DeleteProductRequest;
 import com.google.cloud.retail.v2.GetProductRequest;
@@ -37,7 +36,8 @@
 public class CrudProduct {
 
   public static void main(String[] args) throws IOException {
-    String projectId = ServiceOptions.getDefaultProjectId();
+    // TODO(developer): Set projectId to your Google Cloud Platform project ID.
+    String projectId = "my-project";
     String generatedProductId = UUID.randomUUID().toString();
     String branchName =
         String.format(
diff --git a/samples/interactive-tutorials/src/main/java/product/ImportProductsBigQueryTable.java b/samples/interactive-tutorials/src/main/java/product/ImportProductsBigQueryTable.java
index 552751cf..83dce027 100644
--- a/samples/interactive-tutorials/src/main/java/product/ImportProductsBigQueryTable.java
+++ b/samples/interactive-tutorials/src/main/java/product/ImportProductsBigQueryTable.java
@@ -37,13 +37,16 @@ public class ImportProductsBigQueryTable {
 
   public static void main(String[] args) throws IOException, InterruptedException {
     String projectId = ServiceOptions.getDefaultProjectId();
+    // To check for error handling, replace the below variable with the invalid branch name.
+    // String branchName = "invalid_branch_name";
     String branchName =
         String.format(
             "projects/%s/locations/global/catalogs/default_catalog/branches/0", projectId);
     String datasetId = "products";
+    // To check for error handling, replace the below variable with table id that contains invalid
+    // products.
+    // String tableId = "products_some_invalid";
     String tableId = "products";
-    // TO CHECK ERROR HANDLING USE THE TABLE WITH INVALID PRODUCTS:
-    // tableId = "products_some_invalid"
 
     importProductsFromBigQuery(projectId, branchName, datasetId, tableId);
   }
diff --git a/samples/interactive-tutorials/src/main/java/product/RemoveFulfillmentPlaces.java b/samples/interactive-tutorials/src/main/java/product/RemoveFulfillmentPlaces.java
index 35e7b8f0..6a532dca 100644
--- a/samples/interactive-tutorials/src/main/java/product/RemoveFulfillmentPlaces.java
+++ b/samples/interactive-tutorials/src/main/java/product/RemoveFulfillmentPlaces.java
@@ -25,7 +25,7 @@
 import com.google.cloud.retail.v2.RemoveFulfillmentPlacesRequest;
 import java.io.IOException;
 import java.util.UUID;
-import java.util.concurrent.TimeUnit;
+import java.util.concurrent.ExecutionException;
 
 public class RemoveFulfillmentPlaces {
 
@@ -57,6 +57,15 @@ public static void removeFulfillmentPlaces(String productName, String storeId)
             .setAllowMissing(true)
             .build();
 
+    // To send an out-of-order request assign the invalid RemoveTime here:
+    // Instant instant = LocalDateTime.now().minusDays(1).toInstant(ZoneOffset.UTC);
+    // Timestamp previousDay = Timestamp.newBuilder()
+    //          .setSeconds(instant.getEpochSecond())
+    //          .setNanos(instant.getNano())
+    //          .build();
+    // removeFulfillmentRequest =
+    // removeFulfillmentRequest.toBuilder().setRemoveTime(previousDay).build();
+
     System.out.println("Remove fulfillment request " + removeFulfillmentRequest);
 
     // Initialize client that will be used to send requests. This client only
@@ -64,11 +73,12 @@ public static void removeFulfillmentPlaces(String productName, String storeId)
     // completing all of your requests, call the "close" method on the client to
     // safely clean up any remaining background resources.
     try (ProductServiceClient serviceClient = ProductServiceClient.create()) {
-      serviceClient.removeFulfillmentPlacesAsync(removeFulfillmentRequest);
       // This is a long-running operation and its result is not immediately
       // present with get operations,thus we simulate wait with sleep method.
-      System.out.println("Remove fulfillment places, wait 30 seconds.");
-      TimeUnit.SECONDS.sleep(30);
+      System.out.println("Waiting for operation to finish...");
+      serviceClient.removeFulfillmentPlacesAsync(removeFulfillmentRequest).getPollingFuture().get();
+    } catch (ExecutionException e) {
+      System.out.printf("Exception occurred during longrunning operation: %s%n", e.getMessage());
     }
   }
 }
diff --git a/samples/interactive-tutorials/src/main/java/product/SetInventory.java b/samples/interactive-tutorials/src/main/java/product/SetInventory.java
index 0a16d408..583df6b0 100644
--- a/samples/interactive-tutorials/src/main/java/product/SetInventory.java
+++ b/samples/interactive-tutorials/src/main/java/product/SetInventory.java
@@ -21,18 +21,14 @@
 import static setup.SetupCleanup.getProduct;
 
 import com.google.cloud.ServiceOptions;
-import com.google.cloud.retail.v2.FulfillmentInfo;
-import com.google.cloud.retail.v2.PriceInfo;
-import com.google.cloud.retail.v2.Product;
+import com.google.cloud.retail.v2.*;
 import com.google.cloud.retail.v2.Product.Availability;
-import com.google.cloud.retail.v2.ProductServiceClient;
-import com.google.cloud.retail.v2.SetInventoryRequest;
 import com.google.protobuf.FieldMask;
 import com.google.protobuf.Int32Value;
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.UUID;
-import java.util.concurrent.TimeUnit;
+import java.util.concurrent.ExecutionException;
 
 public class SetInventory {
 
@@ -93,17 +89,25 @@ public static void setInventory(String productName) throws IOException, Interrup
             .build();
     System.out.printf("Set inventory request: %s%n", setInventoryRequest);
 
+    // To send an out-of-order request assign the invalid SetTime here:
+    // Instant instant = LocalDateTime.now().minusDays(1).toInstant(ZoneOffset.UTC);
+    // Timestamp previousDay = Timestamp.newBuilder()
+    //          .setSeconds(instant.getEpochSecond())
+    //          .setNanos(instant.getNano())
+    //          .build();
+    // setInventoryRequest = setInventoryRequest.toBuilder().setSetTime(previousDay).build();
+
     // Initialize client that will be used to send requests. This client only
     // needs to be created once, and can be reused for multiple requests. After
     // completing all of your requests, call the "close" method on the client to
     // safely clean up any remaining background resources.
     try (ProductServiceClient serviceClient = ProductServiceClient.create()) {
-      serviceClient.setInventoryAsync(setInventoryRequest);
+      // This is a long-running operation and its result is not immediately
+      // present with get operations,thus we simulate wait with sleep method.
+      System.out.println("Waiting for operation to finish...");
+      serviceClient.setInventoryAsync(setInventoryRequest).getPollingFuture().get();
+    } catch (ExecutionException e) {
+      System.out.printf("Exception occurred during longrunning operation: %s%n", e.getMessage());
     }
-
-    // This is a long-running operation and its result is not immediately
-    // present with get operations,thus we simulate wait with sleep method.
-    System.out.println("Set inventory, wait 30 seconds.");
-    TimeUnit.SECONDS.sleep(30);
   }
 }
diff --git a/samples/interactive-tutorials/src/main/java/product/setup/ProductsCreateBigqueryTable.java b/samples/interactive-tutorials/src/main/java/product/setup/ProductsCreateBigqueryTable.java
index a13c0b8d..2463622a 100644
--- a/samples/interactive-tutorials/src/main/java/product/setup/ProductsCreateBigqueryTable.java
+++ b/samples/interactive-tutorials/src/main/java/product/setup/ProductsCreateBigqueryTable.java
@@ -38,7 +38,7 @@ public static void main(String[] args) throws IOException {
     String validProductsSourceFile =
         ProductsCreateBigqueryTable.class.getResource("/products.json").getPath();
     String invalidProductsSourceFile =
-        ProductsCreateBigqueryTable.class.getResource("products_some_invalid.json").getPath();
+        ProductsCreateBigqueryTable.class.getResource("/products_some_invalid.json").getPath();
 
     BufferedReader bufferedReader = new BufferedReader(new FileReader(productSchemaFilePath));
     String jsonToString = bufferedReader.lines().collect(Collectors.joining());
diff --git a/samples/interactive-tutorials/src/main/java/search/SearchSimpleQuery.java b/samples/interactive-tutorials/src/main/java/search/SearchSimpleQuery.java
index 545018e8..e2bc4c36 100644
--- a/samples/interactive-tutorials/src/main/java/search/SearchSimpleQuery.java
+++ b/samples/interactive-tutorials/src/main/java/search/SearchSimpleQuery.java
@@ -60,7 +60,11 @@ public static void searchResponse(String defaultSearchPlacementName) throws IOEx
     // safely clean up any remaining background resources.
     try (SearchServiceClient client = SearchServiceClient.create()) {
       SearchResponse searchResponse = client.search(searchRequest).getPage().getResponse();
-      System.out.println("Search response: " + searchResponse);
+      if (searchResponse.getTotalSize() == 0) {
+        System.out.println("The search operation returned no matching results.");
+      } else {
+        System.out.println("Search response: " + searchResponse);
+      }
     }
   }
 }
diff --git a/samples/interactive-tutorials/src/main/java/search/SearchWithBoostSpec.java b/samples/interactive-tutorials/src/main/java/search/SearchWithBoostSpec.java
index 8cead0d8..caf5df7d 100644
--- a/samples/interactive-tutorials/src/main/java/search/SearchWithBoostSpec.java
+++ b/samples/interactive-tutorials/src/main/java/search/SearchWithBoostSpec.java
@@ -71,7 +71,11 @@ public static void searchResponse(String defaultSearchPlacementName) throws IOEx
     // safely clean up any remaining background resources.
     try (SearchServiceClient client = SearchServiceClient.create()) {
       SearchResponse searchResponse = client.search(searchRequest).getPage().getResponse();
-      System.out.println("Search response: " + searchResponse);
+      if (searchResponse.getTotalSize() == 0) {
+        System.out.println("The search operation returned no matching results.");
+      } else {
+        System.out.println("Search response: " + searchResponse);
+      }
     }
   }
 }
diff --git a/samples/interactive-tutorials/src/main/java/search/SearchWithFacetSpec.java b/samples/interactive-tutorials/src/main/java/search/SearchWithFacetSpec.java
index 37029c62..9688a871 100644
--- a/samples/interactive-tutorials/src/main/java/search/SearchWithFacetSpec.java
+++ b/samples/interactive-tutorials/src/main/java/search/SearchWithFacetSpec.java
@@ -62,7 +62,11 @@ public static void searchResponse(String defaultSearchPlacementName) throws IOEx
     // safely clean up any remaining background resources.
     try (SearchServiceClient client = SearchServiceClient.create()) {
       SearchResponse searchResponse = client.search(searchRequest).getPage().getResponse();
-      System.out.println("Search response: " + searchResponse);
+      if (searchResponse.getTotalSize() == 0) {
+        System.out.println("The search operation returned no matching results.");
+      } else {
+        System.out.println("Search response: " + searchResponse);
+      }
     }
   }
 }
diff --git a/samples/interactive-tutorials/src/main/java/search/SearchWithFiltering.java b/samples/interactive-tutorials/src/main/java/search/SearchWithFiltering.java
index 69b2653e..1c46b164 100644
--- a/samples/interactive-tutorials/src/main/java/search/SearchWithFiltering.java
+++ b/samples/interactive-tutorials/src/main/java/search/SearchWithFiltering.java
@@ -63,7 +63,11 @@ public static void searchResponse(String defaultSearchPlacementName) throws IOEx
     // safely clean up any remaining background resources.
     try (SearchServiceClient client = SearchServiceClient.create()) {
       SearchResponse searchResponse = client.search(searchRequest).getPage().getResponse();
-      System.out.println("Search response: " + searchResponse);
+      if (searchResponse.getTotalSize() == 0) {
+        System.out.println("The search operation returned no matching results.");
+      } else {
+        System.out.println("Search response: " + searchResponse);
+      }
     }
   }
 }
diff --git a/samples/interactive-tutorials/src/main/java/search/SearchWithOrdering.java b/samples/interactive-tutorials/src/main/java/search/SearchWithOrdering.java
index c2623b60..d3139a08 100644
--- a/samples/interactive-tutorials/src/main/java/search/SearchWithOrdering.java
+++ b/samples/interactive-tutorials/src/main/java/search/SearchWithOrdering.java
@@ -62,7 +62,11 @@ public static void searchResponse(String defaultSearchPlacementName) throws IOEx
     // safely clean up any remaining background resources.
     try (SearchServiceClient client = SearchServiceClient.create()) {
       SearchResponse searchResponse = client.search(searchRequest).getPage().getResponse();
-      System.out.println("Search response: " + searchResponse);
+      if (searchResponse.getTotalSize() == 0) {
+        System.out.println("The search operation returned no matching results.");
+      } else {
+        System.out.println("Search response: " + searchResponse);
+      }
     }
   }
 }
diff --git a/samples/interactive-tutorials/src/main/java/search/SearchWithPagination.java b/samples/interactive-tutorials/src/main/java/search/SearchWithPagination.java
index b288397b..c3d80c1a 100644
--- a/samples/interactive-tutorials/src/main/java/search/SearchWithPagination.java
+++ b/samples/interactive-tutorials/src/main/java/search/SearchWithPagination.java
@@ -65,7 +65,11 @@ public static void searchResponse(String defaultSearchPlacementName) throws IOEx
     // safely clean up any remaining background resources.
     try (SearchServiceClient client = SearchServiceClient.create()) {
       SearchResponse searchResponseFirstPage = client.search(searchRequest).getPage().getResponse();
-      System.out.println("Search response: " + searchResponseFirstPage);
+      if (searchResponseFirstPage.getTotalSize() == 0) {
+        System.out.println("The search operation returned no matching results.");
+      } else {
+        System.out.println("Search response: " + searchResponseFirstPage);
+      }
 
       // PASTE CALL WITH NEXT PAGE TOKEN HERE:
 
diff --git a/samples/interactive-tutorials/src/main/java/search/SearchWithQueryExpansionSpec.java b/samples/interactive-tutorials/src/main/java/search/SearchWithQueryExpansionSpec.java
index c08552e9..0576de17 100644
--- a/samples/interactive-tutorials/src/main/java/search/SearchWithQueryExpansionSpec.java
+++ b/samples/interactive-tutorials/src/main/java/search/SearchWithQueryExpansionSpec.java
@@ -68,7 +68,11 @@ public static void searchResponse(String defaultSearchPlacementName) throws IOEx
     // safely clean up any remaining background resources.
     try (SearchServiceClient client = SearchServiceClient.create()) {
       SearchResponse searchResponse = client.search(searchRequest).getPage().getResponse();
-      System.out.println("Search response: " + searchResponse);
+      if (searchResponse.getTotalSize() == 0) {
+        System.out.println("The search operation returned no matching results.");
+      } else {
+        System.out.println("Search response: " + searchResponse);
+      }
     }
   }
 }
diff --git a/samples/interactive-tutorials/src/test/java/product/AddFulfillmentPlacesTest.java b/samples/interactive-tutorials/src/test/java/product/AddFulfillmentPlacesTest.java
index ea17c286..c80d7d65 100644
--- a/samples/interactive-tutorials/src/test/java/product/AddFulfillmentPlacesTest.java
+++ b/samples/interactive-tutorials/src/test/java/product/AddFulfillmentPlacesTest.java
@@ -65,7 +65,7 @@ public void testAddFulfillment() {
     String outputResult = bout.toString();
 
     assertThat(outputResult).contains("Add fulfilment places");
-    assertThat(outputResult).contains("Add fulfillment places, wait 45 seconds");
+    assertThat(outputResult).contains("Waiting for operation to finish...");
   }
 
   @After
diff --git a/samples/interactive-tutorials/src/test/java/product/RemoveFulfillmentPlacesTest.java b/samples/interactive-tutorials/src/test/java/product/RemoveFulfillmentPlacesTest.java
index bddaca37..fd4d041e 100644
--- a/samples/interactive-tutorials/src/test/java/product/RemoveFulfillmentPlacesTest.java
+++ b/samples/interactive-tutorials/src/test/java/product/RemoveFulfillmentPlacesTest.java
@@ -64,7 +64,7 @@ public void testRemoveFulfillmentPlaces() {
     String outputResult = bout.toString();
 
     assertThat(outputResult).contains("Remove fulfilment places with current date");
-    assertThat(outputResult).contains("Remove fulfillment places, wait 30 seconds");
+    assertThat(outputResult).contains("Waiting for operation to finish...");
     assertThat(outputResult).contains("Delete product request name");
     assertThat(outputResult).contains("was deleted");
   }
diff --git a/samples/interactive-tutorials/src/test/java/product/SetInventoryTest.java b/samples/interactive-tutorials/src/test/java/product/SetInventoryTest.java
index 747da07e..12d0f716 100644
--- a/samples/interactive-tutorials/src/test/java/product/SetInventoryTest.java
+++ b/samples/interactive-tutorials/src/test/java/product/SetInventoryTest.java
@@ -64,7 +64,7 @@ public void testSetInventoryTest() {
     String outputResult = bout.toString();
 
     assertThat(outputResult).contains("Set inventory request");
-    assertThat(outputResult).contains("Set inventory, wait 30 seconds");
+    assertThat(outputResult).contains("Waiting for operation to finish...");
   }
 
   @After
diff --git a/samples/interactive-tutorials/user_environment_setup.sh b/samples/interactive-tutorials/user_environment_setup.sh
index 2fa0efcf..f2ba633d 100644
--- a/samples/interactive-tutorials/user_environment_setup.sh
+++ b/samples/interactive-tutorials/user_environment_setup.sh
@@ -14,61 +14,83 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-# set the Google Cloud Project ID
-{
-  project_id=$1
-  echo "Project ID: $project_id"
-  gcloud config set project "$project_id"
-
-} && {
-
-  timestamp=$(date +%s)
-
-  service_account_id="service-acc-$timestamp"
-  echo "Service Account: $service_account_id"
+failure() {
+    echo "========================================="
+    echo "The Google Cloud setup was not completed."
+    echo "Please fix the errors above!"
+    echo "========================================="
+    exit 0
+}
 
-  # create service account (your service-acc-$timestamp)
-  gcloud iam service-accounts create "$service_account_id"
+# catch any error that happened during execution
+trap 'failure' ERR
 
-} && {
+# set the Google Cloud Project ID
 
-  # assign necessary roles to your new service account
-  for role in {retail.admin,editor,bigquery.admin}
+project_id=$1
+echo "Project ID: $project_id"
+gcloud config set project "$project_id"
+
+email=$(gcloud auth list --filter="status:ACTIVE account:$project_id.iam.gserviceaccount.com" --format="value(account)")
+echo $email
+
+# Check if user has service account active
+if [ -z "$email" ]
+then
+  # Create a new service account
+    timestamp=$(date +%s)
+
+    service_account_id="service-acc-$timestamp"
+    echo "Service Account: $service_account_id"
+
+    # create service account (your service-acc-$timestamp)
+    gcloud iam service-accounts create "$service_account_id"
+else
+    service_account_id="${email%@*}"
+  # Log out of service account
+    gcloud auth revoke 2>/dev/null
+fi
+echo "$service_account_id"
+
+editor=$(gcloud projects get-iam-policy $project_id  \
+--flatten="bindings[].members" \
+--format='table(bindings.role)' \
+--filter="bindings.members:$service_account_id ROLE=roles/editor")
+
+retail_admin=$(gcloud projects get-iam-policy $project_id  \
+--flatten="bindings[].members" \
+--format='table(bindings.role)' \
+--filter="bindings.members:$service_account_id ROLE=roles/retail.admin")
+
+
+# assign necessary roles to your new service account
+# Check if any of the needed roles is missing
+if [ -z "$editor" ] || [ -z "$retail_admin" ]
+then
+    # Assign necessary roles to your new service account.
+    for role in {retail.admin,editor}
     do
-      gcloud projects add-iam-policy-binding "$project_id" --member="serviceAccount:$service_account_id@$project_id.iam.gserviceaccount.com" --role=roles/"${role}"
-  done
+        gcloud projects add-iam-policy-binding "$project_id" --member="serviceAccount:$service_account_id@$project_id.iam.gserviceaccount.com" --role=roles/"${role}"
+    done
+    echo "Wait ~60 seconds to be sure the appropriate roles have been assigned to your service account"
+    sleep 60
+fi
 
-} && {
+# upload your service account key file
+service_acc_email="$service_account_id@$project_id.iam.gserviceaccount.com"
+gcloud iam service-accounts keys create ~/key.json --iam-account "$service_acc_email"
 
-  echo "Wait ~60 seconds to be sure the appropriate roles have been assigned to your service account"
-  sleep 60
+# activate the service account using the key
+gcloud auth activate-service-account --key-file ~/key.json
 
-  # upload your service account key file
-  service_acc_email="$service_account_id@$project_id.iam.gserviceaccount.com"
-  gcloud iam service-accounts keys create ~/key.json --iam-account "$service_acc_email"
 
-  # activate the service account using the key
-  gcloud auth activate-service-account --key-file ~/key.json
+# install needed Google client libraries
+cd ~/cloudshell_open/java-retail/samples/interactive-tutorials || exit
+mvn clean install -DskipTests
 
-} && {
 
-  # install needed Google client libraries
-  cd ~/cloudshell_open/java-retail/samples/interactive-tutorials || exit
-  mvn clean install -DskipTests
-
-} && {
-
-  # Print success message
-  echo "========================================"
-  echo "The Google Cloud setup is completed."
-  echo "Please proceed with the Tutorial steps"
-  echo "========================================"
-
-} || {
-
-  # Print error message
-  echo "========================================"
-  echo "The Google Cloud setup was not completed."
-  echo "Please fix the errors above!"
-  echo "========================================"
-}
+# Print success message
+echo "========================================"
+echo "The Google Cloud setup is completed."
+echo "Please proceed with the Tutorial steps"
+echo "========================================"
diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml
index a5bff432..d7d90744 100644
--- a/samples/snapshot/pom.xml
+++ b/samples/snapshot/pom.xml
@@ -28,7 +28,7 @@
     
       com.google.cloud
       google-cloud-retail
-      2.5.0
+      2.5.1
     
     
 
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/addcatalogattribute/AsyncAddCatalogAttribute.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/addcatalogattribute/AsyncAddCatalogAttribute.java
index a0d06712..2b71f0dd 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/addcatalogattribute/AsyncAddCatalogAttribute.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/addcatalogattribute/AsyncAddCatalogAttribute.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncAddCatalogAttribute() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       AddCatalogAttributeRequest request =
           AddCatalogAttributeRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/addcatalogattribute/SyncAddCatalogAttribute.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/addcatalogattribute/SyncAddCatalogAttribute.java
index e44b1603..c00c09b8 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/addcatalogattribute/SyncAddCatalogAttribute.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/addcatalogattribute/SyncAddCatalogAttribute.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddCatalogAttribute() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       AddCatalogAttributeRequest request =
           AddCatalogAttributeRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/create/SyncCreateSetCredentialsProvider.java
index 213b179d..0019d8f3 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CatalogServiceSettings catalogServiceSettings =
         CatalogServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/create/SyncCreateSetCredentialsProvider1.java
index 681344e3..e9c91a38 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CatalogServiceSettings catalogServiceSettings =
         CatalogServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/create/SyncCreateSetEndpoint.java
index e0e3954b..3f6e2419 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CatalogServiceSettings catalogServiceSettings =
         CatalogServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     CatalogServiceClient catalogServiceClient = CatalogServiceClient.create(catalogServiceSettings);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/AsyncGetAttributesConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/AsyncGetAttributesConfig.java
index 4f8ca158..daaec4c4 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/AsyncGetAttributesConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/AsyncGetAttributesConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetAttributesConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       GetAttributesConfigRequest request =
           GetAttributesConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/SyncGetAttributesConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/SyncGetAttributesConfig.java
index c2125413..2c4633c9 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/SyncGetAttributesConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/SyncGetAttributesConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetAttributesConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       GetAttributesConfigRequest request =
           GetAttributesConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigAttributesconfigname.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigAttributesconfigname.java
index b41e52d1..f884311b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigAttributesconfigname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigAttributesconfigname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetAttributesConfigAttributesconfigname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       AttributesConfigName name = AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       AttributesConfig response = catalogServiceClient.getAttributesConfig(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigString.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigString.java
index abba3aba..60a75d03 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetAttributesConfigString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       String name = AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       AttributesConfig response = catalogServiceClient.getAttributesConfig(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/AsyncGetCompletionConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/AsyncGetCompletionConfig.java
index a072ccd4..3b4bc349 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/AsyncGetCompletionConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/AsyncGetCompletionConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetCompletionConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       GetCompletionConfigRequest request =
           GetCompletionConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfig.java
index 90823488..1077c21f 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetCompletionConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       GetCompletionConfigRequest request =
           GetCompletionConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigCompletionconfigname.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigCompletionconfigname.java
index f0220c10..dcd74276 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigCompletionconfigname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigCompletionconfigname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetCompletionConfigCompletionconfigname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       CompletionConfigName name = CompletionConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       CompletionConfig response = catalogServiceClient.getCompletionConfig(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigString.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigString.java
index 4a45365e..2ed637b0 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetCompletionConfigString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       String name = CompletionConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       CompletionConfig response = catalogServiceClient.getCompletionConfig(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getdefaultbranch/AsyncGetDefaultBranch.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getdefaultbranch/AsyncGetDefaultBranch.java
index 4623f875..f69d745c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getdefaultbranch/AsyncGetDefaultBranch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getdefaultbranch/AsyncGetDefaultBranch.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetDefaultBranch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       GetDefaultBranchRequest request =
           GetDefaultBranchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranch.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranch.java
index f04e784c..5d70aff5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranch.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetDefaultBranch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       GetDefaultBranchRequest request =
           GetDefaultBranchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchCatalogname.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchCatalogname.java
index 777cfc44..ce3d6c01 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchCatalogname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchCatalogname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetDefaultBranchCatalogname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       CatalogName catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       GetDefaultBranchResponse response = catalogServiceClient.getDefaultBranch(catalog);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchString.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchString.java
index f572a6ab..c5ab9601 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetDefaultBranchString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       String catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       GetDefaultBranchResponse response = catalogServiceClient.getDefaultBranch(catalog);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/AsyncListCatalogs.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/AsyncListCatalogs.java
index 777b11bb..3deb9de2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/AsyncListCatalogs.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/AsyncListCatalogs.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListCatalogs() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       ListCatalogsRequest request =
           ListCatalogsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/AsyncListCatalogsPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/AsyncListCatalogsPaged.java
index da1fe655..27ee29d3 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/AsyncListCatalogsPaged.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/AsyncListCatalogsPaged.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListCatalogsPaged() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       ListCatalogsRequest request =
           ListCatalogsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/SyncListCatalogs.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/SyncListCatalogs.java
index 0ec31dfc..5eb5239d 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/SyncListCatalogs.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/SyncListCatalogs.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListCatalogs() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       ListCatalogsRequest request =
           ListCatalogsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/SyncListCatalogsLocationname.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/SyncListCatalogsLocationname.java
index 1cc7c893..a340acdc 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/SyncListCatalogsLocationname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/SyncListCatalogsLocationname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListCatalogsLocationname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       for (Catalog element : catalogServiceClient.listCatalogs(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/SyncListCatalogsString.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/SyncListCatalogsString.java
index b5b5abfe..80e73eb1 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/SyncListCatalogsString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/listcatalogs/SyncListCatalogsString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListCatalogsString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       for (Catalog element : catalogServiceClient.listCatalogs(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/removecatalogattribute/AsyncRemoveCatalogAttribute.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/removecatalogattribute/AsyncRemoveCatalogAttribute.java
index 5f9d6d74..84538952 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/removecatalogattribute/AsyncRemoveCatalogAttribute.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/removecatalogattribute/AsyncRemoveCatalogAttribute.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRemoveCatalogAttribute() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       RemoveCatalogAttributeRequest request =
           RemoveCatalogAttributeRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/removecatalogattribute/SyncRemoveCatalogAttribute.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/removecatalogattribute/SyncRemoveCatalogAttribute.java
index 6016199a..8ffc6dae 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/removecatalogattribute/SyncRemoveCatalogAttribute.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/removecatalogattribute/SyncRemoveCatalogAttribute.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveCatalogAttribute() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       RemoveCatalogAttributeRequest request =
           RemoveCatalogAttributeRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/replacecatalogattribute/AsyncReplaceCatalogAttribute.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/replacecatalogattribute/AsyncReplaceCatalogAttribute.java
index e9768bd4..b9ceac0b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/replacecatalogattribute/AsyncReplaceCatalogAttribute.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/replacecatalogattribute/AsyncReplaceCatalogAttribute.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncReplaceCatalogAttribute() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       ReplaceCatalogAttributeRequest request =
           ReplaceCatalogAttributeRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/replacecatalogattribute/SyncReplaceCatalogAttribute.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/replacecatalogattribute/SyncReplaceCatalogAttribute.java
index d357a954..cf8dfe8a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/replacecatalogattribute/SyncReplaceCatalogAttribute.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/replacecatalogattribute/SyncReplaceCatalogAttribute.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncReplaceCatalogAttribute() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       ReplaceCatalogAttributeRequest request =
           ReplaceCatalogAttributeRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/setdefaultbranch/AsyncSetDefaultBranch.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/setdefaultbranch/AsyncSetDefaultBranch.java
index e3555dcb..c91aed32 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/setdefaultbranch/AsyncSetDefaultBranch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/setdefaultbranch/AsyncSetDefaultBranch.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncSetDefaultBranch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       SetDefaultBranchRequest request =
           SetDefaultBranchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranch.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranch.java
index ecab749e..d82818f3 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranch.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSetDefaultBranch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       SetDefaultBranchRequest request =
           SetDefaultBranchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchCatalogname.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchCatalogname.java
index eb670199..52115ff5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchCatalogname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchCatalogname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSetDefaultBranchCatalogname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       CatalogName catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       catalogServiceClient.setDefaultBranch(catalog);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchString.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchString.java
index 55407bc0..659699ed 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSetDefaultBranchString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       String catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       catalogServiceClient.setDefaultBranch(catalog);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updateattributesconfig/AsyncUpdateAttributesConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updateattributesconfig/AsyncUpdateAttributesConfig.java
index f080c2ac..74b862be 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updateattributesconfig/AsyncUpdateAttributesConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updateattributesconfig/AsyncUpdateAttributesConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateAttributesConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       UpdateAttributesConfigRequest request =
           UpdateAttributesConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfig.java
index ab01b952..75d7a38d 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateAttributesConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       UpdateAttributesConfigRequest request =
           UpdateAttributesConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfigAttributesconfigFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfigAttributesconfigFieldmask.java
index 32fc5af0..bf3a0a7e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfigAttributesconfigFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfigAttributesconfigFieldmask.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateAttributesConfigAttributesconfigFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       AttributesConfig attributesConfig = AttributesConfig.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecatalog/AsyncUpdateCatalog.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecatalog/AsyncUpdateCatalog.java
index 265bbe02..cb3e75cf 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecatalog/AsyncUpdateCatalog.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecatalog/AsyncUpdateCatalog.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateCatalog() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       UpdateCatalogRequest request =
           UpdateCatalogRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecatalog/SyncUpdateCatalog.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecatalog/SyncUpdateCatalog.java
index f16c6391..90ef6cb1 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecatalog/SyncUpdateCatalog.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecatalog/SyncUpdateCatalog.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateCatalog() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       UpdateCatalogRequest request =
           UpdateCatalogRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecatalog/SyncUpdateCatalogCatalogFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecatalog/SyncUpdateCatalogCatalogFieldmask.java
index 874e774c..13b2bee3 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecatalog/SyncUpdateCatalogCatalogFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecatalog/SyncUpdateCatalogCatalogFieldmask.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateCatalogCatalogFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       Catalog catalog = Catalog.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecompletionconfig/AsyncUpdateCompletionConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecompletionconfig/AsyncUpdateCompletionConfig.java
index 39e81d27..01bc70b8 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecompletionconfig/AsyncUpdateCompletionConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecompletionconfig/AsyncUpdateCompletionConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateCompletionConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       UpdateCompletionConfigRequest request =
           UpdateCompletionConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfig.java
index 042159cc..6cbc27b7 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateCompletionConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       UpdateCompletionConfigRequest request =
           UpdateCompletionConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfigCompletionconfigFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfigCompletionconfigFieldmask.java
index 2cfc094f..99eed7c8 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfigCompletionconfigFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfigCompletionconfigFieldmask.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateCompletionConfigCompletionconfigFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       CompletionConfig completionConfig = CompletionConfig.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/catalogservicesettings/updatecatalog/SyncUpdateCatalog.java b/samples/snippets/generated/com/google/cloud/retail/v2/catalogservicesettings/updatecatalog/SyncUpdateCatalog.java
index 4234849a..aa2a2ea8 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/catalogservicesettings/updatecatalog/SyncUpdateCatalog.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/catalogservicesettings/updatecatalog/SyncUpdateCatalog.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateCatalog() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CatalogServiceSettings.Builder catalogServiceSettingsBuilder =
         CatalogServiceSettings.newBuilder();
     catalogServiceSettingsBuilder
         .updateCatalogSettings()
         .setRetrySettings(
-            catalogServiceSettingsBuilder
-                .updateCatalogSettings()
-                .getRetrySettings()
-                .toBuilder()
+            catalogServiceSettingsBuilder.updateCatalogSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     CatalogServiceSettings catalogServiceSettings = catalogServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/completequery/AsyncCompleteQuery.java b/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/completequery/AsyncCompleteQuery.java
index 8bc7306a..25a56b67 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/completequery/AsyncCompleteQuery.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/completequery/AsyncCompleteQuery.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncCompleteQuery() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
       CompleteQueryRequest request =
           CompleteQueryRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/completequery/SyncCompleteQuery.java b/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/completequery/SyncCompleteQuery.java
index 374718c6..941f251b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/completequery/SyncCompleteQuery.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/completequery/SyncCompleteQuery.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCompleteQuery() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
       CompleteQueryRequest request =
           CompleteQueryRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/create/SyncCreateSetCredentialsProvider.java
index 1160a482..f489dd53 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CompletionServiceSettings completionServiceSettings =
         CompletionServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/create/SyncCreateSetCredentialsProvider1.java
index d0eb8e1e..d9aaa56d 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CompletionServiceSettings completionServiceSettings =
         CompletionServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/create/SyncCreateSetEndpoint.java
index 7f5bd37d..04c6e0eb 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CompletionServiceSettings completionServiceSettings =
         CompletionServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     CompletionServiceClient completionServiceClient =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/importcompletiondata/AsyncImportCompletionData.java b/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/importcompletiondata/AsyncImportCompletionData.java
index 92d0eb44..3aed8175 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/importcompletiondata/AsyncImportCompletionData.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/importcompletiondata/AsyncImportCompletionData.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncImportCompletionData() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
       ImportCompletionDataRequest request =
           ImportCompletionDataRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/importcompletiondata/AsyncImportCompletionDataLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/importcompletiondata/AsyncImportCompletionDataLRO.java
index 4c6d8143..94e6c68f 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/importcompletiondata/AsyncImportCompletionDataLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/importcompletiondata/AsyncImportCompletionDataLRO.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncImportCompletionDataLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
       ImportCompletionDataRequest request =
           ImportCompletionDataRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/importcompletiondata/SyncImportCompletionData.java b/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/importcompletiondata/SyncImportCompletionData.java
index 0640ce07..0bbf5f68 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/importcompletiondata/SyncImportCompletionData.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/completionserviceclient/importcompletiondata/SyncImportCompletionData.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncImportCompletionData() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
       ImportCompletionDataRequest request =
           ImportCompletionDataRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/completionservicesettings/completequery/SyncCompleteQuery.java b/samples/snippets/generated/com/google/cloud/retail/v2/completionservicesettings/completequery/SyncCompleteQuery.java
index ee8cc26f..6c8a301b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/completionservicesettings/completequery/SyncCompleteQuery.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/completionservicesettings/completequery/SyncCompleteQuery.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCompleteQuery() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CompletionServiceSettings.Builder completionServiceSettingsBuilder =
         CompletionServiceSettings.newBuilder();
     completionServiceSettingsBuilder
         .completeQuerySettings()
         .setRetrySettings(
-            completionServiceSettingsBuilder
-                .completeQuerySettings()
-                .getRetrySettings()
-                .toBuilder()
+            completionServiceSettingsBuilder.completeQuerySettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     CompletionServiceSettings completionServiceSettings = completionServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/create/SyncCreateSetCredentialsProvider.java
index 5dd5b46a..ac7e9c8c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ControlServiceSettings controlServiceSettings =
         ControlServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/create/SyncCreateSetCredentialsProvider1.java
index 23d62100..01dbdc57 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ControlServiceSettings controlServiceSettings =
         ControlServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/create/SyncCreateSetEndpoint.java
index a9402b50..5dc4946d 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ControlServiceSettings controlServiceSettings =
         ControlServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     ControlServiceClient controlServiceClient = ControlServiceClient.create(controlServiceSettings);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/AsyncCreateControl.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/AsyncCreateControl.java
index 2660c7c1..89698cf1 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/AsyncCreateControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/AsyncCreateControl.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncCreateControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       CreateControlRequest request =
           CreateControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/SyncCreateControl.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/SyncCreateControl.java
index 16e02425..6c0b96cf 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/SyncCreateControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/SyncCreateControl.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       CreateControlRequest request =
           CreateControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/SyncCreateControlCatalognameControlString.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/SyncCreateControlCatalognameControlString.java
index 0e340fb3..174453d9 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/SyncCreateControlCatalognameControlString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/SyncCreateControlCatalognameControlString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateControlCatalognameControlString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       Control control = Control.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/SyncCreateControlStringControlString.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/SyncCreateControlStringControlString.java
index 759759c5..86adb27c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/SyncCreateControlStringControlString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/createcontrol/SyncCreateControlStringControlString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateControlStringControlString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       Control control = Control.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/AsyncDeleteControl.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/AsyncDeleteControl.java
index b5c168c2..c5ceaa7a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/AsyncDeleteControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/AsyncDeleteControl.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncDeleteControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       DeleteControlRequest request =
           DeleteControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/SyncDeleteControl.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/SyncDeleteControl.java
index 76e0c81e..ea93781e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/SyncDeleteControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/SyncDeleteControl.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       DeleteControlRequest request =
           DeleteControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/SyncDeleteControlControlname.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/SyncDeleteControlControlname.java
index 2544e5cf..6a235eea 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/SyncDeleteControlControlname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/SyncDeleteControlControlname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteControlControlname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       ControlName name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]");
       controlServiceClient.deleteControl(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/SyncDeleteControlString.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/SyncDeleteControlString.java
index bfef04c6..53384b7c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/SyncDeleteControlString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/deletecontrol/SyncDeleteControlString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteControlString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       String name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString();
       controlServiceClient.deleteControl(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/AsyncGetControl.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/AsyncGetControl.java
index f13afba4..a93de958 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/AsyncGetControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/AsyncGetControl.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       GetControlRequest request =
           GetControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/SyncGetControl.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/SyncGetControl.java
index 2f0d214d..0529cb1d 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/SyncGetControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/SyncGetControl.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       GetControlRequest request =
           GetControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/SyncGetControlControlname.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/SyncGetControlControlname.java
index c61df347..d4d719a6 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/SyncGetControlControlname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/SyncGetControlControlname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetControlControlname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       ControlName name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]");
       Control response = controlServiceClient.getControl(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/SyncGetControlString.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/SyncGetControlString.java
index 8082acb4..e4b7d6b2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/SyncGetControlString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/getcontrol/SyncGetControlString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetControlString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       String name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString();
       Control response = controlServiceClient.getControl(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/AsyncListControls.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/AsyncListControls.java
index bd317976..dd6f5c42 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/AsyncListControls.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/AsyncListControls.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListControls() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       ListControlsRequest request =
           ListControlsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/AsyncListControlsPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/AsyncListControlsPaged.java
index c7c2d8fe..bed40e29 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/AsyncListControlsPaged.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/AsyncListControlsPaged.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListControlsPaged() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       ListControlsRequest request =
           ListControlsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/SyncListControls.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/SyncListControls.java
index 47ef078d..0649c259 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/SyncListControls.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/SyncListControls.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListControls() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       ListControlsRequest request =
           ListControlsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/SyncListControlsCatalogname.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/SyncListControlsCatalogname.java
index bd9b42de..c85129fc 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/SyncListControlsCatalogname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/SyncListControlsCatalogname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListControlsCatalogname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       for (Control element : controlServiceClient.listControls(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/SyncListControlsString.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/SyncListControlsString.java
index 214744df..ca83c6f8 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/SyncListControlsString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/listcontrols/SyncListControlsString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListControlsString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       for (Control element : controlServiceClient.listControls(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/updatecontrol/AsyncUpdateControl.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/updatecontrol/AsyncUpdateControl.java
index 6d1f421b..b20e1ba9 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/updatecontrol/AsyncUpdateControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/updatecontrol/AsyncUpdateControl.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       UpdateControlRequest request =
           UpdateControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/updatecontrol/SyncUpdateControl.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/updatecontrol/SyncUpdateControl.java
index cca54f29..3c6c94b1 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/updatecontrol/SyncUpdateControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/updatecontrol/SyncUpdateControl.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       UpdateControlRequest request =
           UpdateControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/updatecontrol/SyncUpdateControlControlFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/updatecontrol/SyncUpdateControlControlFieldmask.java
index d96e13f3..c1d0e2df 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/updatecontrol/SyncUpdateControlControlFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlserviceclient/updatecontrol/SyncUpdateControlControlFieldmask.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateControlControlFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       Control control = Control.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/controlservicesettings/createcontrol/SyncCreateControl.java b/samples/snippets/generated/com/google/cloud/retail/v2/controlservicesettings/createcontrol/SyncCreateControl.java
index 6befa8f7..7feeeabc 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/controlservicesettings/createcontrol/SyncCreateControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/controlservicesettings/createcontrol/SyncCreateControl.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ControlServiceSettings.Builder controlServiceSettingsBuilder =
         ControlServiceSettings.newBuilder();
     controlServiceSettingsBuilder
         .createControlSettings()
         .setRetrySettings(
-            controlServiceSettingsBuilder
-                .createControlSettings()
-                .getRetrySettings()
-                .toBuilder()
+            controlServiceSettingsBuilder.createControlSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     ControlServiceSettings controlServiceSettings = controlServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/create/SyncCreateSetCredentialsProvider.java
index df790553..8208891c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require 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))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/create/SyncCreateSetCredentialsProvider1.java
index 6145428b..f4f7c7e4 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require 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()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/create/SyncCreateSetEndpoint.java
index a0181304..648239cb 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require 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 =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/predict/AsyncPredict.java b/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/predict/AsyncPredict.java
index bcf63d22..43ccf925 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/predict/AsyncPredict.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/predict/AsyncPredict.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncPredict() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying 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()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/predict/SyncPredict.java b/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/predict/SyncPredict.java
index e7892b77..6bafd4a0 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/predict/SyncPredict.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/predictionserviceclient/predict/SyncPredict.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncPredict() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying 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()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/predictionservicesettings/predict/SyncPredict.java b/samples/snippets/generated/com/google/cloud/retail/v2/predictionservicesettings/predict/SyncPredict.java
index 4fcbd0c7..0c3750d8 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/predictionservicesettings/predict/SyncPredict.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/predictionservicesettings/predict/SyncPredict.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncPredict() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require 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()
+            predictionServiceSettingsBuilder.predictSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     PredictionServiceSettings predictionServiceSettings = predictionServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlaces.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlaces.java
index b86d2b10..320ee5dc 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlaces.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlaces.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncAddFulfillmentPlaces() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       AddFulfillmentPlacesRequest request =
           AddFulfillmentPlacesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlacesLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlacesLRO.java
index 751a3821..c9c52ffc 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlacesLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlacesLRO.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncAddFulfillmentPlacesLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       AddFulfillmentPlacesRequest request =
           AddFulfillmentPlacesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlaces.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlaces.java
index 922a6700..2e49cd22 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlaces.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlaces.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddFulfillmentPlaces() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       AddFulfillmentPlacesRequest request =
           AddFulfillmentPlacesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesProductname.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesProductname.java
index 00890d1c..e275af05 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesProductname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesProductname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddFulfillmentPlacesProductname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ProductName product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesString.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesString.java
index 9c0abfa5..8e2889e6 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddFulfillmentPlacesString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/AsyncAddLocalInventories.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/AsyncAddLocalInventories.java
index 806295dc..b749115f 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/AsyncAddLocalInventories.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/AsyncAddLocalInventories.java
@@ -34,8 +34,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncAddLocalInventories() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       AddLocalInventoriesRequest request =
           AddLocalInventoriesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/AsyncAddLocalInventoriesLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/AsyncAddLocalInventoriesLRO.java
index 0392d8bf..59bacca1 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/AsyncAddLocalInventoriesLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/AsyncAddLocalInventoriesLRO.java
@@ -35,8 +35,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncAddLocalInventoriesLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       AddLocalInventoriesRequest request =
           AddLocalInventoriesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/SyncAddLocalInventories.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/SyncAddLocalInventories.java
index 5e7e76ba..4ccdd90b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/SyncAddLocalInventories.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/SyncAddLocalInventories.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddLocalInventories() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       AddLocalInventoriesRequest request =
           AddLocalInventoriesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/SyncAddLocalInventoriesProductname.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/SyncAddLocalInventoriesProductname.java
index 588b3ea5..9791a108 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/SyncAddLocalInventoriesProductname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/SyncAddLocalInventoriesProductname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddLocalInventoriesProductname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ProductName product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/SyncAddLocalInventoriesString.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/SyncAddLocalInventoriesString.java
index 0fd56bef..726cb185 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/SyncAddLocalInventoriesString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/addlocalinventories/SyncAddLocalInventoriesString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddLocalInventoriesString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/create/SyncCreateSetCredentialsProvider.java
index 544d12a9..d6b76427 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ProductServiceSettings productServiceSettings =
         ProductServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/create/SyncCreateSetCredentialsProvider1.java
index ac022062..663638a7 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ProductServiceSettings productServiceSettings =
         ProductServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/create/SyncCreateSetEndpoint.java
index ed296bc5..e8be088e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ProductServiceSettings productServiceSettings =
         ProductServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     ProductServiceClient productServiceClient = ProductServiceClient.create(productServiceSettings);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/createproduct/AsyncCreateProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/createproduct/AsyncCreateProduct.java
index 9f55451a..5d621362 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/createproduct/AsyncCreateProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/createproduct/AsyncCreateProduct.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncCreateProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       CreateProductRequest request =
           CreateProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/createproduct/SyncCreateProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/createproduct/SyncCreateProduct.java
index b2574409..e843767f 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/createproduct/SyncCreateProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/createproduct/SyncCreateProduct.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       CreateProductRequest request =
           CreateProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/createproduct/SyncCreateProductBranchnameProductString.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/createproduct/SyncCreateProductBranchnameProductString.java
index 39b84f6a..6fed27d2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/createproduct/SyncCreateProductBranchnameProductString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/createproduct/SyncCreateProductBranchnameProductString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateProductBranchnameProductString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       BranchName parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
       Product product = Product.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/createproduct/SyncCreateProductStringProductString.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/createproduct/SyncCreateProductStringProductString.java
index 9efaa3ba..007d9004 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/createproduct/SyncCreateProductStringProductString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/createproduct/SyncCreateProductStringProductString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateProductStringProductString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString();
       Product product = Product.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/deleteproduct/AsyncDeleteProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/deleteproduct/AsyncDeleteProduct.java
index 1b7eb9e2..25fba4e9 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/deleteproduct/AsyncDeleteProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/deleteproduct/AsyncDeleteProduct.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncDeleteProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       DeleteProductRequest request =
           DeleteProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/deleteproduct/SyncDeleteProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/deleteproduct/SyncDeleteProduct.java
index a0f6e454..34fd6972 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/deleteproduct/SyncDeleteProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/deleteproduct/SyncDeleteProduct.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       DeleteProductRequest request =
           DeleteProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/deleteproduct/SyncDeleteProductProductname.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/deleteproduct/SyncDeleteProductProductname.java
index fac9b0d3..096457ee 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/deleteproduct/SyncDeleteProductProductname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/deleteproduct/SyncDeleteProductProductname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteProductProductname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ProductName name =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/deleteproduct/SyncDeleteProductString.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/deleteproduct/SyncDeleteProductString.java
index 016875ad..8867e4ed 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/deleteproduct/SyncDeleteProductString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/deleteproduct/SyncDeleteProductString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteProductString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String name =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/getproduct/AsyncGetProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/getproduct/AsyncGetProduct.java
index f0a052d1..f0eb4213 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/getproduct/AsyncGetProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/getproduct/AsyncGetProduct.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       GetProductRequest request =
           GetProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/getproduct/SyncGetProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/getproduct/SyncGetProduct.java
index 27bde94e..671c8394 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/getproduct/SyncGetProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/getproduct/SyncGetProduct.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       GetProductRequest request =
           GetProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/getproduct/SyncGetProductProductname.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/getproduct/SyncGetProductProductname.java
index b3552c64..757789f1 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/getproduct/SyncGetProductProductname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/getproduct/SyncGetProductProductname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetProductProductname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ProductName name =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/getproduct/SyncGetProductString.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/getproduct/SyncGetProductString.java
index b4f4a21d..e16301c0 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/getproduct/SyncGetProductString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/getproduct/SyncGetProductString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetProductString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String name =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/importproducts/AsyncImportProducts.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/importproducts/AsyncImportProducts.java
index 4565e534..b1cbd812 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/importproducts/AsyncImportProducts.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/importproducts/AsyncImportProducts.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncImportProducts() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ImportProductsRequest request =
           ImportProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/importproducts/AsyncImportProductsLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/importproducts/AsyncImportProductsLRO.java
index 44115d87..3bb51069 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/importproducts/AsyncImportProductsLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/importproducts/AsyncImportProductsLRO.java
@@ -34,8 +34,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncImportProductsLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ImportProductsRequest request =
           ImportProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/importproducts/SyncImportProducts.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/importproducts/SyncImportProducts.java
index f0d74b8a..76aa8973 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/importproducts/SyncImportProducts.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/importproducts/SyncImportProducts.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncImportProducts() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ImportProductsRequest request =
           ImportProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/AsyncListProducts.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/AsyncListProducts.java
index 44b243d4..166ff87f 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/AsyncListProducts.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/AsyncListProducts.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListProducts() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ListProductsRequest request =
           ListProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/AsyncListProductsPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/AsyncListProductsPaged.java
index f156b90b..1f04bce9 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/AsyncListProductsPaged.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/AsyncListProductsPaged.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListProductsPaged() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ListProductsRequest request =
           ListProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/SyncListProducts.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/SyncListProducts.java
index cd748e1a..a640ad89 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/SyncListProducts.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/SyncListProducts.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListProducts() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ListProductsRequest request =
           ListProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/SyncListProductsBranchname.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/SyncListProductsBranchname.java
index e3a9fb37..b41ef27a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/SyncListProductsBranchname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/SyncListProductsBranchname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListProductsBranchname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       BranchName parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
       for (Product element : productServiceClient.listProducts(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/SyncListProductsString.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/SyncListProductsString.java
index 8e3d4ceb..9117f263 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/SyncListProductsString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/listproducts/SyncListProductsString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListProductsString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString();
       for (Product element : productServiceClient.listProducts(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlaces.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlaces.java
index 9b3c1f6f..d4ee8641 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlaces.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlaces.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRemoveFulfillmentPlaces() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       RemoveFulfillmentPlacesRequest request =
           RemoveFulfillmentPlacesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlacesLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlacesLRO.java
index 43ca1285..c5aa984e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlacesLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlacesLRO.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRemoveFulfillmentPlacesLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       RemoveFulfillmentPlacesRequest request =
           RemoveFulfillmentPlacesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlaces.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlaces.java
index 27a695a8..ac298b00 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlaces.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlaces.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveFulfillmentPlaces() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       RemoveFulfillmentPlacesRequest request =
           RemoveFulfillmentPlacesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesProductname.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesProductname.java
index 11bc11da..013ac523 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesProductname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesProductname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveFulfillmentPlacesProductname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ProductName product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesString.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesString.java
index 9814b7a4..67e3ab83 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveFulfillmentPlacesString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/AsyncRemoveLocalInventories.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/AsyncRemoveLocalInventories.java
index e42c81f3..7a8002f9 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/AsyncRemoveLocalInventories.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/AsyncRemoveLocalInventories.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRemoveLocalInventories() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       RemoveLocalInventoriesRequest request =
           RemoveLocalInventoriesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/AsyncRemoveLocalInventoriesLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/AsyncRemoveLocalInventoriesLRO.java
index a4447d03..2e418505 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/AsyncRemoveLocalInventoriesLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/AsyncRemoveLocalInventoriesLRO.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRemoveLocalInventoriesLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       RemoveLocalInventoriesRequest request =
           RemoveLocalInventoriesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/SyncRemoveLocalInventories.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/SyncRemoveLocalInventories.java
index e6059c61..1542dc30 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/SyncRemoveLocalInventories.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/SyncRemoveLocalInventories.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveLocalInventories() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       RemoveLocalInventoriesRequest request =
           RemoveLocalInventoriesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesProductname.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesProductname.java
index ba6b8a17..d6eafe45 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesProductname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesProductname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveLocalInventoriesProductname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ProductName product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesString.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesString.java
index e6a003ae..de7f912c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveLocalInventoriesString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/setinventory/AsyncSetInventory.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/setinventory/AsyncSetInventory.java
index 55edfe0e..cf3a9bc2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/setinventory/AsyncSetInventory.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/setinventory/AsyncSetInventory.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncSetInventory() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       SetInventoryRequest request =
           SetInventoryRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/setinventory/AsyncSetInventoryLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/setinventory/AsyncSetInventoryLRO.java
index 99544069..386aa581 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/setinventory/AsyncSetInventoryLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/setinventory/AsyncSetInventoryLRO.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncSetInventoryLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       SetInventoryRequest request =
           SetInventoryRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/setinventory/SyncSetInventory.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/setinventory/SyncSetInventory.java
index 87696f9d..867a2a88 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/setinventory/SyncSetInventory.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/setinventory/SyncSetInventory.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSetInventory() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       SetInventoryRequest request =
           SetInventoryRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/setinventory/SyncSetInventoryProductFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/setinventory/SyncSetInventoryProductFieldmask.java
index ca30faba..c7c3bb14 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/setinventory/SyncSetInventoryProductFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/setinventory/SyncSetInventoryProductFieldmask.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSetInventoryProductFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       Product inventory = Product.newBuilder().build();
       FieldMask setMask = FieldMask.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/updateproduct/AsyncUpdateProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/updateproduct/AsyncUpdateProduct.java
index d8640a10..a15bd2a0 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/updateproduct/AsyncUpdateProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/updateproduct/AsyncUpdateProduct.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       UpdateProductRequest request =
           UpdateProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/updateproduct/SyncUpdateProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/updateproduct/SyncUpdateProduct.java
index e0e6d1a1..9541fdcd 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/updateproduct/SyncUpdateProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/updateproduct/SyncUpdateProduct.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       UpdateProductRequest request =
           UpdateProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/updateproduct/SyncUpdateProductProductFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/updateproduct/SyncUpdateProductProductFieldmask.java
index 7dd7ebff..62d3b42c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/updateproduct/SyncUpdateProductProductFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productserviceclient/updateproduct/SyncUpdateProductProductFieldmask.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateProductProductFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       Product product = Product.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/productservicesettings/createproduct/SyncCreateProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2/productservicesettings/createproduct/SyncCreateProduct.java
index f7acec58..46c4ca98 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/productservicesettings/createproduct/SyncCreateProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/productservicesettings/createproduct/SyncCreateProduct.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ProductServiceSettings.Builder productServiceSettingsBuilder =
         ProductServiceSettings.newBuilder();
     productServiceSettingsBuilder
         .createProductSettings()
         .setRetrySettings(
-            productServiceSettingsBuilder
-                .createProductSettings()
-                .getRetrySettings()
-                .toBuilder()
+            productServiceSettingsBuilder.createProductSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     ProductServiceSettings productServiceSettings = productServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/create/SyncCreateSetCredentialsProvider.java
index 9918465b..6491b2e7 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SearchServiceSettings searchServiceSettings =
         SearchServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/create/SyncCreateSetCredentialsProvider1.java
index 156129eb..fe168c96 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SearchServiceSettings searchServiceSettings =
         SearchServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/create/SyncCreateSetEndpoint.java
index a4df307a..57101a49 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SearchServiceSettings searchServiceSettings =
         SearchServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     SearchServiceClient searchServiceClient = SearchServiceClient.create(searchServiceSettings);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/search/AsyncSearch.java b/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/search/AsyncSearch.java
index 3d7850f3..6f099383 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/search/AsyncSearch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/search/AsyncSearch.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncSearch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
       SearchRequest request =
           SearchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/search/AsyncSearchPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/search/AsyncSearchPaged.java
index c5d485cb..24be5efe 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/search/AsyncSearchPaged.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/search/AsyncSearchPaged.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncSearchPaged() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
       SearchRequest request =
           SearchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/search/SyncSearch.java b/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/search/SyncSearch.java
index f03bf0ce..92abbe7f 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/search/SyncSearch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/searchserviceclient/search/SyncSearch.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSearch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
       SearchRequest request =
           SearchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/searchservicesettings/search/SyncSearch.java b/samples/snippets/generated/com/google/cloud/retail/v2/searchservicesettings/search/SyncSearch.java
index a240556a..44496c2a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/searchservicesettings/search/SyncSearch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/searchservicesettings/search/SyncSearch.java
@@ -27,16 +27,16 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSearch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SearchServiceSettings.Builder searchServiceSettingsBuilder = SearchServiceSettings.newBuilder();
     searchServiceSettingsBuilder
         .searchSettings()
         .setRetrySettings(
-            searchServiceSettingsBuilder
-                .searchSettings()
-                .getRetrySettings()
-                .toBuilder()
+            searchServiceSettingsBuilder.searchSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     SearchServiceSettings searchServiceSettings = searchServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/AsyncAddControl.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/AsyncAddControl.java
index 5b80fd72..b3857040 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/AsyncAddControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/AsyncAddControl.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncAddControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       AddControlRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/SyncAddControl.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/SyncAddControl.java
index 3ee67587..f2ba06f2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/SyncAddControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/SyncAddControl.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       AddControlRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/SyncAddControlServingconfigname.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/SyncAddControlServingconfigname.java
index c6821e81..ca4bfc5d 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/SyncAddControlServingconfigname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/SyncAddControlServingconfigname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddControlServingconfigname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ServingConfigName servingConfig =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/SyncAddControlString.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/SyncAddControlString.java
index da64a87f..3d6ac2a7 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/SyncAddControlString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/addcontrol/SyncAddControlString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddControlString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       String servingConfig =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider.java
index 5498dec2..ac202635 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ServingConfigServiceSettings servingConfigServiceSettings =
         ServingConfigServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider1.java
index 155db716..947031a1 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ServingConfigServiceSettings servingConfigServiceSettings =
         ServingConfigServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/create/SyncCreateSetEndpoint.java
index 226d2c14..56144b2a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ServingConfigServiceSettings servingConfigServiceSettings =
         ServingConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     ServingConfigServiceClient servingConfigServiceClient =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/AsyncCreateServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/AsyncCreateServingConfig.java
index 95cec9bc..e2601f54 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/AsyncCreateServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/AsyncCreateServingConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncCreateServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       CreateServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/SyncCreateServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/SyncCreateServingConfig.java
index 287a3b6d..54e6bdcb 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/SyncCreateServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/SyncCreateServingConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       CreateServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigCatalognameServingconfigString.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigCatalognameServingconfigString.java
index 8a098921..b2242a3b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigCatalognameServingconfigString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigCatalognameServingconfigString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateServingConfigCatalognameServingconfigString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigStringServingconfigString.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigStringServingconfigString.java
index 3c33c3e3..35f3cc06 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigStringServingconfigString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigStringServingconfigString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateServingConfigStringServingconfigString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/AsyncDeleteServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/AsyncDeleteServingConfig.java
index 9c991188..c66e7639 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/AsyncDeleteServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/AsyncDeleteServingConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncDeleteServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       DeleteServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfig.java
index ef420846..e6c46eb4 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       DeleteServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigServingconfigname.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigServingconfigname.java
index 4be25087..779998fa 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigServingconfigname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigServingconfigname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteServingConfigServingconfigname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ServingConfigName name =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigString.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigString.java
index 3bea9968..683146a5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteServingConfigString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       String name =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/AsyncGetServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/AsyncGetServingConfig.java
index 3b26cc15..18a7c9f3 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/AsyncGetServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/AsyncGetServingConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       GetServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/SyncGetServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/SyncGetServingConfig.java
index 557db8ea..38adee76 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/SyncGetServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/SyncGetServingConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       GetServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/SyncGetServingConfigServingconfigname.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/SyncGetServingConfigServingconfigname.java
index 7bbd3b1c..eccaff43 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/SyncGetServingConfigServingconfigname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/SyncGetServingConfigServingconfigname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetServingConfigServingconfigname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ServingConfigName name =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/SyncGetServingConfigString.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/SyncGetServingConfigString.java
index 5a1bf384..1511bb88 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/SyncGetServingConfigString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/getservingconfig/SyncGetServingConfigString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetServingConfigString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       String name =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigs.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigs.java
index 86ebdbf4..0282a77b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigs.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigs.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListServingConfigs() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ListServingConfigsRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigsPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigsPaged.java
index b163ef43..b43f0345 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigsPaged.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigsPaged.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListServingConfigsPaged() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ListServingConfigsRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/SyncListServingConfigs.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/SyncListServingConfigs.java
index c446e2b2..77c394a4 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/SyncListServingConfigs.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/SyncListServingConfigs.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListServingConfigs() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ListServingConfigsRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsCatalogname.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsCatalogname.java
index 909ce7df..72e2ed9b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsCatalogname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsCatalogname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListServingConfigsCatalogname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsString.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsString.java
index 255c9e10..f3c31c5d 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListServingConfigsString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/AsyncRemoveControl.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/AsyncRemoveControl.java
index efe4ca96..68f16b7b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/AsyncRemoveControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/AsyncRemoveControl.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRemoveControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       RemoveControlRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/SyncRemoveControl.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/SyncRemoveControl.java
index c4e6824a..0c5d03df 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/SyncRemoveControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/SyncRemoveControl.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       RemoveControlRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/SyncRemoveControlServingconfigname.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/SyncRemoveControlServingconfigname.java
index 3d43b6a5..836dfba6 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/SyncRemoveControlServingconfigname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/SyncRemoveControlServingconfigname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveControlServingconfigname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ServingConfigName servingConfig =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/SyncRemoveControlString.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/SyncRemoveControlString.java
index bcf7e9f7..d278770a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/SyncRemoveControlString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/removecontrol/SyncRemoveControlString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveControlString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       String servingConfig =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/updateservingconfig/AsyncUpdateServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/updateservingconfig/AsyncUpdateServingConfig.java
index 7f43db53..3be190ad 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/updateservingconfig/AsyncUpdateServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/updateservingconfig/AsyncUpdateServingConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       UpdateServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfig.java
index 22615e95..cb4d4b6e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       UpdateServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfigServingconfigFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfigServingconfigFieldmask.java
index 6675b37a..515306ef 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfigServingconfigFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfigServingconfigFieldmask.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateServingConfigServingconfigFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ServingConfig servingConfig = ServingConfig.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigservicesettings/createservingconfig/SyncCreateServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigservicesettings/createservingconfig/SyncCreateServingConfig.java
index da56bfa7..6ed6e3b3 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigservicesettings/createservingconfig/SyncCreateServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/servingconfigservicesettings/createservingconfig/SyncCreateServingConfig.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ServingConfigServiceSettings.Builder servingConfigServiceSettingsBuilder =
         ServingConfigServiceSettings.newBuilder();
     servingConfigServiceSettingsBuilder
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/stub/catalogservicestubsettings/updatecatalog/SyncUpdateCatalog.java b/samples/snippets/generated/com/google/cloud/retail/v2/stub/catalogservicestubsettings/updatecatalog/SyncUpdateCatalog.java
index 30150799..886654e1 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/stub/catalogservicestubsettings/updatecatalog/SyncUpdateCatalog.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/stub/catalogservicestubsettings/updatecatalog/SyncUpdateCatalog.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateCatalog() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CatalogServiceStubSettings.Builder catalogServiceSettingsBuilder =
         CatalogServiceStubSettings.newBuilder();
     catalogServiceSettingsBuilder
         .updateCatalogSettings()
         .setRetrySettings(
-            catalogServiceSettingsBuilder
-                .updateCatalogSettings()
-                .getRetrySettings()
-                .toBuilder()
+            catalogServiceSettingsBuilder.updateCatalogSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     CatalogServiceStubSettings catalogServiceSettings = catalogServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/stub/completionservicestubsettings/completequery/SyncCompleteQuery.java b/samples/snippets/generated/com/google/cloud/retail/v2/stub/completionservicestubsettings/completequery/SyncCompleteQuery.java
index 035c3f00..347ec68e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/stub/completionservicestubsettings/completequery/SyncCompleteQuery.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/stub/completionservicestubsettings/completequery/SyncCompleteQuery.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCompleteQuery() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CompletionServiceStubSettings.Builder completionServiceSettingsBuilder =
         CompletionServiceStubSettings.newBuilder();
     completionServiceSettingsBuilder
         .completeQuerySettings()
         .setRetrySettings(
-            completionServiceSettingsBuilder
-                .completeQuerySettings()
-                .getRetrySettings()
-                .toBuilder()
+            completionServiceSettingsBuilder.completeQuerySettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     CompletionServiceStubSettings completionServiceSettings =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/stub/controlservicestubsettings/createcontrol/SyncCreateControl.java b/samples/snippets/generated/com/google/cloud/retail/v2/stub/controlservicestubsettings/createcontrol/SyncCreateControl.java
index 090038be..69285489 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/stub/controlservicestubsettings/createcontrol/SyncCreateControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/stub/controlservicestubsettings/createcontrol/SyncCreateControl.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ControlServiceStubSettings.Builder controlServiceSettingsBuilder =
         ControlServiceStubSettings.newBuilder();
     controlServiceSettingsBuilder
         .createControlSettings()
         .setRetrySettings(
-            controlServiceSettingsBuilder
-                .createControlSettings()
-                .getRetrySettings()
-                .toBuilder()
+            controlServiceSettingsBuilder.createControlSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     ControlServiceStubSettings controlServiceSettings = controlServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/stub/predictionservicestubsettings/predict/SyncPredict.java b/samples/snippets/generated/com/google/cloud/retail/v2/stub/predictionservicestubsettings/predict/SyncPredict.java
index cfc9f7cd..1199398a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/stub/predictionservicestubsettings/predict/SyncPredict.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/stub/predictionservicestubsettings/predict/SyncPredict.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncPredict() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require 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()
+            predictionServiceSettingsBuilder.predictSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     PredictionServiceStubSettings predictionServiceSettings =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/stub/productservicestubsettings/createproduct/SyncCreateProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2/stub/productservicestubsettings/createproduct/SyncCreateProduct.java
index 5dd52b9a..f8c9e36c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/stub/productservicestubsettings/createproduct/SyncCreateProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/stub/productservicestubsettings/createproduct/SyncCreateProduct.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ProductServiceStubSettings.Builder productServiceSettingsBuilder =
         ProductServiceStubSettings.newBuilder();
     productServiceSettingsBuilder
         .createProductSettings()
         .setRetrySettings(
-            productServiceSettingsBuilder
-                .createProductSettings()
-                .getRetrySettings()
-                .toBuilder()
+            productServiceSettingsBuilder.createProductSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     ProductServiceStubSettings productServiceSettings = productServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/stub/searchservicestubsettings/search/SyncSearch.java b/samples/snippets/generated/com/google/cloud/retail/v2/stub/searchservicestubsettings/search/SyncSearch.java
index 61a39787..d87265eb 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/stub/searchservicestubsettings/search/SyncSearch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/stub/searchservicestubsettings/search/SyncSearch.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSearch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SearchServiceStubSettings.Builder searchServiceSettingsBuilder =
         SearchServiceStubSettings.newBuilder();
     searchServiceSettingsBuilder
         .searchSettings()
         .setRetrySettings(
-            searchServiceSettingsBuilder
-                .searchSettings()
-                .getRetrySettings()
-                .toBuilder()
+            searchServiceSettingsBuilder.searchSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     SearchServiceStubSettings searchServiceSettings = searchServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/stub/servingconfigservicestubsettings/createservingconfig/SyncCreateServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2/stub/servingconfigservicestubsettings/createservingconfig/SyncCreateServingConfig.java
index b86c287a..25127231 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/stub/servingconfigservicestubsettings/createservingconfig/SyncCreateServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/stub/servingconfigservicestubsettings/createservingconfig/SyncCreateServingConfig.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ServingConfigServiceStubSettings.Builder servingConfigServiceSettingsBuilder =
         ServingConfigServiceStubSettings.newBuilder();
     servingConfigServiceSettingsBuilder
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/stub/usereventservicestubsettings/writeuserevent/SyncWriteUserEvent.java b/samples/snippets/generated/com/google/cloud/retail/v2/stub/usereventservicestubsettings/writeuserevent/SyncWriteUserEvent.java
index c6f601c6..0f290ebb 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/stub/usereventservicestubsettings/writeuserevent/SyncWriteUserEvent.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/stub/usereventservicestubsettings/writeuserevent/SyncWriteUserEvent.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncWriteUserEvent() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     UserEventServiceStubSettings.Builder userEventServiceSettingsBuilder =
         UserEventServiceStubSettings.newBuilder();
     userEventServiceSettingsBuilder
         .writeUserEventSettings()
         .setRetrySettings(
-            userEventServiceSettingsBuilder
-                .writeUserEventSettings()
-                .getRetrySettings()
-                .toBuilder()
+            userEventServiceSettingsBuilder.writeUserEventSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     UserEventServiceStubSettings userEventServiceSettings = userEventServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/collectuserevent/AsyncCollectUserEvent.java b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/collectuserevent/AsyncCollectUserEvent.java
index 2dc7618c..269c691f 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/collectuserevent/AsyncCollectUserEvent.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/collectuserevent/AsyncCollectUserEvent.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncCollectUserEvent() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       CollectUserEventRequest request =
           CollectUserEventRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/collectuserevent/SyncCollectUserEvent.java b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/collectuserevent/SyncCollectUserEvent.java
index d8877b3c..68e0e118 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/collectuserevent/SyncCollectUserEvent.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/collectuserevent/SyncCollectUserEvent.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCollectUserEvent() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       CollectUserEventRequest request =
           CollectUserEventRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/create/SyncCreateSetCredentialsProvider.java
index e48c52a5..76eba88c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     UserEventServiceSettings userEventServiceSettings =
         UserEventServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/create/SyncCreateSetCredentialsProvider1.java
index 503196d6..2c3ee5e3 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     UserEventServiceSettings userEventServiceSettings =
         UserEventServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/create/SyncCreateSetEndpoint.java
index ab23c7c2..16f7b230 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     UserEventServiceSettings userEventServiceSettings =
         UserEventServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     UserEventServiceClient userEventServiceClient =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/importuserevents/AsyncImportUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/importuserevents/AsyncImportUserEvents.java
index 77a16c76..42eb62ef 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/importuserevents/AsyncImportUserEvents.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/importuserevents/AsyncImportUserEvents.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncImportUserEvents() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       ImportUserEventsRequest request =
           ImportUserEventsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/importuserevents/AsyncImportUserEventsLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/importuserevents/AsyncImportUserEventsLRO.java
index 7ea122a3..be3db824 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/importuserevents/AsyncImportUserEventsLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/importuserevents/AsyncImportUserEventsLRO.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncImportUserEventsLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       ImportUserEventsRequest request =
           ImportUserEventsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/importuserevents/SyncImportUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/importuserevents/SyncImportUserEvents.java
index db6e00da..6054c010 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/importuserevents/SyncImportUserEvents.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/importuserevents/SyncImportUserEvents.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncImportUserEvents() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       ImportUserEventsRequest request =
           ImportUserEventsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java
index 79672927..42bab5bc 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncPurgeUserEvents() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       PurgeUserEventsRequest request =
           PurgeUserEventsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java
index 0ef970d5..5570ba26 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncPurgeUserEventsLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       PurgeUserEventsRequest request =
           PurgeUserEventsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java
index ec051793..129241d1 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncPurgeUserEvents() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       PurgeUserEventsRequest request =
           PurgeUserEventsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEvents.java
index a35efcfb..c5a12267 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEvents.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEvents.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRejoinUserEvents() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       RejoinUserEventsRequest request =
           RejoinUserEventsRequest.newBuilder().setParent("parent-995424086").build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEventsLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEventsLRO.java
index 71f47931..6e95f7cd 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEventsLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEventsLRO.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRejoinUserEventsLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       RejoinUserEventsRequest request =
           RejoinUserEventsRequest.newBuilder().setParent("parent-995424086").build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/rejoinuserevents/SyncRejoinUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/rejoinuserevents/SyncRejoinUserEvents.java
index 57cfbdfb..78726dd8 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/rejoinuserevents/SyncRejoinUserEvents.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/rejoinuserevents/SyncRejoinUserEvents.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRejoinUserEvents() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       RejoinUserEventsRequest request =
           RejoinUserEventsRequest.newBuilder().setParent("parent-995424086").build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/writeuserevent/AsyncWriteUserEvent.java b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/writeuserevent/AsyncWriteUserEvent.java
index 1658e2e5..5d40f1e9 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/writeuserevent/AsyncWriteUserEvent.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/writeuserevent/AsyncWriteUserEvent.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncWriteUserEvent() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       WriteUserEventRequest request =
           WriteUserEventRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/writeuserevent/SyncWriteUserEvent.java b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/writeuserevent/SyncWriteUserEvent.java
index 7e0d3801..0f7c0cc7 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/writeuserevent/SyncWriteUserEvent.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/usereventserviceclient/writeuserevent/SyncWriteUserEvent.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncWriteUserEvent() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       WriteUserEventRequest request =
           WriteUserEventRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2/usereventservicesettings/writeuserevent/SyncWriteUserEvent.java b/samples/snippets/generated/com/google/cloud/retail/v2/usereventservicesettings/writeuserevent/SyncWriteUserEvent.java
index c78dc1ad..3c773b74 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2/usereventservicesettings/writeuserevent/SyncWriteUserEvent.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2/usereventservicesettings/writeuserevent/SyncWriteUserEvent.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncWriteUserEvent() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     UserEventServiceSettings.Builder userEventServiceSettingsBuilder =
         UserEventServiceSettings.newBuilder();
     userEventServiceSettingsBuilder
         .writeUserEventSettings()
         .setRetrySettings(
-            userEventServiceSettingsBuilder
-                .writeUserEventSettings()
-                .getRetrySettings()
-                .toBuilder()
+            userEventServiceSettingsBuilder.writeUserEventSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     UserEventServiceSettings userEventServiceSettings = userEventServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/addcatalogattribute/AsyncAddCatalogAttribute.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/addcatalogattribute/AsyncAddCatalogAttribute.java
index f2ddf1c3..90e23d00 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/addcatalogattribute/AsyncAddCatalogAttribute.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/addcatalogattribute/AsyncAddCatalogAttribute.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncAddCatalogAttribute() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       AddCatalogAttributeRequest request =
           AddCatalogAttributeRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/addcatalogattribute/SyncAddCatalogAttribute.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/addcatalogattribute/SyncAddCatalogAttribute.java
index 3bd3a620..e24b487e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/addcatalogattribute/SyncAddCatalogAttribute.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/addcatalogattribute/SyncAddCatalogAttribute.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddCatalogAttribute() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       AddCatalogAttributeRequest request =
           AddCatalogAttributeRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/create/SyncCreateSetCredentialsProvider.java
index 19b4334a..9c22315c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CatalogServiceSettings catalogServiceSettings =
         CatalogServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/create/SyncCreateSetCredentialsProvider1.java
index cbddda90..88fe4d51 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CatalogServiceSettings catalogServiceSettings =
         CatalogServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/create/SyncCreateSetEndpoint.java
index f2439d82..f7dbbe28 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CatalogServiceSettings catalogServiceSettings =
         CatalogServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     CatalogServiceClient catalogServiceClient = CatalogServiceClient.create(catalogServiceSettings);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getattributesconfig/AsyncGetAttributesConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getattributesconfig/AsyncGetAttributesConfig.java
index 40a050c0..6ab44df1 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getattributesconfig/AsyncGetAttributesConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getattributesconfig/AsyncGetAttributesConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetAttributesConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       GetAttributesConfigRequest request =
           GetAttributesConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getattributesconfig/SyncGetAttributesConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getattributesconfig/SyncGetAttributesConfig.java
index 97fd6b8e..9dfe97b5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getattributesconfig/SyncGetAttributesConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getattributesconfig/SyncGetAttributesConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetAttributesConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       GetAttributesConfigRequest request =
           GetAttributesConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigAttributesconfigname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigAttributesconfigname.java
index e248cd3b..ce67173a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigAttributesconfigname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigAttributesconfigname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetAttributesConfigAttributesconfigname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       AttributesConfigName name = AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       AttributesConfig response = catalogServiceClient.getAttributesConfig(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigString.java
index 6ceaba9d..e98a0d77 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetAttributesConfigString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       String name = AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       AttributesConfig response = catalogServiceClient.getAttributesConfig(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getcompletionconfig/AsyncGetCompletionConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getcompletionconfig/AsyncGetCompletionConfig.java
index fcc35a59..7cf4fd09 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getcompletionconfig/AsyncGetCompletionConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getcompletionconfig/AsyncGetCompletionConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetCompletionConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       GetCompletionConfigRequest request =
           GetCompletionConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfig.java
index df66713f..a2ce5e0a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetCompletionConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       GetCompletionConfigRequest request =
           GetCompletionConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigCompletionconfigname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigCompletionconfigname.java
index ef084d63..89e35a8e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigCompletionconfigname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigCompletionconfigname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetCompletionConfigCompletionconfigname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       CompletionConfigName name = CompletionConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       CompletionConfig response = catalogServiceClient.getCompletionConfig(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigString.java
index ab4d9e4c..82500161 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetCompletionConfigString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       String name = CompletionConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       CompletionConfig response = catalogServiceClient.getCompletionConfig(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getdefaultbranch/AsyncGetDefaultBranch.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getdefaultbranch/AsyncGetDefaultBranch.java
index f237b8de..9c478940 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getdefaultbranch/AsyncGetDefaultBranch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getdefaultbranch/AsyncGetDefaultBranch.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetDefaultBranch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       GetDefaultBranchRequest request =
           GetDefaultBranchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranch.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranch.java
index b279f1f4..7db7fab6 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranch.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetDefaultBranch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       GetDefaultBranchRequest request =
           GetDefaultBranchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchCatalogname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchCatalogname.java
index 88652dc1..a92d020e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchCatalogname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchCatalogname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetDefaultBranchCatalogname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       CatalogName catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       GetDefaultBranchResponse response = catalogServiceClient.getDefaultBranch(catalog);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchString.java
index 919d9056..3a13a252 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetDefaultBranchString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       String catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       GetDefaultBranchResponse response = catalogServiceClient.getDefaultBranch(catalog);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/AsyncListCatalogs.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/AsyncListCatalogs.java
index 5da2583a..448a6caf 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/AsyncListCatalogs.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/AsyncListCatalogs.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListCatalogs() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       ListCatalogsRequest request =
           ListCatalogsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/AsyncListCatalogsPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/AsyncListCatalogsPaged.java
index 9c7dadd2..83f0e83d 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/AsyncListCatalogsPaged.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/AsyncListCatalogsPaged.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListCatalogsPaged() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       ListCatalogsRequest request =
           ListCatalogsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/SyncListCatalogs.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/SyncListCatalogs.java
index c4190187..9449a68b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/SyncListCatalogs.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/SyncListCatalogs.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListCatalogs() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       ListCatalogsRequest request =
           ListCatalogsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/SyncListCatalogsLocationname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/SyncListCatalogsLocationname.java
index 93dee5a9..03594818 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/SyncListCatalogsLocationname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/SyncListCatalogsLocationname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListCatalogsLocationname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       for (Catalog element : catalogServiceClient.listCatalogs(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/SyncListCatalogsString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/SyncListCatalogsString.java
index b4a4cdca..af8fbd95 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/SyncListCatalogsString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/listcatalogs/SyncListCatalogsString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListCatalogsString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       for (Catalog element : catalogServiceClient.listCatalogs(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/removecatalogattribute/AsyncRemoveCatalogAttribute.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/removecatalogattribute/AsyncRemoveCatalogAttribute.java
index b4545e2a..7f722030 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/removecatalogattribute/AsyncRemoveCatalogAttribute.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/removecatalogattribute/AsyncRemoveCatalogAttribute.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRemoveCatalogAttribute() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       RemoveCatalogAttributeRequest request =
           RemoveCatalogAttributeRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/removecatalogattribute/SyncRemoveCatalogAttribute.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/removecatalogattribute/SyncRemoveCatalogAttribute.java
index 21f18c85..ab07c839 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/removecatalogattribute/SyncRemoveCatalogAttribute.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/removecatalogattribute/SyncRemoveCatalogAttribute.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveCatalogAttribute() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       RemoveCatalogAttributeRequest request =
           RemoveCatalogAttributeRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/replacecatalogattribute/AsyncReplaceCatalogAttribute.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/replacecatalogattribute/AsyncReplaceCatalogAttribute.java
index b9bc1b80..a7aef760 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/replacecatalogattribute/AsyncReplaceCatalogAttribute.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/replacecatalogattribute/AsyncReplaceCatalogAttribute.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncReplaceCatalogAttribute() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       ReplaceCatalogAttributeRequest request =
           ReplaceCatalogAttributeRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/replacecatalogattribute/SyncReplaceCatalogAttribute.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/replacecatalogattribute/SyncReplaceCatalogAttribute.java
index 772df146..db3143b7 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/replacecatalogattribute/SyncReplaceCatalogAttribute.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/replacecatalogattribute/SyncReplaceCatalogAttribute.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncReplaceCatalogAttribute() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       ReplaceCatalogAttributeRequest request =
           ReplaceCatalogAttributeRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/setdefaultbranch/AsyncSetDefaultBranch.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/setdefaultbranch/AsyncSetDefaultBranch.java
index 51b78de8..7bd20b99 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/setdefaultbranch/AsyncSetDefaultBranch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/setdefaultbranch/AsyncSetDefaultBranch.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncSetDefaultBranch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       SetDefaultBranchRequest request =
           SetDefaultBranchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranch.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranch.java
index f8bf628b..054e4088 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranch.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSetDefaultBranch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       SetDefaultBranchRequest request =
           SetDefaultBranchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchCatalogname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchCatalogname.java
index ea4642d6..ca820378 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchCatalogname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchCatalogname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSetDefaultBranchCatalogname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       CatalogName catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       catalogServiceClient.setDefaultBranch(catalog);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchString.java
index 0d4394f1..781784f9 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSetDefaultBranchString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       String catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       catalogServiceClient.setDefaultBranch(catalog);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updateattributesconfig/AsyncUpdateAttributesConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updateattributesconfig/AsyncUpdateAttributesConfig.java
index c978d53b..4235c222 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updateattributesconfig/AsyncUpdateAttributesConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updateattributesconfig/AsyncUpdateAttributesConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateAttributesConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       UpdateAttributesConfigRequest request =
           UpdateAttributesConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfig.java
index cafd9362..8d6c44eb 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateAttributesConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       UpdateAttributesConfigRequest request =
           UpdateAttributesConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfigAttributesconfigFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfigAttributesconfigFieldmask.java
index 3e7c8880..b8d723d8 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfigAttributesconfigFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfigAttributesconfigFieldmask.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateAttributesConfigAttributesconfigFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       AttributesConfig attributesConfig = AttributesConfig.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecatalog/AsyncUpdateCatalog.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecatalog/AsyncUpdateCatalog.java
index abd91066..7565d1ac 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecatalog/AsyncUpdateCatalog.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecatalog/AsyncUpdateCatalog.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateCatalog() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       UpdateCatalogRequest request =
           UpdateCatalogRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecatalog/SyncUpdateCatalog.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecatalog/SyncUpdateCatalog.java
index 2eb43ab8..1a921872 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecatalog/SyncUpdateCatalog.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecatalog/SyncUpdateCatalog.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateCatalog() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       UpdateCatalogRequest request =
           UpdateCatalogRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecatalog/SyncUpdateCatalogCatalogFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecatalog/SyncUpdateCatalogCatalogFieldmask.java
index bdf2a792..6b999d1a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecatalog/SyncUpdateCatalogCatalogFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecatalog/SyncUpdateCatalogCatalogFieldmask.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateCatalogCatalogFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       Catalog catalog = Catalog.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecompletionconfig/AsyncUpdateCompletionConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecompletionconfig/AsyncUpdateCompletionConfig.java
index 90bc3b28..b21b3793 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecompletionconfig/AsyncUpdateCompletionConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecompletionconfig/AsyncUpdateCompletionConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateCompletionConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       UpdateCompletionConfigRequest request =
           UpdateCompletionConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfig.java
index a0848487..7fd8e1e8 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateCompletionConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       UpdateCompletionConfigRequest request =
           UpdateCompletionConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfigCompletionconfigFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfigCompletionconfigFieldmask.java
index 4b964dc6..d5add390 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfigCompletionconfigFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfigCompletionconfigFieldmask.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateCompletionConfigCompletionconfigFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       CompletionConfig completionConfig = CompletionConfig.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogservicesettings/updatecatalog/SyncUpdateCatalog.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogservicesettings/updatecatalog/SyncUpdateCatalog.java
index 39b25303..4350ab39 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogservicesettings/updatecatalog/SyncUpdateCatalog.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/catalogservicesettings/updatecatalog/SyncUpdateCatalog.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateCatalog() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CatalogServiceSettings.Builder catalogServiceSettingsBuilder =
         CatalogServiceSettings.newBuilder();
     catalogServiceSettingsBuilder
         .updateCatalogSettings()
         .setRetrySettings(
-            catalogServiceSettingsBuilder
-                .updateCatalogSettings()
-                .getRetrySettings()
-                .toBuilder()
+            catalogServiceSettingsBuilder.updateCatalogSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     CatalogServiceSettings catalogServiceSettings = catalogServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/completequery/AsyncCompleteQuery.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/completequery/AsyncCompleteQuery.java
index 78f162b9..8b2f9db9 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/completequery/AsyncCompleteQuery.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/completequery/AsyncCompleteQuery.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncCompleteQuery() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
       CompleteQueryRequest request =
           CompleteQueryRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/completequery/SyncCompleteQuery.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/completequery/SyncCompleteQuery.java
index aad8166e..694a1725 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/completequery/SyncCompleteQuery.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/completequery/SyncCompleteQuery.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCompleteQuery() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
       CompleteQueryRequest request =
           CompleteQueryRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/create/SyncCreateSetCredentialsProvider.java
index 0cda9136..98d491ca 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CompletionServiceSettings completionServiceSettings =
         CompletionServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/create/SyncCreateSetCredentialsProvider1.java
index ac2af2e9..c84b8eac 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CompletionServiceSettings completionServiceSettings =
         CompletionServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/create/SyncCreateSetEndpoint.java
index 7b64939b..c1500ee9 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CompletionServiceSettings completionServiceSettings =
         CompletionServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     CompletionServiceClient completionServiceClient =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/importcompletiondata/AsyncImportCompletionData.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/importcompletiondata/AsyncImportCompletionData.java
index 9cc53c72..80759ebf 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/importcompletiondata/AsyncImportCompletionData.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/importcompletiondata/AsyncImportCompletionData.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncImportCompletionData() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
       ImportCompletionDataRequest request =
           ImportCompletionDataRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/importcompletiondata/AsyncImportCompletionDataLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/importcompletiondata/AsyncImportCompletionDataLRO.java
index f13a03ab..d8992f3b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/importcompletiondata/AsyncImportCompletionDataLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/importcompletiondata/AsyncImportCompletionDataLRO.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncImportCompletionDataLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
       ImportCompletionDataRequest request =
           ImportCompletionDataRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/importcompletiondata/SyncImportCompletionData.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/importcompletiondata/SyncImportCompletionData.java
index 580e3c00..7a547b44 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/importcompletiondata/SyncImportCompletionData.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionserviceclient/importcompletiondata/SyncImportCompletionData.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncImportCompletionData() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
       ImportCompletionDataRequest request =
           ImportCompletionDataRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionservicesettings/completequery/SyncCompleteQuery.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionservicesettings/completequery/SyncCompleteQuery.java
index a9fca5a6..20f29316 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionservicesettings/completequery/SyncCompleteQuery.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/completionservicesettings/completequery/SyncCompleteQuery.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCompleteQuery() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CompletionServiceSettings.Builder completionServiceSettingsBuilder =
         CompletionServiceSettings.newBuilder();
     completionServiceSettingsBuilder
         .completeQuerySettings()
         .setRetrySettings(
-            completionServiceSettingsBuilder
-                .completeQuerySettings()
-                .getRetrySettings()
-                .toBuilder()
+            completionServiceSettingsBuilder.completeQuerySettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     CompletionServiceSettings completionServiceSettings = completionServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/create/SyncCreateSetCredentialsProvider.java
index 48ad1aa8..349db05c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ControlServiceSettings controlServiceSettings =
         ControlServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/create/SyncCreateSetCredentialsProvider1.java
index a214b068..fe381604 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ControlServiceSettings controlServiceSettings =
         ControlServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/create/SyncCreateSetEndpoint.java
index b5ba69f0..3fcfa2a4 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ControlServiceSettings controlServiceSettings =
         ControlServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     ControlServiceClient controlServiceClient = ControlServiceClient.create(controlServiceSettings);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/createcontrol/AsyncCreateControl.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/createcontrol/AsyncCreateControl.java
index 7542a545..bcd3f30a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/createcontrol/AsyncCreateControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/createcontrol/AsyncCreateControl.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncCreateControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       CreateControlRequest request =
           CreateControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/createcontrol/SyncCreateControl.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/createcontrol/SyncCreateControl.java
index 2a8c5987..50556327 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/createcontrol/SyncCreateControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/createcontrol/SyncCreateControl.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       CreateControlRequest request =
           CreateControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/createcontrol/SyncCreateControlCatalognameControlString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/createcontrol/SyncCreateControlCatalognameControlString.java
index d19bb294..53829e34 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/createcontrol/SyncCreateControlCatalognameControlString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/createcontrol/SyncCreateControlCatalognameControlString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateControlCatalognameControlString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       Control control = Control.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/createcontrol/SyncCreateControlStringControlString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/createcontrol/SyncCreateControlStringControlString.java
index 84d88a23..94e84bf0 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/createcontrol/SyncCreateControlStringControlString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/createcontrol/SyncCreateControlStringControlString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateControlStringControlString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       Control control = Control.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/deletecontrol/AsyncDeleteControl.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/deletecontrol/AsyncDeleteControl.java
index 359a9b5f..f50dd7f2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/deletecontrol/AsyncDeleteControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/deletecontrol/AsyncDeleteControl.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncDeleteControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       DeleteControlRequest request =
           DeleteControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/deletecontrol/SyncDeleteControl.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/deletecontrol/SyncDeleteControl.java
index fccdc58b..b572405f 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/deletecontrol/SyncDeleteControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/deletecontrol/SyncDeleteControl.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       DeleteControlRequest request =
           DeleteControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/deletecontrol/SyncDeleteControlControlname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/deletecontrol/SyncDeleteControlControlname.java
index 36d93eec..acc862c1 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/deletecontrol/SyncDeleteControlControlname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/deletecontrol/SyncDeleteControlControlname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteControlControlname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       ControlName name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]");
       controlServiceClient.deleteControl(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/deletecontrol/SyncDeleteControlString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/deletecontrol/SyncDeleteControlString.java
index 102964eb..973d6c1b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/deletecontrol/SyncDeleteControlString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/deletecontrol/SyncDeleteControlString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteControlString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       String name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString();
       controlServiceClient.deleteControl(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/getcontrol/AsyncGetControl.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/getcontrol/AsyncGetControl.java
index 1eeec4bf..4efccb69 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/getcontrol/AsyncGetControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/getcontrol/AsyncGetControl.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       GetControlRequest request =
           GetControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/getcontrol/SyncGetControl.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/getcontrol/SyncGetControl.java
index 613195b5..efb24086 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/getcontrol/SyncGetControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/getcontrol/SyncGetControl.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       GetControlRequest request =
           GetControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/getcontrol/SyncGetControlControlname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/getcontrol/SyncGetControlControlname.java
index 4d38c2b9..cefb6c18 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/getcontrol/SyncGetControlControlname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/getcontrol/SyncGetControlControlname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetControlControlname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       ControlName name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]");
       Control response = controlServiceClient.getControl(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/getcontrol/SyncGetControlString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/getcontrol/SyncGetControlString.java
index 105cf049..f8510128 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/getcontrol/SyncGetControlString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/getcontrol/SyncGetControlString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetControlString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       String name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString();
       Control response = controlServiceClient.getControl(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/AsyncListControls.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/AsyncListControls.java
index 590aa457..d251b415 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/AsyncListControls.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/AsyncListControls.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListControls() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       ListControlsRequest request =
           ListControlsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/AsyncListControlsPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/AsyncListControlsPaged.java
index f418b443..bd4217d7 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/AsyncListControlsPaged.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/AsyncListControlsPaged.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListControlsPaged() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       ListControlsRequest request =
           ListControlsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/SyncListControls.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/SyncListControls.java
index c10195c0..9d278b14 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/SyncListControls.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/SyncListControls.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListControls() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       ListControlsRequest request =
           ListControlsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/SyncListControlsCatalogname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/SyncListControlsCatalogname.java
index 3c7d2ac6..abf92c0b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/SyncListControlsCatalogname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/SyncListControlsCatalogname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListControlsCatalogname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       for (Control element : controlServiceClient.listControls(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/SyncListControlsString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/SyncListControlsString.java
index a4f9b72b..3f076154 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/SyncListControlsString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/listcontrols/SyncListControlsString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListControlsString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       for (Control element : controlServiceClient.listControls(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/updatecontrol/AsyncUpdateControl.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/updatecontrol/AsyncUpdateControl.java
index d0b62aea..9ff4094f 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/updatecontrol/AsyncUpdateControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/updatecontrol/AsyncUpdateControl.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       UpdateControlRequest request =
           UpdateControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/updatecontrol/SyncUpdateControl.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/updatecontrol/SyncUpdateControl.java
index 18c0ed68..369c3dac 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/updatecontrol/SyncUpdateControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/updatecontrol/SyncUpdateControl.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       UpdateControlRequest request =
           UpdateControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/updatecontrol/SyncUpdateControlControlFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/updatecontrol/SyncUpdateControlControlFieldmask.java
index 38f4c6ca..c03d85ec 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/updatecontrol/SyncUpdateControlControlFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlserviceclient/updatecontrol/SyncUpdateControlControlFieldmask.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateControlControlFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       Control control = Control.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlservicesettings/createcontrol/SyncCreateControl.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlservicesettings/createcontrol/SyncCreateControl.java
index 7101eecc..25b1e2ef 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlservicesettings/createcontrol/SyncCreateControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/controlservicesettings/createcontrol/SyncCreateControl.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ControlServiceSettings.Builder controlServiceSettingsBuilder =
         ControlServiceSettings.newBuilder();
     controlServiceSettingsBuilder
         .createControlSettings()
         .setRetrySettings(
-            controlServiceSettingsBuilder
-                .createControlSettings()
-                .getRetrySettings()
-                .toBuilder()
+            controlServiceSettingsBuilder.createControlSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     ControlServiceSettings controlServiceSettings = controlServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetCredentialsProvider.java
index 976021b9..b0ec51cc 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ModelServiceSettings modelServiceSettings =
         ModelServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetCredentialsProvider1.java
index 5c5cbb3c..063cfde3 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ModelServiceSettings modelServiceSettings =
         ModelServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetEndpoint.java
index 93dbb902..bcf7e320 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ModelServiceSettings modelServiceSettings =
         ModelServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/AsyncCreateModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/AsyncCreateModel.java
index 4dc8f9fb..06a9f41b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/AsyncCreateModel.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/AsyncCreateModel.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncCreateModel() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       CreateModelRequest request =
           CreateModelRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/AsyncCreateModelLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/AsyncCreateModelLRO.java
index ebe079ca..ed924644 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/AsyncCreateModelLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/AsyncCreateModelLRO.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncCreateModelLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       CreateModelRequest request =
           CreateModelRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModel.java
index 2787d070..fbef0ad0 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModel.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModel.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateModel() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       CreateModelRequest request =
           CreateModelRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModelCatalognameModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModelCatalognameModel.java
index 002b7530..8044e45d 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModelCatalognameModel.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModelCatalognameModel.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateModelCatalognameModel() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       Model model = Model.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModelStringModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModelStringModel.java
index 78d6a18e..a8cf1bbf 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModelStringModel.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/createmodel/SyncCreateModelStringModel.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateModelStringModel() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       Model model = Model.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/AsyncDeleteModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/AsyncDeleteModel.java
index fb022955..b78d34c7 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/AsyncDeleteModel.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/AsyncDeleteModel.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncDeleteModel() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       DeleteModelRequest request =
           DeleteModelRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModel.java
index cf35faa6..79de9bb2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModel.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModel.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteModel() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       DeleteModelRequest request =
           DeleteModelRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModelModelname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModelModelname.java
index 05d5ac22..fda25280 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModelModelname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModelModelname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteModelModelname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
       modelServiceClient.deleteModel(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModelString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModelString.java
index 7269c68e..09fff590 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModelString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/deletemodel/SyncDeleteModelString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteModelString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       String name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString();
       modelServiceClient.deleteModel(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/AsyncListModels.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/AsyncListModels.java
index 5a781e55..b6a4b170 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/AsyncListModels.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/AsyncListModels.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListModels() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       ListModelsRequest request =
           ListModelsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/AsyncListModelsPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/AsyncListModelsPaged.java
index ae62b932..cf8c7789 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/AsyncListModelsPaged.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/AsyncListModelsPaged.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListModelsPaged() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       ListModelsRequest request =
           ListModelsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModels.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModels.java
index da76f259..837cf622 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModels.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModels.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListModels() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       ListModelsRequest request =
           ListModelsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModelsCatalogname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModelsCatalogname.java
index c59bbc7c..cfc8bab0 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModelsCatalogname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModelsCatalogname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListModelsCatalogname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       for (Model element : modelServiceClient.listModels(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModelsString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModelsString.java
index 9e2afe5a..5828c8d2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModelsString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/listmodels/SyncListModelsString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListModelsString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       for (Model element : modelServiceClient.listModels(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/AsyncPauseModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/AsyncPauseModel.java
index 2041c08e..f19c8906 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/AsyncPauseModel.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/AsyncPauseModel.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncPauseModel() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       PauseModelRequest request =
           PauseModelRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModel.java
index 3f098117..cdda8606 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModel.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModel.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncPauseModel() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       PauseModelRequest request =
           PauseModelRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModelModelname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModelModelname.java
index eb56cd19..dabf1912 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModelModelname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModelModelname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncPauseModelModelname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
       Model response = modelServiceClient.pauseModel(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModelString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModelString.java
index d65135a2..dea9181f 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModelString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/pausemodel/SyncPauseModelString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncPauseModelString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       String name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString();
       Model response = modelServiceClient.pauseModel(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/AsyncResumeModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/AsyncResumeModel.java
index 34bcfaff..b45ddc28 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/AsyncResumeModel.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/AsyncResumeModel.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncResumeModel() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       ResumeModelRequest request = ResumeModelRequest.newBuilder().setName("name3373707").build();
       ApiFuture future = modelServiceClient.resumeModelCallable().futureCall(request);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/SyncResumeModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/SyncResumeModel.java
index f53ba8cd..80302e2f 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/SyncResumeModel.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/SyncResumeModel.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncResumeModel() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       ResumeModelRequest request = ResumeModelRequest.newBuilder().setName("name3373707").build();
       Model response = modelServiceClient.resumeModel(request);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/SyncResumeModelString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/SyncResumeModelString.java
index 351b7239..5f6cb330 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/SyncResumeModelString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/resumemodel/SyncResumeModelString.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncResumeModelString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       String name = "name3373707";
       Model response = modelServiceClient.resumeModel(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/AsyncTuneModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/AsyncTuneModel.java
index e0c7f13a..04fcb107 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/AsyncTuneModel.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/AsyncTuneModel.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncTuneModel() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       TuneModelRequest request =
           TuneModelRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/AsyncTuneModelLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/AsyncTuneModelLRO.java
index 278ca54d..fddd775a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/AsyncTuneModelLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/AsyncTuneModelLRO.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncTuneModelLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       TuneModelRequest request =
           TuneModelRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModel.java
index 9ae2171e..8894a5f1 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModel.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModel.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncTuneModel() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       TuneModelRequest request =
           TuneModelRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModelModelname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModelModelname.java
index 41191714..4291b43a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModelModelname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModelModelname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncTuneModelModelname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
       TuneModelResponse response = modelServiceClient.tuneModelAsync(name).get();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModelString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModelString.java
index 5d5657dd..7e781fb1 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModelString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/tunemodel/SyncTuneModelString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncTuneModelString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       String name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString();
       TuneModelResponse response = modelServiceClient.tuneModelAsync(name).get();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/AsyncUpdateModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/AsyncUpdateModel.java
index ba9423d9..3a2d6aa2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/AsyncUpdateModel.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/AsyncUpdateModel.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateModel() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       UpdateModelRequest request =
           UpdateModelRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/SyncUpdateModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/SyncUpdateModel.java
index 5b769702..11a1eaa5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/SyncUpdateModel.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/SyncUpdateModel.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateModel() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       UpdateModelRequest request =
           UpdateModelRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/SyncUpdateModelModelFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/SyncUpdateModelModelFieldmask.java
index e1b8a781..307d7ab8 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/SyncUpdateModelModelFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelserviceclient/updatemodel/SyncUpdateModelModelFieldmask.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateModelModelFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
       Model model = Model.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelservicesettings/pausemodel/SyncPauseModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelservicesettings/pausemodel/SyncPauseModel.java
index 69de0ef5..867e9931 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelservicesettings/pausemodel/SyncPauseModel.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/modelservicesettings/pausemodel/SyncPauseModel.java
@@ -27,16 +27,16 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncPauseModel() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ModelServiceSettings.Builder modelServiceSettingsBuilder = ModelServiceSettings.newBuilder();
     modelServiceSettingsBuilder
         .pauseModelSettings()
         .setRetrySettings(
-            modelServiceSettingsBuilder
-                .pauseModelSettings()
-                .getRetrySettings()
-                .toBuilder()
+            modelServiceSettingsBuilder.pauseModelSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     ModelServiceSettings modelServiceSettings = modelServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/create/SyncCreateSetCredentialsProvider.java
index 21f14490..dcec1c77 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require 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))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/create/SyncCreateSetCredentialsProvider1.java
index 30bd9e49..42dcadec 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require 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()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/create/SyncCreateSetEndpoint.java
index a31180b1..a97806e2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require 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 =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/predict/AsyncPredict.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/predict/AsyncPredict.java
index f65f66ab..2bc0eee8 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/predict/AsyncPredict.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/predict/AsyncPredict.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncPredict() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying 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()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/predict/SyncPredict.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/predict/SyncPredict.java
index 0db5b880..fbcd5140 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/predict/SyncPredict.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionserviceclient/predict/SyncPredict.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncPredict() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying 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()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionservicesettings/predict/SyncPredict.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionservicesettings/predict/SyncPredict.java
index 92c81f94..d3c98f54 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionservicesettings/predict/SyncPredict.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/predictionservicesettings/predict/SyncPredict.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncPredict() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require 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()
+            predictionServiceSettingsBuilder.predictSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     PredictionServiceSettings predictionServiceSettings = predictionServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlaces.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlaces.java
index ff690b51..587ae562 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlaces.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlaces.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncAddFulfillmentPlaces() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       AddFulfillmentPlacesRequest request =
           AddFulfillmentPlacesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlacesLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlacesLRO.java
index db3d5a3f..fcbc2fb4 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlacesLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlacesLRO.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncAddFulfillmentPlacesLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       AddFulfillmentPlacesRequest request =
           AddFulfillmentPlacesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlaces.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlaces.java
index 5b78e051..f2d6d6d9 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlaces.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlaces.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddFulfillmentPlaces() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       AddFulfillmentPlacesRequest request =
           AddFulfillmentPlacesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesProductname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesProductname.java
index 7f9706f2..142c9eff 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesProductname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesProductname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddFulfillmentPlacesProductname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ProductName product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesString.java
index 7ca6dd07..43d4ef37 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddFulfillmentPlacesString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/AsyncAddLocalInventories.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/AsyncAddLocalInventories.java
index ce11cc78..3762247e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/AsyncAddLocalInventories.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/AsyncAddLocalInventories.java
@@ -34,8 +34,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncAddLocalInventories() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       AddLocalInventoriesRequest request =
           AddLocalInventoriesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/AsyncAddLocalInventoriesLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/AsyncAddLocalInventoriesLRO.java
index b05daa80..3f9f5547 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/AsyncAddLocalInventoriesLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/AsyncAddLocalInventoriesLRO.java
@@ -35,8 +35,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncAddLocalInventoriesLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       AddLocalInventoriesRequest request =
           AddLocalInventoriesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/SyncAddLocalInventories.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/SyncAddLocalInventories.java
index 3ebc5729..30298fa8 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/SyncAddLocalInventories.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/SyncAddLocalInventories.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddLocalInventories() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       AddLocalInventoriesRequest request =
           AddLocalInventoriesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/SyncAddLocalInventoriesProductname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/SyncAddLocalInventoriesProductname.java
index 2bc807b4..852ad765 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/SyncAddLocalInventoriesProductname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/SyncAddLocalInventoriesProductname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddLocalInventoriesProductname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ProductName product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/SyncAddLocalInventoriesString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/SyncAddLocalInventoriesString.java
index 5bf5d212..b0fcfedb 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/SyncAddLocalInventoriesString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/addlocalinventories/SyncAddLocalInventoriesString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddLocalInventoriesString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/create/SyncCreateSetCredentialsProvider.java
index baae0b77..db0e249f 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ProductServiceSettings productServiceSettings =
         ProductServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/create/SyncCreateSetCredentialsProvider1.java
index ece0b90b..84352ea1 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ProductServiceSettings productServiceSettings =
         ProductServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/create/SyncCreateSetEndpoint.java
index 474b2e35..4b778deb 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ProductServiceSettings productServiceSettings =
         ProductServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     ProductServiceClient productServiceClient = ProductServiceClient.create(productServiceSettings);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/createproduct/AsyncCreateProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/createproduct/AsyncCreateProduct.java
index a003dfc2..d831d83c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/createproduct/AsyncCreateProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/createproduct/AsyncCreateProduct.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncCreateProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       CreateProductRequest request =
           CreateProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/createproduct/SyncCreateProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/createproduct/SyncCreateProduct.java
index bff10c64..62d3ff66 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/createproduct/SyncCreateProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/createproduct/SyncCreateProduct.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       CreateProductRequest request =
           CreateProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/createproduct/SyncCreateProductBranchnameProductString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/createproduct/SyncCreateProductBranchnameProductString.java
index da17e00b..af2bd720 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/createproduct/SyncCreateProductBranchnameProductString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/createproduct/SyncCreateProductBranchnameProductString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateProductBranchnameProductString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       BranchName parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
       Product product = Product.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/createproduct/SyncCreateProductStringProductString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/createproduct/SyncCreateProductStringProductString.java
index c8744a38..db6ea3dc 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/createproduct/SyncCreateProductStringProductString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/createproduct/SyncCreateProductStringProductString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateProductStringProductString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString();
       Product product = Product.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/deleteproduct/AsyncDeleteProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/deleteproduct/AsyncDeleteProduct.java
index c83106ab..0fd7ae98 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/deleteproduct/AsyncDeleteProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/deleteproduct/AsyncDeleteProduct.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncDeleteProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       DeleteProductRequest request =
           DeleteProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/deleteproduct/SyncDeleteProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/deleteproduct/SyncDeleteProduct.java
index e804a6cf..d753152d 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/deleteproduct/SyncDeleteProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/deleteproduct/SyncDeleteProduct.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       DeleteProductRequest request =
           DeleteProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/deleteproduct/SyncDeleteProductProductname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/deleteproduct/SyncDeleteProductProductname.java
index 1ef70bb4..736f854a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/deleteproduct/SyncDeleteProductProductname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/deleteproduct/SyncDeleteProductProductname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteProductProductname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ProductName name =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/deleteproduct/SyncDeleteProductString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/deleteproduct/SyncDeleteProductString.java
index a0928115..0c190803 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/deleteproduct/SyncDeleteProductString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/deleteproduct/SyncDeleteProductString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteProductString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String name =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/getproduct/AsyncGetProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/getproduct/AsyncGetProduct.java
index 78d6ec83..3fa0581a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/getproduct/AsyncGetProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/getproduct/AsyncGetProduct.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       GetProductRequest request =
           GetProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/getproduct/SyncGetProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/getproduct/SyncGetProduct.java
index adeba2d3..213f9bb2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/getproduct/SyncGetProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/getproduct/SyncGetProduct.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       GetProductRequest request =
           GetProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/getproduct/SyncGetProductProductname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/getproduct/SyncGetProductProductname.java
index ccf07b4e..f61c922b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/getproduct/SyncGetProductProductname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/getproduct/SyncGetProductProductname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetProductProductname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ProductName name =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/getproduct/SyncGetProductString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/getproduct/SyncGetProductString.java
index dba9f928..64608bc6 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/getproduct/SyncGetProductString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/getproduct/SyncGetProductString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetProductString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String name =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/AsyncImportProducts.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/AsyncImportProducts.java
index c5c811a6..acd6f4e4 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/AsyncImportProducts.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/AsyncImportProducts.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncImportProducts() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ImportProductsRequest request =
           ImportProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/AsyncImportProductsLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/AsyncImportProductsLRO.java
index 179b58f4..e7d58283 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/AsyncImportProductsLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/AsyncImportProductsLRO.java
@@ -34,8 +34,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncImportProductsLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ImportProductsRequest request =
           ImportProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/SyncImportProducts.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/SyncImportProducts.java
index f7546a49..44306e2a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/SyncImportProducts.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/importproducts/SyncImportProducts.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncImportProducts() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ImportProductsRequest request =
           ImportProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/AsyncListProducts.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/AsyncListProducts.java
index 0f6dd1aa..cb89461e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/AsyncListProducts.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/AsyncListProducts.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListProducts() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ListProductsRequest request =
           ListProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/AsyncListProductsPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/AsyncListProductsPaged.java
index b3103652..2f290cfe 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/AsyncListProductsPaged.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/AsyncListProductsPaged.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListProductsPaged() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ListProductsRequest request =
           ListProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/SyncListProducts.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/SyncListProducts.java
index ea47a194..a9a689e8 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/SyncListProducts.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/SyncListProducts.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListProducts() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ListProductsRequest request =
           ListProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/SyncListProductsBranchname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/SyncListProductsBranchname.java
index c86613f9..7800970d 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/SyncListProductsBranchname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/SyncListProductsBranchname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListProductsBranchname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       BranchName parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
       for (Product element : productServiceClient.listProducts(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/SyncListProductsString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/SyncListProductsString.java
index 5cc1f381..074009da 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/SyncListProductsString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/listproducts/SyncListProductsString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListProductsString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString();
       for (Product element : productServiceClient.listProducts(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/purgeproducts/AsyncPurgeProducts.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/purgeproducts/AsyncPurgeProducts.java
index c1115238..24afff5c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/purgeproducts/AsyncPurgeProducts.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/purgeproducts/AsyncPurgeProducts.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncPurgeProducts() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       PurgeProductsRequest request =
           PurgeProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/purgeproducts/AsyncPurgeProductsLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/purgeproducts/AsyncPurgeProductsLRO.java
index 8c3b4773..b0712d6d 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/purgeproducts/AsyncPurgeProductsLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/purgeproducts/AsyncPurgeProductsLRO.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncPurgeProductsLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       PurgeProductsRequest request =
           PurgeProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/purgeproducts/SyncPurgeProducts.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/purgeproducts/SyncPurgeProducts.java
index 3cf1fa1a..3ee099d6 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/purgeproducts/SyncPurgeProducts.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/purgeproducts/SyncPurgeProducts.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncPurgeProducts() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       PurgeProductsRequest request =
           PurgeProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlaces.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlaces.java
index 18191943..e411253f 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlaces.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlaces.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRemoveFulfillmentPlaces() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       RemoveFulfillmentPlacesRequest request =
           RemoveFulfillmentPlacesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlacesLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlacesLRO.java
index 4b96f9e0..5c27e061 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlacesLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlacesLRO.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRemoveFulfillmentPlacesLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       RemoveFulfillmentPlacesRequest request =
           RemoveFulfillmentPlacesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlaces.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlaces.java
index 849b2750..a7f1c9dc 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlaces.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlaces.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveFulfillmentPlaces() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       RemoveFulfillmentPlacesRequest request =
           RemoveFulfillmentPlacesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesProductname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesProductname.java
index bfa7820f..3552a28f 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesProductname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesProductname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveFulfillmentPlacesProductname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ProductName product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesString.java
index f919d370..eba6e738 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveFulfillmentPlacesString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/AsyncRemoveLocalInventories.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/AsyncRemoveLocalInventories.java
index 1a36ee4e..90aa560c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/AsyncRemoveLocalInventories.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/AsyncRemoveLocalInventories.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRemoveLocalInventories() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       RemoveLocalInventoriesRequest request =
           RemoveLocalInventoriesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/AsyncRemoveLocalInventoriesLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/AsyncRemoveLocalInventoriesLRO.java
index 8c389038..a0c3a032 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/AsyncRemoveLocalInventoriesLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/AsyncRemoveLocalInventoriesLRO.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRemoveLocalInventoriesLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       RemoveLocalInventoriesRequest request =
           RemoveLocalInventoriesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/SyncRemoveLocalInventories.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/SyncRemoveLocalInventories.java
index 58d625bb..89d0e71a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/SyncRemoveLocalInventories.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/SyncRemoveLocalInventories.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveLocalInventories() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       RemoveLocalInventoriesRequest request =
           RemoveLocalInventoriesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesProductname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesProductname.java
index 8c496a92..9a26ab83 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesProductname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesProductname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveLocalInventoriesProductname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ProductName product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesString.java
index bc46b494..20925e36 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveLocalInventoriesString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/setinventory/AsyncSetInventory.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/setinventory/AsyncSetInventory.java
index 19020c79..043997de 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/setinventory/AsyncSetInventory.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/setinventory/AsyncSetInventory.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncSetInventory() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       SetInventoryRequest request =
           SetInventoryRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/setinventory/AsyncSetInventoryLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/setinventory/AsyncSetInventoryLRO.java
index 9e579b19..459a5a64 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/setinventory/AsyncSetInventoryLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/setinventory/AsyncSetInventoryLRO.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncSetInventoryLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       SetInventoryRequest request =
           SetInventoryRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/setinventory/SyncSetInventory.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/setinventory/SyncSetInventory.java
index b3088944..8acac234 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/setinventory/SyncSetInventory.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/setinventory/SyncSetInventory.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSetInventory() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       SetInventoryRequest request =
           SetInventoryRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/setinventory/SyncSetInventoryProductFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/setinventory/SyncSetInventoryProductFieldmask.java
index 1e668c88..0a641fc4 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/setinventory/SyncSetInventoryProductFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/setinventory/SyncSetInventoryProductFieldmask.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSetInventoryProductFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       Product inventory = Product.newBuilder().build();
       FieldMask setMask = FieldMask.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/updateproduct/AsyncUpdateProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/updateproduct/AsyncUpdateProduct.java
index cdb49686..9d847615 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/updateproduct/AsyncUpdateProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/updateproduct/AsyncUpdateProduct.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       UpdateProductRequest request =
           UpdateProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/updateproduct/SyncUpdateProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/updateproduct/SyncUpdateProduct.java
index a8bdaa83..59176313 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/updateproduct/SyncUpdateProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/updateproduct/SyncUpdateProduct.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       UpdateProductRequest request =
           UpdateProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/updateproduct/SyncUpdateProductProductFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/updateproduct/SyncUpdateProductProductFieldmask.java
index 2f65a2a0..18b27a47 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/updateproduct/SyncUpdateProductProductFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productserviceclient/updateproduct/SyncUpdateProductProductFieldmask.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateProductProductFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       Product product = Product.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productservicesettings/createproduct/SyncCreateProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productservicesettings/createproduct/SyncCreateProduct.java
index 5a1e4aee..22474842 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/productservicesettings/createproduct/SyncCreateProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/productservicesettings/createproduct/SyncCreateProduct.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ProductServiceSettings.Builder productServiceSettingsBuilder =
         ProductServiceSettings.newBuilder();
     productServiceSettingsBuilder
         .createProductSettings()
         .setRetrySettings(
-            productServiceSettingsBuilder
-                .createProductSettings()
-                .getRetrySettings()
-                .toBuilder()
+            productServiceSettingsBuilder.createProductSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     ProductServiceSettings productServiceSettings = productServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/create/SyncCreateSetCredentialsProvider.java
index 86db9529..2386ef29 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SearchServiceSettings searchServiceSettings =
         SearchServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/create/SyncCreateSetCredentialsProvider1.java
index 10124f5b..6cd39357 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SearchServiceSettings searchServiceSettings =
         SearchServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/create/SyncCreateSetEndpoint.java
index 769ee252..ce00545e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SearchServiceSettings searchServiceSettings =
         SearchServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     SearchServiceClient searchServiceClient = SearchServiceClient.create(searchServiceSettings);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/AsyncSearch.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/AsyncSearch.java
index 7caafa99..daeef45c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/AsyncSearch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/AsyncSearch.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncSearch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
       SearchRequest request =
           SearchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/AsyncSearchPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/AsyncSearchPaged.java
index 201ce319..3707bcc2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/AsyncSearchPaged.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/AsyncSearchPaged.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncSearchPaged() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
       SearchRequest request =
           SearchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/SyncSearch.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/SyncSearch.java
index 54e88cd1..40df3e78 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/SyncSearch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchserviceclient/search/SyncSearch.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSearch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
       SearchRequest request =
           SearchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchservicesettings/search/SyncSearch.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchservicesettings/search/SyncSearch.java
index e0294354..3e11e404 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchservicesettings/search/SyncSearch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/searchservicesettings/search/SyncSearch.java
@@ -27,16 +27,16 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSearch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SearchServiceSettings.Builder searchServiceSettingsBuilder = SearchServiceSettings.newBuilder();
     searchServiceSettingsBuilder
         .searchSettings()
         .setRetrySettings(
-            searchServiceSettingsBuilder
-                .searchSettings()
-                .getRetrySettings()
-                .toBuilder()
+            searchServiceSettingsBuilder.searchSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     SearchServiceSettings searchServiceSettings = searchServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/addcontrol/AsyncAddControl.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/addcontrol/AsyncAddControl.java
index 992e638d..17ac07df 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/addcontrol/AsyncAddControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/addcontrol/AsyncAddControl.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncAddControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       AddControlRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/addcontrol/SyncAddControl.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/addcontrol/SyncAddControl.java
index a453f1d1..10b0c7e7 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/addcontrol/SyncAddControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/addcontrol/SyncAddControl.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       AddControlRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/addcontrol/SyncAddControlServingconfigname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/addcontrol/SyncAddControlServingconfigname.java
index 3088886b..555dd0f5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/addcontrol/SyncAddControlServingconfigname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/addcontrol/SyncAddControlServingconfigname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddControlServingconfigname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ServingConfigName servingConfig =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/addcontrol/SyncAddControlString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/addcontrol/SyncAddControlString.java
index c7b15a7c..1d7757dd 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/addcontrol/SyncAddControlString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/addcontrol/SyncAddControlString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddControlString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       String servingConfig =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider.java
index a9a7f8ba..cdb493eb 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ServingConfigServiceSettings servingConfigServiceSettings =
         ServingConfigServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider1.java
index 15d508ac..46d14be5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ServingConfigServiceSettings servingConfigServiceSettings =
         ServingConfigServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/create/SyncCreateSetEndpoint.java
index 5733aa8f..feebab95 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ServingConfigServiceSettings servingConfigServiceSettings =
         ServingConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     ServingConfigServiceClient servingConfigServiceClient =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/createservingconfig/AsyncCreateServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/createservingconfig/AsyncCreateServingConfig.java
index 2d3ac99e..7cb387a1 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/createservingconfig/AsyncCreateServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/createservingconfig/AsyncCreateServingConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncCreateServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       CreateServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/createservingconfig/SyncCreateServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/createservingconfig/SyncCreateServingConfig.java
index 89219d88..38588a9b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/createservingconfig/SyncCreateServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/createservingconfig/SyncCreateServingConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       CreateServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigCatalognameServingconfigString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigCatalognameServingconfigString.java
index c2f5a387..362cdd60 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigCatalognameServingconfigString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigCatalognameServingconfigString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateServingConfigCatalognameServingconfigString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigStringServingconfigString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigStringServingconfigString.java
index 07956f54..27a686d6 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigStringServingconfigString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigStringServingconfigString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateServingConfigStringServingconfigString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/deleteservingconfig/AsyncDeleteServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/deleteservingconfig/AsyncDeleteServingConfig.java
index 4d982b38..d1f488de 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/deleteservingconfig/AsyncDeleteServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/deleteservingconfig/AsyncDeleteServingConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncDeleteServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       DeleteServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfig.java
index 2604f10a..a1907f60 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       DeleteServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigServingconfigname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigServingconfigname.java
index dcee76a7..baa75ac7 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigServingconfigname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigServingconfigname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteServingConfigServingconfigname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ServingConfigName name =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigString.java
index 51443426..6f349742 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteServingConfigString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       String name =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/getservingconfig/AsyncGetServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/getservingconfig/AsyncGetServingConfig.java
index 1e6ad4a1..d978a9de 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/getservingconfig/AsyncGetServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/getservingconfig/AsyncGetServingConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       GetServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/getservingconfig/SyncGetServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/getservingconfig/SyncGetServingConfig.java
index eecb25e0..35301555 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/getservingconfig/SyncGetServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/getservingconfig/SyncGetServingConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       GetServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/getservingconfig/SyncGetServingConfigServingconfigname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/getservingconfig/SyncGetServingConfigServingconfigname.java
index 5740b8b8..acc4894d 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/getservingconfig/SyncGetServingConfigServingconfigname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/getservingconfig/SyncGetServingConfigServingconfigname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetServingConfigServingconfigname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ServingConfigName name =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/getservingconfig/SyncGetServingConfigString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/getservingconfig/SyncGetServingConfigString.java
index 1d90a5a8..6fce24d3 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/getservingconfig/SyncGetServingConfigString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/getservingconfig/SyncGetServingConfigString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetServingConfigString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       String name =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigs.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigs.java
index 0752655c..b8815a70 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigs.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigs.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListServingConfigs() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ListServingConfigsRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigsPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigsPaged.java
index 18de6567..7500ed55 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigsPaged.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigsPaged.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListServingConfigsPaged() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ListServingConfigsRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/SyncListServingConfigs.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/SyncListServingConfigs.java
index 06072f40..643be5d6 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/SyncListServingConfigs.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/SyncListServingConfigs.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListServingConfigs() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ListServingConfigsRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsCatalogname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsCatalogname.java
index d812272e..d174ca11 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsCatalogname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsCatalogname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListServingConfigsCatalogname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsString.java
index 732ec149..3a833b14 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListServingConfigsString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/removecontrol/AsyncRemoveControl.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/removecontrol/AsyncRemoveControl.java
index c9b6ba34..a9e8b556 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/removecontrol/AsyncRemoveControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/removecontrol/AsyncRemoveControl.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRemoveControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       RemoveControlRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/removecontrol/SyncRemoveControl.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/removecontrol/SyncRemoveControl.java
index f9c96d55..0f88bd36 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/removecontrol/SyncRemoveControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/removecontrol/SyncRemoveControl.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       RemoveControlRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/removecontrol/SyncRemoveControlServingconfigname.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/removecontrol/SyncRemoveControlServingconfigname.java
index df8b8962..8ca2f7f1 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/removecontrol/SyncRemoveControlServingconfigname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/removecontrol/SyncRemoveControlServingconfigname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveControlServingconfigname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ServingConfigName servingConfig =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/removecontrol/SyncRemoveControlString.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/removecontrol/SyncRemoveControlString.java
index 9a293d67..59bc7be2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/removecontrol/SyncRemoveControlString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/removecontrol/SyncRemoveControlString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveControlString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       String servingConfig =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/updateservingconfig/AsyncUpdateServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/updateservingconfig/AsyncUpdateServingConfig.java
index 6d1efdaa..e6ea51c7 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/updateservingconfig/AsyncUpdateServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/updateservingconfig/AsyncUpdateServingConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       UpdateServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfig.java
index b8e568a5..74bd9c78 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       UpdateServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfigServingconfigFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfigServingconfigFieldmask.java
index 0da7a95e..91e9e838 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfigServingconfigFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfigServingconfigFieldmask.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateServingConfigServingconfigFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ServingConfig servingConfig = ServingConfig.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigservicesettings/createservingconfig/SyncCreateServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigservicesettings/createservingconfig/SyncCreateServingConfig.java
index 68512e7b..7ed4f3c2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigservicesettings/createservingconfig/SyncCreateServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/servingconfigservicesettings/createservingconfig/SyncCreateServingConfig.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ServingConfigServiceSettings.Builder servingConfigServiceSettingsBuilder =
         ServingConfigServiceSettings.newBuilder();
     servingConfigServiceSettingsBuilder
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/catalogservicestubsettings/updatecatalog/SyncUpdateCatalog.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/catalogservicestubsettings/updatecatalog/SyncUpdateCatalog.java
index 5133c288..d6dc1dbb 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/catalogservicestubsettings/updatecatalog/SyncUpdateCatalog.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/catalogservicestubsettings/updatecatalog/SyncUpdateCatalog.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateCatalog() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CatalogServiceStubSettings.Builder catalogServiceSettingsBuilder =
         CatalogServiceStubSettings.newBuilder();
     catalogServiceSettingsBuilder
         .updateCatalogSettings()
         .setRetrySettings(
-            catalogServiceSettingsBuilder
-                .updateCatalogSettings()
-                .getRetrySettings()
-                .toBuilder()
+            catalogServiceSettingsBuilder.updateCatalogSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     CatalogServiceStubSettings catalogServiceSettings = catalogServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/completionservicestubsettings/completequery/SyncCompleteQuery.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/completionservicestubsettings/completequery/SyncCompleteQuery.java
index 9ca8930b..c9ab9b21 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/completionservicestubsettings/completequery/SyncCompleteQuery.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/completionservicestubsettings/completequery/SyncCompleteQuery.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCompleteQuery() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CompletionServiceStubSettings.Builder completionServiceSettingsBuilder =
         CompletionServiceStubSettings.newBuilder();
     completionServiceSettingsBuilder
         .completeQuerySettings()
         .setRetrySettings(
-            completionServiceSettingsBuilder
-                .completeQuerySettings()
-                .getRetrySettings()
-                .toBuilder()
+            completionServiceSettingsBuilder.completeQuerySettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     CompletionServiceStubSettings completionServiceSettings =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/controlservicestubsettings/createcontrol/SyncCreateControl.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/controlservicestubsettings/createcontrol/SyncCreateControl.java
index f4c4c7fe..f0f40c60 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/controlservicestubsettings/createcontrol/SyncCreateControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/controlservicestubsettings/createcontrol/SyncCreateControl.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ControlServiceStubSettings.Builder controlServiceSettingsBuilder =
         ControlServiceStubSettings.newBuilder();
     controlServiceSettingsBuilder
         .createControlSettings()
         .setRetrySettings(
-            controlServiceSettingsBuilder
-                .createControlSettings()
-                .getRetrySettings()
-                .toBuilder()
+            controlServiceSettingsBuilder.createControlSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     ControlServiceStubSettings controlServiceSettings = controlServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/modelservicestubsettings/pausemodel/SyncPauseModel.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/modelservicestubsettings/pausemodel/SyncPauseModel.java
index 029ec71e..3672c739 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/modelservicestubsettings/pausemodel/SyncPauseModel.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/modelservicestubsettings/pausemodel/SyncPauseModel.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncPauseModel() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ModelServiceStubSettings.Builder modelServiceSettingsBuilder =
         ModelServiceStubSettings.newBuilder();
     modelServiceSettingsBuilder
         .pauseModelSettings()
         .setRetrySettings(
-            modelServiceSettingsBuilder
-                .pauseModelSettings()
-                .getRetrySettings()
-                .toBuilder()
+            modelServiceSettingsBuilder.pauseModelSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     ModelServiceStubSettings modelServiceSettings = modelServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/predictionservicestubsettings/predict/SyncPredict.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/predictionservicestubsettings/predict/SyncPredict.java
index 890b642b..e6841a87 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/predictionservicestubsettings/predict/SyncPredict.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/predictionservicestubsettings/predict/SyncPredict.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncPredict() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require 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()
+            predictionServiceSettingsBuilder.predictSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     PredictionServiceStubSettings predictionServiceSettings =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/productservicestubsettings/createproduct/SyncCreateProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/productservicestubsettings/createproduct/SyncCreateProduct.java
index 4a3bc6f0..cfb39126 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/productservicestubsettings/createproduct/SyncCreateProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/productservicestubsettings/createproduct/SyncCreateProduct.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ProductServiceStubSettings.Builder productServiceSettingsBuilder =
         ProductServiceStubSettings.newBuilder();
     productServiceSettingsBuilder
         .createProductSettings()
         .setRetrySettings(
-            productServiceSettingsBuilder
-                .createProductSettings()
-                .getRetrySettings()
-                .toBuilder()
+            productServiceSettingsBuilder.createProductSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     ProductServiceStubSettings productServiceSettings = productServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/searchservicestubsettings/search/SyncSearch.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/searchservicestubsettings/search/SyncSearch.java
index 8ed8a423..3a5a5408 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/searchservicestubsettings/search/SyncSearch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/searchservicestubsettings/search/SyncSearch.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSearch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SearchServiceStubSettings.Builder searchServiceSettingsBuilder =
         SearchServiceStubSettings.newBuilder();
     searchServiceSettingsBuilder
         .searchSettings()
         .setRetrySettings(
-            searchServiceSettingsBuilder
-                .searchSettings()
-                .getRetrySettings()
-                .toBuilder()
+            searchServiceSettingsBuilder.searchSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     SearchServiceStubSettings searchServiceSettings = searchServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/servingconfigservicestubsettings/createservingconfig/SyncCreateServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/servingconfigservicestubsettings/createservingconfig/SyncCreateServingConfig.java
index f2b8880a..edc77785 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/servingconfigservicestubsettings/createservingconfig/SyncCreateServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/servingconfigservicestubsettings/createservingconfig/SyncCreateServingConfig.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ServingConfigServiceStubSettings.Builder servingConfigServiceSettingsBuilder =
         ServingConfigServiceStubSettings.newBuilder();
     servingConfigServiceSettingsBuilder
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/usereventservicestubsettings/writeuserevent/SyncWriteUserEvent.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/usereventservicestubsettings/writeuserevent/SyncWriteUserEvent.java
index 8da2f025..36e5bea9 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/usereventservicestubsettings/writeuserevent/SyncWriteUserEvent.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/stub/usereventservicestubsettings/writeuserevent/SyncWriteUserEvent.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncWriteUserEvent() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     UserEventServiceStubSettings.Builder userEventServiceSettingsBuilder =
         UserEventServiceStubSettings.newBuilder();
     userEventServiceSettingsBuilder
         .writeUserEventSettings()
         .setRetrySettings(
-            userEventServiceSettingsBuilder
-                .writeUserEventSettings()
-                .getRetrySettings()
-                .toBuilder()
+            userEventServiceSettingsBuilder.writeUserEventSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     UserEventServiceStubSettings userEventServiceSettings = userEventServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/collectuserevent/AsyncCollectUserEvent.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/collectuserevent/AsyncCollectUserEvent.java
index 5ade671c..fd4476c6 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/collectuserevent/AsyncCollectUserEvent.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/collectuserevent/AsyncCollectUserEvent.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncCollectUserEvent() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       CollectUserEventRequest request =
           CollectUserEventRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/collectuserevent/SyncCollectUserEvent.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/collectuserevent/SyncCollectUserEvent.java
index 11606861..d3f0ff82 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/collectuserevent/SyncCollectUserEvent.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/collectuserevent/SyncCollectUserEvent.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCollectUserEvent() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       CollectUserEventRequest request =
           CollectUserEventRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/create/SyncCreateSetCredentialsProvider.java
index 183e14bf..64b63fde 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     UserEventServiceSettings userEventServiceSettings =
         UserEventServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/create/SyncCreateSetCredentialsProvider1.java
index c9839dd3..376e8276 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     UserEventServiceSettings userEventServiceSettings =
         UserEventServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/create/SyncCreateSetEndpoint.java
index dea987d9..99c5c8bc 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     UserEventServiceSettings userEventServiceSettings =
         UserEventServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     UserEventServiceClient userEventServiceClient =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/importuserevents/AsyncImportUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/importuserevents/AsyncImportUserEvents.java
index a028e74b..2328a143 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/importuserevents/AsyncImportUserEvents.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/importuserevents/AsyncImportUserEvents.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncImportUserEvents() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       ImportUserEventsRequest request =
           ImportUserEventsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/importuserevents/AsyncImportUserEventsLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/importuserevents/AsyncImportUserEventsLRO.java
index 4bd04e5a..d78ac677 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/importuserevents/AsyncImportUserEventsLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/importuserevents/AsyncImportUserEventsLRO.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncImportUserEventsLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       ImportUserEventsRequest request =
           ImportUserEventsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/importuserevents/SyncImportUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/importuserevents/SyncImportUserEvents.java
index 28f8f78d..28056c11 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/importuserevents/SyncImportUserEvents.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/importuserevents/SyncImportUserEvents.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncImportUserEvents() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       ImportUserEventsRequest request =
           ImportUserEventsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java
index baf2a1f8..0cb081fd 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncPurgeUserEvents() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       PurgeUserEventsRequest request =
           PurgeUserEventsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java
index 64d94356..ed11c10a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncPurgeUserEventsLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       PurgeUserEventsRequest request =
           PurgeUserEventsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java
index 5c541ff4..9fd61965 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncPurgeUserEvents() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       PurgeUserEventsRequest request =
           PurgeUserEventsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEvents.java
index 39f60ef8..450673be 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEvents.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEvents.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRejoinUserEvents() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       RejoinUserEventsRequest request =
           RejoinUserEventsRequest.newBuilder().setParent("parent-995424086").build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEventsLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEventsLRO.java
index 094dcc4d..ce4b102a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEventsLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEventsLRO.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRejoinUserEventsLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       RejoinUserEventsRequest request =
           RejoinUserEventsRequest.newBuilder().setParent("parent-995424086").build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/rejoinuserevents/SyncRejoinUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/rejoinuserevents/SyncRejoinUserEvents.java
index 77cffbb6..588a677c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/rejoinuserevents/SyncRejoinUserEvents.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/rejoinuserevents/SyncRejoinUserEvents.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRejoinUserEvents() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       RejoinUserEventsRequest request =
           RejoinUserEventsRequest.newBuilder().setParent("parent-995424086").build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/writeuserevent/AsyncWriteUserEvent.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/writeuserevent/AsyncWriteUserEvent.java
index 76b3c78a..57626ed9 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/writeuserevent/AsyncWriteUserEvent.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/writeuserevent/AsyncWriteUserEvent.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncWriteUserEvent() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       WriteUserEventRequest request =
           WriteUserEventRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/writeuserevent/SyncWriteUserEvent.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/writeuserevent/SyncWriteUserEvent.java
index c9690fc3..a219300b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/writeuserevent/SyncWriteUserEvent.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventserviceclient/writeuserevent/SyncWriteUserEvent.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncWriteUserEvent() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       WriteUserEventRequest request =
           WriteUserEventRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventservicesettings/writeuserevent/SyncWriteUserEvent.java b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventservicesettings/writeuserevent/SyncWriteUserEvent.java
index 21d761d1..24965c59 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventservicesettings/writeuserevent/SyncWriteUserEvent.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2alpha/usereventservicesettings/writeuserevent/SyncWriteUserEvent.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncWriteUserEvent() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     UserEventServiceSettings.Builder userEventServiceSettingsBuilder =
         UserEventServiceSettings.newBuilder();
     userEventServiceSettingsBuilder
         .writeUserEventSettings()
         .setRetrySettings(
-            userEventServiceSettingsBuilder
-                .writeUserEventSettings()
-                .getRetrySettings()
-                .toBuilder()
+            userEventServiceSettingsBuilder.writeUserEventSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     UserEventServiceSettings userEventServiceSettings = userEventServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/addcatalogattribute/AsyncAddCatalogAttribute.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/addcatalogattribute/AsyncAddCatalogAttribute.java
index 84ac3536..d37ba0cd 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/addcatalogattribute/AsyncAddCatalogAttribute.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/addcatalogattribute/AsyncAddCatalogAttribute.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncAddCatalogAttribute() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       AddCatalogAttributeRequest request =
           AddCatalogAttributeRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/addcatalogattribute/SyncAddCatalogAttribute.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/addcatalogattribute/SyncAddCatalogAttribute.java
index 95b7db63..5776f775 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/addcatalogattribute/SyncAddCatalogAttribute.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/addcatalogattribute/SyncAddCatalogAttribute.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddCatalogAttribute() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       AddCatalogAttributeRequest request =
           AddCatalogAttributeRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/batchremovecatalogattributes/AsyncBatchRemoveCatalogAttributes.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/batchremovecatalogattributes/AsyncBatchRemoveCatalogAttributes.java
new file mode 100644
index 00000000..2971dd9c
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/batchremovecatalogattributes/AsyncBatchRemoveCatalogAttributes.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_catalogserviceclient_batchremovecatalogattributes_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.retail.v2beta.AttributesConfigName;
+import com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest;
+import com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse;
+import com.google.cloud.retail.v2beta.CatalogServiceClient;
+import java.util.ArrayList;
+
+public class AsyncBatchRemoveCatalogAttributes {
+
+  public static void main(String[] args) throws Exception {
+    asyncBatchRemoveCatalogAttributes();
+  }
+
+  public static void asyncBatchRemoveCatalogAttributes() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+      BatchRemoveCatalogAttributesRequest request =
+          BatchRemoveCatalogAttributesRequest.newBuilder()
+              .setAttributesConfig(
+                  AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+              .addAllAttributeKeys(new ArrayList())
+              .build();
+      ApiFuture future =
+          catalogServiceClient.batchRemoveCatalogAttributesCallable().futureCall(request);
+      // Do something.
+      BatchRemoveCatalogAttributesResponse response = future.get();
+    }
+  }
+}
+// [END retail_v2beta_generated_catalogserviceclient_batchremovecatalogattributes_async]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/batchremovecatalogattributes/SyncBatchRemoveCatalogAttributes.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/batchremovecatalogattributes/SyncBatchRemoveCatalogAttributes.java
new file mode 100644
index 00000000..36df5345
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/batchremovecatalogattributes/SyncBatchRemoveCatalogAttributes.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_catalogserviceclient_batchremovecatalogattributes_sync]
+import com.google.cloud.retail.v2beta.AttributesConfigName;
+import com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesRequest;
+import com.google.cloud.retail.v2beta.BatchRemoveCatalogAttributesResponse;
+import com.google.cloud.retail.v2beta.CatalogServiceClient;
+import java.util.ArrayList;
+
+public class SyncBatchRemoveCatalogAttributes {
+
+  public static void main(String[] args) throws Exception {
+    syncBatchRemoveCatalogAttributes();
+  }
+
+  public static void syncBatchRemoveCatalogAttributes() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
+      BatchRemoveCatalogAttributesRequest request =
+          BatchRemoveCatalogAttributesRequest.newBuilder()
+              .setAttributesConfig(
+                  AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+              .addAllAttributeKeys(new ArrayList())
+              .build();
+      BatchRemoveCatalogAttributesResponse response =
+          catalogServiceClient.batchRemoveCatalogAttributes(request);
+    }
+  }
+}
+// [END retail_v2beta_generated_catalogserviceclient_batchremovecatalogattributes_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/create/SyncCreateSetCredentialsProvider.java
index e11bb764..10fce388 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CatalogServiceSettings catalogServiceSettings =
         CatalogServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/create/SyncCreateSetCredentialsProvider1.java
index 5302d33d..b3c6ccdf 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CatalogServiceSettings catalogServiceSettings =
         CatalogServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/create/SyncCreateSetEndpoint.java
index f7077726..6ef540ca 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CatalogServiceSettings catalogServiceSettings =
         CatalogServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     CatalogServiceClient catalogServiceClient = CatalogServiceClient.create(catalogServiceSettings);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getattributesconfig/AsyncGetAttributesConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getattributesconfig/AsyncGetAttributesConfig.java
index 3fe2b04f..8e926e5e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getattributesconfig/AsyncGetAttributesConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getattributesconfig/AsyncGetAttributesConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetAttributesConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       GetAttributesConfigRequest request =
           GetAttributesConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getattributesconfig/SyncGetAttributesConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getattributesconfig/SyncGetAttributesConfig.java
index f9fbcc7b..3e02d5f0 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getattributesconfig/SyncGetAttributesConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getattributesconfig/SyncGetAttributesConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetAttributesConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       GetAttributesConfigRequest request =
           GetAttributesConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigAttributesconfigname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigAttributesconfigname.java
index 4ae60e57..ada595cc 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigAttributesconfigname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigAttributesconfigname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetAttributesConfigAttributesconfigname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       AttributesConfigName name = AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       AttributesConfig response = catalogServiceClient.getAttributesConfig(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigString.java
index 186e4186..799e8004 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getattributesconfig/SyncGetAttributesConfigString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetAttributesConfigString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       String name = AttributesConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       AttributesConfig response = catalogServiceClient.getAttributesConfig(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getcompletionconfig/AsyncGetCompletionConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getcompletionconfig/AsyncGetCompletionConfig.java
index 1b76379f..16463b95 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getcompletionconfig/AsyncGetCompletionConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getcompletionconfig/AsyncGetCompletionConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetCompletionConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       GetCompletionConfigRequest request =
           GetCompletionConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfig.java
index 82639a1e..8941cf3b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetCompletionConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       GetCompletionConfigRequest request =
           GetCompletionConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigCompletionconfigname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigCompletionconfigname.java
index 8ee48946..261c66dc 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigCompletionconfigname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigCompletionconfigname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetCompletionConfigCompletionconfigname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       CompletionConfigName name = CompletionConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       CompletionConfig response = catalogServiceClient.getCompletionConfig(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigString.java
index a09242da..a2a43e7e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getcompletionconfig/SyncGetCompletionConfigString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetCompletionConfigString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       String name = CompletionConfigName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       CompletionConfig response = catalogServiceClient.getCompletionConfig(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getdefaultbranch/AsyncGetDefaultBranch.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getdefaultbranch/AsyncGetDefaultBranch.java
index ca136476..83d86b2f 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getdefaultbranch/AsyncGetDefaultBranch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getdefaultbranch/AsyncGetDefaultBranch.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetDefaultBranch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       GetDefaultBranchRequest request =
           GetDefaultBranchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranch.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranch.java
index 33edc3ab..bf132718 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranch.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetDefaultBranch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       GetDefaultBranchRequest request =
           GetDefaultBranchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchCatalogname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchCatalogname.java
index 335ea14b..da3fd62c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchCatalogname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchCatalogname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetDefaultBranchCatalogname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       CatalogName catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       GetDefaultBranchResponse response = catalogServiceClient.getDefaultBranch(catalog);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchString.java
index 81bef11f..169b427b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/getdefaultbranch/SyncGetDefaultBranchString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetDefaultBranchString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       String catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       GetDefaultBranchResponse response = catalogServiceClient.getDefaultBranch(catalog);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/AsyncListCatalogs.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/AsyncListCatalogs.java
index ababcfd9..6f3540c2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/AsyncListCatalogs.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/AsyncListCatalogs.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListCatalogs() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       ListCatalogsRequest request =
           ListCatalogsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/AsyncListCatalogsPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/AsyncListCatalogsPaged.java
index 7679cd51..5d884602 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/AsyncListCatalogsPaged.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/AsyncListCatalogsPaged.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListCatalogsPaged() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       ListCatalogsRequest request =
           ListCatalogsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/SyncListCatalogs.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/SyncListCatalogs.java
index 7c30dedf..ddc3e0f1 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/SyncListCatalogs.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/SyncListCatalogs.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListCatalogs() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       ListCatalogsRequest request =
           ListCatalogsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/SyncListCatalogsLocationname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/SyncListCatalogsLocationname.java
index 8ea17f20..fde14a21 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/SyncListCatalogsLocationname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/SyncListCatalogsLocationname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListCatalogsLocationname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       LocationName parent = LocationName.of("[PROJECT]", "[LOCATION]");
       for (Catalog element : catalogServiceClient.listCatalogs(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/SyncListCatalogsString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/SyncListCatalogsString.java
index 89c0e5fc..45d2500d 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/SyncListCatalogsString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/listcatalogs/SyncListCatalogsString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListCatalogsString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       String parent = LocationName.of("[PROJECT]", "[LOCATION]").toString();
       for (Catalog element : catalogServiceClient.listCatalogs(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/removecatalogattribute/AsyncRemoveCatalogAttribute.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/removecatalogattribute/AsyncRemoveCatalogAttribute.java
index 03d463cf..11b2c25e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/removecatalogattribute/AsyncRemoveCatalogAttribute.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/removecatalogattribute/AsyncRemoveCatalogAttribute.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRemoveCatalogAttribute() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       RemoveCatalogAttributeRequest request =
           RemoveCatalogAttributeRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/removecatalogattribute/SyncRemoveCatalogAttribute.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/removecatalogattribute/SyncRemoveCatalogAttribute.java
index 894ab601..52f660cf 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/removecatalogattribute/SyncRemoveCatalogAttribute.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/removecatalogattribute/SyncRemoveCatalogAttribute.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveCatalogAttribute() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       RemoveCatalogAttributeRequest request =
           RemoveCatalogAttributeRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/replacecatalogattribute/AsyncReplaceCatalogAttribute.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/replacecatalogattribute/AsyncReplaceCatalogAttribute.java
index 02f62a5f..e1e0ddcc 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/replacecatalogattribute/AsyncReplaceCatalogAttribute.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/replacecatalogattribute/AsyncReplaceCatalogAttribute.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncReplaceCatalogAttribute() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       ReplaceCatalogAttributeRequest request =
           ReplaceCatalogAttributeRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/replacecatalogattribute/SyncReplaceCatalogAttribute.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/replacecatalogattribute/SyncReplaceCatalogAttribute.java
index ffe7f215..c2b7e468 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/replacecatalogattribute/SyncReplaceCatalogAttribute.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/replacecatalogattribute/SyncReplaceCatalogAttribute.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncReplaceCatalogAttribute() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       ReplaceCatalogAttributeRequest request =
           ReplaceCatalogAttributeRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/setdefaultbranch/AsyncSetDefaultBranch.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/setdefaultbranch/AsyncSetDefaultBranch.java
index 88af8fe6..654e67fe 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/setdefaultbranch/AsyncSetDefaultBranch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/setdefaultbranch/AsyncSetDefaultBranch.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncSetDefaultBranch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       SetDefaultBranchRequest request =
           SetDefaultBranchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranch.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranch.java
index f8605468..e53d3f79 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranch.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSetDefaultBranch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       SetDefaultBranchRequest request =
           SetDefaultBranchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchCatalogname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchCatalogname.java
index f7707632..4565c899 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchCatalogname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchCatalogname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSetDefaultBranchCatalogname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       CatalogName catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       catalogServiceClient.setDefaultBranch(catalog);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchString.java
index 88f9d27f..cc84ec4f 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/setdefaultbranch/SyncSetDefaultBranchString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSetDefaultBranchString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       String catalog = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       catalogServiceClient.setDefaultBranch(catalog);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updateattributesconfig/AsyncUpdateAttributesConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updateattributesconfig/AsyncUpdateAttributesConfig.java
index 43456026..ba1c9406 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updateattributesconfig/AsyncUpdateAttributesConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updateattributesconfig/AsyncUpdateAttributesConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateAttributesConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       UpdateAttributesConfigRequest request =
           UpdateAttributesConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfig.java
index abbf7b88..4c204207 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateAttributesConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       UpdateAttributesConfigRequest request =
           UpdateAttributesConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfigAttributesconfigFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfigAttributesconfigFieldmask.java
index cab614a3..d5b8eac2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfigAttributesconfigFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updateattributesconfig/SyncUpdateAttributesConfigAttributesconfigFieldmask.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateAttributesConfigAttributesconfigFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       AttributesConfig attributesConfig = AttributesConfig.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecatalog/AsyncUpdateCatalog.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecatalog/AsyncUpdateCatalog.java
index 260cf62c..8c602343 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecatalog/AsyncUpdateCatalog.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecatalog/AsyncUpdateCatalog.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateCatalog() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       UpdateCatalogRequest request =
           UpdateCatalogRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecatalog/SyncUpdateCatalog.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecatalog/SyncUpdateCatalog.java
index c2a33974..5b90e2cb 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecatalog/SyncUpdateCatalog.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecatalog/SyncUpdateCatalog.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateCatalog() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       UpdateCatalogRequest request =
           UpdateCatalogRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecatalog/SyncUpdateCatalogCatalogFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecatalog/SyncUpdateCatalogCatalogFieldmask.java
index ff243649..34704eec 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecatalog/SyncUpdateCatalogCatalogFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecatalog/SyncUpdateCatalogCatalogFieldmask.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateCatalogCatalogFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       Catalog catalog = Catalog.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecompletionconfig/AsyncUpdateCompletionConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecompletionconfig/AsyncUpdateCompletionConfig.java
index f2d4a974..42aa0280 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecompletionconfig/AsyncUpdateCompletionConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecompletionconfig/AsyncUpdateCompletionConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateCompletionConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       UpdateCompletionConfigRequest request =
           UpdateCompletionConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfig.java
index 7b0ff57f..86b22fb6 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateCompletionConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       UpdateCompletionConfigRequest request =
           UpdateCompletionConfigRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfigCompletionconfigFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfigCompletionconfigFieldmask.java
index 2b7ca867..28768bf6 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfigCompletionconfigFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogserviceclient/updatecompletionconfig/SyncUpdateCompletionConfigCompletionconfigFieldmask.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateCompletionConfigCompletionconfigFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CatalogServiceClient catalogServiceClient = CatalogServiceClient.create()) {
       CompletionConfig completionConfig = CompletionConfig.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogservicesettings/updatecatalog/SyncUpdateCatalog.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogservicesettings/updatecatalog/SyncUpdateCatalog.java
index 2cbfa3b9..a7565846 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogservicesettings/updatecatalog/SyncUpdateCatalog.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/catalogservicesettings/updatecatalog/SyncUpdateCatalog.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateCatalog() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CatalogServiceSettings.Builder catalogServiceSettingsBuilder =
         CatalogServiceSettings.newBuilder();
     catalogServiceSettingsBuilder
         .updateCatalogSettings()
         .setRetrySettings(
-            catalogServiceSettingsBuilder
-                .updateCatalogSettings()
-                .getRetrySettings()
-                .toBuilder()
+            catalogServiceSettingsBuilder.updateCatalogSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     CatalogServiceSettings catalogServiceSettings = catalogServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/completequery/AsyncCompleteQuery.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/completequery/AsyncCompleteQuery.java
index 80ddc3d2..34fcba79 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/completequery/AsyncCompleteQuery.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/completequery/AsyncCompleteQuery.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncCompleteQuery() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
       CompleteQueryRequest request =
           CompleteQueryRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/completequery/SyncCompleteQuery.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/completequery/SyncCompleteQuery.java
index d6f90b8d..a34d2dc5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/completequery/SyncCompleteQuery.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/completequery/SyncCompleteQuery.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCompleteQuery() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
       CompleteQueryRequest request =
           CompleteQueryRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/create/SyncCreateSetCredentialsProvider.java
index 3f0b032c..137261a5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CompletionServiceSettings completionServiceSettings =
         CompletionServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/create/SyncCreateSetCredentialsProvider1.java
index 2d8d6699..4bbfe2d5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CompletionServiceSettings completionServiceSettings =
         CompletionServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/create/SyncCreateSetEndpoint.java
index 9d8d7eb1..ff15eef4 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CompletionServiceSettings completionServiceSettings =
         CompletionServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     CompletionServiceClient completionServiceClient =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/importcompletiondata/AsyncImportCompletionData.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/importcompletiondata/AsyncImportCompletionData.java
index 963c1452..90594d95 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/importcompletiondata/AsyncImportCompletionData.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/importcompletiondata/AsyncImportCompletionData.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncImportCompletionData() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
       ImportCompletionDataRequest request =
           ImportCompletionDataRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/importcompletiondata/AsyncImportCompletionDataLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/importcompletiondata/AsyncImportCompletionDataLRO.java
index ffac086c..f2592e0b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/importcompletiondata/AsyncImportCompletionDataLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/importcompletiondata/AsyncImportCompletionDataLRO.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncImportCompletionDataLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
       ImportCompletionDataRequest request =
           ImportCompletionDataRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/importcompletiondata/SyncImportCompletionData.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/importcompletiondata/SyncImportCompletionData.java
index 86e4ab28..680fd42b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/importcompletiondata/SyncImportCompletionData.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/completionserviceclient/importcompletiondata/SyncImportCompletionData.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncImportCompletionData() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (CompletionServiceClient completionServiceClient = CompletionServiceClient.create()) {
       ImportCompletionDataRequest request =
           ImportCompletionDataRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/completionservicesettings/completequery/SyncCompleteQuery.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/completionservicesettings/completequery/SyncCompleteQuery.java
index de62c829..2a5b6914 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/completionservicesettings/completequery/SyncCompleteQuery.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/completionservicesettings/completequery/SyncCompleteQuery.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCompleteQuery() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CompletionServiceSettings.Builder completionServiceSettingsBuilder =
         CompletionServiceSettings.newBuilder();
     completionServiceSettingsBuilder
         .completeQuerySettings()
         .setRetrySettings(
-            completionServiceSettingsBuilder
-                .completeQuerySettings()
-                .getRetrySettings()
-                .toBuilder()
+            completionServiceSettingsBuilder.completeQuerySettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     CompletionServiceSettings completionServiceSettings = completionServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/create/SyncCreateSetCredentialsProvider.java
index 320d3850..84334591 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ControlServiceSettings controlServiceSettings =
         ControlServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/create/SyncCreateSetCredentialsProvider1.java
index 3898eca2..7babb22a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ControlServiceSettings controlServiceSettings =
         ControlServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/create/SyncCreateSetEndpoint.java
index 6faec97b..a27152a1 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ControlServiceSettings controlServiceSettings =
         ControlServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     ControlServiceClient controlServiceClient = ControlServiceClient.create(controlServiceSettings);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/createcontrol/AsyncCreateControl.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/createcontrol/AsyncCreateControl.java
index 00f81a93..43985ee4 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/createcontrol/AsyncCreateControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/createcontrol/AsyncCreateControl.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncCreateControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       CreateControlRequest request =
           CreateControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/createcontrol/SyncCreateControl.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/createcontrol/SyncCreateControl.java
index 8a7b3559..3273d59c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/createcontrol/SyncCreateControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/createcontrol/SyncCreateControl.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       CreateControlRequest request =
           CreateControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/createcontrol/SyncCreateControlCatalognameControlString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/createcontrol/SyncCreateControlCatalognameControlString.java
index 6a1be976..6688fee5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/createcontrol/SyncCreateControlCatalognameControlString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/createcontrol/SyncCreateControlCatalognameControlString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateControlCatalognameControlString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       Control control = Control.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/createcontrol/SyncCreateControlStringControlString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/createcontrol/SyncCreateControlStringControlString.java
index a0d032c4..eae34b27 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/createcontrol/SyncCreateControlStringControlString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/createcontrol/SyncCreateControlStringControlString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateControlStringControlString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       Control control = Control.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/deletecontrol/AsyncDeleteControl.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/deletecontrol/AsyncDeleteControl.java
index f8d7faa8..392942c8 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/deletecontrol/AsyncDeleteControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/deletecontrol/AsyncDeleteControl.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncDeleteControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       DeleteControlRequest request =
           DeleteControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/deletecontrol/SyncDeleteControl.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/deletecontrol/SyncDeleteControl.java
index c9ad4ff4..4f4b5c0a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/deletecontrol/SyncDeleteControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/deletecontrol/SyncDeleteControl.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       DeleteControlRequest request =
           DeleteControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/deletecontrol/SyncDeleteControlControlname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/deletecontrol/SyncDeleteControlControlname.java
index 551e17ae..c2d3aae5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/deletecontrol/SyncDeleteControlControlname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/deletecontrol/SyncDeleteControlControlname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteControlControlname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       ControlName name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]");
       controlServiceClient.deleteControl(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/deletecontrol/SyncDeleteControlString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/deletecontrol/SyncDeleteControlString.java
index 9492b937..6edc8ebf 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/deletecontrol/SyncDeleteControlString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/deletecontrol/SyncDeleteControlString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteControlString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       String name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString();
       controlServiceClient.deleteControl(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/getcontrol/AsyncGetControl.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/getcontrol/AsyncGetControl.java
index a6c2c60a..1e334bf3 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/getcontrol/AsyncGetControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/getcontrol/AsyncGetControl.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       GetControlRequest request =
           GetControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/getcontrol/SyncGetControl.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/getcontrol/SyncGetControl.java
index e19fd69d..3a16c3ac 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/getcontrol/SyncGetControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/getcontrol/SyncGetControl.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       GetControlRequest request =
           GetControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/getcontrol/SyncGetControlControlname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/getcontrol/SyncGetControlControlname.java
index bd7b90c7..f38b9a13 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/getcontrol/SyncGetControlControlname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/getcontrol/SyncGetControlControlname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetControlControlname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       ControlName name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]");
       Control response = controlServiceClient.getControl(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/getcontrol/SyncGetControlString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/getcontrol/SyncGetControlString.java
index dab545a1..b2fded48 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/getcontrol/SyncGetControlString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/getcontrol/SyncGetControlString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetControlString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       String name = ControlName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[CONTROL]").toString();
       Control response = controlServiceClient.getControl(name);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/AsyncListControls.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/AsyncListControls.java
index 505b6fc8..47cf0b3e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/AsyncListControls.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/AsyncListControls.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListControls() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       ListControlsRequest request =
           ListControlsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/AsyncListControlsPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/AsyncListControlsPaged.java
index 71f67e10..a6f5638a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/AsyncListControlsPaged.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/AsyncListControlsPaged.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListControlsPaged() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       ListControlsRequest request =
           ListControlsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/SyncListControls.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/SyncListControls.java
index 01dbd88c..529d7bec 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/SyncListControls.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/SyncListControls.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListControls() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       ListControlsRequest request =
           ListControlsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/SyncListControlsCatalogname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/SyncListControlsCatalogname.java
index 8289913f..f7be421a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/SyncListControlsCatalogname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/SyncListControlsCatalogname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListControlsCatalogname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
       for (Control element : controlServiceClient.listControls(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/SyncListControlsString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/SyncListControlsString.java
index c60cb18b..2eaf7c62 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/SyncListControlsString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/listcontrols/SyncListControlsString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListControlsString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
       for (Control element : controlServiceClient.listControls(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/updatecontrol/AsyncUpdateControl.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/updatecontrol/AsyncUpdateControl.java
index 928312da..df9bbc7c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/updatecontrol/AsyncUpdateControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/updatecontrol/AsyncUpdateControl.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       UpdateControlRequest request =
           UpdateControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/updatecontrol/SyncUpdateControl.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/updatecontrol/SyncUpdateControl.java
index 4b3913cf..9004cc58 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/updatecontrol/SyncUpdateControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/updatecontrol/SyncUpdateControl.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       UpdateControlRequest request =
           UpdateControlRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/updatecontrol/SyncUpdateControlControlFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/updatecontrol/SyncUpdateControlControlFieldmask.java
index dc3f7869..c5d0b297 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/updatecontrol/SyncUpdateControlControlFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlserviceclient/updatecontrol/SyncUpdateControlControlFieldmask.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateControlControlFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ControlServiceClient controlServiceClient = ControlServiceClient.create()) {
       Control control = Control.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlservicesettings/createcontrol/SyncCreateControl.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlservicesettings/createcontrol/SyncCreateControl.java
index 86d8b9b2..31c98a2e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/controlservicesettings/createcontrol/SyncCreateControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/controlservicesettings/createcontrol/SyncCreateControl.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ControlServiceSettings.Builder controlServiceSettingsBuilder =
         ControlServiceSettings.newBuilder();
     controlServiceSettingsBuilder
         .createControlSettings()
         .setRetrySettings(
-            controlServiceSettingsBuilder
-                .createControlSettings()
-                .getRetrySettings()
-                .toBuilder()
+            controlServiceSettingsBuilder.createControlSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     ControlServiceSettings controlServiceSettings = controlServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/create/SyncCreateSetCredentialsProvider.java
new file mode 100644
index 00000000..095e0809
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_create_setcredentialsprovider_sync]
+import com.google.api.gax.core.FixedCredentialsProvider;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.cloud.retail.v2beta.ModelServiceSettings;
+import com.google.cloud.retail.v2beta.myCredentials;
+
+public class SyncCreateSetCredentialsProvider {
+
+  public static void main(String[] args) throws Exception {
+    syncCreateSetCredentialsProvider();
+  }
+
+  public static void syncCreateSetCredentialsProvider() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    ModelServiceSettings modelServiceSettings =
+        ModelServiceSettings.newBuilder()
+            .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+            .build();
+    ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings);
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_create_setcredentialsprovider_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/create/SyncCreateSetCredentialsProvider1.java
new file mode 100644
index 00000000..db9f6d30
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_create_setcredentialsprovider1_sync]
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.cloud.retail.v2beta.ModelServiceSettings;
+
+public class SyncCreateSetCredentialsProvider1 {
+
+  public static void main(String[] args) throws Exception {
+    syncCreateSetCredentialsProvider1();
+  }
+
+  public static void syncCreateSetCredentialsProvider1() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    ModelServiceSettings modelServiceSettings =
+        ModelServiceSettings.newBuilder()
+            .setTransportChannelProvider(
+                ModelServiceSettings.defaultHttpJsonTransportProviderBuilder().build())
+            .build();
+    ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings);
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_create_setcredentialsprovider1_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/create/SyncCreateSetEndpoint.java
new file mode 100644
index 00000000..1dca9ca5
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/create/SyncCreateSetEndpoint.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_create_setendpoint_sync]
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.cloud.retail.v2beta.ModelServiceSettings;
+import com.google.cloud.retail.v2beta.myEndpoint;
+
+public class SyncCreateSetEndpoint {
+
+  public static void main(String[] args) throws Exception {
+    syncCreateSetEndpoint();
+  }
+
+  public static void syncCreateSetEndpoint() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    ModelServiceSettings modelServiceSettings =
+        ModelServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+    ModelServiceClient modelServiceClient = ModelServiceClient.create(modelServiceSettings);
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_create_setendpoint_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/createmodel/AsyncCreateModel.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/createmodel/AsyncCreateModel.java
new file mode 100644
index 00000000..2a9ea26b
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/createmodel/AsyncCreateModel.java
@@ -0,0 +1,52 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_createmodel_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.retail.v2beta.CatalogName;
+import com.google.cloud.retail.v2beta.CreateModelRequest;
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.longrunning.Operation;
+
+public class AsyncCreateModel {
+
+  public static void main(String[] args) throws Exception {
+    asyncCreateModel();
+  }
+
+  public static void asyncCreateModel() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      CreateModelRequest request =
+          CreateModelRequest.newBuilder()
+              .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+              .setModel(Model.newBuilder().build())
+              .setDryRun(true)
+              .build();
+      ApiFuture future = modelServiceClient.createModelCallable().futureCall(request);
+      // Do something.
+      Operation response = future.get();
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_createmodel_async]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/createmodel/AsyncCreateModelLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/createmodel/AsyncCreateModelLRO.java
new file mode 100644
index 00000000..c6770a5a
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/createmodel/AsyncCreateModelLRO.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_createmodel_lro_async]
+import com.google.api.gax.longrunning.OperationFuture;
+import com.google.cloud.retail.v2beta.CatalogName;
+import com.google.cloud.retail.v2beta.CreateModelMetadata;
+import com.google.cloud.retail.v2beta.CreateModelRequest;
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+
+public class AsyncCreateModelLRO {
+
+  public static void main(String[] args) throws Exception {
+    asyncCreateModelLRO();
+  }
+
+  public static void asyncCreateModelLRO() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      CreateModelRequest request =
+          CreateModelRequest.newBuilder()
+              .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+              .setModel(Model.newBuilder().build())
+              .setDryRun(true)
+              .build();
+      OperationFuture future =
+          modelServiceClient.createModelOperationCallable().futureCall(request);
+      // Do something.
+      Model response = future.get();
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_createmodel_lro_async]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/createmodel/SyncCreateModel.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/createmodel/SyncCreateModel.java
new file mode 100644
index 00000000..e2199883
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/createmodel/SyncCreateModel.java
@@ -0,0 +1,48 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_createmodel_sync]
+import com.google.cloud.retail.v2beta.CatalogName;
+import com.google.cloud.retail.v2beta.CreateModelRequest;
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+
+public class SyncCreateModel {
+
+  public static void main(String[] args) throws Exception {
+    syncCreateModel();
+  }
+
+  public static void syncCreateModel() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      CreateModelRequest request =
+          CreateModelRequest.newBuilder()
+              .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+              .setModel(Model.newBuilder().build())
+              .setDryRun(true)
+              .build();
+      Model response = modelServiceClient.createModelAsync(request).get();
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_createmodel_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/createmodel/SyncCreateModelCatalognameModel.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/createmodel/SyncCreateModelCatalognameModel.java
new file mode 100644
index 00000000..f1a7696a
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/createmodel/SyncCreateModelCatalognameModel.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_createmodel_catalognamemodel_sync]
+import com.google.cloud.retail.v2beta.CatalogName;
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+
+public class SyncCreateModelCatalognameModel {
+
+  public static void main(String[] args) throws Exception {
+    syncCreateModelCatalognameModel();
+  }
+
+  public static void syncCreateModelCatalognameModel() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+      Model model = Model.newBuilder().build();
+      Model response = modelServiceClient.createModelAsync(parent, model).get();
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_createmodel_catalognamemodel_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/createmodel/SyncCreateModelStringModel.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/createmodel/SyncCreateModelStringModel.java
new file mode 100644
index 00000000..dcefb12a
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/createmodel/SyncCreateModelStringModel.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_createmodel_stringmodel_sync]
+import com.google.cloud.retail.v2beta.CatalogName;
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+
+public class SyncCreateModelStringModel {
+
+  public static void main(String[] args) throws Exception {
+    syncCreateModelStringModel();
+  }
+
+  public static void syncCreateModelStringModel() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
+      Model model = Model.newBuilder().build();
+      Model response = modelServiceClient.createModelAsync(parent, model).get();
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_createmodel_stringmodel_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/deletemodel/AsyncDeleteModel.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/deletemodel/AsyncDeleteModel.java
new file mode 100644
index 00000000..6dcbeb6d
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/deletemodel/AsyncDeleteModel.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_deletemodel_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.retail.v2beta.DeleteModelRequest;
+import com.google.cloud.retail.v2beta.ModelName;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.protobuf.Empty;
+
+public class AsyncDeleteModel {
+
+  public static void main(String[] args) throws Exception {
+    asyncDeleteModel();
+  }
+
+  public static void asyncDeleteModel() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      DeleteModelRequest request =
+          DeleteModelRequest.newBuilder()
+              .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+              .build();
+      ApiFuture future = modelServiceClient.deleteModelCallable().futureCall(request);
+      // Do something.
+      future.get();
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_deletemodel_async]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/deletemodel/SyncDeleteModel.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/deletemodel/SyncDeleteModel.java
new file mode 100644
index 00000000..be4792cc
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/deletemodel/SyncDeleteModel.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_deletemodel_sync]
+import com.google.cloud.retail.v2beta.DeleteModelRequest;
+import com.google.cloud.retail.v2beta.ModelName;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.protobuf.Empty;
+
+public class SyncDeleteModel {
+
+  public static void main(String[] args) throws Exception {
+    syncDeleteModel();
+  }
+
+  public static void syncDeleteModel() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      DeleteModelRequest request =
+          DeleteModelRequest.newBuilder()
+              .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+              .build();
+      modelServiceClient.deleteModel(request);
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_deletemodel_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/deletemodel/SyncDeleteModelModelname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/deletemodel/SyncDeleteModelModelname.java
new file mode 100644
index 00000000..449c810f
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/deletemodel/SyncDeleteModelModelname.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_deletemodel_modelname_sync]
+import com.google.cloud.retail.v2beta.ModelName;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.protobuf.Empty;
+
+public class SyncDeleteModelModelname {
+
+  public static void main(String[] args) throws Exception {
+    syncDeleteModelModelname();
+  }
+
+  public static void syncDeleteModelModelname() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
+      modelServiceClient.deleteModel(name);
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_deletemodel_modelname_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/deletemodel/SyncDeleteModelString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/deletemodel/SyncDeleteModelString.java
new file mode 100644
index 00000000..1ba508bd
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/deletemodel/SyncDeleteModelString.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_deletemodel_string_sync]
+import com.google.cloud.retail.v2beta.ModelName;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.protobuf.Empty;
+
+public class SyncDeleteModelString {
+
+  public static void main(String[] args) throws Exception {
+    syncDeleteModelString();
+  }
+
+  public static void syncDeleteModelString() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      String name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString();
+      modelServiceClient.deleteModel(name);
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_deletemodel_string_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/listmodels/AsyncListModels.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/listmodels/AsyncListModels.java
new file mode 100644
index 00000000..d78ce9a9
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/listmodels/AsyncListModels.java
@@ -0,0 +1,53 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_listmodels_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.retail.v2beta.CatalogName;
+import com.google.cloud.retail.v2beta.ListModelsRequest;
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+
+public class AsyncListModels {
+
+  public static void main(String[] args) throws Exception {
+    asyncListModels();
+  }
+
+  public static void asyncListModels() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      ListModelsRequest request =
+          ListModelsRequest.newBuilder()
+              .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .build();
+      ApiFuture future = modelServiceClient.listModelsPagedCallable().futureCall(request);
+      // Do something.
+      for (Model element : future.get().iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_listmodels_async]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/listmodels/AsyncListModelsPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/listmodels/AsyncListModelsPaged.java
new file mode 100644
index 00000000..a0ec5a50
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/listmodels/AsyncListModelsPaged.java
@@ -0,0 +1,61 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_listmodels_paged_async]
+import com.google.cloud.retail.v2beta.CatalogName;
+import com.google.cloud.retail.v2beta.ListModelsRequest;
+import com.google.cloud.retail.v2beta.ListModelsResponse;
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.common.base.Strings;
+
+public class AsyncListModelsPaged {
+
+  public static void main(String[] args) throws Exception {
+    asyncListModelsPaged();
+  }
+
+  public static void asyncListModelsPaged() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      ListModelsRequest request =
+          ListModelsRequest.newBuilder()
+              .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .build();
+      while (true) {
+        ListModelsResponse response = modelServiceClient.listModelsCallable().call(request);
+        for (Model element : response.getModelsList()) {
+          // doThingsWith(element);
+        }
+        String nextPageToken = response.getNextPageToken();
+        if (!Strings.isNullOrEmpty(nextPageToken)) {
+          request = request.toBuilder().setPageToken(nextPageToken).build();
+        } else {
+          break;
+        }
+      }
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_listmodels_paged_async]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/listmodels/SyncListModels.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/listmodels/SyncListModels.java
new file mode 100644
index 00000000..012798d3
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/listmodels/SyncListModels.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_listmodels_sync]
+import com.google.cloud.retail.v2beta.CatalogName;
+import com.google.cloud.retail.v2beta.ListModelsRequest;
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+
+public class SyncListModels {
+
+  public static void main(String[] args) throws Exception {
+    syncListModels();
+  }
+
+  public static void syncListModels() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      ListModelsRequest request =
+          ListModelsRequest.newBuilder()
+              .setParent(CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString())
+              .setPageSize(883849137)
+              .setPageToken("pageToken873572522")
+              .build();
+      for (Model element : modelServiceClient.listModels(request).iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_listmodels_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/listmodels/SyncListModelsCatalogname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/listmodels/SyncListModelsCatalogname.java
new file mode 100644
index 00000000..8e8c28c6
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/listmodels/SyncListModelsCatalogname.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_listmodels_catalogname_sync]
+import com.google.cloud.retail.v2beta.CatalogName;
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+
+public class SyncListModelsCatalogname {
+
+  public static void main(String[] args) throws Exception {
+    syncListModelsCatalogname();
+  }
+
+  public static void syncListModelsCatalogname() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
+      for (Model element : modelServiceClient.listModels(parent).iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_listmodels_catalogname_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/listmodels/SyncListModelsString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/listmodels/SyncListModelsString.java
new file mode 100644
index 00000000..dab07413
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/listmodels/SyncListModelsString.java
@@ -0,0 +1,44 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_listmodels_string_sync]
+import com.google.cloud.retail.v2beta.CatalogName;
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+
+public class SyncListModelsString {
+
+  public static void main(String[] args) throws Exception {
+    syncListModelsString();
+  }
+
+  public static void syncListModelsString() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
+      for (Model element : modelServiceClient.listModels(parent).iterateAll()) {
+        // doThingsWith(element);
+      }
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_listmodels_string_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/pausemodel/AsyncPauseModel.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/pausemodel/AsyncPauseModel.java
new file mode 100644
index 00000000..65778ade
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/pausemodel/AsyncPauseModel.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_pausemodel_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelName;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.cloud.retail.v2beta.PauseModelRequest;
+
+public class AsyncPauseModel {
+
+  public static void main(String[] args) throws Exception {
+    asyncPauseModel();
+  }
+
+  public static void asyncPauseModel() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      PauseModelRequest request =
+          PauseModelRequest.newBuilder()
+              .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+              .build();
+      ApiFuture future = modelServiceClient.pauseModelCallable().futureCall(request);
+      // Do something.
+      Model response = future.get();
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_pausemodel_async]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/pausemodel/SyncPauseModel.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/pausemodel/SyncPauseModel.java
new file mode 100644
index 00000000..eb8a6cc3
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/pausemodel/SyncPauseModel.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_pausemodel_sync]
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelName;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.cloud.retail.v2beta.PauseModelRequest;
+
+public class SyncPauseModel {
+
+  public static void main(String[] args) throws Exception {
+    syncPauseModel();
+  }
+
+  public static void syncPauseModel() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      PauseModelRequest request =
+          PauseModelRequest.newBuilder()
+              .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+              .build();
+      Model response = modelServiceClient.pauseModel(request);
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_pausemodel_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/pausemodel/SyncPauseModelModelname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/pausemodel/SyncPauseModelModelname.java
new file mode 100644
index 00000000..2977b1a4
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/pausemodel/SyncPauseModelModelname.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_pausemodel_modelname_sync]
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelName;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+
+public class SyncPauseModelModelname {
+
+  public static void main(String[] args) throws Exception {
+    syncPauseModelModelname();
+  }
+
+  public static void syncPauseModelModelname() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
+      Model response = modelServiceClient.pauseModel(name);
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_pausemodel_modelname_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/pausemodel/SyncPauseModelString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/pausemodel/SyncPauseModelString.java
new file mode 100644
index 00000000..5bf75444
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/pausemodel/SyncPauseModelString.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_pausemodel_string_sync]
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelName;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+
+public class SyncPauseModelString {
+
+  public static void main(String[] args) throws Exception {
+    syncPauseModelString();
+  }
+
+  public static void syncPauseModelString() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      String name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString();
+      Model response = modelServiceClient.pauseModel(name);
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_pausemodel_string_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/resumemodel/AsyncResumeModel.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/resumemodel/AsyncResumeModel.java
new file mode 100644
index 00000000..7ff4b022
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/resumemodel/AsyncResumeModel.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_resumemodel_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.cloud.retail.v2beta.ResumeModelRequest;
+
+public class AsyncResumeModel {
+
+  public static void main(String[] args) throws Exception {
+    asyncResumeModel();
+  }
+
+  public static void asyncResumeModel() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      ResumeModelRequest request = ResumeModelRequest.newBuilder().setName("name3373707").build();
+      ApiFuture future = modelServiceClient.resumeModelCallable().futureCall(request);
+      // Do something.
+      Model response = future.get();
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_resumemodel_async]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/resumemodel/SyncResumeModel.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/resumemodel/SyncResumeModel.java
new file mode 100644
index 00000000..85dddcfd
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/resumemodel/SyncResumeModel.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_resumemodel_sync]
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.cloud.retail.v2beta.ResumeModelRequest;
+
+public class SyncResumeModel {
+
+  public static void main(String[] args) throws Exception {
+    syncResumeModel();
+  }
+
+  public static void syncResumeModel() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      ResumeModelRequest request = ResumeModelRequest.newBuilder().setName("name3373707").build();
+      Model response = modelServiceClient.resumeModel(request);
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_resumemodel_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/resumemodel/SyncResumeModelString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/resumemodel/SyncResumeModelString.java
new file mode 100644
index 00000000..f04d0711
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/resumemodel/SyncResumeModelString.java
@@ -0,0 +1,41 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_resumemodel_string_sync]
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+
+public class SyncResumeModelString {
+
+  public static void main(String[] args) throws Exception {
+    syncResumeModelString();
+  }
+
+  public static void syncResumeModelString() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      String name = "name3373707";
+      Model response = modelServiceClient.resumeModel(name);
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_resumemodel_string_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/tunemodel/AsyncTuneModel.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/tunemodel/AsyncTuneModel.java
new file mode 100644
index 00000000..0764e8f8
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/tunemodel/AsyncTuneModel.java
@@ -0,0 +1,49 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_tunemodel_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.retail.v2beta.ModelName;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.cloud.retail.v2beta.TuneModelRequest;
+import com.google.longrunning.Operation;
+
+public class AsyncTuneModel {
+
+  public static void main(String[] args) throws Exception {
+    asyncTuneModel();
+  }
+
+  public static void asyncTuneModel() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      TuneModelRequest request =
+          TuneModelRequest.newBuilder()
+              .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+              .build();
+      ApiFuture future = modelServiceClient.tuneModelCallable().futureCall(request);
+      // Do something.
+      Operation response = future.get();
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_tunemodel_async]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/tunemodel/AsyncTuneModelLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/tunemodel/AsyncTuneModelLRO.java
new file mode 100644
index 00000000..e238deb8
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/tunemodel/AsyncTuneModelLRO.java
@@ -0,0 +1,51 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_tunemodel_lro_async]
+import com.google.api.gax.longrunning.OperationFuture;
+import com.google.cloud.retail.v2beta.ModelName;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.cloud.retail.v2beta.TuneModelMetadata;
+import com.google.cloud.retail.v2beta.TuneModelRequest;
+import com.google.cloud.retail.v2beta.TuneModelResponse;
+
+public class AsyncTuneModelLRO {
+
+  public static void main(String[] args) throws Exception {
+    asyncTuneModelLRO();
+  }
+
+  public static void asyncTuneModelLRO() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      TuneModelRequest request =
+          TuneModelRequest.newBuilder()
+              .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+              .build();
+      OperationFuture future =
+          modelServiceClient.tuneModelOperationCallable().futureCall(request);
+      // Do something.
+      TuneModelResponse response = future.get();
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_tunemodel_lro_async]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/tunemodel/SyncTuneModel.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/tunemodel/SyncTuneModel.java
new file mode 100644
index 00000000..4019403b
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/tunemodel/SyncTuneModel.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_tunemodel_sync]
+import com.google.cloud.retail.v2beta.ModelName;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.cloud.retail.v2beta.TuneModelRequest;
+import com.google.cloud.retail.v2beta.TuneModelResponse;
+
+public class SyncTuneModel {
+
+  public static void main(String[] args) throws Exception {
+    syncTuneModel();
+  }
+
+  public static void syncTuneModel() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      TuneModelRequest request =
+          TuneModelRequest.newBuilder()
+              .setName(ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString())
+              .build();
+      TuneModelResponse response = modelServiceClient.tuneModelAsync(request).get();
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_tunemodel_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/tunemodel/SyncTuneModelModelname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/tunemodel/SyncTuneModelModelname.java
new file mode 100644
index 00000000..ee58518d
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/tunemodel/SyncTuneModelModelname.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_tunemodel_modelname_sync]
+import com.google.cloud.retail.v2beta.ModelName;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.cloud.retail.v2beta.TuneModelResponse;
+
+public class SyncTuneModelModelname {
+
+  public static void main(String[] args) throws Exception {
+    syncTuneModelModelname();
+  }
+
+  public static void syncTuneModelModelname() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      ModelName name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]");
+      TuneModelResponse response = modelServiceClient.tuneModelAsync(name).get();
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_tunemodel_modelname_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/tunemodel/SyncTuneModelString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/tunemodel/SyncTuneModelString.java
new file mode 100644
index 00000000..80ae92cf
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/tunemodel/SyncTuneModelString.java
@@ -0,0 +1,42 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_tunemodel_string_sync]
+import com.google.cloud.retail.v2beta.ModelName;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.cloud.retail.v2beta.TuneModelResponse;
+
+public class SyncTuneModelString {
+
+  public static void main(String[] args) throws Exception {
+    syncTuneModelString();
+  }
+
+  public static void syncTuneModelString() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      String name = ModelName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[MODEL]").toString();
+      TuneModelResponse response = modelServiceClient.tuneModelAsync(name).get();
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_tunemodel_string_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/updatemodel/AsyncUpdateModel.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/updatemodel/AsyncUpdateModel.java
new file mode 100644
index 00000000..b6598554
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/updatemodel/AsyncUpdateModel.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_updatemodel_async]
+import com.google.api.core.ApiFuture;
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.cloud.retail.v2beta.UpdateModelRequest;
+import com.google.protobuf.FieldMask;
+
+public class AsyncUpdateModel {
+
+  public static void main(String[] args) throws Exception {
+    asyncUpdateModel();
+  }
+
+  public static void asyncUpdateModel() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      UpdateModelRequest request =
+          UpdateModelRequest.newBuilder()
+              .setModel(Model.newBuilder().build())
+              .setUpdateMask(FieldMask.newBuilder().build())
+              .build();
+      ApiFuture future = modelServiceClient.updateModelCallable().futureCall(request);
+      // Do something.
+      Model response = future.get();
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_updatemodel_async]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/updatemodel/SyncUpdateModel.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/updatemodel/SyncUpdateModel.java
new file mode 100644
index 00000000..895a4fe7
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/updatemodel/SyncUpdateModel.java
@@ -0,0 +1,47 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_updatemodel_sync]
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.cloud.retail.v2beta.UpdateModelRequest;
+import com.google.protobuf.FieldMask;
+
+public class SyncUpdateModel {
+
+  public static void main(String[] args) throws Exception {
+    syncUpdateModel();
+  }
+
+  public static void syncUpdateModel() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      UpdateModelRequest request =
+          UpdateModelRequest.newBuilder()
+              .setModel(Model.newBuilder().build())
+              .setUpdateMask(FieldMask.newBuilder().build())
+              .build();
+      Model response = modelServiceClient.updateModel(request);
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_updatemodel_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/updatemodel/SyncUpdateModelModelFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/updatemodel/SyncUpdateModelModelFieldmask.java
new file mode 100644
index 00000000..94163f00
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelserviceclient/updatemodel/SyncUpdateModelModelFieldmask.java
@@ -0,0 +1,43 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelserviceclient_updatemodel_modelfieldmask_sync]
+import com.google.cloud.retail.v2beta.Model;
+import com.google.cloud.retail.v2beta.ModelServiceClient;
+import com.google.protobuf.FieldMask;
+
+public class SyncUpdateModelModelFieldmask {
+
+  public static void main(String[] args) throws Exception {
+    syncUpdateModelModelFieldmask();
+  }
+
+  public static void syncUpdateModelModelFieldmask() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    try (ModelServiceClient modelServiceClient = ModelServiceClient.create()) {
+      Model model = Model.newBuilder().build();
+      FieldMask updateMask = FieldMask.newBuilder().build();
+      Model response = modelServiceClient.updateModel(model, updateMask);
+    }
+  }
+}
+// [END retail_v2beta_generated_modelserviceclient_updatemodel_modelfieldmask_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/modelservicesettings/pausemodel/SyncPauseModel.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelservicesettings/pausemodel/SyncPauseModel.java
new file mode 100644
index 00000000..9168f414
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/modelservicesettings/pausemodel/SyncPauseModel.java
@@ -0,0 +1,45 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.samples;
+
+// [START retail_v2beta_generated_modelservicesettings_pausemodel_sync]
+import com.google.cloud.retail.v2beta.ModelServiceSettings;
+import java.time.Duration;
+
+public class SyncPauseModel {
+
+  public static void main(String[] args) throws Exception {
+    syncPauseModel();
+  }
+
+  public static void syncPauseModel() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    ModelServiceSettings.Builder modelServiceSettingsBuilder = ModelServiceSettings.newBuilder();
+    modelServiceSettingsBuilder
+        .pauseModelSettings()
+        .setRetrySettings(
+            modelServiceSettingsBuilder.pauseModelSettings().getRetrySettings().toBuilder()
+                .setTotalTimeout(Duration.ofSeconds(30))
+                .build());
+    ModelServiceSettings modelServiceSettings = modelServiceSettingsBuilder.build();
+  }
+}
+// [END retail_v2beta_generated_modelservicesettings_pausemodel_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/create/SyncCreateSetCredentialsProvider.java
index 3dd974c1..8ea909e6 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require 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))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/create/SyncCreateSetCredentialsProvider1.java
index 35739124..301b3c93 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require 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()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/create/SyncCreateSetEndpoint.java
index 551d1f23..8943388c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require 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 =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/predict/AsyncPredict.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/predict/AsyncPredict.java
index a9c14f7d..e297f361 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/predict/AsyncPredict.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/predict/AsyncPredict.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncPredict() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying 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()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/predict/SyncPredict.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/predict/SyncPredict.java
index d30a345b..92ecaaa5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/predict/SyncPredict.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionserviceclient/predict/SyncPredict.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncPredict() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying 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()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionservicesettings/predict/SyncPredict.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionservicesettings/predict/SyncPredict.java
index 4bcc2150..de5db88a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionservicesettings/predict/SyncPredict.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/predictionservicesettings/predict/SyncPredict.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncPredict() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require 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()
+            predictionServiceSettingsBuilder.predictSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     PredictionServiceSettings predictionServiceSettings = predictionServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlaces.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlaces.java
index 341a6231..e587912a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlaces.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlaces.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncAddFulfillmentPlaces() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       AddFulfillmentPlacesRequest request =
           AddFulfillmentPlacesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlacesLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlacesLRO.java
index 29ebf11a..aea941b4 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlacesLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/AsyncAddFulfillmentPlacesLRO.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncAddFulfillmentPlacesLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       AddFulfillmentPlacesRequest request =
           AddFulfillmentPlacesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlaces.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlaces.java
index 7d87a8e5..3b892ca4 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlaces.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlaces.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddFulfillmentPlaces() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       AddFulfillmentPlacesRequest request =
           AddFulfillmentPlacesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesProductname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesProductname.java
index 6d2cfb0b..b38d324d 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesProductname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesProductname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddFulfillmentPlacesProductname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ProductName product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesString.java
index fcf77016..e1b0b1f6 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addfulfillmentplaces/SyncAddFulfillmentPlacesString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddFulfillmentPlacesString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/AsyncAddLocalInventories.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/AsyncAddLocalInventories.java
index 6ad09148..5d1fb225 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/AsyncAddLocalInventories.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/AsyncAddLocalInventories.java
@@ -34,8 +34,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncAddLocalInventories() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       AddLocalInventoriesRequest request =
           AddLocalInventoriesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/AsyncAddLocalInventoriesLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/AsyncAddLocalInventoriesLRO.java
index bd587cb6..92ce15b4 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/AsyncAddLocalInventoriesLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/AsyncAddLocalInventoriesLRO.java
@@ -35,8 +35,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncAddLocalInventoriesLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       AddLocalInventoriesRequest request =
           AddLocalInventoriesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/SyncAddLocalInventories.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/SyncAddLocalInventories.java
index e6df6c49..02029caa 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/SyncAddLocalInventories.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/SyncAddLocalInventories.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddLocalInventories() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       AddLocalInventoriesRequest request =
           AddLocalInventoriesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/SyncAddLocalInventoriesProductname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/SyncAddLocalInventoriesProductname.java
index 77edad20..9ffb70fb 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/SyncAddLocalInventoriesProductname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/SyncAddLocalInventoriesProductname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddLocalInventoriesProductname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ProductName product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/SyncAddLocalInventoriesString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/SyncAddLocalInventoriesString.java
index 4cf735a5..6e2861d0 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/SyncAddLocalInventoriesString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/addlocalinventories/SyncAddLocalInventoriesString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddLocalInventoriesString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/create/SyncCreateSetCredentialsProvider.java
index 9986ddc2..c81926b7 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ProductServiceSettings productServiceSettings =
         ProductServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/create/SyncCreateSetCredentialsProvider1.java
index 47cc8acd..281f9018 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ProductServiceSettings productServiceSettings =
         ProductServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/create/SyncCreateSetEndpoint.java
index a091791f..bc24a621 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ProductServiceSettings productServiceSettings =
         ProductServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     ProductServiceClient productServiceClient = ProductServiceClient.create(productServiceSettings);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/createproduct/AsyncCreateProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/createproduct/AsyncCreateProduct.java
index 6316aba5..b64f4d3a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/createproduct/AsyncCreateProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/createproduct/AsyncCreateProduct.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncCreateProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       CreateProductRequest request =
           CreateProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/createproduct/SyncCreateProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/createproduct/SyncCreateProduct.java
index 0d6b1b40..4a2a7260 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/createproduct/SyncCreateProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/createproduct/SyncCreateProduct.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       CreateProductRequest request =
           CreateProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/createproduct/SyncCreateProductBranchnameProductString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/createproduct/SyncCreateProductBranchnameProductString.java
index 53908457..92ce5bd5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/createproduct/SyncCreateProductBranchnameProductString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/createproduct/SyncCreateProductBranchnameProductString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateProductBranchnameProductString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       BranchName parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
       Product product = Product.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/createproduct/SyncCreateProductStringProductString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/createproduct/SyncCreateProductStringProductString.java
index abc7c587..5f2cb04c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/createproduct/SyncCreateProductStringProductString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/createproduct/SyncCreateProductStringProductString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateProductStringProductString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString();
       Product product = Product.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/deleteproduct/AsyncDeleteProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/deleteproduct/AsyncDeleteProduct.java
index 5a079e79..d9f20412 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/deleteproduct/AsyncDeleteProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/deleteproduct/AsyncDeleteProduct.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncDeleteProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       DeleteProductRequest request =
           DeleteProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/deleteproduct/SyncDeleteProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/deleteproduct/SyncDeleteProduct.java
index d4c19bd5..03873588 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/deleteproduct/SyncDeleteProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/deleteproduct/SyncDeleteProduct.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       DeleteProductRequest request =
           DeleteProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/deleteproduct/SyncDeleteProductProductname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/deleteproduct/SyncDeleteProductProductname.java
index 18e28c28..3fc08472 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/deleteproduct/SyncDeleteProductProductname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/deleteproduct/SyncDeleteProductProductname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteProductProductname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ProductName name =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/deleteproduct/SyncDeleteProductString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/deleteproduct/SyncDeleteProductString.java
index 6fcef450..058b9fa5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/deleteproduct/SyncDeleteProductString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/deleteproduct/SyncDeleteProductString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteProductString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String name =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/getproduct/AsyncGetProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/getproduct/AsyncGetProduct.java
index ced473d9..063f48ee 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/getproduct/AsyncGetProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/getproduct/AsyncGetProduct.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       GetProductRequest request =
           GetProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/getproduct/SyncGetProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/getproduct/SyncGetProduct.java
index c777816f..c4472229 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/getproduct/SyncGetProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/getproduct/SyncGetProduct.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       GetProductRequest request =
           GetProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/getproduct/SyncGetProductProductname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/getproduct/SyncGetProductProductname.java
index f6e6d7af..7caf632e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/getproduct/SyncGetProductProductname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/getproduct/SyncGetProductProductname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetProductProductname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ProductName name =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/getproduct/SyncGetProductString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/getproduct/SyncGetProductString.java
index 8bc84b63..c953f952 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/getproduct/SyncGetProductString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/getproduct/SyncGetProductString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetProductString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String name =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/importproducts/AsyncImportProducts.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/importproducts/AsyncImportProducts.java
index c1705d52..159e2855 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/importproducts/AsyncImportProducts.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/importproducts/AsyncImportProducts.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncImportProducts() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ImportProductsRequest request =
           ImportProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/importproducts/AsyncImportProductsLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/importproducts/AsyncImportProductsLRO.java
index a9181657..ffd641ad 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/importproducts/AsyncImportProductsLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/importproducts/AsyncImportProductsLRO.java
@@ -34,8 +34,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncImportProductsLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ImportProductsRequest request =
           ImportProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/importproducts/SyncImportProducts.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/importproducts/SyncImportProducts.java
index 2303e880..828f6dad 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/importproducts/SyncImportProducts.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/importproducts/SyncImportProducts.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncImportProducts() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ImportProductsRequest request =
           ImportProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/AsyncListProducts.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/AsyncListProducts.java
index 584111ee..0beb8fb6 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/AsyncListProducts.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/AsyncListProducts.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListProducts() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ListProductsRequest request =
           ListProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/AsyncListProductsPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/AsyncListProductsPaged.java
index a41c9ed9..e00d2773 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/AsyncListProductsPaged.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/AsyncListProductsPaged.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListProductsPaged() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ListProductsRequest request =
           ListProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/SyncListProducts.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/SyncListProducts.java
index 0eb6d991..1c2b15de 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/SyncListProducts.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/SyncListProducts.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListProducts() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ListProductsRequest request =
           ListProductsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/SyncListProductsBranchname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/SyncListProductsBranchname.java
index 4acc1028..8238b1c6 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/SyncListProductsBranchname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/SyncListProductsBranchname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListProductsBranchname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       BranchName parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]");
       for (Product element : productServiceClient.listProducts(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/SyncListProductsString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/SyncListProductsString.java
index 64e4770b..7357600d 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/SyncListProductsString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/listproducts/SyncListProductsString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListProductsString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String parent = BranchName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]").toString();
       for (Product element : productServiceClient.listProducts(parent).iterateAll()) {
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlaces.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlaces.java
index acdcc3f0..69a3fcaa 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlaces.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlaces.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRemoveFulfillmentPlaces() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       RemoveFulfillmentPlacesRequest request =
           RemoveFulfillmentPlacesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlacesLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlacesLRO.java
index b602d1a6..bb80fd5a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlacesLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/AsyncRemoveFulfillmentPlacesLRO.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRemoveFulfillmentPlacesLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       RemoveFulfillmentPlacesRequest request =
           RemoveFulfillmentPlacesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlaces.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlaces.java
index c397f9e3..0ef5f9be 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlaces.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlaces.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveFulfillmentPlaces() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       RemoveFulfillmentPlacesRequest request =
           RemoveFulfillmentPlacesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesProductname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesProductname.java
index 7fe6359d..7b201640 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesProductname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesProductname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveFulfillmentPlacesProductname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ProductName product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesString.java
index 9e986171..8287fc60 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removefulfillmentplaces/SyncRemoveFulfillmentPlacesString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveFulfillmentPlacesString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/AsyncRemoveLocalInventories.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/AsyncRemoveLocalInventories.java
index 85326af9..efae96d9 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/AsyncRemoveLocalInventories.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/AsyncRemoveLocalInventories.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRemoveLocalInventories() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       RemoveLocalInventoriesRequest request =
           RemoveLocalInventoriesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/AsyncRemoveLocalInventoriesLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/AsyncRemoveLocalInventoriesLRO.java
index 96959e7b..c5471e54 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/AsyncRemoveLocalInventoriesLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/AsyncRemoveLocalInventoriesLRO.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRemoveLocalInventoriesLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       RemoveLocalInventoriesRequest request =
           RemoveLocalInventoriesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/SyncRemoveLocalInventories.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/SyncRemoveLocalInventories.java
index 600bfe2c..ba5ff5f5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/SyncRemoveLocalInventories.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/SyncRemoveLocalInventories.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveLocalInventories() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       RemoveLocalInventoriesRequest request =
           RemoveLocalInventoriesRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesProductname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesProductname.java
index 0de3e632..586e5dd9 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesProductname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesProductname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveLocalInventoriesProductname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       ProductName product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesString.java
index 991c42f6..6fb8d836 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/removelocalinventories/SyncRemoveLocalInventoriesString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveLocalInventoriesString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       String product =
           ProductName.of("[PROJECT]", "[LOCATION]", "[CATALOG]", "[BRANCH]", "[PRODUCT]")
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/setinventory/AsyncSetInventory.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/setinventory/AsyncSetInventory.java
index ee08a61b..27bc1a0b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/setinventory/AsyncSetInventory.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/setinventory/AsyncSetInventory.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncSetInventory() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       SetInventoryRequest request =
           SetInventoryRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/setinventory/AsyncSetInventoryLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/setinventory/AsyncSetInventoryLRO.java
index a4a7210c..8291d38e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/setinventory/AsyncSetInventoryLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/setinventory/AsyncSetInventoryLRO.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncSetInventoryLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       SetInventoryRequest request =
           SetInventoryRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/setinventory/SyncSetInventory.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/setinventory/SyncSetInventory.java
index 930717b5..44ec3c6f 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/setinventory/SyncSetInventory.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/setinventory/SyncSetInventory.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSetInventory() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       SetInventoryRequest request =
           SetInventoryRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/setinventory/SyncSetInventoryProductFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/setinventory/SyncSetInventoryProductFieldmask.java
index 2d6a3493..caf11aff 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/setinventory/SyncSetInventoryProductFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/setinventory/SyncSetInventoryProductFieldmask.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSetInventoryProductFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       Product inventory = Product.newBuilder().build();
       FieldMask setMask = FieldMask.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/updateproduct/AsyncUpdateProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/updateproduct/AsyncUpdateProduct.java
index 4ca112ed..da0403df 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/updateproduct/AsyncUpdateProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/updateproduct/AsyncUpdateProduct.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       UpdateProductRequest request =
           UpdateProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/updateproduct/SyncUpdateProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/updateproduct/SyncUpdateProduct.java
index d4ee6292..82f5256a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/updateproduct/SyncUpdateProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/updateproduct/SyncUpdateProduct.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       UpdateProductRequest request =
           UpdateProductRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/updateproduct/SyncUpdateProductProductFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/updateproduct/SyncUpdateProductProductFieldmask.java
index ea64bfa3..42b540f3 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/updateproduct/SyncUpdateProductProductFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productserviceclient/updateproduct/SyncUpdateProductProductFieldmask.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateProductProductFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ProductServiceClient productServiceClient = ProductServiceClient.create()) {
       Product product = Product.newBuilder().build();
       FieldMask updateMask = FieldMask.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/productservicesettings/createproduct/SyncCreateProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/productservicesettings/createproduct/SyncCreateProduct.java
index 76eb39a0..e82053e3 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/productservicesettings/createproduct/SyncCreateProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/productservicesettings/createproduct/SyncCreateProduct.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ProductServiceSettings.Builder productServiceSettingsBuilder =
         ProductServiceSettings.newBuilder();
     productServiceSettingsBuilder
         .createProductSettings()
         .setRetrySettings(
-            productServiceSettingsBuilder
-                .createProductSettings()
-                .getRetrySettings()
-                .toBuilder()
+            productServiceSettingsBuilder.createProductSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     ProductServiceSettings productServiceSettings = productServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/create/SyncCreateSetCredentialsProvider.java
index d2d0cd06..355fc4ed 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SearchServiceSettings searchServiceSettings =
         SearchServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/create/SyncCreateSetCredentialsProvider1.java
index 3dceef44..299a621a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SearchServiceSettings searchServiceSettings =
         SearchServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/create/SyncCreateSetEndpoint.java
index ec26b519..9f9ad504 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SearchServiceSettings searchServiceSettings =
         SearchServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     SearchServiceClient searchServiceClient = SearchServiceClient.create(searchServiceSettings);
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/AsyncSearch.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/AsyncSearch.java
index ba06b401..fa228c3b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/AsyncSearch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/AsyncSearch.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncSearch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
       SearchRequest request =
           SearchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/AsyncSearchPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/AsyncSearchPaged.java
index 9d8652c4..790da378 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/AsyncSearchPaged.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/AsyncSearchPaged.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncSearchPaged() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
       SearchRequest request =
           SearchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/SyncSearch.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/SyncSearch.java
index f7ad37da..b7d7c7e1 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/SyncSearch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchserviceclient/search/SyncSearch.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSearch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (SearchServiceClient searchServiceClient = SearchServiceClient.create()) {
       SearchRequest request =
           SearchRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchservicesettings/search/SyncSearch.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchservicesettings/search/SyncSearch.java
index 53b373a6..d5302d49 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/searchservicesettings/search/SyncSearch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/searchservicesettings/search/SyncSearch.java
@@ -27,16 +27,16 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSearch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SearchServiceSettings.Builder searchServiceSettingsBuilder = SearchServiceSettings.newBuilder();
     searchServiceSettingsBuilder
         .searchSettings()
         .setRetrySettings(
-            searchServiceSettingsBuilder
-                .searchSettings()
-                .getRetrySettings()
-                .toBuilder()
+            searchServiceSettingsBuilder.searchSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     SearchServiceSettings searchServiceSettings = searchServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/addcontrol/AsyncAddControl.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/addcontrol/AsyncAddControl.java
index 65c97669..ad8fedf4 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/addcontrol/AsyncAddControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/addcontrol/AsyncAddControl.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncAddControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       AddControlRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/addcontrol/SyncAddControl.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/addcontrol/SyncAddControl.java
index fa39829f..2cb3d028 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/addcontrol/SyncAddControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/addcontrol/SyncAddControl.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       AddControlRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/addcontrol/SyncAddControlServingconfigname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/addcontrol/SyncAddControlServingconfigname.java
index 05e947e1..639a7309 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/addcontrol/SyncAddControlServingconfigname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/addcontrol/SyncAddControlServingconfigname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddControlServingconfigname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ServingConfigName servingConfig =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/addcontrol/SyncAddControlString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/addcontrol/SyncAddControlString.java
index 9b3f6373..0c425425 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/addcontrol/SyncAddControlString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/addcontrol/SyncAddControlString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncAddControlString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       String servingConfig =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider.java
index a725d416..39ea6e12 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ServingConfigServiceSettings servingConfigServiceSettings =
         ServingConfigServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider1.java
index 6bb86f6d..b01d0ec0 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ServingConfigServiceSettings servingConfigServiceSettings =
         ServingConfigServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/create/SyncCreateSetEndpoint.java
index 1935777a..cbdddcf5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ServingConfigServiceSettings servingConfigServiceSettings =
         ServingConfigServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     ServingConfigServiceClient servingConfigServiceClient =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/createservingconfig/AsyncCreateServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/createservingconfig/AsyncCreateServingConfig.java
index 9d26ccaf..33350d3a 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/createservingconfig/AsyncCreateServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/createservingconfig/AsyncCreateServingConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncCreateServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       CreateServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/createservingconfig/SyncCreateServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/createservingconfig/SyncCreateServingConfig.java
index 409103d8..12c78760 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/createservingconfig/SyncCreateServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/createservingconfig/SyncCreateServingConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       CreateServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigCatalognameServingconfigString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigCatalognameServingconfigString.java
index 7f4e7a1c..c12eba8b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigCatalognameServingconfigString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigCatalognameServingconfigString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateServingConfigCatalognameServingconfigString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigStringServingconfigString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigStringServingconfigString.java
index 17432dab..3c4e8a42 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigStringServingconfigString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/createservingconfig/SyncCreateServingConfigStringServingconfigString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateServingConfigStringServingconfigString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/deleteservingconfig/AsyncDeleteServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/deleteservingconfig/AsyncDeleteServingConfig.java
index b1a8431d..b4f79f73 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/deleteservingconfig/AsyncDeleteServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/deleteservingconfig/AsyncDeleteServingConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncDeleteServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       DeleteServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfig.java
index 0151b52c..4335e76f 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       DeleteServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigServingconfigname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigServingconfigname.java
index 4a869a90..4772e4c7 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigServingconfigname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigServingconfigname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteServingConfigServingconfigname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ServingConfigName name =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigString.java
index 9436e146..93d6dc86 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/deleteservingconfig/SyncDeleteServingConfigString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncDeleteServingConfigString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       String name =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/getservingconfig/AsyncGetServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/getservingconfig/AsyncGetServingConfig.java
index d7f4718b..e448efd7 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/getservingconfig/AsyncGetServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/getservingconfig/AsyncGetServingConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncGetServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       GetServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/getservingconfig/SyncGetServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/getservingconfig/SyncGetServingConfig.java
index 1c7dee2c..2f47a893 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/getservingconfig/SyncGetServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/getservingconfig/SyncGetServingConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       GetServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/getservingconfig/SyncGetServingConfigServingconfigname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/getservingconfig/SyncGetServingConfigServingconfigname.java
index 063db107..75512688 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/getservingconfig/SyncGetServingConfigServingconfigname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/getservingconfig/SyncGetServingConfigServingconfigname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetServingConfigServingconfigname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ServingConfigName name =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/getservingconfig/SyncGetServingConfigString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/getservingconfig/SyncGetServingConfigString.java
index 68393336..66b69194 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/getservingconfig/SyncGetServingConfigString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/getservingconfig/SyncGetServingConfigString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncGetServingConfigString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       String name =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigs.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigs.java
index 9eda4ea4..d8da37e2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigs.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigs.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListServingConfigs() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ListServingConfigsRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigsPaged.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigsPaged.java
index 6d71bde6..455d2cc5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigsPaged.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/AsyncListServingConfigsPaged.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncListServingConfigsPaged() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ListServingConfigsRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/SyncListServingConfigs.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/SyncListServingConfigs.java
index 6ceca20a..22531d40 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/SyncListServingConfigs.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/SyncListServingConfigs.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListServingConfigs() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ListServingConfigsRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsCatalogname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsCatalogname.java
index 7f3ffaac..1940af6f 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsCatalogname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsCatalogname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListServingConfigsCatalogname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       CatalogName parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]");
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsString.java
index 761d0164..aed30220 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/listservingconfigs/SyncListServingConfigsString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncListServingConfigsString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       String parent = CatalogName.of("[PROJECT]", "[LOCATION]", "[CATALOG]").toString();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/removecontrol/AsyncRemoveControl.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/removecontrol/AsyncRemoveControl.java
index c919c671..48a360ca 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/removecontrol/AsyncRemoveControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/removecontrol/AsyncRemoveControl.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRemoveControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       RemoveControlRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/removecontrol/SyncRemoveControl.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/removecontrol/SyncRemoveControl.java
index 590eb215..79be5f1e 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/removecontrol/SyncRemoveControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/removecontrol/SyncRemoveControl.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       RemoveControlRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/removecontrol/SyncRemoveControlServingconfigname.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/removecontrol/SyncRemoveControlServingconfigname.java
index 03424a2f..e283b8ab 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/removecontrol/SyncRemoveControlServingconfigname.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/removecontrol/SyncRemoveControlServingconfigname.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveControlServingconfigname() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ServingConfigName servingConfig =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/removecontrol/SyncRemoveControlString.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/removecontrol/SyncRemoveControlString.java
index 44367cc2..036f5bc7 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/removecontrol/SyncRemoveControlString.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/removecontrol/SyncRemoveControlString.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRemoveControlString() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       String servingConfig =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/updateservingconfig/AsyncUpdateServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/updateservingconfig/AsyncUpdateServingConfig.java
index 216df01b..0e443922 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/updateservingconfig/AsyncUpdateServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/updateservingconfig/AsyncUpdateServingConfig.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncUpdateServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       UpdateServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfig.java
index b7f65306..ea196461 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfig.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       UpdateServingConfigRequest request =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfigServingconfigFieldmask.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfigServingconfigFieldmask.java
index f0f24d82..e12db62c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfigServingconfigFieldmask.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigserviceclient/updateservingconfig/SyncUpdateServingConfigServingconfigFieldmask.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateServingConfigServingconfigFieldmask() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (ServingConfigServiceClient servingConfigServiceClient =
         ServingConfigServiceClient.create()) {
       ServingConfig servingConfig = ServingConfig.newBuilder().build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigservicesettings/createservingconfig/SyncCreateServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigservicesettings/createservingconfig/SyncCreateServingConfig.java
index 05930f6a..c79ec0b7 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigservicesettings/createservingconfig/SyncCreateServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/servingconfigservicesettings/createservingconfig/SyncCreateServingConfig.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ServingConfigServiceSettings.Builder servingConfigServiceSettingsBuilder =
         ServingConfigServiceSettings.newBuilder();
     servingConfigServiceSettingsBuilder
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/catalogservicestubsettings/updatecatalog/SyncUpdateCatalog.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/catalogservicestubsettings/updatecatalog/SyncUpdateCatalog.java
index 461df87b..350116f8 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/catalogservicestubsettings/updatecatalog/SyncUpdateCatalog.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/catalogservicestubsettings/updatecatalog/SyncUpdateCatalog.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncUpdateCatalog() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CatalogServiceStubSettings.Builder catalogServiceSettingsBuilder =
         CatalogServiceStubSettings.newBuilder();
     catalogServiceSettingsBuilder
         .updateCatalogSettings()
         .setRetrySettings(
-            catalogServiceSettingsBuilder
-                .updateCatalogSettings()
-                .getRetrySettings()
-                .toBuilder()
+            catalogServiceSettingsBuilder.updateCatalogSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     CatalogServiceStubSettings catalogServiceSettings = catalogServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/completionservicestubsettings/completequery/SyncCompleteQuery.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/completionservicestubsettings/completequery/SyncCompleteQuery.java
index 6916d8a2..cd6663a6 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/completionservicestubsettings/completequery/SyncCompleteQuery.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/completionservicestubsettings/completequery/SyncCompleteQuery.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCompleteQuery() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     CompletionServiceStubSettings.Builder completionServiceSettingsBuilder =
         CompletionServiceStubSettings.newBuilder();
     completionServiceSettingsBuilder
         .completeQuerySettings()
         .setRetrySettings(
-            completionServiceSettingsBuilder
-                .completeQuerySettings()
-                .getRetrySettings()
-                .toBuilder()
+            completionServiceSettingsBuilder.completeQuerySettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     CompletionServiceStubSettings completionServiceSettings =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/controlservicestubsettings/createcontrol/SyncCreateControl.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/controlservicestubsettings/createcontrol/SyncCreateControl.java
index d43bb3e1..89c6631d 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/controlservicestubsettings/createcontrol/SyncCreateControl.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/controlservicestubsettings/createcontrol/SyncCreateControl.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateControl() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ControlServiceStubSettings.Builder controlServiceSettingsBuilder =
         ControlServiceStubSettings.newBuilder();
     controlServiceSettingsBuilder
         .createControlSettings()
         .setRetrySettings(
-            controlServiceSettingsBuilder
-                .createControlSettings()
-                .getRetrySettings()
-                .toBuilder()
+            controlServiceSettingsBuilder.createControlSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     ControlServiceStubSettings controlServiceSettings = controlServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/modelservicestubsettings/pausemodel/SyncPauseModel.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/modelservicestubsettings/pausemodel/SyncPauseModel.java
new file mode 100644
index 00000000..3e29bf8e
--- /dev/null
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/modelservicestubsettings/pausemodel/SyncPauseModel.java
@@ -0,0 +1,46 @@
+/*
+ * Copyright 2022 Google LLC
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *      https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package com.google.cloud.retail.v2beta.stub.samples;
+
+// [START retail_v2beta_generated_modelservicestubsettings_pausemodel_sync]
+import com.google.cloud.retail.v2beta.stub.ModelServiceStubSettings;
+import java.time.Duration;
+
+public class SyncPauseModel {
+
+  public static void main(String[] args) throws Exception {
+    syncPauseModel();
+  }
+
+  public static void syncPauseModel() throws Exception {
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
+    ModelServiceStubSettings.Builder modelServiceSettingsBuilder =
+        ModelServiceStubSettings.newBuilder();
+    modelServiceSettingsBuilder
+        .pauseModelSettings()
+        .setRetrySettings(
+            modelServiceSettingsBuilder.pauseModelSettings().getRetrySettings().toBuilder()
+                .setTotalTimeout(Duration.ofSeconds(30))
+                .build());
+    ModelServiceStubSettings modelServiceSettings = modelServiceSettingsBuilder.build();
+  }
+}
+// [END retail_v2beta_generated_modelservicestubsettings_pausemodel_sync]
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/predictionservicestubsettings/predict/SyncPredict.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/predictionservicestubsettings/predict/SyncPredict.java
index b60cbc9a..d4c5f090 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/predictionservicestubsettings/predict/SyncPredict.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/predictionservicestubsettings/predict/SyncPredict.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncPredict() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require 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()
+            predictionServiceSettingsBuilder.predictSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     PredictionServiceStubSettings predictionServiceSettings =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/productservicestubsettings/createproduct/SyncCreateProduct.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/productservicestubsettings/createproduct/SyncCreateProduct.java
index 0db7c0f8..8f43afa9 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/productservicestubsettings/createproduct/SyncCreateProduct.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/productservicestubsettings/createproduct/SyncCreateProduct.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateProduct() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ProductServiceStubSettings.Builder productServiceSettingsBuilder =
         ProductServiceStubSettings.newBuilder();
     productServiceSettingsBuilder
         .createProductSettings()
         .setRetrySettings(
-            productServiceSettingsBuilder
-                .createProductSettings()
-                .getRetrySettings()
-                .toBuilder()
+            productServiceSettingsBuilder.createProductSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     ProductServiceStubSettings productServiceSettings = productServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/searchservicestubsettings/search/SyncSearch.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/searchservicestubsettings/search/SyncSearch.java
index 4ed39109..c1d6fd48 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/searchservicestubsettings/search/SyncSearch.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/searchservicestubsettings/search/SyncSearch.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncSearch() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     SearchServiceStubSettings.Builder searchServiceSettingsBuilder =
         SearchServiceStubSettings.newBuilder();
     searchServiceSettingsBuilder
         .searchSettings()
         .setRetrySettings(
-            searchServiceSettingsBuilder
-                .searchSettings()
-                .getRetrySettings()
-                .toBuilder()
+            searchServiceSettingsBuilder.searchSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     SearchServiceStubSettings searchServiceSettings = searchServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/servingconfigservicestubsettings/createservingconfig/SyncCreateServingConfig.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/servingconfigservicestubsettings/createservingconfig/SyncCreateServingConfig.java
index 3caaf3b0..eef5d2b0 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/servingconfigservicestubsettings/createservingconfig/SyncCreateServingConfig.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/servingconfigservicestubsettings/createservingconfig/SyncCreateServingConfig.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateServingConfig() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     ServingConfigServiceStubSettings.Builder servingConfigServiceSettingsBuilder =
         ServingConfigServiceStubSettings.newBuilder();
     servingConfigServiceSettingsBuilder
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/usereventservicestubsettings/writeuserevent/SyncWriteUserEvent.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/usereventservicestubsettings/writeuserevent/SyncWriteUserEvent.java
index 92180686..69b5a5fd 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/usereventservicestubsettings/writeuserevent/SyncWriteUserEvent.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/stub/usereventservicestubsettings/writeuserevent/SyncWriteUserEvent.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncWriteUserEvent() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     UserEventServiceStubSettings.Builder userEventServiceSettingsBuilder =
         UserEventServiceStubSettings.newBuilder();
     userEventServiceSettingsBuilder
         .writeUserEventSettings()
         .setRetrySettings(
-            userEventServiceSettingsBuilder
-                .writeUserEventSettings()
-                .getRetrySettings()
-                .toBuilder()
+            userEventServiceSettingsBuilder.writeUserEventSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     UserEventServiceStubSettings userEventServiceSettings = userEventServiceSettingsBuilder.build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/collectuserevent/AsyncCollectUserEvent.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/collectuserevent/AsyncCollectUserEvent.java
index 0992bf52..6ee25ac0 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/collectuserevent/AsyncCollectUserEvent.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/collectuserevent/AsyncCollectUserEvent.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncCollectUserEvent() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       CollectUserEventRequest request =
           CollectUserEventRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/collectuserevent/SyncCollectUserEvent.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/collectuserevent/SyncCollectUserEvent.java
index 893ec1ee..5449272b 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/collectuserevent/SyncCollectUserEvent.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/collectuserevent/SyncCollectUserEvent.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCollectUserEvent() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       CollectUserEventRequest request =
           CollectUserEventRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/create/SyncCreateSetCredentialsProvider.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/create/SyncCreateSetCredentialsProvider.java
index 18bc722d..2a6cf9c5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/create/SyncCreateSetCredentialsProvider.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/create/SyncCreateSetCredentialsProvider.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     UserEventServiceSettings userEventServiceSettings =
         UserEventServiceSettings.newBuilder()
             .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/create/SyncCreateSetCredentialsProvider1.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/create/SyncCreateSetCredentialsProvider1.java
index 98632693..6876b60c 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/create/SyncCreateSetCredentialsProvider1.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/create/SyncCreateSetCredentialsProvider1.java
@@ -27,8 +27,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetCredentialsProvider1() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     UserEventServiceSettings userEventServiceSettings =
         UserEventServiceSettings.newBuilder()
             .setTransportChannelProvider(
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/create/SyncCreateSetEndpoint.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/create/SyncCreateSetEndpoint.java
index f362a958..d8dc05a2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/create/SyncCreateSetEndpoint.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/create/SyncCreateSetEndpoint.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncCreateSetEndpoint() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     UserEventServiceSettings userEventServiceSettings =
         UserEventServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
     UserEventServiceClient userEventServiceClient =
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/importuserevents/AsyncImportUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/importuserevents/AsyncImportUserEvents.java
index 441e4b8c..c5cb5ca2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/importuserevents/AsyncImportUserEvents.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/importuserevents/AsyncImportUserEvents.java
@@ -32,8 +32,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncImportUserEvents() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       ImportUserEventsRequest request =
           ImportUserEventsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/importuserevents/AsyncImportUserEventsLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/importuserevents/AsyncImportUserEventsLRO.java
index 8b9a8a8a..f6c0e2ba 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/importuserevents/AsyncImportUserEventsLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/importuserevents/AsyncImportUserEventsLRO.java
@@ -33,8 +33,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncImportUserEventsLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       ImportUserEventsRequest request =
           ImportUserEventsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/importuserevents/SyncImportUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/importuserevents/SyncImportUserEvents.java
index 694c4f5b..fddf57e2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/importuserevents/SyncImportUserEvents.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/importuserevents/SyncImportUserEvents.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncImportUserEvents() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       ImportUserEventsRequest request =
           ImportUserEventsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java
index 9dc6f7a3..d9a5c398 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/AsyncPurgeUserEvents.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncPurgeUserEvents() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       PurgeUserEventsRequest request =
           PurgeUserEventsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java
index 180af8ec..d53787a2 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/AsyncPurgeUserEventsLRO.java
@@ -31,8 +31,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncPurgeUserEventsLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       PurgeUserEventsRequest request =
           PurgeUserEventsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java
index 8cc81694..803c32f5 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/purgeuserevents/SyncPurgeUserEvents.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncPurgeUserEvents() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       PurgeUserEventsRequest request =
           PurgeUserEventsRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEvents.java
index 0402ab4a..4fce67a4 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEvents.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEvents.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRejoinUserEvents() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       RejoinUserEventsRequest request =
           RejoinUserEventsRequest.newBuilder().setParent("parent-995424086").build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEventsLRO.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEventsLRO.java
index fc843fc4..f3d18c16 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEventsLRO.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/rejoinuserevents/AsyncRejoinUserEventsLRO.java
@@ -30,8 +30,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncRejoinUserEventsLRO() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       RejoinUserEventsRequest request =
           RejoinUserEventsRequest.newBuilder().setParent("parent-995424086").build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/rejoinuserevents/SyncRejoinUserEvents.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/rejoinuserevents/SyncRejoinUserEvents.java
index 6787f7bc..ddfc4782 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/rejoinuserevents/SyncRejoinUserEvents.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/rejoinuserevents/SyncRejoinUserEvents.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncRejoinUserEvents() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       RejoinUserEventsRequest request =
           RejoinUserEventsRequest.newBuilder().setParent("parent-995424086").build();
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/writeuserevent/AsyncWriteUserEvent.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/writeuserevent/AsyncWriteUserEvent.java
index b4a1587a..9725e8fb 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/writeuserevent/AsyncWriteUserEvent.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/writeuserevent/AsyncWriteUserEvent.java
@@ -29,8 +29,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void asyncWriteUserEvent() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       WriteUserEventRequest request =
           WriteUserEventRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/writeuserevent/SyncWriteUserEvent.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/writeuserevent/SyncWriteUserEvent.java
index 789e7683..42adf049 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/writeuserevent/SyncWriteUserEvent.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventserviceclient/writeuserevent/SyncWriteUserEvent.java
@@ -28,8 +28,11 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncWriteUserEvent() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     try (UserEventServiceClient userEventServiceClient = UserEventServiceClient.create()) {
       WriteUserEventRequest request =
           WriteUserEventRequest.newBuilder()
diff --git a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventservicesettings/writeuserevent/SyncWriteUserEvent.java b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventservicesettings/writeuserevent/SyncWriteUserEvent.java
index a7c7a624..6228703d 100644
--- a/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventservicesettings/writeuserevent/SyncWriteUserEvent.java
+++ b/samples/snippets/generated/com/google/cloud/retail/v2beta/usereventservicesettings/writeuserevent/SyncWriteUserEvent.java
@@ -27,17 +27,17 @@ public static void main(String[] args) throws Exception {
   }
 
   public static void syncWriteUserEvent() throws Exception {
-    // This snippet has been automatically generated for illustrative purposes only.
-    // It may require modifications to work in your environment.
+    // This snippet has been automatically generated and should be regarded as a code template only.
+    // It will require modifications to work:
+    // - It may require correct/in-range values for request initialization.
+    // - It may require specifying regional endpoints when creating the service client as shown in
+    // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
     UserEventServiceSettings.Builder userEventServiceSettingsBuilder =
         UserEventServiceSettings.newBuilder();
     userEventServiceSettingsBuilder
         .writeUserEventSettings()
         .setRetrySettings(
-            userEventServiceSettingsBuilder
-                .writeUserEventSettings()
-                .getRetrySettings()
-                .toBuilder()
+            userEventServiceSettingsBuilder.writeUserEventSettings().getRetrySettings().toBuilder()
                 .setTotalTimeout(Duration.ofSeconds(30))
                 .build());
     UserEventServiceSettings userEventServiceSettings = userEventServiceSettingsBuilder.build();
diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml
index 6dad66af..bdaee613 100644
--- a/samples/snippets/pom.xml
+++ b/samples/snippets/pom.xml
@@ -28,7 +28,7 @@
     
       com.google.cloud
       google-cloud-retail
-      2.4.0
+      2.5.0
     
 
     
diff --git a/versions.txt b/versions.txt
index 11a4493f..f9ddd509 100644
--- a/versions.txt
+++ b/versions.txt
@@ -1,10 +1,10 @@
 # Format:
 # module:released-version:current-version
 
-google-cloud-retail:2.5.0:2.5.0
-grpc-google-cloud-retail-v2:2.5.0:2.5.0
-proto-google-cloud-retail-v2:2.5.0:2.5.0
-proto-google-cloud-retail-v2alpha:2.5.0:2.5.0
-proto-google-cloud-retail-v2beta:2.5.0:2.5.0
-grpc-google-cloud-retail-v2alpha:2.5.0:2.5.0
-grpc-google-cloud-retail-v2beta:2.5.0:2.5.0
+google-cloud-retail:2.5.1:2.5.1
+grpc-google-cloud-retail-v2:2.5.1:2.5.1
+proto-google-cloud-retail-v2:2.5.1:2.5.1
+proto-google-cloud-retail-v2alpha:2.5.1:2.5.1
+proto-google-cloud-retail-v2beta:2.5.1:2.5.1
+grpc-google-cloud-retail-v2alpha:2.5.1:2.5.1
+grpc-google-cloud-retail-v2beta:2.5.1:2.5.1