diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index 62592923..42327db5 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -13,4 +13,4 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-java:latest - digest: sha256:8175681a918181d306d9c370d3262f16b4c724cc73d74111b7d42fc985ca7f93 + digest: sha256:f14e3fefe8e361e85752bd9890c8e56f2fe25f1e89cbb9597e4e3c7a429203a3 diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh index ab821e49..0196aca2 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 00af26cc..8040a363 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 4ce8c73a..9637a409 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,43 @@ # Changelog +## [1.6.2](https://github.com/googleapis/java-iam/compare/v1.6.1...v1.6.2) (2022-10-02) + + +### Documentation + +* **samples:** Update package names to match v2 ([#424](https://github.com/googleapis/java-iam/issues/424)) ([7fda749](https://github.com/googleapis/java-iam/commit/7fda74962365073996bf1f0a6229bbf8984d1d09)) + + +### Dependencies + +* Update dependency cachetools to v5 ([#459](https://github.com/googleapis/java-iam/issues/459)) ([3984974](https://github.com/googleapis/java-iam/commit/3984974630ccd0921f12d276dbc22eb6798e74a9)) +* Update dependency certifi to v2022.9.24 ([#440](https://github.com/googleapis/java-iam/issues/440)) ([e0ebd9e](https://github.com/googleapis/java-iam/commit/e0ebd9e20a25e6edf7b913dea0943909ec28effb)) +* Update dependency charset-normalizer to v2.1.1 ([#444](https://github.com/googleapis/java-iam/issues/444)) ([4bac18b](https://github.com/googleapis/java-iam/commit/4bac18bd92702502730b878f10dcb12b39dfa1cf)) +* Update dependency click to v8.1.3 ([#445](https://github.com/googleapis/java-iam/issues/445)) ([e21bea2](https://github.com/googleapis/java-iam/commit/e21bea21af318e34220a649e9ec4bd9214f11feb)) +* Update dependency com.google.apis:google-api-services-cloudresourcemanager to v3-rev20220911-2.0.0 ([#435](https://github.com/googleapis/java-iam/issues/435)) ([63a136b](https://github.com/googleapis/java-iam/commit/63a136b56dff577ac1e630293c80bd10539c1930)) +* Update dependency com.google.apis:google-api-services-cloudresourcemanager to v3-rev20220925-2.0.0 ([#439](https://github.com/googleapis/java-iam/issues/439)) ([85b1d0f](https://github.com/googleapis/java-iam/commit/85b1d0f68950095c3ffd1ecda7eedc82ac5a92b1)) +* Update dependency com.google.cloud:google-iam-policy to v1.6.1 ([#434](https://github.com/googleapis/java-iam/issues/434)) ([b468d86](https://github.com/googleapis/java-iam/commit/b468d86fdeb55b3f463a5c03c61f37f467bfeef6)) +* Update dependency com.google.protobuf:protobuf-java to v3.21.7 ([#463](https://github.com/googleapis/java-iam/issues/463)) ([a58810f](https://github.com/googleapis/java-iam/commit/a58810f3f6fc641b74cb92d358f71f9461ad9664)) +* Update dependency gcp-releasetool to v1.8.8 ([#441](https://github.com/googleapis/java-iam/issues/441)) ([89469a8](https://github.com/googleapis/java-iam/commit/89469a845e62479ab0f34a219486020d398aaf70)) +* Update dependency google-api-core to v2.10.1 ([#446](https://github.com/googleapis/java-iam/issues/446)) ([69dbd0d](https://github.com/googleapis/java-iam/commit/69dbd0d656656943851a9f5b159b4de0f7665a5d)) +* Update dependency google-auth to v2.12.0 ([#447](https://github.com/googleapis/java-iam/issues/447)) ([10fed85](https://github.com/googleapis/java-iam/commit/10fed85610182533b695fe741fe8e158e7b3799a)) +* Update dependency google-cloud-core to v2.3.2 ([#442](https://github.com/googleapis/java-iam/issues/442)) ([709e0b4](https://github.com/googleapis/java-iam/commit/709e0b407610ee5fec6bb38b695504c245f5d003)) +* Update dependency google-cloud-storage to v2.5.0 ([#448](https://github.com/googleapis/java-iam/issues/448)) ([4ef1f8e](https://github.com/googleapis/java-iam/commit/4ef1f8e6f5317ba339b94613a120d540acd90f57)) +* Update dependency google-crc32c to v1.5.0 ([#449](https://github.com/googleapis/java-iam/issues/449)) ([e54b847](https://github.com/googleapis/java-iam/commit/e54b8479589cb2350356c78c2f2a44a841e8f904)) +* Update dependency googleapis-common-protos to v1.56.4 ([#443](https://github.com/googleapis/java-iam/issues/443)) ([d060a5b](https://github.com/googleapis/java-iam/commit/d060a5b90ba189f1118b4ad899c7a0e9ad39bf44)) +* Update dependency importlib-metadata to v4.12.0 ([#450](https://github.com/googleapis/java-iam/issues/450)) ([248b90a](https://github.com/googleapis/java-iam/commit/248b90a6f715d881856a50e55df45b19a695ff32)) +* Update dependency io.grpc:grpc-protobuf to v1.49.2 ([#464](https://github.com/googleapis/java-iam/issues/464)) ([406e890](https://github.com/googleapis/java-iam/commit/406e89048c62e264dcf93ef5c940734e7367a00f)) +* Update dependency io.grpc:grpc-stub to v1.49.2 ([#465](https://github.com/googleapis/java-iam/issues/465)) ([8735303](https://github.com/googleapis/java-iam/commit/8735303fc9eb7b1198ce2a2019e33ad5f63ec1cf)) +* Update dependency jeepney to v0.8.0 ([#451](https://github.com/googleapis/java-iam/issues/451)) ([0721ab8](https://github.com/googleapis/java-iam/commit/0721ab835c3a0588632916e70b2d92ff51824de6)) +* Update dependency jinja2 to v3.1.2 ([#452](https://github.com/googleapis/java-iam/issues/452)) ([514f80c](https://github.com/googleapis/java-iam/commit/514f80c8f051a8bb2f2fbf19d0e130c12b70ee9a)) +* Update dependency markupsafe to v2.1.1 ([#454](https://github.com/googleapis/java-iam/issues/454)) ([d6123a7](https://github.com/googleapis/java-iam/commit/d6123a709b01e1c40ce8423ebd70ed5a6c4ae4a0)) +* Update dependency protobuf to v3.20.2 ([#455](https://github.com/googleapis/java-iam/issues/455)) ([c9a631a](https://github.com/googleapis/java-iam/commit/c9a631ac0ba852fee31ddd458bb40bd78a081b75)) +* Update dependency protobuf to v4 ([#460](https://github.com/googleapis/java-iam/issues/460)) ([7738293](https://github.com/googleapis/java-iam/commit/773829323697e3c5785eb9b7bf7000fd296921b7)) +* Update dependency pyjwt to v2.5.0 ([#461](https://github.com/googleapis/java-iam/issues/461)) ([5f1659f](https://github.com/googleapis/java-iam/commit/5f1659f2cb1a20d9a034e1f6214ec793d2ef908c)) +* Update dependency requests to v2.28.1 ([#456](https://github.com/googleapis/java-iam/issues/456)) ([c390fee](https://github.com/googleapis/java-iam/commit/c390fee02a5545c567d45cc4375a5eb549d9765f)) +* Update dependency typing-extensions to v4.3.0 ([#457](https://github.com/googleapis/java-iam/issues/457)) ([913effd](https://github.com/googleapis/java-iam/commit/913effd62b170e96ebd74456b02692f462cedc40)) +* Update dependency zipp to v3.8.1 ([#458](https://github.com/googleapis/java-iam/issues/458)) ([5afe18a](https://github.com/googleapis/java-iam/commit/5afe18a7c6c0ef89b603455cea5569be71b27173)) + ## [1.6.1](https://github.com/googleapis/java-iam/compare/v1.6.0...v1.6.1) (2022-09-21) diff --git a/google-iam-policy/pom.xml b/google-iam-policy/pom.xml index 58b22ae7..26847f87 100644 --- a/google-iam-policy/pom.xml +++ b/google-iam-policy/pom.xml @@ -3,7 +3,7 @@ 4.0.0 com.google.cloud google-iam-policy - 1.6.1 + 1.6.2 jar Google IAM Policy https://github.com/googleapis/java-eventarc @@ -11,7 +11,7 @@ com.google.cloud google-iam-parent - 1.6.1 + 1.6.2 google-iam-policy diff --git a/google-iam-policy/src/main/java/com/google/iam/v2/PoliciesClient.java b/google-iam-policy/src/main/java/com/google/iam/v2/PoliciesClient.java index b7e40fcd..92be44bc 100644 --- a/google-iam-policy/src/main/java/com/google/iam/v2/PoliciesClient.java +++ b/google-iam-policy/src/main/java/com/google/iam/v2/PoliciesClient.java @@ -780,175 +780,6 @@ public final UnaryCallable deletePolicyCallable( return stub.deletePolicyCallable(); } - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves all the policies that are attached to the specified resource, or anywhere in the - * ancestry of the resource. For example, for a project this endpoint would return all the - * `denyPolicy` kind policies attached to the project, its parent folder (if any), and its parent - * organization (if any). The endpoint requires the same permissions that it would take to call - * `ListPolicies` or `GetPolicy`. - * - *

The main reason to use this endpoint is as a policy admin to debug access issues for a - * resource. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
-   *   String attachmentPoint = "attachmentPoint-686994899";
-   *   for (Policy element : policiesClient.listApplicablePolicies(attachmentPoint).iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- * - * @param attachmentPoint Required. The Cloud resource at which the applicable policies are to be - * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource name, which means - * that the forward-slash character, `/`, must be written as `%2F`. For example, - * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`. - * @throws com.google.api.gax.rpc.ApiException if the remote call fails - */ - public final ListApplicablePoliciesPagedResponse listApplicablePolicies(String attachmentPoint) { - ListApplicablePoliciesRequest request = - ListApplicablePoliciesRequest.newBuilder().setAttachmentPoint(attachmentPoint).build(); - return listApplicablePolicies(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves all the policies that are attached to the specified resource, or anywhere in the - * ancestry of the resource. For example, for a project this endpoint would return all the - * `denyPolicy` kind policies attached to the project, its parent folder (if any), and its parent - * organization (if any). The endpoint requires the same permissions that it would take to call - * `ListPolicies` or `GetPolicy`. - * - *

The main reason to use this endpoint is as a policy admin to debug access issues for a - * resource. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
-   *   ListApplicablePoliciesRequest request =
-   *       ListApplicablePoliciesRequest.newBuilder()
-   *           .setAttachmentPoint("attachmentPoint-686994899")
-   *           .setFilter("filter-1274492040")
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .build();
-   *   for (Policy element : policiesClient.listApplicablePolicies(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 ListApplicablePoliciesPagedResponse listApplicablePolicies( - ListApplicablePoliciesRequest request) { - return listApplicablePoliciesPagedCallable().call(request); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves all the policies that are attached to the specified resource, or anywhere in the - * ancestry of the resource. For example, for a project this endpoint would return all the - * `denyPolicy` kind policies attached to the project, its parent folder (if any), and its parent - * organization (if any). The endpoint requires the same permissions that it would take to call - * `ListPolicies` or `GetPolicy`. - * - *

The main reason to use this endpoint is as a policy admin to debug access issues for a - * resource. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
-   *   ListApplicablePoliciesRequest request =
-   *       ListApplicablePoliciesRequest.newBuilder()
-   *           .setAttachmentPoint("attachmentPoint-686994899")
-   *           .setFilter("filter-1274492040")
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .build();
-   *   ApiFuture future =
-   *       policiesClient.listApplicablePoliciesPagedCallable().futureCall(request);
-   *   // Do something.
-   *   for (Policy element : future.get().iterateAll()) {
-   *     // doThingsWith(element);
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listApplicablePoliciesPagedCallable() { - return stub.listApplicablePoliciesPagedCallable(); - } - - // AUTO-GENERATED DOCUMENTATION AND METHOD. - /** - * Retrieves all the policies that are attached to the specified resource, or anywhere in the - * ancestry of the resource. For example, for a project this endpoint would return all the - * `denyPolicy` kind policies attached to the project, its parent folder (if any), and its parent - * organization (if any). The endpoint requires the same permissions that it would take to call - * `ListPolicies` or `GetPolicy`. - * - *

The main reason to use this endpoint is as a policy admin to debug access issues for a - * resource. - * - *

Sample code: - * - *

{@code
-   * // This snippet has been automatically generated and should be regarded as a code template only.
-   * // It will require modifications to work:
-   * // - It may require correct/in-range values for request initialization.
-   * // - It may require specifying regional endpoints when creating the service client as shown in
-   * // https://cloud.google.com/java/docs/setup#configure_endpoints_for_the_client_library
-   * try (PoliciesClient policiesClient = PoliciesClient.create()) {
-   *   ListApplicablePoliciesRequest request =
-   *       ListApplicablePoliciesRequest.newBuilder()
-   *           .setAttachmentPoint("attachmentPoint-686994899")
-   *           .setFilter("filter-1274492040")
-   *           .setPageToken("pageToken873572522")
-   *           .setPageSize(883849137)
-   *           .build();
-   *   while (true) {
-   *     ListApplicablePoliciesResponse response =
-   *         policiesClient.listApplicablePoliciesCallable().call(request);
-   *     for (Policy element : response.getPoliciesList()) {
-   *       // doThingsWith(element);
-   *     }
-   *     String nextPageToken = response.getNextPageToken();
-   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
-   *       request = request.toBuilder().setPageToken(nextPageToken).build();
-   *     } else {
-   *       break;
-   *     }
-   *   }
-   * }
-   * }
- */ - public final UnaryCallable - listApplicablePoliciesCallable() { - return stub.listApplicablePoliciesCallable(); - } - @Override public final void close() { stub.close(); @@ -1053,84 +884,4 @@ protected ListPoliciesFixedSizeCollection createCollection( return new ListPoliciesFixedSizeCollection(pages, collectionSize); } } - - public static class ListApplicablePoliciesPagedResponse - extends AbstractPagedListResponse< - ListApplicablePoliciesRequest, - ListApplicablePoliciesResponse, - Policy, - ListApplicablePoliciesPage, - ListApplicablePoliciesFixedSizeCollection> { - - public static ApiFuture createAsync( - PageContext context, - ApiFuture futureResponse) { - ApiFuture futurePage = - ListApplicablePoliciesPage.createEmptyPage().createPageAsync(context, futureResponse); - return ApiFutures.transform( - futurePage, - input -> new ListApplicablePoliciesPagedResponse(input), - MoreExecutors.directExecutor()); - } - - private ListApplicablePoliciesPagedResponse(ListApplicablePoliciesPage page) { - super(page, ListApplicablePoliciesFixedSizeCollection.createEmptyCollection()); - } - } - - public static class ListApplicablePoliciesPage - extends AbstractPage< - ListApplicablePoliciesRequest, - ListApplicablePoliciesResponse, - Policy, - ListApplicablePoliciesPage> { - - private ListApplicablePoliciesPage( - PageContext context, - ListApplicablePoliciesResponse response) { - super(context, response); - } - - private static ListApplicablePoliciesPage createEmptyPage() { - return new ListApplicablePoliciesPage(null, null); - } - - @Override - protected ListApplicablePoliciesPage createPage( - PageContext context, - ListApplicablePoliciesResponse response) { - return new ListApplicablePoliciesPage(context, response); - } - - @Override - public ApiFuture createPageAsync( - PageContext context, - ApiFuture futureResponse) { - return super.createPageAsync(context, futureResponse); - } - } - - public static class ListApplicablePoliciesFixedSizeCollection - extends AbstractFixedSizeCollection< - ListApplicablePoliciesRequest, - ListApplicablePoliciesResponse, - Policy, - ListApplicablePoliciesPage, - ListApplicablePoliciesFixedSizeCollection> { - - private ListApplicablePoliciesFixedSizeCollection( - List pages, int collectionSize) { - super(pages, collectionSize); - } - - private static ListApplicablePoliciesFixedSizeCollection createEmptyCollection() { - return new ListApplicablePoliciesFixedSizeCollection(null, 0); - } - - @Override - protected ListApplicablePoliciesFixedSizeCollection createCollection( - List pages, int collectionSize) { - return new ListApplicablePoliciesFixedSizeCollection(pages, collectionSize); - } - } } diff --git a/google-iam-policy/src/main/java/com/google/iam/v2/PoliciesSettings.java b/google-iam-policy/src/main/java/com/google/iam/v2/PoliciesSettings.java index a8e27342..06ec905b 100644 --- a/google-iam-policy/src/main/java/com/google/iam/v2/PoliciesSettings.java +++ b/google-iam-policy/src/main/java/com/google/iam/v2/PoliciesSettings.java @@ -16,7 +16,6 @@ package com.google.iam.v2; -import static com.google.iam.v2.PoliciesClient.ListApplicablePoliciesPagedResponse; import static com.google.iam.v2.PoliciesClient.ListPoliciesPagedResponse; import com.google.api.core.ApiFunction; @@ -118,15 +117,6 @@ public UnaryCallSettings deletePolicySettings() return ((PoliciesStubSettings) getStubSettings()).deletePolicyOperationSettings(); } - /** Returns the object with the settings used for calls to listApplicablePolicies. */ - public PagedCallSettings< - ListApplicablePoliciesRequest, - ListApplicablePoliciesResponse, - ListApplicablePoliciesPagedResponse> - listApplicablePoliciesSettings() { - return ((PoliciesStubSettings) getStubSettings()).listApplicablePoliciesSettings(); - } - public static final PoliciesSettings create(PoliciesStubSettings stub) throws IOException { return new PoliciesSettings.Builder(stub.toBuilder()).build(); } @@ -286,15 +276,6 @@ public UnaryCallSettings.Builder deletePolicySet return getStubSettingsBuilder().deletePolicyOperationSettings(); } - /** Returns the builder for the settings used for calls to listApplicablePolicies. */ - public PagedCallSettings.Builder< - ListApplicablePoliciesRequest, - ListApplicablePoliciesResponse, - ListApplicablePoliciesPagedResponse> - listApplicablePoliciesSettings() { - return getStubSettingsBuilder().listApplicablePoliciesSettings(); - } - @Override public PoliciesSettings build() throws IOException { return new PoliciesSettings(this); diff --git a/google-iam-policy/src/main/java/com/google/iam/v2/gapic_metadata.json b/google-iam-policy/src/main/java/com/google/iam/v2/gapic_metadata.json index c0965438..4277cbfc 100644 --- a/google-iam-policy/src/main/java/com/google/iam/v2/gapic_metadata.json +++ b/google-iam-policy/src/main/java/com/google/iam/v2/gapic_metadata.json @@ -19,9 +19,6 @@ "GetPolicy": { "methods": ["getPolicy", "getPolicy", "getPolicyCallable"] }, - "ListApplicablePolicies": { - "methods": ["listApplicablePolicies", "listApplicablePolicies", "listApplicablePoliciesPagedCallable", "listApplicablePoliciesCallable"] - }, "ListPolicies": { "methods": ["listPolicies", "listPolicies", "listPoliciesPagedCallable", "listPoliciesCallable"] }, diff --git a/google-iam-policy/src/main/java/com/google/iam/v2/stub/GrpcPoliciesStub.java b/google-iam-policy/src/main/java/com/google/iam/v2/stub/GrpcPoliciesStub.java index 3a0f0620..61258f90 100644 --- a/google-iam-policy/src/main/java/com/google/iam/v2/stub/GrpcPoliciesStub.java +++ b/google-iam-policy/src/main/java/com/google/iam/v2/stub/GrpcPoliciesStub.java @@ -16,7 +16,6 @@ package com.google.iam.v2.stub; -import static com.google.iam.v2.PoliciesClient.ListApplicablePoliciesPagedResponse; import static com.google.iam.v2.PoliciesClient.ListPoliciesPagedResponse; import com.google.api.gax.core.BackgroundResource; @@ -30,8 +29,6 @@ import com.google.iam.v2.CreatePolicyRequest; import com.google.iam.v2.DeletePolicyRequest; import com.google.iam.v2.GetPolicyRequest; -import com.google.iam.v2.ListApplicablePoliciesRequest; -import com.google.iam.v2.ListApplicablePoliciesResponse; import com.google.iam.v2.ListPoliciesRequest; import com.google.iam.v2.ListPoliciesResponse; import com.google.iam.v2.Policy; @@ -98,19 +95,6 @@ public class GrpcPoliciesStub extends PoliciesStub { .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) .build(); - private static final MethodDescriptor< - ListApplicablePoliciesRequest, ListApplicablePoliciesResponse> - listApplicablePoliciesMethodDescriptor = - MethodDescriptor - .newBuilder() - .setType(MethodDescriptor.MethodType.UNARY) - .setFullMethodName("google.iam.v2.Policies/ListApplicablePolicies") - .setRequestMarshaller( - ProtoUtils.marshaller(ListApplicablePoliciesRequest.getDefaultInstance())) - .setResponseMarshaller( - ProtoUtils.marshaller(ListApplicablePoliciesResponse.getDefaultInstance())) - .build(); - private final UnaryCallable listPoliciesCallable; private final UnaryCallable listPoliciesPagedCallable; @@ -124,10 +108,6 @@ public class GrpcPoliciesStub extends PoliciesStub { private final UnaryCallable deletePolicyCallable; private final OperationCallable deletePolicyOperationCallable; - private final UnaryCallable - listApplicablePoliciesCallable; - private final UnaryCallable - listApplicablePoliciesPagedCallable; private final BackgroundResource backgroundResources; private final GrpcOperationsStub operationsStub; @@ -218,18 +198,6 @@ protected GrpcPoliciesStub( return params.build(); }) .build(); - GrpcCallSettings - listApplicablePoliciesTransportSettings = - GrpcCallSettings - .newBuilder() - .setMethodDescriptor(listApplicablePoliciesMethodDescriptor) - .setParamsExtractor( - request -> { - ImmutableMap.Builder params = ImmutableMap.builder(); - params.put("attachment_point", String.valueOf(request.getAttachmentPoint())); - return params.build(); - }) - .build(); this.listPoliciesCallable = callableFactory.createUnaryCallable( @@ -267,16 +235,6 @@ protected GrpcPoliciesStub( settings.deletePolicyOperationSettings(), clientContext, operationsStub); - this.listApplicablePoliciesCallable = - callableFactory.createUnaryCallable( - listApplicablePoliciesTransportSettings, - settings.listApplicablePoliciesSettings(), - clientContext); - this.listApplicablePoliciesPagedCallable = - callableFactory.createPagedCallable( - listApplicablePoliciesTransportSettings, - settings.listApplicablePoliciesSettings(), - clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -334,18 +292,6 @@ public UnaryCallable deletePolicyCallable() { return deletePolicyOperationCallable; } - @Override - public UnaryCallable - listApplicablePoliciesCallable() { - return listApplicablePoliciesCallable; - } - - @Override - public UnaryCallable - listApplicablePoliciesPagedCallable() { - return listApplicablePoliciesPagedCallable; - } - @Override public final void close() { try { diff --git a/google-iam-policy/src/main/java/com/google/iam/v2/stub/HttpJsonPoliciesStub.java b/google-iam-policy/src/main/java/com/google/iam/v2/stub/HttpJsonPoliciesStub.java index 6370f750..fce3838d 100644 --- a/google-iam-policy/src/main/java/com/google/iam/v2/stub/HttpJsonPoliciesStub.java +++ b/google-iam-policy/src/main/java/com/google/iam/v2/stub/HttpJsonPoliciesStub.java @@ -16,7 +16,6 @@ package com.google.iam.v2.stub; -import static com.google.iam.v2.PoliciesClient.ListApplicablePoliciesPagedResponse; import static com.google.iam.v2.PoliciesClient.ListPoliciesPagedResponse; import com.google.api.core.BetaApi; @@ -37,8 +36,6 @@ import com.google.iam.v2.CreatePolicyRequest; import com.google.iam.v2.DeletePolicyRequest; import com.google.iam.v2.GetPolicyRequest; -import com.google.iam.v2.ListApplicablePoliciesRequest; -import com.google.iam.v2.ListApplicablePoliciesResponse; import com.google.iam.v2.ListPoliciesRequest; import com.google.iam.v2.ListPoliciesResponse; import com.google.iam.v2.Policy; @@ -253,45 +250,6 @@ public class HttpJsonPoliciesStub extends PoliciesStub { HttpJsonOperationSnapshot.create(response)) .build(); - private static final ApiMethodDescriptor< - ListApplicablePoliciesRequest, ListApplicablePoliciesResponse> - listApplicablePoliciesMethodDescriptor = - ApiMethodDescriptor - .newBuilder() - .setFullMethodName("google.iam.v2.Policies/ListApplicablePolicies") - .setHttpMethod("GET") - .setType(ApiMethodDescriptor.MethodType.UNARY) - .setRequestFormatter( - ProtoMessageRequestFormatter.newBuilder() - .setPath( - "/v2/{attachmentPoint=*}:listApplicablePolicies", - request -> { - Map fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putPathParam( - fields, "attachmentPoint", request.getAttachmentPoint()); - return fields; - }) - .setQueryParamsExtractor( - request -> { - Map> fields = new HashMap<>(); - ProtoRestSerializer serializer = - ProtoRestSerializer.create(); - serializer.putQueryParam(fields, "filter", request.getFilter()); - serializer.putQueryParam(fields, "pageSize", request.getPageSize()); - serializer.putQueryParam(fields, "pageToken", request.getPageToken()); - return fields; - }) - .setRequestBodyExtractor(request -> null) - .build()) - .setResponseParser( - ProtoMessageResponseParser.newBuilder() - .setDefaultInstance(ListApplicablePoliciesResponse.getDefaultInstance()) - .setDefaultTypeRegistry(typeRegistry) - .build()) - .build(); - private final UnaryCallable listPoliciesCallable; private final UnaryCallable listPoliciesPagedCallable; @@ -305,10 +263,6 @@ public class HttpJsonPoliciesStub extends PoliciesStub { private final UnaryCallable deletePolicyCallable; private final OperationCallable deletePolicyOperationCallable; - private final UnaryCallable - listApplicablePoliciesCallable; - private final UnaryCallable - listApplicablePoliciesPagedCallable; private final BackgroundResource backgroundResources; private final HttpJsonOperationsStub httpJsonOperationsStub; @@ -379,13 +333,6 @@ protected HttpJsonPoliciesStub( .setMethodDescriptor(deletePolicyMethodDescriptor) .setTypeRegistry(typeRegistry) .build(); - HttpJsonCallSettings - listApplicablePoliciesTransportSettings = - HttpJsonCallSettings - .newBuilder() - .setMethodDescriptor(listApplicablePoliciesMethodDescriptor) - .setTypeRegistry(typeRegistry) - .build(); this.listPoliciesCallable = callableFactory.createUnaryCallable( @@ -423,16 +370,6 @@ protected HttpJsonPoliciesStub( settings.deletePolicyOperationSettings(), clientContext, httpJsonOperationsStub); - this.listApplicablePoliciesCallable = - callableFactory.createUnaryCallable( - listApplicablePoliciesTransportSettings, - settings.listApplicablePoliciesSettings(), - clientContext); - this.listApplicablePoliciesPagedCallable = - callableFactory.createPagedCallable( - listApplicablePoliciesTransportSettings, - settings.listApplicablePoliciesSettings(), - clientContext); this.backgroundResources = new BackgroundResourceAggregation(clientContext.getBackgroundResources()); @@ -446,7 +383,6 @@ public static List getMethodDescriptors() { methodDescriptors.add(createPolicyMethodDescriptor); methodDescriptors.add(updatePolicyMethodDescriptor); methodDescriptors.add(deletePolicyMethodDescriptor); - methodDescriptors.add(listApplicablePoliciesMethodDescriptor); return methodDescriptors; } @@ -502,18 +438,6 @@ public UnaryCallable deletePolicyCallable() { return deletePolicyOperationCallable; } - @Override - public UnaryCallable - listApplicablePoliciesCallable() { - return listApplicablePoliciesCallable; - } - - @Override - public UnaryCallable - listApplicablePoliciesPagedCallable() { - return listApplicablePoliciesPagedCallable; - } - @Override public final void close() { try { diff --git a/google-iam-policy/src/main/java/com/google/iam/v2/stub/PoliciesStub.java b/google-iam-policy/src/main/java/com/google/iam/v2/stub/PoliciesStub.java index f00f4af8..90d52e01 100644 --- a/google-iam-policy/src/main/java/com/google/iam/v2/stub/PoliciesStub.java +++ b/google-iam-policy/src/main/java/com/google/iam/v2/stub/PoliciesStub.java @@ -16,7 +16,6 @@ package com.google.iam.v2.stub; -import static com.google.iam.v2.PoliciesClient.ListApplicablePoliciesPagedResponse; import static com.google.iam.v2.PoliciesClient.ListPoliciesPagedResponse; import com.google.api.gax.core.BackgroundResource; @@ -25,8 +24,6 @@ import com.google.iam.v2.CreatePolicyRequest; import com.google.iam.v2.DeletePolicyRequest; import com.google.iam.v2.GetPolicyRequest; -import com.google.iam.v2.ListApplicablePoliciesRequest; -import com.google.iam.v2.ListApplicablePoliciesResponse; import com.google.iam.v2.ListPoliciesRequest; import com.google.iam.v2.ListPoliciesResponse; import com.google.iam.v2.Policy; @@ -92,17 +89,6 @@ public UnaryCallable deletePolicyCallable() { throw new UnsupportedOperationException("Not implemented: deletePolicyCallable()"); } - public UnaryCallable - listApplicablePoliciesPagedCallable() { - throw new UnsupportedOperationException( - "Not implemented: listApplicablePoliciesPagedCallable()"); - } - - public UnaryCallable - listApplicablePoliciesCallable() { - throw new UnsupportedOperationException("Not implemented: listApplicablePoliciesCallable()"); - } - @Override public abstract void close(); } diff --git a/google-iam-policy/src/main/java/com/google/iam/v2/stub/PoliciesStubSettings.java b/google-iam-policy/src/main/java/com/google/iam/v2/stub/PoliciesStubSettings.java index 3a7ffe92..2a9434e1 100644 --- a/google-iam-policy/src/main/java/com/google/iam/v2/stub/PoliciesStubSettings.java +++ b/google-iam-policy/src/main/java/com/google/iam/v2/stub/PoliciesStubSettings.java @@ -16,7 +16,6 @@ package com.google.iam.v2.stub; -import static com.google.iam.v2.PoliciesClient.ListApplicablePoliciesPagedResponse; import static com.google.iam.v2.PoliciesClient.ListPoliciesPagedResponse; import com.google.api.core.ApiFunction; @@ -55,8 +54,6 @@ import com.google.iam.v2.CreatePolicyRequest; import com.google.iam.v2.DeletePolicyRequest; import com.google.iam.v2.GetPolicyRequest; -import com.google.iam.v2.ListApplicablePoliciesRequest; -import com.google.iam.v2.ListApplicablePoliciesResponse; import com.google.iam.v2.ListPoliciesRequest; import com.google.iam.v2.ListPoliciesResponse; import com.google.iam.v2.Policy; @@ -120,11 +117,6 @@ public class PoliciesStubSettings extends StubSettings { private final UnaryCallSettings deletePolicySettings; private final OperationCallSettings deletePolicyOperationSettings; - private final PagedCallSettings< - ListApplicablePoliciesRequest, - ListApplicablePoliciesResponse, - ListApplicablePoliciesPagedResponse> - listApplicablePoliciesSettings; private static final PagedListDescriptor LIST_POLICIES_PAGE_STR_DESC = @@ -162,48 +154,6 @@ public Iterable extractResources(ListPoliciesResponse payload) { } }; - private static final PagedListDescriptor< - ListApplicablePoliciesRequest, ListApplicablePoliciesResponse, Policy> - LIST_APPLICABLE_POLICIES_PAGE_STR_DESC = - new PagedListDescriptor< - ListApplicablePoliciesRequest, ListApplicablePoliciesResponse, Policy>() { - @Override - public String emptyToken() { - return ""; - } - - @Override - public ListApplicablePoliciesRequest injectToken( - ListApplicablePoliciesRequest payload, String token) { - return ListApplicablePoliciesRequest.newBuilder(payload).setPageToken(token).build(); - } - - @Override - public ListApplicablePoliciesRequest injectPageSize( - ListApplicablePoliciesRequest payload, int pageSize) { - return ListApplicablePoliciesRequest.newBuilder(payload) - .setPageSize(pageSize) - .build(); - } - - @Override - public Integer extractPageSize(ListApplicablePoliciesRequest payload) { - return payload.getPageSize(); - } - - @Override - public String extractNextToken(ListApplicablePoliciesResponse payload) { - return payload.getNextPageToken(); - } - - @Override - public Iterable extractResources(ListApplicablePoliciesResponse payload) { - return payload.getPoliciesList() == null - ? ImmutableList.of() - : payload.getPoliciesList(); - } - }; - private static final PagedListResponseFactory< ListPoliciesRequest, ListPoliciesResponse, ListPoliciesPagedResponse> LIST_POLICIES_PAGE_STR_FACT = @@ -221,30 +171,6 @@ public ApiFuture getFuturePagedResponse( } }; - private static final PagedListResponseFactory< - ListApplicablePoliciesRequest, - ListApplicablePoliciesResponse, - ListApplicablePoliciesPagedResponse> - LIST_APPLICABLE_POLICIES_PAGE_STR_FACT = - new PagedListResponseFactory< - ListApplicablePoliciesRequest, - ListApplicablePoliciesResponse, - ListApplicablePoliciesPagedResponse>() { - @Override - public ApiFuture getFuturePagedResponse( - UnaryCallable - callable, - ListApplicablePoliciesRequest request, - ApiCallContext context, - ApiFuture futureResponse) { - PageContext - pageContext = - PageContext.create( - callable, LIST_APPLICABLE_POLICIES_PAGE_STR_DESC, request, context); - return ListApplicablePoliciesPagedResponse.createAsync(pageContext, futureResponse); - } - }; - /** Returns the object with the settings used for calls to listPolicies. */ public PagedCallSettings listPoliciesSettings() { @@ -289,15 +215,6 @@ public UnaryCallSettings deletePolicySettings() return deletePolicyOperationSettings; } - /** Returns the object with the settings used for calls to listApplicablePolicies. */ - public PagedCallSettings< - ListApplicablePoliciesRequest, - ListApplicablePoliciesResponse, - ListApplicablePoliciesPagedResponse> - listApplicablePoliciesSettings() { - return listApplicablePoliciesSettings; - } - public PoliciesStub createStub() throws IOException { if (getTransportChannelProvider() .getTransportName() @@ -410,7 +327,6 @@ protected PoliciesStubSettings(Builder settingsBuilder) throws IOException { updatePolicyOperationSettings = settingsBuilder.updatePolicyOperationSettings().build(); deletePolicySettings = settingsBuilder.deletePolicySettings().build(); deletePolicyOperationSettings = settingsBuilder.deletePolicyOperationSettings().build(); - listApplicablePoliciesSettings = settingsBuilder.listApplicablePoliciesSettings().build(); } /** Builder for PoliciesStubSettings. */ @@ -432,11 +348,6 @@ public static class Builder extends StubSettings.Builder deletePolicyOperationSettings; - private final PagedCallSettings.Builder< - ListApplicablePoliciesRequest, - ListApplicablePoliciesResponse, - ListApplicablePoliciesPagedResponse> - listApplicablePoliciesSettings; private static final ImmutableMap> RETRYABLE_CODE_DEFINITIONS; @@ -446,7 +357,6 @@ public static class Builder extends StubSettings.BuildernewArrayList(StatusCode.Code.UNAVAILABLE))); - definitions.put("no_retry_codes", ImmutableSet.copyOf(Lists.newArrayList())); RETRYABLE_CODE_DEFINITIONS = definitions.build(); } @@ -466,8 +376,6 @@ public static class Builder extends StubSettings.Builder>of( @@ -495,8 +401,7 @@ protected Builder(ClientContext clientContext) { getPolicySettings, createPolicySettings, updatePolicySettings, - deletePolicySettings, - listApplicablePoliciesSettings); + deletePolicySettings); initDefaults(this); } @@ -511,7 +416,6 @@ protected Builder(PoliciesStubSettings settings) { updatePolicyOperationSettings = settings.updatePolicyOperationSettings.toBuilder(); deletePolicySettings = settings.deletePolicySettings.toBuilder(); deletePolicyOperationSettings = settings.deletePolicyOperationSettings.toBuilder(); - listApplicablePoliciesSettings = settings.listApplicablePoliciesSettings.toBuilder(); unaryMethodSettingsBuilders = ImmutableList.>of( @@ -519,8 +423,7 @@ protected Builder(PoliciesStubSettings settings) { getPolicySettings, createPolicySettings, updatePolicySettings, - deletePolicySettings, - listApplicablePoliciesSettings); + deletePolicySettings); } private static Builder createDefault() { @@ -575,11 +478,6 @@ 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 - .listApplicablePoliciesSettings() - .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_codes")) - .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_params")); - builder .createPolicyOperationSettings() .setInitialCallSettings( @@ -721,15 +619,6 @@ public UnaryCallSettings.Builder deletePolicySet return deletePolicyOperationSettings; } - /** Returns the builder for the settings used for calls to listApplicablePolicies. */ - public PagedCallSettings.Builder< - ListApplicablePoliciesRequest, - ListApplicablePoliciesResponse, - ListApplicablePoliciesPagedResponse> - listApplicablePoliciesSettings() { - return listApplicablePoliciesSettings; - } - @Override public PoliciesStubSettings build() throws IOException { return new PoliciesStubSettings(this); diff --git a/google-iam-policy/src/test/java/com/google/iam/v2/MockPoliciesImpl.java b/google-iam-policy/src/test/java/com/google/iam/v2/MockPoliciesImpl.java index 1abaf30f..a77354b7 100644 --- a/google-iam-policy/src/test/java/com/google/iam/v2/MockPoliciesImpl.java +++ b/google-iam-policy/src/test/java/com/google/iam/v2/MockPoliciesImpl.java @@ -162,26 +162,4 @@ public void deletePolicy( Exception.class.getName()))); } } - - @Override - public void listApplicablePolicies( - ListApplicablePoliciesRequest request, - StreamObserver responseObserver) { - Object response = responses.poll(); - if (response instanceof ListApplicablePoliciesResponse) { - requests.add(request); - responseObserver.onNext(((ListApplicablePoliciesResponse) 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 ListApplicablePolicies, expected %s or %s", - response == null ? "null" : response.getClass().getName(), - ListApplicablePoliciesResponse.class.getName(), - Exception.class.getName()))); - } - } } diff --git a/google-iam-policy/src/test/java/com/google/iam/v2/PoliciesClientHttpJsonTest.java b/google-iam-policy/src/test/java/com/google/iam/v2/PoliciesClientHttpJsonTest.java index e6534c85..91228b78 100644 --- a/google-iam-policy/src/test/java/com/google/iam/v2/PoliciesClientHttpJsonTest.java +++ b/google-iam-policy/src/test/java/com/google/iam/v2/PoliciesClientHttpJsonTest.java @@ -16,7 +16,6 @@ package com.google.iam.v2; -import static com.google.iam.v2.PoliciesClient.ListApplicablePoliciesPagedResponse; import static com.google.iam.v2.PoliciesClient.ListPoliciesPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; @@ -397,55 +396,4 @@ public void deletePolicyExceptionTest() throws Exception { } catch (ExecutionException e) { } } - - @Test - public void listApplicablePoliciesTest() throws Exception { - Policy responsesElement = Policy.newBuilder().build(); - ListApplicablePoliciesResponse expectedResponse = - ListApplicablePoliciesResponse.newBuilder() - .setNextPageToken("") - .addAllPolicies(Arrays.asList(responsesElement)) - .build(); - mockService.addResponse(expectedResponse); - - String attachmentPoint = "attachmentPoint-4653"; - - ListApplicablePoliciesPagedResponse pagedListResponse = - client.listApplicablePolicies(attachmentPoint); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getPoliciesList().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 listApplicablePoliciesExceptionTest() throws Exception { - ApiException exception = - ApiExceptionFactory.createException( - new Exception(), FakeStatusCode.of(StatusCode.Code.INVALID_ARGUMENT), false); - mockService.addException(exception); - - try { - String attachmentPoint = "attachmentPoint-4653"; - client.listApplicablePolicies(attachmentPoint); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } } diff --git a/google-iam-policy/src/test/java/com/google/iam/v2/PoliciesClientTest.java b/google-iam-policy/src/test/java/com/google/iam/v2/PoliciesClientTest.java index 5001a4d2..81c53a73 100644 --- a/google-iam-policy/src/test/java/com/google/iam/v2/PoliciesClientTest.java +++ b/google-iam-policy/src/test/java/com/google/iam/v2/PoliciesClientTest.java @@ -16,7 +16,6 @@ package com.google.iam.v2; -import static com.google.iam.v2.PoliciesClient.ListApplicablePoliciesPagedResponse; import static com.google.iam.v2.PoliciesClient.ListPoliciesPagedResponse; import com.google.api.gax.core.NoCredentialsProvider; @@ -353,50 +352,4 @@ public void deletePolicyExceptionTest() throws Exception { Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); } } - - @Test - public void listApplicablePoliciesTest() throws Exception { - Policy responsesElement = Policy.newBuilder().build(); - ListApplicablePoliciesResponse expectedResponse = - ListApplicablePoliciesResponse.newBuilder() - .setNextPageToken("") - .addAllPolicies(Arrays.asList(responsesElement)) - .build(); - mockPolicies.addResponse(expectedResponse); - - String attachmentPoint = "attachmentPoint-686994899"; - - ListApplicablePoliciesPagedResponse pagedListResponse = - client.listApplicablePolicies(attachmentPoint); - - List resources = Lists.newArrayList(pagedListResponse.iterateAll()); - - Assert.assertEquals(1, resources.size()); - Assert.assertEquals(expectedResponse.getPoliciesList().get(0), resources.get(0)); - - List actualRequests = mockPolicies.getRequests(); - Assert.assertEquals(1, actualRequests.size()); - ListApplicablePoliciesRequest actualRequest = - ((ListApplicablePoliciesRequest) actualRequests.get(0)); - - Assert.assertEquals(attachmentPoint, actualRequest.getAttachmentPoint()); - Assert.assertTrue( - channelProvider.isHeaderSent( - ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), - GaxGrpcProperties.getDefaultApiClientHeaderPattern())); - } - - @Test - public void listApplicablePoliciesExceptionTest() throws Exception { - StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); - mockPolicies.addException(exception); - - try { - String attachmentPoint = "attachmentPoint-686994899"; - client.listApplicablePolicies(attachmentPoint); - Assert.fail("No exception raised"); - } catch (InvalidArgumentException e) { - // Expected exception. - } - } } diff --git a/grpc-google-iam-v1/build.gradle b/grpc-google-iam-v1/build.gradle index 18d0ad19..a5e1c51a 100644 --- a/grpc-google-iam-v1/build.gradle +++ b/grpc-google-iam-v1/build.gradle @@ -18,8 +18,8 @@ repositories { } dependencies { - compile 'io.grpc:grpc-stub:1.49.1' - compile 'io.grpc:grpc-protobuf:1.49.1' + compile 'io.grpc:grpc-stub:1.49.2' + compile 'io.grpc:grpc-protobuf:1.49.2' compile project(':proto-google-iam-v1') } diff --git a/grpc-google-iam-v1/pom.xml b/grpc-google-iam-v1/pom.xml index 4f94210d..a3e2ab28 100644 --- a/grpc-google-iam-v1/pom.xml +++ b/grpc-google-iam-v1/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-iam-v1 - 1.6.1 + 1.6.2 grpc-google-iam-v1 GRPC library for grpc-google-iam-v1 com.google.cloud google-iam-parent - 1.6.1 + 1.6.2 diff --git a/grpc-google-iam-v2/pom.xml b/grpc-google-iam-v2/pom.xml index fe517252..7a029084 100644 --- a/grpc-google-iam-v2/pom.xml +++ b/grpc-google-iam-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-iam-v2 - 1.6.1 + 1.6.2 grpc-google-iam-v2 GRPC library for proto-google-iam-v2 com.google.cloud google-iam-parent - 1.6.1 + 1.6.2 diff --git a/grpc-google-iam-v2/src/main/java/com/google/iam/v2/PoliciesGrpc.java b/grpc-google-iam-v2/src/main/java/com/google/iam/v2/PoliciesGrpc.java index b5b34c76..bfd3857e 100644 --- a/grpc-google-iam-v2/src/main/java/com/google/iam/v2/PoliciesGrpc.java +++ b/grpc-google-iam-v2/src/main/java/com/google/iam/v2/PoliciesGrpc.java @@ -234,54 +234,6 @@ private PoliciesGrpc() {} return getDeletePolicyMethod; } - private static volatile io.grpc.MethodDescriptor< - com.google.iam.v2.ListApplicablePoliciesRequest, - com.google.iam.v2.ListApplicablePoliciesResponse> - getListApplicablePoliciesMethod; - - @io.grpc.stub.annotations.RpcMethod( - fullMethodName = SERVICE_NAME + '/' + "ListApplicablePolicies", - requestType = com.google.iam.v2.ListApplicablePoliciesRequest.class, - responseType = com.google.iam.v2.ListApplicablePoliciesResponse.class, - methodType = io.grpc.MethodDescriptor.MethodType.UNARY) - public static io.grpc.MethodDescriptor< - com.google.iam.v2.ListApplicablePoliciesRequest, - com.google.iam.v2.ListApplicablePoliciesResponse> - getListApplicablePoliciesMethod() { - io.grpc.MethodDescriptor< - com.google.iam.v2.ListApplicablePoliciesRequest, - com.google.iam.v2.ListApplicablePoliciesResponse> - getListApplicablePoliciesMethod; - if ((getListApplicablePoliciesMethod = PoliciesGrpc.getListApplicablePoliciesMethod) == null) { - synchronized (PoliciesGrpc.class) { - if ((getListApplicablePoliciesMethod = PoliciesGrpc.getListApplicablePoliciesMethod) - == null) { - PoliciesGrpc.getListApplicablePoliciesMethod = - getListApplicablePoliciesMethod = - io.grpc.MethodDescriptor - . - newBuilder() - .setType(io.grpc.MethodDescriptor.MethodType.UNARY) - .setFullMethodName( - generateFullMethodName(SERVICE_NAME, "ListApplicablePolicies")) - .setSampledToLocalTracing(true) - .setRequestMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v2.ListApplicablePoliciesRequest.getDefaultInstance())) - .setResponseMarshaller( - io.grpc.protobuf.ProtoUtils.marshaller( - com.google.iam.v2.ListApplicablePoliciesResponse - .getDefaultInstance())) - .setSchemaDescriptor( - new PoliciesMethodDescriptorSupplier("ListApplicablePolicies")) - .build(); - } - } - } - return getListApplicablePoliciesMethod; - } - /** Creates a new async stub that supports all call types for the service */ public static PoliciesStub newStub(io.grpc.Channel channel) { io.grpc.stub.AbstractStub.StubFactory factory = @@ -382,8 +334,7 @@ public void createPolicy( * Updates the specified policy. * You can update only the rules and the display name for the policy. * To update a policy, you should use a read-modify-write loop: - * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current - * version of the policy. + * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy. * 2. Modify the policy as needed. * 3. Use `UpdatePolicy` to write the updated policy. * This pattern helps prevent conflicts between concurrent updates. @@ -410,29 +361,6 @@ public void deletePolicy( getDeletePolicyMethod(), responseObserver); } - /** - * - * - *
-     * Retrieves all the policies that are attached to the specified resource,
-     * or anywhere in the ancestry of the resource. For example, for a project
-     * this endpoint would return all the `denyPolicy` kind policies attached to
-     * the project, its parent folder (if any), and its parent organization (if
-     * any).
-     * The endpoint requires the same permissions that it would take to call
-     * `ListPolicies` or `GetPolicy`.
-     * The main reason to use this endpoint is as a policy admin to debug access
-     * issues for a resource.
-     * 
- */ - public void listApplicablePolicies( - com.google.iam.v2.ListApplicablePoliciesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall( - getListApplicablePoliciesMethod(), responseObserver); - } - @java.lang.Override public final io.grpc.ServerServiceDefinition bindService() { return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) @@ -465,13 +393,6 @@ public final io.grpc.ServerServiceDefinition bindService() { new MethodHandlers< com.google.iam.v2.DeletePolicyRequest, com.google.longrunning.Operation>( this, METHODID_DELETE_POLICY))) - .addMethod( - getListApplicablePoliciesMethod(), - io.grpc.stub.ServerCalls.asyncUnaryCall( - new MethodHandlers< - com.google.iam.v2.ListApplicablePoliciesRequest, - com.google.iam.v2.ListApplicablePoliciesResponse>( - this, METHODID_LIST_APPLICABLE_POLICIES))) .build(); } } @@ -549,8 +470,7 @@ public void createPolicy( * Updates the specified policy. * You can update only the rules and the display name for the policy. * To update a policy, you should use a read-modify-write loop: - * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current - * version of the policy. + * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy. * 2. Modify the policy as needed. * 3. Use `UpdatePolicy` to write the updated policy. * This pattern helps prevent conflicts between concurrent updates. @@ -580,31 +500,6 @@ public void deletePolicy( request, responseObserver); } - - /** - * - * - *
-     * Retrieves all the policies that are attached to the specified resource,
-     * or anywhere in the ancestry of the resource. For example, for a project
-     * this endpoint would return all the `denyPolicy` kind policies attached to
-     * the project, its parent folder (if any), and its parent organization (if
-     * any).
-     * The endpoint requires the same permissions that it would take to call
-     * `ListPolicies` or `GetPolicy`.
-     * The main reason to use this endpoint is as a policy admin to debug access
-     * issues for a resource.
-     * 
- */ - public void listApplicablePolicies( - com.google.iam.v2.ListApplicablePoliciesRequest request, - io.grpc.stub.StreamObserver - responseObserver) { - io.grpc.stub.ClientCalls.asyncUnaryCall( - getChannel().newCall(getListApplicablePoliciesMethod(), getCallOptions()), - request, - responseObserver); - } } /** @@ -673,8 +568,7 @@ public com.google.longrunning.Operation createPolicy( * Updates the specified policy. * You can update only the rules and the display name for the policy. * To update a policy, you should use a read-modify-write loop: - * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current - * version of the policy. + * 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy. * 2. Modify the policy as needed. * 3. Use `UpdatePolicy` to write the updated policy. * This pattern helps prevent conflicts between concurrent updates. @@ -698,27 +592,6 @@ public com.google.longrunning.Operation deletePolicy( return io.grpc.stub.ClientCalls.blockingUnaryCall( getChannel(), getDeletePolicyMethod(), getCallOptions(), request); } - - /** - * - * - *
-     * Retrieves all the policies that are attached to the specified resource,
-     * or anywhere in the ancestry of the resource. For example, for a project
-     * this endpoint would return all the `denyPolicy` kind policies attached to
-     * the project, its parent folder (if any), and its parent organization (if
-     * any).
-     * The endpoint requires the same permissions that it would take to call
-     * `ListPolicies` or `GetPolicy`.
-     * The main reason to use this endpoint is as a policy admin to debug access
-     * issues for a resource.
-     * 
- */ - public com.google.iam.v2.ListApplicablePoliciesResponse listApplicablePolicies( - com.google.iam.v2.ListApplicablePoliciesRequest request) { - return io.grpc.stub.ClientCalls.blockingUnaryCall( - getChannel(), getListApplicablePoliciesMethod(), getCallOptions(), request); - } } /** @@ -789,8 +662,7 @@ public com.google.common.util.concurrent.ListenableFuture - * Retrieves all the policies that are attached to the specified resource, - * or anywhere in the ancestry of the resource. For example, for a project - * this endpoint would return all the `denyPolicy` kind policies attached to - * the project, its parent folder (if any), and its parent organization (if - * any). - * The endpoint requires the same permissions that it would take to call - * `ListPolicies` or `GetPolicy`. - * The main reason to use this endpoint is as a policy admin to debug access - * issues for a resource. - * - */ - public com.google.common.util.concurrent.ListenableFuture< - com.google.iam.v2.ListApplicablePoliciesResponse> - listApplicablePolicies(com.google.iam.v2.ListApplicablePoliciesRequest request) { - return io.grpc.stub.ClientCalls.futureUnaryCall( - getChannel().newCall(getListApplicablePoliciesMethod(), getCallOptions()), request); - } } private static final int METHODID_LIST_POLICIES = 0; @@ -843,7 +693,6 @@ public com.google.common.util.concurrent.ListenableFuture implements io.grpc.stub.ServerCalls.UnaryMethod, @@ -888,12 +737,6 @@ public void invoke(Req request, io.grpc.stub.StreamObserver responseObserv (com.google.iam.v2.DeletePolicyRequest) request, (io.grpc.stub.StreamObserver) responseObserver); break; - case METHODID_LIST_APPLICABLE_POLICIES: - serviceImpl.listApplicablePolicies( - (com.google.iam.v2.ListApplicablePoliciesRequest) request, - (io.grpc.stub.StreamObserver) - responseObserver); - break; default: throw new AssertionError(); } @@ -961,7 +804,6 @@ public static io.grpc.ServiceDescriptor getServiceDescriptor() { .addMethod(getCreatePolicyMethod()) .addMethod(getUpdatePolicyMethod()) .addMethod(getDeletePolicyMethod()) - .addMethod(getListApplicablePoliciesMethod()) .build(); } } diff --git a/grpc-google-iam-v2beta/pom.xml b/grpc-google-iam-v2beta/pom.xml index f9031c53..224d9e6e 100644 --- a/grpc-google-iam-v2beta/pom.xml +++ b/grpc-google-iam-v2beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc grpc-google-iam-v2beta - 1.6.1 + 1.6.2 grpc-google-iam-v2beta GRPC library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.6.1 + 1.6.2 diff --git a/pom.xml b/pom.xml index bd1216d2..90a56468 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.google.cloud google-iam-parent pom - 1.6.1 + 1.6.2 Google IAM Parent https://github.com/googleapis/java-iam @@ -68,6 +68,16 @@ + com.google.protobuf + protobuf-bom + 3.21.7 + pom + import + + + com.google.cloud google-cloud-shared-dependencies 3.0.3 @@ -77,37 +87,37 @@ com.google.api.grpc proto-google-iam-v2 - 1.6.1 + 1.6.2 com.google.api.grpc grpc-google-iam-v2 - 1.6.1 + 1.6.2 com.google.cloud google-iam-policy - 1.6.1 + 1.6.2 com.google.api.grpc proto-google-iam-v2beta - 1.6.1 + 1.6.2 com.google.api.grpc grpc-google-iam-v1 - 1.6.1 + 1.6.2 com.google.api.grpc grpc-google-iam-v2beta - 1.6.1 + 1.6.2 com.google.api.grpc proto-google-iam-v1 - 1.6.1 + 1.6.2 diff --git a/proto-google-iam-v1/build.gradle b/proto-google-iam-v1/build.gradle index 4faf2f70..425297af 100644 --- a/proto-google-iam-v1/build.gradle +++ b/proto-google-iam-v1/build.gradle @@ -18,7 +18,7 @@ repositories { } dependencies { - compile 'com.google.protobuf:protobuf-java:3.21.6' + compile 'com.google.protobuf:protobuf-java:3.21.7' compile 'com.google.api:api-common:2.2.1' compile project(':proto-google-common-protos') } diff --git a/proto-google-iam-v1/pom.xml b/proto-google-iam-v1/pom.xml index 2c05a7fa..13780046 100644 --- a/proto-google-iam-v1/pom.xml +++ b/proto-google-iam-v1/pom.xml @@ -3,13 +3,13 @@ 4.0.0 com.google.api.grpc proto-google-iam-v1 - 1.6.1 + 1.6.2 proto-google-iam-v1 PROTO library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.6.1 + 1.6.2 diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfig.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfig.java index ec61d337..7d07f324 100644 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfig.java +++ b/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfig.java @@ -99,66 +99,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AuditConfig( - 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(); - - service_ = s; - break; - } - case 26: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - auditLogConfigs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - auditLogConfigs_.add( - input.readMessage(com.google.iam.v1.AuditLogConfig.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)) { - auditLogConfigs_ = java.util.Collections.unmodifiableList(auditLogConfigs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_AuditConfig_descriptor; } @@ -314,7 +254,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < auditLogConfigs_.size(); i++) { output.writeMessage(3, auditLogConfigs_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -329,7 +269,7 @@ public int getSerializedSize() { for (int i = 0; i < auditLogConfigs_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, auditLogConfigs_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -346,7 +286,7 @@ public boolean equals(final java.lang.Object obj) { if (!getService().equals(other.getService())) return false; if (!getAuditLogConfigsList().equals(other.getAuditLogConfigsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -363,7 +303,7 @@ public int hashCode() { hash = (37 * hash) + AUDIT_LOG_CONFIGS_FIELD_NUMBER; hash = (53 * hash) + getAuditLogConfigsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -535,19 +475,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v1.AuditConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getAuditLogConfigsFieldBuilder(); - } } @java.lang.Override @@ -557,10 +488,11 @@ public Builder clear() { if (auditLogConfigsBuilder_ == null) { auditLogConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + auditLogConfigs_ = null; auditLogConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); return this; } @@ -677,7 +609,7 @@ public Builder mergeFrom(com.google.iam.v1.AuditConfig other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -692,17 +624,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v1.AuditConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + service_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 26: + { + com.google.iam.v1.AuditLogConfig m = + input.readMessage(com.google.iam.v1.AuditLogConfig.parser(), extensionRegistry); + if (auditLogConfigsBuilder_ == null) { + ensureAuditLogConfigsIsMutable(); + auditLogConfigs_.add(m); + } else { + auditLogConfigsBuilder_.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.iam.v1.AuditConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1209,7 +1173,18 @@ public AuditConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AuditConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfigDelta.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfigDelta.java index 56e4b058..622b6414 100644 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfigDelta.java +++ b/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditConfigDelta.java @@ -56,73 +56,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AuditConfigDelta( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder 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(); - - action_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - service_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - exemptedMember_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - logType_ = 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.iam.v1.PolicyProto.internal_static_google_iam_v1_AuditConfigDelta_descriptor; } @@ -519,7 +452,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logType_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 4, logType_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -540,7 +473,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(logType_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, logType_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -559,7 +492,7 @@ public boolean equals(final java.lang.Object obj) { if (!getService().equals(other.getService())) return false; if (!getExemptedMember().equals(other.getExemptedMember())) return false; if (!getLogType().equals(other.getLogType())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -578,7 +511,7 @@ public int hashCode() { hash = (53 * hash) + getExemptedMember().hashCode(); hash = (37 * hash) + LOG_TYPE_FIELD_NUMBER; hash = (53 * hash) + getLogType().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -707,17 +640,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v1.AuditConfigDelta.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -825,7 +751,7 @@ public Builder mergeFrom(com.google.iam.v1.AuditConfigDelta other) { logType_ = other.logType_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -840,17 +766,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v1.AuditConfigDelta parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.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: + { + action_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + service_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + exemptedMember_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + logType_ = 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.iam.v1.AuditConfigDelta) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1335,7 +1299,18 @@ public AuditConfigDelta parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AuditConfigDelta(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditLogConfig.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditLogConfig.java index 0008387a..645f2c04 100644 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditLogConfig.java +++ b/proto-google-iam-v1/src/main/java/com/google/iam/v1/AuditLogConfig.java @@ -69,66 +69,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private AuditLogConfig( - 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: - { - int rawValue = input.readEnum(); - - logType_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - exemptedMembers_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - exemptedMembers_.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)) { - exemptedMembers_ = exemptedMembers_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_AuditLogConfig_descriptor; } @@ -447,7 +387,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < exemptedMembers_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, exemptedMembers_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -467,7 +407,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getExemptedMembersList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -484,7 +424,7 @@ public boolean equals(final java.lang.Object obj) { if (logType_ != other.logType_) return false; if (!getExemptedMembersList().equals(other.getExemptedMembersList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -501,7 +441,7 @@ public int hashCode() { hash = (37 * hash) + EXEMPTED_MEMBERS_FIELD_NUMBER; hash = (53 * hash) + getExemptedMembersList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -644,17 +584,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v1.AuditLogConfig.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -758,7 +691,7 @@ public Builder mergeFrom(com.google.iam.v1.AuditLogConfig other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -773,17 +706,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v1.AuditLogConfig parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.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: + { + logType_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExemptedMembersIsMutable(); + exemptedMembers_.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.iam.v1.AuditLogConfig) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1098,7 +1058,18 @@ public AuditLogConfig parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new AuditLogConfig(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/Binding.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/Binding.java index cf06536c..d4cb1d80 100644 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/Binding.java +++ b/proto-google-iam-v1/src/main/java/com/google/iam/v1/Binding.java @@ -53,80 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Binding( - 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(); - - role_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - members_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - members_.add(s); - break; - } - case 26: - { - com.google.type.Expr.Builder subBuilder = null; - if (condition_ != null) { - subBuilder = condition_.toBuilder(); - } - condition_ = input.readMessage(com.google.type.Expr.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(condition_); - condition_ = 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)) { - members_ = members_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Binding_descriptor; } @@ -464,7 +390,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (condition_ != null) { output.writeMessage(3, getCondition()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -487,7 +413,7 @@ public int getSerializedSize() { if (condition_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getCondition()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -508,7 +434,7 @@ public boolean equals(final java.lang.Object obj) { if (hasCondition()) { if (!getCondition().equals(other.getCondition())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -529,7 +455,7 @@ public int hashCode() { hash = (37 * hash) + CONDITION_FIELD_NUMBER; hash = (53 * hash) + getCondition().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -654,17 +580,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v1.Binding.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -783,7 +702,7 @@ public Builder mergeFrom(com.google.iam.v1.Binding other) { if (other.hasCondition()) { mergeCondition(other.getCondition()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -798,17 +717,50 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v1.Binding parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + role_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureMembersIsMutable(); + members_.add(s); + break; + } // case 18 + case 26: + { + input.readMessage(getConditionFieldBuilder().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.iam.v1.Binding) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1639,7 +1591,18 @@ public Binding parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Binding(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/BindingDelta.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/BindingDelta.java index b6ef1653..f6d46a10 100644 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/BindingDelta.java +++ b/proto-google-iam-v1/src/main/java/com/google/iam/v1/BindingDelta.java @@ -55,80 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private BindingDelta( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder 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(); - - action_ = rawValue; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - role_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - member_ = s; - break; - } - case 34: - { - com.google.type.Expr.Builder subBuilder = null; - if (condition_ != null) { - subBuilder = condition_.toBuilder(); - } - condition_ = input.readMessage(com.google.type.Expr.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(condition_); - condition_ = 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.iam.v1.PolicyProto.internal_static_google_iam_v1_BindingDelta_descriptor; } @@ -515,7 +441,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (condition_ != null) { output.writeMessage(4, getCondition()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -536,7 +462,7 @@ public int getSerializedSize() { if (condition_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getCondition()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -558,7 +484,7 @@ public boolean equals(final java.lang.Object obj) { if (hasCondition()) { if (!getCondition().equals(other.getCondition())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -579,7 +505,7 @@ public int hashCode() { hash = (37 * hash) + CONDITION_FIELD_NUMBER; hash = (53 * hash) + getCondition().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -706,17 +632,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v1.BindingDelta.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -830,7 +749,7 @@ public Builder mergeFrom(com.google.iam.v1.BindingDelta other) { if (other.hasCondition()) { mergeCondition(other.getCondition()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -845,17 +764,55 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v1.BindingDelta parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.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: + { + action_ = input.readEnum(); + + break; + } // case 8 + case 18: + { + role_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + member_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + input.readMessage(getConditionFieldBuilder().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.iam.v1.BindingDelta) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1391,7 +1348,18 @@ public BindingDelta parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new BindingDelta(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetIamPolicyRequest.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetIamPolicyRequest.java index 1a41603b..883feeaa 100644 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetIamPolicyRequest.java +++ b/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetIamPolicyRequest.java @@ -52,67 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetIamPolicyRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - resource_ = s; - break; - } - case 18: - { - com.google.iam.v1.GetPolicyOptions.Builder subBuilder = null; - if (options_ != null) { - subBuilder = options_.toBuilder(); - } - options_ = - input.readMessage(com.google.iam.v1.GetPolicyOptions.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(options_); - options_ = 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.iam.v1.IamPolicyProto .internal_static_google_iam_v1_GetIamPolicyRequest_descriptor; @@ -252,7 +191,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (options_ != null) { output.writeMessage(2, getOptions()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -267,7 +206,7 @@ public int getSerializedSize() { if (options_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOptions()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -287,7 +226,7 @@ public boolean equals(final java.lang.Object obj) { if (hasOptions()) { if (!getOptions().equals(other.getOptions())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -304,7 +243,7 @@ public int hashCode() { hash = (37 * hash) + OPTIONS_FIELD_NUMBER; hash = (53 * hash) + getOptions().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -432,17 +371,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v1.GetIamPolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -545,7 +477,7 @@ public Builder mergeFrom(com.google.iam.v1.GetIamPolicyRequest other) { if (other.hasOptions()) { mergeOptions(other.getOptions()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -560,17 +492,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v1.GetIamPolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getOptionsFieldBuilder().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.iam.v1.GetIamPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -921,7 +879,18 @@ public GetIamPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetIamPolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetPolicyOptions.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetPolicyOptions.java index 488dad2c..1c427ecb 100644 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetPolicyOptions.java +++ b/proto-google-iam-v1/src/main/java/com/google/iam/v1/GetPolicyOptions.java @@ -50,50 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetPolicyOptions( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder 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: - { - requestedPolicyVersion_ = 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.iam.v1.OptionsProto.internal_static_google_iam_v1_GetPolicyOptions_descriptor; } @@ -156,7 +112,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (requestedPolicyVersion_ != 0) { output.writeInt32(1, requestedPolicyVersion_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -168,7 +124,7 @@ public int getSerializedSize() { if (requestedPolicyVersion_ != 0) { size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, requestedPolicyVersion_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -184,7 +140,7 @@ public boolean equals(final java.lang.Object obj) { com.google.iam.v1.GetPolicyOptions other = (com.google.iam.v1.GetPolicyOptions) obj; if (getRequestedPolicyVersion() != other.getRequestedPolicyVersion()) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -197,7 +153,7 @@ public int hashCode() { hash = (19 * hash) + getDescriptor().hashCode(); hash = (37 * hash) + REQUESTED_POLICY_VERSION_FIELD_NUMBER; hash = (53 * hash) + getRequestedPolicyVersion(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -325,17 +281,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v1.GetPolicyOptions.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -422,7 +371,7 @@ public Builder mergeFrom(com.google.iam.v1.GetPolicyOptions other) { if (other.getRequestedPolicyVersion() != 0) { setRequestedPolicyVersion(other.getRequestedPolicyVersion()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -437,17 +386,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v1.GetPolicyOptions parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.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: + { + requestedPolicyVersion_ = input.readInt32(); + + 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.iam.v1.GetPolicyOptions) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -574,7 +543,18 @@ public GetPolicyOptions parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetPolicyOptions(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/Policy.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/Policy.java index db26b549..b03aa80d 100644 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/Policy.java +++ b/proto-google-iam-v1/src/main/java/com/google/iam/v1/Policy.java @@ -112,82 +112,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Policy( - 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: - { - version_ = input.readInt32(); - break; - } - case 26: - { - etag_ = input.readBytes(); - break; - } - case 34: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - bindings_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - bindings_.add( - input.readMessage(com.google.iam.v1.Binding.parser(), extensionRegistry)); - break; - } - case 50: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - auditConfigs_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - auditConfigs_.add( - input.readMessage(com.google.iam.v1.AuditConfig.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)) { - bindings_ = java.util.Collections.unmodifiableList(bindings_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - auditConfigs_ = java.util.Collections.unmodifiableList(auditConfigs_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_Policy_descriptor; } @@ -466,7 +390,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < auditConfigs_.size(); i++) { output.writeMessage(6, auditConfigs_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -487,7 +411,7 @@ public int getSerializedSize() { for (int i = 0; i < auditConfigs_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, auditConfigs_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -506,7 +430,7 @@ public boolean equals(final java.lang.Object obj) { if (!getBindingsList().equals(other.getBindingsList())) return false; if (!getAuditConfigsList().equals(other.getAuditConfigsList())) return false; if (!getEtag().equals(other.getEtag())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -529,7 +453,7 @@ public int hashCode() { } hash = (37 * hash) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -712,20 +636,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v1.Policy.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getBindingsFieldBuilder(); - getAuditConfigsFieldBuilder(); - } } @java.lang.Override @@ -735,16 +649,18 @@ public Builder clear() { if (bindingsBuilder_ == null) { bindings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + bindings_ = null; bindingsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (auditConfigsBuilder_ == null) { auditConfigs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + auditConfigs_ = null; auditConfigsBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); etag_ = com.google.protobuf.ByteString.EMPTY; return this; @@ -902,7 +818,7 @@ public Builder mergeFrom(com.google.iam.v1.Policy other) { if (other.getEtag() != com.google.protobuf.ByteString.EMPTY) { setEtag(other.getEtag()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -917,17 +833,67 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v1.Policy parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.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: + { + version_ = input.readInt32(); + + break; + } // case 8 + case 26: + { + etag_ = input.readBytes(); + + break; + } // case 26 + case 34: + { + com.google.iam.v1.Binding m = + input.readMessage(com.google.iam.v1.Binding.parser(), extensionRegistry); + if (bindingsBuilder_ == null) { + ensureBindingsIsMutable(); + bindings_.add(m); + } else { + bindingsBuilder_.addMessage(m); + } + break; + } // case 34 + case 50: + { + com.google.iam.v1.AuditConfig m = + input.readMessage(com.google.iam.v1.AuditConfig.parser(), extensionRegistry); + if (auditConfigsBuilder_ == null) { + ensureAuditConfigsIsMutable(); + auditConfigs_.add(m); + } else { + auditConfigsBuilder_.addMessage(m); + } + 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.iam.v1.Policy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1987,7 +1953,18 @@ public Policy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Policy(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyDelta.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyDelta.java index ed094c19..536ede1a 100644 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyDelta.java +++ b/proto-google-iam-v1/src/main/java/com/google/iam/v1/PolicyDelta.java @@ -53,73 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PolicyDelta( - 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)) { - bindingDeltas_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - bindingDeltas_.add( - input.readMessage(com.google.iam.v1.BindingDelta.parser(), extensionRegistry)); - break; - } - case 18: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - auditConfigDeltas_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - auditConfigDeltas_.add( - input.readMessage( - com.google.iam.v1.AuditConfigDelta.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)) { - bindingDeltas_ = java.util.Collections.unmodifiableList(bindingDeltas_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - auditConfigDeltas_ = java.util.Collections.unmodifiableList(auditConfigDeltas_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v1.PolicyProto.internal_static_google_iam_v1_PolicyDelta_descriptor; } @@ -291,7 +224,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < auditConfigDeltas_.size(); i++) { output.writeMessage(2, auditConfigDeltas_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -307,7 +240,7 @@ public int getSerializedSize() { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, auditConfigDeltas_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -324,7 +257,7 @@ public boolean equals(final java.lang.Object obj) { if (!getBindingDeltasList().equals(other.getBindingDeltasList())) return false; if (!getAuditConfigDeltasList().equals(other.getAuditConfigDeltasList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -343,7 +276,7 @@ public int hashCode() { hash = (37 * hash) + AUDIT_CONFIG_DELTAS_FIELD_NUMBER; hash = (53 * hash) + getAuditConfigDeltasList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -469,20 +402,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v1.PolicyDelta.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getBindingDeltasFieldBuilder(); - getAuditConfigDeltasFieldBuilder(); - } } @java.lang.Override @@ -490,16 +413,18 @@ public Builder clear() { super.clear(); if (bindingDeltasBuilder_ == null) { bindingDeltas_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + bindingDeltas_ = null; bindingDeltasBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); if (auditConfigDeltasBuilder_ == null) { auditConfigDeltas_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + auditConfigDeltas_ = null; auditConfigDeltasBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -647,7 +572,7 @@ public Builder mergeFrom(com.google.iam.v1.PolicyDelta other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -662,17 +587,56 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v1.PolicyDelta parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } 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.iam.v1.BindingDelta m = + input.readMessage(com.google.iam.v1.BindingDelta.parser(), extensionRegistry); + if (bindingDeltasBuilder_ == null) { + ensureBindingDeltasIsMutable(); + bindingDeltas_.add(m); + } else { + bindingDeltasBuilder_.addMessage(m); + } + break; + } // case 10 + case 18: + { + com.google.iam.v1.AuditConfigDelta m = + input.readMessage( + com.google.iam.v1.AuditConfigDelta.parser(), extensionRegistry); + if (auditConfigDeltasBuilder_ == null) { + ensureAuditConfigDeltasIsMutable(); + auditConfigDeltas_.add(m); + } else { + auditConfigDeltasBuilder_.addMessage(m); + } + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v1.PolicyDelta) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1415,7 +1379,18 @@ public PolicyDelta parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyDelta(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/SetIamPolicyRequest.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/SetIamPolicyRequest.java index 3bf8dfa8..78d0c7aa 100644 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/SetIamPolicyRequest.java +++ b/proto-google-iam-v1/src/main/java/com/google/iam/v1/SetIamPolicyRequest.java @@ -52,81 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SetIamPolicyRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - resource_ = s; - break; - } - case 18: - { - com.google.iam.v1.Policy.Builder subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = input.readMessage(com.google.iam.v1.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = 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.iam.v1.IamPolicyProto .internal_static_google_iam_v1_SetIamPolicyRequest_descriptor; @@ -330,7 +255,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 @@ -348,7 +273,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; } @@ -372,7 +297,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; } @@ -393,7 +318,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; } @@ -521,17 +446,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v1.SetIamPolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -648,7 +566,7 @@ public Builder mergeFrom(com.google.iam.v1.SetIamPolicyRequest other) { if (other.hasUpdateMask()) { mergeUpdateMask(other.getUpdateMask()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -663,17 +581,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v1.SetIamPolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getPolicyFieldBuilder().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.iam.v1.SetIamPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1244,7 +1194,18 @@ public SetIamPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new SetIamPolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsRequest.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsRequest.java index 7e4b6583..cb5dab7d 100644 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsRequest.java +++ b/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsRequest.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsRequest( - 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(); - - resource_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - permissions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - permissions_.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)) { - permissions_ = permissions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v1.IamPolicyProto .internal_static_google_iam_v1_TestIamPermissionsRequest_descriptor; @@ -276,7 +216,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < permissions_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, permissions_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -296,7 +236,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getPermissionsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -314,7 +254,7 @@ public boolean equals(final java.lang.Object obj) { if (!getResource().equals(other.getResource())) return false; if (!getPermissionsList().equals(other.getPermissionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -331,7 +271,7 @@ public int hashCode() { hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; hash = (53 * hash) + getPermissionsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -460,17 +400,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v1.TestIamPermissionsRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -577,7 +510,7 @@ public Builder mergeFrom(com.google.iam.v1.TestIamPermissionsRequest other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -592,17 +525,44 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v1.TestIamPermissionsRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + resource_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensurePermissionsIsMutable(); + permissions_.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.iam.v1.TestIamPermissionsRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -956,7 +916,18 @@ public TestIamPermissionsRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsResponse.java b/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsResponse.java index 0aec2dfd..fbe4f1a3 100644 --- a/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsResponse.java +++ b/proto-google-iam-v1/src/main/java/com/google/iam/v1/TestIamPermissionsResponse.java @@ -52,59 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private TestIamPermissionsResponse( - 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)) { - permissions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - permissions_.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)) { - permissions_ = permissions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v1.IamPolicyProto .internal_static_google_iam_v1_TestIamPermissionsResponse_descriptor; @@ -202,7 +149,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < permissions_.size(); i++) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, permissions_.getRaw(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -219,7 +166,7 @@ public int getSerializedSize() { size += dataSize; size += 1 * getPermissionsList().size(); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -236,7 +183,7 @@ public boolean equals(final java.lang.Object obj) { (com.google.iam.v1.TestIamPermissionsResponse) obj; if (!getPermissionsList().equals(other.getPermissionsList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -251,7 +198,7 @@ public int hashCode() { hash = (37 * hash) + PERMISSIONS_FIELD_NUMBER; hash = (53 * hash) + getPermissionsList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -380,17 +327,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v1.TestIamPermissionsResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private 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 +430,7 @@ public Builder mergeFrom(com.google.iam.v1.TestIamPermissionsResponse other) { } onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -505,17 +445,38 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v1.TestIamPermissionsResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } 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(); + ensurePermissionsIsMutable(); + permissions_.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.iam.v1.TestIamPermissionsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -730,7 +691,18 @@ public TestIamPermissionsResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new TestIamPermissionsResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/pom.xml b/proto-google-iam-v2/pom.xml index f461670a..a80c7043 100644 --- a/proto-google-iam-v2/pom.xml +++ b/proto-google-iam-v2/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-iam-v2 - 1.6.1 + 1.6.2 proto-google-iam-v2 Proto library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.6.1 + 1.6.2 diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequest.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequest.java index 3a88d070..3566ce1a 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequest.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequest.java @@ -53,73 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreatePolicyRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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.iam.v2.Policy.Builder subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = input.readMessage(com.google.iam.v2.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - policyId_ = 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.iam.v2.PolicyProto .internal_static_google_iam_v2_CreatePolicyRequest_descriptor; @@ -141,8 +74,8 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The resource that the policy is attached to, along with the kind
-   * of policy to create. Format: `policies/{attachment_point}/denypolicies`
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to create. Format: `policies/{attachment_point}/denypolicies`
    * The attachment point is identified by its URL-encoded full resource name,
    * which means that the forward-slash character, `/`, must be written as
    * `%2F`. For example,
@@ -171,8 +104,8 @@ public java.lang.String getParent() {
    *
    *
    * 
-   * Required. The resource that the policy is attached to, along with the kind
-   * of policy to create. Format: `policies/{attachment_point}/denypolicies`
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to create. Format: `policies/{attachment_point}/denypolicies`
    * The attachment point is identified by its URL-encoded full resource name,
    * which means that the forward-slash character, `/`, must be written as
    * `%2F`. For example,
@@ -322,7 +255,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io
     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyId_)) {
       com.google.protobuf.GeneratedMessageV3.writeString(output, 3, policyId_);
     }
-    unknownFields.writeTo(output);
+    getUnknownFields().writeTo(output);
   }
 
   @java.lang.Override
@@ -340,7 +273,7 @@ public int getSerializedSize() {
     if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyId_)) {
       size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, policyId_);
     }
-    size += unknownFields.getSerializedSize();
+    size += getUnknownFields().getSerializedSize();
     memoizedSize = size;
     return size;
   }
@@ -361,7 +294,7 @@ public boolean equals(final java.lang.Object obj) {
       if (!getPolicy().equals(other.getPolicy())) return false;
     }
     if (!getPolicyId().equals(other.getPolicyId())) return false;
-    if (!unknownFields.equals(other.unknownFields)) return false;
+    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
     return true;
   }
 
@@ -380,7 +313,7 @@ public int hashCode() {
     }
     hash = (37 * hash) + POLICY_ID_FIELD_NUMBER;
     hash = (53 * hash) + getPolicyId().hashCode();
-    hash = (29 * hash) + unknownFields.hashCode();
+    hash = (29 * hash) + getUnknownFields().hashCode();
     memoizedHashCode = hash;
     return hash;
   }
@@ -508,17 +441,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
     }
 
     // Construct using com.google.iam.v2.CreatePolicyRequest.newBuilder()
-    private Builder() {
-      maybeForceBuilderInitialization();
-    }
+    private Builder() {}
 
     private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
       super(parent);
-      maybeForceBuilderInitialization();
-    }
-
-    private void maybeForceBuilderInitialization() {
-      if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {}
     }
 
     @java.lang.Override
@@ -628,7 +554,7 @@ public Builder mergeFrom(com.google.iam.v2.CreatePolicyRequest other) {
         policyId_ = other.policyId_;
         onChanged();
       }
-      this.mergeUnknownFields(other.unknownFields);
+      this.mergeUnknownFields(other.getUnknownFields());
       onChanged();
       return this;
     }
@@ -643,17 +569,49 @@ public Builder mergeFrom(
         com.google.protobuf.CodedInputStream input,
         com.google.protobuf.ExtensionRegistryLite extensionRegistry)
         throws java.io.IOException {
-      com.google.iam.v2.CreatePolicyRequest parsedMessage = null;
+      if (extensionRegistry == null) {
+        throw new java.lang.NullPointerException();
+      }
       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(getPolicyFieldBuilder().getBuilder(), extensionRegistry);
+
+                break;
+              } // case 18
+            case 26:
+              {
+                policyId_ = 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.iam.v2.CreatePolicyRequest) e.getUnfinishedMessage();
         throw e.unwrapIOException();
       } finally {
-        if (parsedMessage != null) {
-          mergeFrom(parsedMessage);
-        }
-      }
+        onChanged();
+      } // finally
       return this;
     }
 
@@ -662,8 +620,8 @@ public Builder mergeFrom(
      *
      *
      * 
-     * Required. The resource that the policy is attached to, along with the kind
-     * of policy to create. Format: `policies/{attachment_point}/denypolicies`
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to create. Format: `policies/{attachment_point}/denypolicies`
      * The attachment point is identified by its URL-encoded full resource name,
      * which means that the forward-slash character, `/`, must be written as
      * `%2F`. For example,
@@ -691,8 +649,8 @@ public java.lang.String getParent() {
      *
      *
      * 
-     * Required. The resource that the policy is attached to, along with the kind
-     * of policy to create. Format: `policies/{attachment_point}/denypolicies`
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to create. Format: `policies/{attachment_point}/denypolicies`
      * The attachment point is identified by its URL-encoded full resource name,
      * which means that the forward-slash character, `/`, must be written as
      * `%2F`. For example,
@@ -720,8 +678,8 @@ public com.google.protobuf.ByteString getParentBytes() {
      *
      *
      * 
-     * Required. The resource that the policy is attached to, along with the kind
-     * of policy to create. Format: `policies/{attachment_point}/denypolicies`
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to create. Format: `policies/{attachment_point}/denypolicies`
      * The attachment point is identified by its URL-encoded full resource name,
      * which means that the forward-slash character, `/`, must be written as
      * `%2F`. For example,
@@ -748,8 +706,8 @@ public Builder setParent(java.lang.String value) {
      *
      *
      * 
-     * Required. The resource that the policy is attached to, along with the kind
-     * of policy to create. Format: `policies/{attachment_point}/denypolicies`
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to create. Format: `policies/{attachment_point}/denypolicies`
      * The attachment point is identified by its URL-encoded full resource name,
      * which means that the forward-slash character, `/`, must be written as
      * `%2F`. For example,
@@ -772,8 +730,8 @@ public Builder clearParent() {
      *
      *
      * 
-     * Required. The resource that the policy is attached to, along with the kind
-     * of policy to create. Format: `policies/{attachment_point}/denypolicies`
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to create. Format: `policies/{attachment_point}/denypolicies`
      * The attachment point is identified by its URL-encoded full resource name,
      * which means that the forward-slash character, `/`, must be written as
      * `%2F`. For example,
@@ -1128,7 +1086,18 @@ public CreatePolicyRequest parsePartialFrom(
             com.google.protobuf.CodedInputStream input,
             com.google.protobuf.ExtensionRegistryLite extensionRegistry)
             throws com.google.protobuf.InvalidProtocolBufferException {
-          return new CreatePolicyRequest(input, extensionRegistry);
+          Builder builder = newBuilder();
+          try {
+            builder.mergeFrom(input, extensionRegistry);
+          } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+            throw e.setUnfinishedMessage(builder.buildPartial());
+          } catch (com.google.protobuf.UninitializedMessageException e) {
+            throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+          } catch (java.io.IOException e) {
+            throw new com.google.protobuf.InvalidProtocolBufferException(e)
+                .setUnfinishedMessage(builder.buildPartial());
+          }
+          return builder.buildPartial();
         }
       };
 
diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequestOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequestOrBuilder.java
index 35cbef4d..3825ae18 100644
--- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequestOrBuilder.java
+++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/CreatePolicyRequestOrBuilder.java
@@ -27,8 +27,8 @@ public interface CreatePolicyRequestOrBuilder
    *
    *
    * 
-   * Required. The resource that the policy is attached to, along with the kind
-   * of policy to create. Format: `policies/{attachment_point}/denypolicies`
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to create. Format: `policies/{attachment_point}/denypolicies`
    * The attachment point is identified by its URL-encoded full resource name,
    * which means that the forward-slash character, `/`, must be written as
    * `%2F`. For example,
@@ -46,8 +46,8 @@ public interface CreatePolicyRequestOrBuilder
    *
    *
    * 
-   * Required. The resource that the policy is attached to, along with the kind
-   * of policy to create. Format: `policies/{attachment_point}/denypolicies`
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to create. Format: `policies/{attachment_point}/denypolicies`
    * The attachment point is identified by its URL-encoded full resource name,
    * which means that the forward-slash character, `/`, must be written as
    * `%2F`. For example,
diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequest.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequest.java
index 44d2147b..3900d3dc 100644
--- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequest.java
+++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequest.java
@@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
     return this.unknownFields;
   }
 
-  private DeletePolicyRequest(
-      com.google.protobuf.CodedInputStream input,
-      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
-      throws com.google.protobuf.InvalidProtocolBufferException {
-    this();
-    if (extensionRegistry == null) {
-      throw new java.lang.NullPointerException();
-    }
-    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
-        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();
-
-              etag_ = 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.iam.v2.PolicyProto
         .internal_static_google_iam_v2_DeletePolicyRequest_descriptor;
@@ -188,9 +135,9 @@ public com.google.protobuf.ByteString getNameBytes() {
    *
    *
    * 
-   * Optional. The expected `etag` of the policy to delete. If the value does
-   * not match the value that is stored in IAM, the request fails with a `409`
-   * error code and `ABORTED` status.
+   * Optional. The expected `etag` of the policy to delete. If the value does not match
+   * the value that is stored in IAM, the request fails with a `409` error code
+   * and `ABORTED` status.
    * If you omit this field, the policy is deleted regardless of its current
    * `etag`.
    * 
@@ -215,9 +162,9 @@ public java.lang.String getEtag() { * * *
-   * Optional. The expected `etag` of the policy to delete. If the value does
-   * not match the value that is stored in IAM, the request fails with a `409`
-   * error code and `ABORTED` status.
+   * Optional. The expected `etag` of the policy to delete. If the value does not match
+   * the value that is stored in IAM, the request fails with a `409` error code
+   * and `ABORTED` status.
    * If you omit this field, the policy is deleted regardless of its current
    * `etag`.
    * 
@@ -259,7 +206,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -274,7 +221,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -291,7 +238,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getEtag().equals(other.getEtag())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -306,7 +253,7 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -434,17 +381,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2.DeletePolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -540,7 +480,7 @@ public Builder mergeFrom(com.google.iam.v2.DeletePolicyRequest other) { etag_ = other.etag_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -555,17 +495,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2.DeletePolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } 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: + { + etag_ = 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.iam.v2.DeletePolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -710,9 +676,9 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * Optional. The expected `etag` of the policy to delete. If the value does
-     * not match the value that is stored in IAM, the request fails with a `409`
-     * error code and `ABORTED` status.
+     * Optional. The expected `etag` of the policy to delete. If the value does not match
+     * the value that is stored in IAM, the request fails with a `409` error code
+     * and `ABORTED` status.
      * If you omit this field, the policy is deleted regardless of its current
      * `etag`.
      * 
@@ -736,9 +702,9 @@ public java.lang.String getEtag() { * * *
-     * Optional. The expected `etag` of the policy to delete. If the value does
-     * not match the value that is stored in IAM, the request fails with a `409`
-     * error code and `ABORTED` status.
+     * Optional. The expected `etag` of the policy to delete. If the value does not match
+     * the value that is stored in IAM, the request fails with a `409` error code
+     * and `ABORTED` status.
      * If you omit this field, the policy is deleted regardless of its current
      * `etag`.
      * 
@@ -762,9 +728,9 @@ public com.google.protobuf.ByteString getEtagBytes() { * * *
-     * Optional. The expected `etag` of the policy to delete. If the value does
-     * not match the value that is stored in IAM, the request fails with a `409`
-     * error code and `ABORTED` status.
+     * Optional. The expected `etag` of the policy to delete. If the value does not match
+     * the value that is stored in IAM, the request fails with a `409` error code
+     * and `ABORTED` status.
      * If you omit this field, the policy is deleted regardless of its current
      * `etag`.
      * 
@@ -787,9 +753,9 @@ public Builder setEtag(java.lang.String value) { * * *
-     * Optional. The expected `etag` of the policy to delete. If the value does
-     * not match the value that is stored in IAM, the request fails with a `409`
-     * error code and `ABORTED` status.
+     * Optional. The expected `etag` of the policy to delete. If the value does not match
+     * the value that is stored in IAM, the request fails with a `409` error code
+     * and `ABORTED` status.
      * If you omit this field, the policy is deleted regardless of its current
      * `etag`.
      * 
@@ -808,9 +774,9 @@ public Builder clearEtag() { * * *
-     * Optional. The expected `etag` of the policy to delete. If the value does
-     * not match the value that is stored in IAM, the request fails with a `409`
-     * error code and `ABORTED` status.
+     * Optional. The expected `etag` of the policy to delete. If the value does not match
+     * the value that is stored in IAM, the request fails with a `409` error code
+     * and `ABORTED` status.
      * If you omit this field, the policy is deleted regardless of its current
      * `etag`.
      * 
@@ -863,7 +829,18 @@ public DeletePolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeletePolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequestOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequestOrBuilder.java index a0d077f2..9bdd7fc3 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequestOrBuilder.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/DeletePolicyRequestOrBuilder.java @@ -64,9 +64,9 @@ public interface DeletePolicyRequestOrBuilder * * *
-   * Optional. The expected `etag` of the policy to delete. If the value does
-   * not match the value that is stored in IAM, the request fails with a `409`
-   * error code and `ABORTED` status.
+   * Optional. The expected `etag` of the policy to delete. If the value does not match
+   * the value that is stored in IAM, the request fails with a `409` error code
+   * and `ABORTED` status.
    * If you omit this field, the policy is deleted regardless of its current
    * `etag`.
    * 
@@ -80,9 +80,9 @@ public interface DeletePolicyRequestOrBuilder * * *
-   * Optional. The expected `etag` of the policy to delete. If the value does
-   * not match the value that is stored in IAM, the request fails with a `409`
-   * error code and `ABORTED` status.
+   * Optional. The expected `etag` of the policy to delete. If the value does not match
+   * the value that is stored in IAM, the request fails with a `409` error code
+   * and `ABORTED` status.
    * If you omit this field, the policy is deleted regardless of its current
    * `etag`.
    * 
diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRule.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRule.java index 61475584..f3bc03f5 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRule.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/DenyRule.java @@ -55,113 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DenyRule( - 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)) { - deniedPrincipals_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - deniedPrincipals_.add(s); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - exceptionPrincipals_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - exceptionPrincipals_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - deniedPermissions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - deniedPermissions_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - exceptionPermissions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - exceptionPermissions_.add(s); - break; - } - case 42: - { - com.google.type.Expr.Builder subBuilder = null; - if (denialCondition_ != null) { - subBuilder = denialCondition_.toBuilder(); - } - denialCondition_ = - input.readMessage(com.google.type.Expr.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(denialCondition_); - denialCondition_ = 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)) { - deniedPrincipals_ = deniedPrincipals_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - exceptionPrincipals_ = exceptionPrincipals_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - deniedPermissions_ = deniedPermissions_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - exceptionPermissions_ = exceptionPermissions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v2.DenyRuleProto.internal_static_google_iam_v2_DenyRule_descriptor; } @@ -698,7 +591,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (denialCondition_ != null) { output.writeMessage(5, getDenialCondition()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -742,7 +635,7 @@ public int getSerializedSize() { if (denialCondition_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDenialCondition()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -765,7 +658,7 @@ public boolean equals(final java.lang.Object obj) { if (hasDenialCondition()) { if (!getDenialCondition().equals(other.getDenialCondition())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -796,7 +689,7 @@ public int hashCode() { hash = (37 * hash) + DENIAL_CONDITION_FIELD_NUMBER; hash = (53 * hash) + getDenialCondition().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -922,17 +815,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2.DenyRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1095,7 +981,7 @@ public Builder mergeFrom(com.google.iam.v2.DenyRule other) { if (other.hasDenialCondition()) { mergeDenialCondition(other.getDenialCondition()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1110,17 +996,65 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2.DenyRule parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } 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(); + ensureDeniedPrincipalsIsMutable(); + deniedPrincipals_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExceptionPrincipalsIsMutable(); + exceptionPrincipals_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDeniedPermissionsIsMutable(); + deniedPermissions_.add(s); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExceptionPermissionsIsMutable(); + exceptionPermissions_.add(s); + break; + } // case 34 + case 42: + { + input.readMessage(getDenialConditionFieldBuilder().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.iam.v2.DenyRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2484,7 +2418,18 @@ public DenyRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DenyRule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/GetPolicyRequest.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/GetPolicyRequest.java index 89594074..e3888a12 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/GetPolicyRequest.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/GetPolicyRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetPolicyRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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.iam.v2.PolicyProto.internal_static_google_iam_v2_GetPolicyRequest_descriptor; } @@ -190,7 +144,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 @@ -202,7 +156,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; } @@ -218,7 +172,7 @@ public boolean equals(final java.lang.Object obj) { com.google.iam.v2.GetPolicyRequest other = (com.google.iam.v2.GetPolicyRequest) obj; if (!getName().equals(other.getName())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -231,7 +185,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; } @@ -359,17 +313,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2.GetPolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private 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.iam.v2.GetPolicyRequest other) { name_ = other.name_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -472,17 +419,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2.GetPolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } 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.iam.v2.GetPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -654,7 +621,18 @@ public GetPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetPolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesRequest.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesRequest.java deleted file mode 100644 index fad84f5d..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesRequest.java +++ /dev/null @@ -1,1207 +0,0 @@ -/* - * 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/iam/v2/policy.proto - -package com.google.iam.v2; - -/** - * - * - *
- * `ListApplicablePoliciesRequest` represents the Request message for the
- * `ListApplicablePolicies` method. It provides the input for a filterable query
- * of Policies that apply to a certain GCP Resource, specified by the field
- * `attachment_point`, found on this message.
- * Example:
- * ```
- * {
- *    attachment_point:
- *    'cloudresourcemanager.googleapis.com%2Forganizations%2F212345678901'
- *    filter: 'kind:denyPolicies'
- * }
- * ```
- * 
- * - * Protobuf type {@code google.iam.v2.ListApplicablePoliciesRequest} - */ -public final class ListApplicablePoliciesRequest extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2.ListApplicablePoliciesRequest) - ListApplicablePoliciesRequestOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListApplicablePoliciesRequest.newBuilder() to construct. - private ListApplicablePoliciesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListApplicablePoliciesRequest() { - attachmentPoint_ = ""; - filter_ = ""; - pageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListApplicablePoliciesRequest(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListApplicablePoliciesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - attachmentPoint_ = s; - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - - filter_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - pageToken_ = s; - break; - } - case 32: - { - pageSize_ = 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.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.ListApplicablePoliciesRequest.class, - com.google.iam.v2.ListApplicablePoliciesRequest.Builder.class); - } - - public static final int ATTACHMENT_POINT_FIELD_NUMBER = 1; - private volatile java.lang.Object attachmentPoint_; - /** - * - * - *
-   * Required. The Cloud resource at which the applicable policies are to be
-   * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource
-   * name, which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`.
-   * 
- * - * string attachment_point = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The attachmentPoint. - */ - @java.lang.Override - public java.lang.String getAttachmentPoint() { - java.lang.Object ref = attachmentPoint_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attachmentPoint_ = s; - return s; - } - } - /** - * - * - *
-   * Required. The Cloud resource at which the applicable policies are to be
-   * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource
-   * name, which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`.
-   * 
- * - * string attachment_point = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for attachmentPoint. - */ - @java.lang.Override - public com.google.protobuf.ByteString getAttachmentPointBytes() { - java.lang.Object ref = attachmentPoint_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - attachmentPoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int FILTER_FIELD_NUMBER = 2; - private volatile java.lang.Object filter_; - /** - * - * - *
-   * Filtering currently only supports the kind of policies to return, and
-   * must be in the format “kind:[policyKind1] OR kind:[policyKind2]”.  New
-   * policy kinds may be added in the future without notice.
-   * Example value: “kind:denyPolicies”
-   * 
- * - * string filter = 2; - * - * @return The filter. - */ - @java.lang.Override - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } - } - /** - * - * - *
-   * Filtering currently only supports the kind of policies to return, and
-   * must be in the format “kind:[policyKind1] OR kind:[policyKind2]”.  New
-   * policy kinds may be added in the future without notice.
-   * Example value: “kind:denyPolicies”
-   * 
- * - * string filter = 2; - * - * @return The bytes for filter. - */ - @java.lang.Override - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object pageToken_; - /** - * - * - *
-   * If present, then retrieve the batch of results following the results from
-   * the preceding call to this method.  `page_token` must be the value of
-   * `next_page_token`
-   * [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token]
-   * from the previous response.  The values of other method parameters should
-   * be identical to those in the previous call.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - @java.lang.Override - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } - } - /** - * - * - *
-   * If present, then retrieve the batch of results following the results from
-   * the preceding call to this method.  `page_token` must be the value of
-   * `next_page_token`
-   * [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token]
-   * from the previous response.  The values of other method parameters should
-   * be identical to those in the previous call.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - @java.lang.Override - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - public static final int PAGE_SIZE_FIELD_NUMBER = 4; - private int pageSize_; - /** - * - * - *
-   * Limit on the number of policies to include in the response.
-   * Further policies can subsequently be obtained by including the
-   * [ListApplicablePoliciesResponse.next_page_token][google.iam.admin.v1.ListApplicablePoliciesResponse.next_page_token]
-   * in a subsequent request.
-   * The minimum is 25, and the maximum is 100.
-   * 
- * - * int32 page_size = 4; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (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(attachmentPoint_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, attachmentPoint_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); - } - if (pageSize_ != 0) { - output.writeInt32(4, pageSize_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(attachmentPoint_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, attachmentPoint_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, filter_); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); - } - if (pageSize_ != 0) { - size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2.ListApplicablePoliciesRequest)) { - return super.equals(obj); - } - com.google.iam.v2.ListApplicablePoliciesRequest other = - (com.google.iam.v2.ListApplicablePoliciesRequest) obj; - - if (!getAttachmentPoint().equals(other.getAttachmentPoint())) return false; - if (!getFilter().equals(other.getFilter())) return false; - if (!getPageToken().equals(other.getPageToken())) return false; - if (getPageSize() != other.getPageSize()) return false; - if (!unknownFields.equals(other.unknownFields)) 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) + ATTACHMENT_POINT_FIELD_NUMBER; - hash = (53 * hash) + getAttachmentPoint().hashCode(); - hash = (37 * hash) + FILTER_FIELD_NUMBER; - hash = (53 * hash) + getFilter().hashCode(); - hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getPageToken().hashCode(); - hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; - hash = (53 * hash) + getPageSize(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest parseFrom(java.io.InputStream input) - throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest 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.iam.v2.ListApplicablePoliciesRequest parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest 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.iam.v2.ListApplicablePoliciesRequest parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest 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.iam.v2.ListApplicablePoliciesRequest prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.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; - } - /** - * - * - *
-   * `ListApplicablePoliciesRequest` represents the Request message for the
-   * `ListApplicablePolicies` method. It provides the input for a filterable query
-   * of Policies that apply to a certain GCP Resource, specified by the field
-   * `attachment_point`, found on this message.
-   * Example:
-   * ```
-   * {
-   *    attachment_point:
-   *    'cloudresourcemanager.googleapis.com%2Forganizations%2F212345678901'
-   *    filter: 'kind:denyPolicies'
-   * }
-   * ```
-   * 
- * - * Protobuf type {@code google.iam.v2.ListApplicablePoliciesRequest} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2.ListApplicablePoliciesRequest) - com.google.iam.v2.ListApplicablePoliciesRequestOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesRequest_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesRequest_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.ListApplicablePoliciesRequest.class, - com.google.iam.v2.ListApplicablePoliciesRequest.Builder.class); - } - - // Construct using com.google.iam.v2.ListApplicablePoliciesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - 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(); - attachmentPoint_ = ""; - - filter_ = ""; - - pageToken_ = ""; - - pageSize_ = 0; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesRequest_descriptor; - } - - @java.lang.Override - public com.google.iam.v2.ListApplicablePoliciesRequest getDefaultInstanceForType() { - return com.google.iam.v2.ListApplicablePoliciesRequest.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2.ListApplicablePoliciesRequest build() { - com.google.iam.v2.ListApplicablePoliciesRequest result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2.ListApplicablePoliciesRequest buildPartial() { - com.google.iam.v2.ListApplicablePoliciesRequest result = - new com.google.iam.v2.ListApplicablePoliciesRequest(this); - result.attachmentPoint_ = attachmentPoint_; - result.filter_ = filter_; - result.pageToken_ = pageToken_; - result.pageSize_ = pageSize_; - 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.iam.v2.ListApplicablePoliciesRequest) { - return mergeFrom((com.google.iam.v2.ListApplicablePoliciesRequest) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2.ListApplicablePoliciesRequest other) { - if (other == com.google.iam.v2.ListApplicablePoliciesRequest.getDefaultInstance()) - return this; - if (!other.getAttachmentPoint().isEmpty()) { - attachmentPoint_ = other.attachmentPoint_; - onChanged(); - } - if (!other.getFilter().isEmpty()) { - filter_ = other.filter_; - onChanged(); - } - if (!other.getPageToken().isEmpty()) { - pageToken_ = other.pageToken_; - onChanged(); - } - if (other.getPageSize() != 0) { - setPageSize(other.getPageSize()); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.iam.v2.ListApplicablePoliciesRequest parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2.ListApplicablePoliciesRequest) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private java.lang.Object attachmentPoint_ = ""; - /** - * - * - *
-     * Required. The Cloud resource at which the applicable policies are to be
-     * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource
-     * name, which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`.
-     * 
- * - * string attachment_point = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The attachmentPoint. - */ - public java.lang.String getAttachmentPoint() { - java.lang.Object ref = attachmentPoint_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - attachmentPoint_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Required. The Cloud resource at which the applicable policies are to be
-     * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource
-     * name, which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`.
-     * 
- * - * string attachment_point = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for attachmentPoint. - */ - public com.google.protobuf.ByteString getAttachmentPointBytes() { - java.lang.Object ref = attachmentPoint_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - attachmentPoint_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Required. The Cloud resource at which the applicable policies are to be
-     * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource
-     * name, which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`.
-     * 
- * - * string attachment_point = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The attachmentPoint to set. - * @return This builder for chaining. - */ - public Builder setAttachmentPoint(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - attachmentPoint_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Cloud resource at which the applicable policies are to be
-     * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource
-     * name, which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`.
-     * 
- * - * string attachment_point = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return This builder for chaining. - */ - public Builder clearAttachmentPoint() { - - attachmentPoint_ = getDefaultInstance().getAttachmentPoint(); - onChanged(); - return this; - } - /** - * - * - *
-     * Required. The Cloud resource at which the applicable policies are to be
-     * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource
-     * name, which means that the forward-slash character, `/`, must be written as
-     * `%2F`. For example,
-     * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`.
-     * 
- * - * string attachment_point = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @param value The bytes for attachmentPoint to set. - * @return This builder for chaining. - */ - public Builder setAttachmentPointBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - attachmentPoint_ = value; - onChanged(); - return this; - } - - private java.lang.Object filter_ = ""; - /** - * - * - *
-     * Filtering currently only supports the kind of policies to return, and
-     * must be in the format “kind:[policyKind1] OR kind:[policyKind2]”.  New
-     * policy kinds may be added in the future without notice.
-     * Example value: “kind:denyPolicies”
-     * 
- * - * string filter = 2; - * - * @return The filter. - */ - public java.lang.String getFilter() { - java.lang.Object ref = filter_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - filter_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * Filtering currently only supports the kind of policies to return, and
-     * must be in the format “kind:[policyKind1] OR kind:[policyKind2]”.  New
-     * policy kinds may be added in the future without notice.
-     * Example value: “kind:denyPolicies”
-     * 
- * - * string filter = 2; - * - * @return The bytes for filter. - */ - public com.google.protobuf.ByteString getFilterBytes() { - java.lang.Object ref = filter_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - filter_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * Filtering currently only supports the kind of policies to return, and
-     * must be in the format “kind:[policyKind1] OR kind:[policyKind2]”.  New
-     * policy kinds may be added in the future without notice.
-     * Example value: “kind:denyPolicies”
-     * 
- * - * string filter = 2; - * - * @param value The filter to set. - * @return This builder for chaining. - */ - public Builder setFilter(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - filter_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Filtering currently only supports the kind of policies to return, and
-     * must be in the format “kind:[policyKind1] OR kind:[policyKind2]”.  New
-     * policy kinds may be added in the future without notice.
-     * Example value: “kind:denyPolicies”
-     * 
- * - * string filter = 2; - * - * @return This builder for chaining. - */ - public Builder clearFilter() { - - filter_ = getDefaultInstance().getFilter(); - onChanged(); - return this; - } - /** - * - * - *
-     * Filtering currently only supports the kind of policies to return, and
-     * must be in the format “kind:[policyKind1] OR kind:[policyKind2]”.  New
-     * policy kinds may be added in the future without notice.
-     * Example value: “kind:denyPolicies”
-     * 
- * - * string filter = 2; - * - * @param value The bytes for filter to set. - * @return This builder for chaining. - */ - public Builder setFilterBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - filter_ = value; - onChanged(); - return this; - } - - private java.lang.Object pageToken_ = ""; - /** - * - * - *
-     * If present, then retrieve the batch of results following the results from
-     * the preceding call to this method.  `page_token` must be the value of
-     * `next_page_token`
-     * [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token]
-     * from the previous response.  The values of other method parameters should
-     * be identical to those in the previous call.
-     * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - public java.lang.String getPageToken() { - java.lang.Object ref = pageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - pageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * If present, then retrieve the batch of results following the results from
-     * the preceding call to this method.  `page_token` must be the value of
-     * `next_page_token`
-     * [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token]
-     * from the previous response.  The values of other method parameters should
-     * be identical to those in the previous call.
-     * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - public com.google.protobuf.ByteString getPageTokenBytes() { - java.lang.Object ref = pageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - pageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * If present, then retrieve the batch of results following the results from
-     * the preceding call to this method.  `page_token` must be the value of
-     * `next_page_token`
-     * [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token]
-     * from the previous response.  The values of other method parameters should
-     * be identical to those in the previous call.
-     * 
- * - * string page_token = 3; - * - * @param value The pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageToken(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - pageToken_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * If present, then retrieve the batch of results following the results from
-     * the preceding call to this method.  `page_token` must be the value of
-     * `next_page_token`
-     * [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token]
-     * from the previous response.  The values of other method parameters should
-     * be identical to those in the previous call.
-     * 
- * - * string page_token = 3; - * - * @return This builder for chaining. - */ - public Builder clearPageToken() { - - pageToken_ = getDefaultInstance().getPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * If present, then retrieve the batch of results following the results from
-     * the preceding call to this method.  `page_token` must be the value of
-     * `next_page_token`
-     * [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token]
-     * from the previous response.  The values of other method parameters should
-     * be identical to those in the previous call.
-     * 
- * - * string page_token = 3; - * - * @param value The bytes for pageToken to set. - * @return This builder for chaining. - */ - public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - pageToken_ = value; - onChanged(); - return this; - } - - private int pageSize_; - /** - * - * - *
-     * Limit on the number of policies to include in the response.
-     * Further policies can subsequently be obtained by including the
-     * [ListApplicablePoliciesResponse.next_page_token][google.iam.admin.v1.ListApplicablePoliciesResponse.next_page_token]
-     * in a subsequent request.
-     * The minimum is 25, and the maximum is 100.
-     * 
- * - * int32 page_size = 4; - * - * @return The pageSize. - */ - @java.lang.Override - public int getPageSize() { - return pageSize_; - } - /** - * - * - *
-     * Limit on the number of policies to include in the response.
-     * Further policies can subsequently be obtained by including the
-     * [ListApplicablePoliciesResponse.next_page_token][google.iam.admin.v1.ListApplicablePoliciesResponse.next_page_token]
-     * in a subsequent request.
-     * The minimum is 25, and the maximum is 100.
-     * 
- * - * int32 page_size = 4; - * - * @param value The pageSize to set. - * @return This builder for chaining. - */ - public Builder setPageSize(int value) { - - pageSize_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Limit on the number of policies to include in the response.
-     * Further policies can subsequently be obtained by including the
-     * [ListApplicablePoliciesResponse.next_page_token][google.iam.admin.v1.ListApplicablePoliciesResponse.next_page_token]
-     * in a subsequent request.
-     * The minimum is 25, and the maximum is 100.
-     * 
- * - * int32 page_size = 4; - * - * @return This builder for chaining. - */ - public Builder clearPageSize() { - - pageSize_ = 0; - onChanged(); - return this; - } - - @java.lang.Override - public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); - } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); - } - - // @@protoc_insertion_point(builder_scope:google.iam.v2.ListApplicablePoliciesRequest) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2.ListApplicablePoliciesRequest) - private static final com.google.iam.v2.ListApplicablePoliciesRequest DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2.ListApplicablePoliciesRequest(); - } - - public static com.google.iam.v2.ListApplicablePoliciesRequest getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListApplicablePoliciesRequest parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListApplicablePoliciesRequest(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2.ListApplicablePoliciesRequest getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesRequestOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesRequestOrBuilder.java deleted file mode 100644 index b4b91808..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesRequestOrBuilder.java +++ /dev/null @@ -1,141 +0,0 @@ -/* - * 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/iam/v2/policy.proto - -package com.google.iam.v2; - -public interface ListApplicablePoliciesRequestOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2.ListApplicablePoliciesRequest) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Required. The Cloud resource at which the applicable policies are to be
-   * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource
-   * name, which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`.
-   * 
- * - * string attachment_point = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The attachmentPoint. - */ - java.lang.String getAttachmentPoint(); - /** - * - * - *
-   * Required. The Cloud resource at which the applicable policies are to be
-   * retrieved. Format: `{attachment-point}` Use the URL-encoded full resource
-   * name, which means that the forward-slash character, `/`, must be written as
-   * `%2F`. For example,
-   * `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`.
-   * 
- * - * string attachment_point = 1 [(.google.api.field_behavior) = REQUIRED]; - * - * @return The bytes for attachmentPoint. - */ - com.google.protobuf.ByteString getAttachmentPointBytes(); - - /** - * - * - *
-   * Filtering currently only supports the kind of policies to return, and
-   * must be in the format “kind:[policyKind1] OR kind:[policyKind2]”.  New
-   * policy kinds may be added in the future without notice.
-   * Example value: “kind:denyPolicies”
-   * 
- * - * string filter = 2; - * - * @return The filter. - */ - java.lang.String getFilter(); - /** - * - * - *
-   * Filtering currently only supports the kind of policies to return, and
-   * must be in the format “kind:[policyKind1] OR kind:[policyKind2]”.  New
-   * policy kinds may be added in the future without notice.
-   * Example value: “kind:denyPolicies”
-   * 
- * - * string filter = 2; - * - * @return The bytes for filter. - */ - com.google.protobuf.ByteString getFilterBytes(); - - /** - * - * - *
-   * If present, then retrieve the batch of results following the results from
-   * the preceding call to this method.  `page_token` must be the value of
-   * `next_page_token`
-   * [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token]
-   * from the previous response.  The values of other method parameters should
-   * be identical to those in the previous call.
-   * 
- * - * string page_token = 3; - * - * @return The pageToken. - */ - java.lang.String getPageToken(); - /** - * - * - *
-   * If present, then retrieve the batch of results following the results from
-   * the preceding call to this method.  `page_token` must be the value of
-   * `next_page_token`
-   * [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token]
-   * from the previous response.  The values of other method parameters should
-   * be identical to those in the previous call.
-   * 
- * - * string page_token = 3; - * - * @return The bytes for pageToken. - */ - com.google.protobuf.ByteString getPageTokenBytes(); - - /** - * - * - *
-   * Limit on the number of policies to include in the response.
-   * Further policies can subsequently be obtained by including the
-   * [ListApplicablePoliciesResponse.next_page_token][google.iam.admin.v1.ListApplicablePoliciesResponse.next_page_token]
-   * in a subsequent request.
-   * The minimum is 25, and the maximum is 100.
-   * 
- * - * int32 page_size = 4; - * - * @return The pageSize. - */ - int getPageSize(); -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesResponse.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesResponse.java deleted file mode 100644 index 6c31b640..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesResponse.java +++ /dev/null @@ -1,1503 +0,0 @@ -/* - * 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/iam/v2/policy.proto - -package com.google.iam.v2; - -/** - * - * - *
- * Response message for [ListApplicablePolicies][] method.
- * 
- * - * Protobuf type {@code google.iam.v2.ListApplicablePoliciesResponse} - */ -public final class ListApplicablePoliciesResponse extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.iam.v2.ListApplicablePoliciesResponse) - ListApplicablePoliciesResponseOrBuilder { - private static final long serialVersionUID = 0L; - // Use ListApplicablePoliciesResponse.newBuilder() to construct. - private ListApplicablePoliciesResponse( - com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private ListApplicablePoliciesResponse() { - policies_ = java.util.Collections.emptyList(); - inaccessible_ = com.google.protobuf.LazyStringArrayList.EMPTY; - nextPageToken_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new ListApplicablePoliciesResponse(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - private ListApplicablePoliciesResponse( - 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)) { - policies_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - policies_.add( - input.readMessage(com.google.iam.v2.Policy.parser(), extensionRegistry)); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - inaccessible_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - inaccessible_.add(s); - break; - } - case 26: - { - 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)) { - policies_ = java.util.Collections.unmodifiableList(policies_); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - inaccessible_ = inaccessible_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.ListApplicablePoliciesResponse.class, - com.google.iam.v2.ListApplicablePoliciesResponse.Builder.class); - } - - public static final int POLICIES_FIELD_NUMBER = 1; - private java.util.List policies_; - /** - * - * - *
-   * Ordered list starting from the resource on which this API was called
-   * then proceeding up the hierarchy. Policies for the same attachment point
-   * will be grouped, but no further ordering is guaranteed.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - @java.lang.Override - public java.util.List getPoliciesList() { - return policies_; - } - /** - * - * - *
-   * Ordered list starting from the resource on which this API was called
-   * then proceeding up the hierarchy. Policies for the same attachment point
-   * will be grouped, but no further ordering is guaranteed.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - @java.lang.Override - public java.util.List getPoliciesOrBuilderList() { - return policies_; - } - /** - * - * - *
-   * Ordered list starting from the resource on which this API was called
-   * then proceeding up the hierarchy. Policies for the same attachment point
-   * will be grouped, but no further ordering is guaranteed.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - @java.lang.Override - public int getPoliciesCount() { - return policies_.size(); - } - /** - * - * - *
-   * Ordered list starting from the resource on which this API was called
-   * then proceeding up the hierarchy. Policies for the same attachment point
-   * will be grouped, but no further ordering is guaranteed.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - @java.lang.Override - public com.google.iam.v2.Policy getPolicies(int index) { - return policies_.get(index); - } - /** - * - * - *
-   * Ordered list starting from the resource on which this API was called
-   * then proceeding up the hierarchy. Policies for the same attachment point
-   * will be grouped, but no further ordering is guaranteed.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - @java.lang.Override - public com.google.iam.v2.PolicyOrBuilder getPoliciesOrBuilder(int index) { - return policies_.get(index); - } - - public static final int INACCESSIBLE_FIELD_NUMBER = 2; - private com.google.protobuf.LazyStringList inaccessible_; - /** - * - * - *
-   * A list of resources that the caller does not have permission to retrieve.
-   * List or Get can be used to get detailed error messages.
-   * Get: `policies/{attachment-point}/denypolicies/{policy-id}`
-   * List: `policies/{attachment-point}/denypolicies`
-   * 
- * - * repeated string inaccessible = 2; - * - * @return A list containing the inaccessible. - */ - public com.google.protobuf.ProtocolStringList getInaccessibleList() { - return inaccessible_; - } - /** - * - * - *
-   * A list of resources that the caller does not have permission to retrieve.
-   * List or Get can be used to get detailed error messages.
-   * Get: `policies/{attachment-point}/denypolicies/{policy-id}`
-   * List: `policies/{attachment-point}/denypolicies`
-   * 
- * - * repeated string inaccessible = 2; - * - * @return The count of inaccessible. - */ - public int getInaccessibleCount() { - return inaccessible_.size(); - } - /** - * - * - *
-   * A list of resources that the caller does not have permission to retrieve.
-   * List or Get can be used to get detailed error messages.
-   * Get: `policies/{attachment-point}/denypolicies/{policy-id}`
-   * List: `policies/{attachment-point}/denypolicies`
-   * 
- * - * repeated string inaccessible = 2; - * - * @param index The index of the element to return. - * @return The inaccessible at the given index. - */ - public java.lang.String getInaccessible(int index) { - return inaccessible_.get(index); - } - /** - * - * - *
-   * A list of resources that the caller does not have permission to retrieve.
-   * List or Get can be used to get detailed error messages.
-   * Get: `policies/{attachment-point}/denypolicies/{policy-id}`
-   * List: `policies/{attachment-point}/denypolicies`
-   * 
- * - * repeated string inaccessible = 2; - * - * @param index The index of the value to return. - * @return The bytes of the inaccessible at the given index. - */ - public com.google.protobuf.ByteString getInaccessibleBytes(int index) { - return inaccessible_.getByteString(index); - } - - public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 3; - private volatile java.lang.Object nextPageToken_; - /** - * - * - *
-   * A page token that can be used in a
-   * [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest]
-   * to retrieve the next page. If this field is blank, there are no additional
-   * pages.
-   * 
- * - * string next_page_token = 3; - * - * @return The nextPageToken. - */ - @java.lang.Override - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } - } - /** - * - * - *
-   * A page token that can be used in a
-   * [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest]
-   * to retrieve the next page. If this field is blank, there are no additional
-   * pages.
-   * 
- * - * string next_page_token = 3; - * - * @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 < policies_.size(); i++) { - output.writeMessage(1, policies_.get(i)); - } - for (int i = 0; i < inaccessible_.size(); i++) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 2, inaccessible_.getRaw(i)); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 3, nextPageToken_); - } - unknownFields.writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - for (int i = 0; i < policies_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, policies_.get(i)); - } - { - int dataSize = 0; - for (int i = 0; i < inaccessible_.size(); i++) { - dataSize += computeStringSizeNoTag(inaccessible_.getRaw(i)); - } - size += dataSize; - size += 1 * getInaccessibleList().size(); - } - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, nextPageToken_); - } - size += unknownFields.getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.iam.v2.ListApplicablePoliciesResponse)) { - return super.equals(obj); - } - com.google.iam.v2.ListApplicablePoliciesResponse other = - (com.google.iam.v2.ListApplicablePoliciesResponse) obj; - - if (!getPoliciesList().equals(other.getPoliciesList())) return false; - if (!getInaccessibleList().equals(other.getInaccessibleList())) return false; - if (!getNextPageToken().equals(other.getNextPageToken())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - if (getPoliciesCount() > 0) { - hash = (37 * hash) + POLICIES_FIELD_NUMBER; - hash = (53 * hash) + getPoliciesList().hashCode(); - } - if (getInaccessibleCount() > 0) { - hash = (37 * hash) + INACCESSIBLE_FIELD_NUMBER; - hash = (53 * hash) + getInaccessibleList().hashCode(); - } - hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; - hash = (53 * hash) + getNextPageToken().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse parseFrom(java.nio.ByteBuffer data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse parseFrom( - com.google.protobuf.ByteString data, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse 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.iam.v2.ListApplicablePoliciesResponse parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse 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.iam.v2.ListApplicablePoliciesResponse parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse 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.iam.v2.ListApplicablePoliciesResponse prototype) { - return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); - } - - @java.lang.Override - public Builder toBuilder() { - return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); - } - - @java.lang.Override - protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } - /** - * - * - *
-   * Response message for [ListApplicablePolicies][] method.
-   * 
- * - * Protobuf type {@code google.iam.v2.ListApplicablePoliciesResponse} - */ - public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.iam.v2.ListApplicablePoliciesResponse) - com.google.iam.v2.ListApplicablePoliciesResponseOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesResponse_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.iam.v2.ListApplicablePoliciesResponse.class, - com.google.iam.v2.ListApplicablePoliciesResponse.Builder.class); - } - - // Construct using com.google.iam.v2.ListApplicablePoliciesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPoliciesFieldBuilder(); - } - } - - @java.lang.Override - public Builder clear() { - super.clear(); - if (policiesBuilder_ == null) { - policies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - policiesBuilder_.clear(); - } - inaccessible_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - nextPageToken_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.iam.v2.PolicyProto - .internal_static_google_iam_v2_ListApplicablePoliciesResponse_descriptor; - } - - @java.lang.Override - public com.google.iam.v2.ListApplicablePoliciesResponse getDefaultInstanceForType() { - return com.google.iam.v2.ListApplicablePoliciesResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.iam.v2.ListApplicablePoliciesResponse build() { - com.google.iam.v2.ListApplicablePoliciesResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.iam.v2.ListApplicablePoliciesResponse buildPartial() { - com.google.iam.v2.ListApplicablePoliciesResponse result = - new com.google.iam.v2.ListApplicablePoliciesResponse(this); - int from_bitField0_ = bitField0_; - if (policiesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - policies_ = java.util.Collections.unmodifiableList(policies_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.policies_ = policies_; - } else { - result.policies_ = policiesBuilder_.build(); - } - if (((bitField0_ & 0x00000002) != 0)) { - inaccessible_ = inaccessible_.getUnmodifiableView(); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.inaccessible_ = inaccessible_; - 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.iam.v2.ListApplicablePoliciesResponse) { - return mergeFrom((com.google.iam.v2.ListApplicablePoliciesResponse) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.iam.v2.ListApplicablePoliciesResponse other) { - if (other == com.google.iam.v2.ListApplicablePoliciesResponse.getDefaultInstance()) - return this; - if (policiesBuilder_ == null) { - if (!other.policies_.isEmpty()) { - if (policies_.isEmpty()) { - policies_ = other.policies_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensurePoliciesIsMutable(); - policies_.addAll(other.policies_); - } - onChanged(); - } - } else { - if (!other.policies_.isEmpty()) { - if (policiesBuilder_.isEmpty()) { - policiesBuilder_.dispose(); - policiesBuilder_ = null; - policies_ = other.policies_; - bitField0_ = (bitField0_ & ~0x00000001); - policiesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getPoliciesFieldBuilder() - : null; - } else { - policiesBuilder_.addAllMessages(other.policies_); - } - } - } - if (!other.inaccessible_.isEmpty()) { - if (inaccessible_.isEmpty()) { - inaccessible_ = other.inaccessible_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureInaccessibleIsMutable(); - inaccessible_.addAll(other.inaccessible_); - } - onChanged(); - } - if (!other.getNextPageToken().isEmpty()) { - nextPageToken_ = other.nextPageToken_; - onChanged(); - } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; - } - - @java.lang.Override - public final boolean isInitialized() { - return true; - } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.iam.v2.ListApplicablePoliciesResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2.ListApplicablePoliciesResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; - } - - private int bitField0_; - - private java.util.List policies_ = java.util.Collections.emptyList(); - - private void ensurePoliciesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - policies_ = new java.util.ArrayList(policies_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v2.Policy, - com.google.iam.v2.Policy.Builder, - com.google.iam.v2.PolicyOrBuilder> - policiesBuilder_; - - /** - * - * - *
-     * Ordered list starting from the resource on which this API was called
-     * then proceeding up the hierarchy. Policies for the same attachment point
-     * will be grouped, but no further ordering is guaranteed.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public java.util.List getPoliciesList() { - if (policiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(policies_); - } else { - return policiesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Ordered list starting from the resource on which this API was called
-     * then proceeding up the hierarchy. Policies for the same attachment point
-     * will be grouped, but no further ordering is guaranteed.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public int getPoliciesCount() { - if (policiesBuilder_ == null) { - return policies_.size(); - } else { - return policiesBuilder_.getCount(); - } - } - /** - * - * - *
-     * Ordered list starting from the resource on which this API was called
-     * then proceeding up the hierarchy. Policies for the same attachment point
-     * will be grouped, but no further ordering is guaranteed.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public com.google.iam.v2.Policy getPolicies(int index) { - if (policiesBuilder_ == null) { - return policies_.get(index); - } else { - return policiesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Ordered list starting from the resource on which this API was called
-     * then proceeding up the hierarchy. Policies for the same attachment point
-     * will be grouped, but no further ordering is guaranteed.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public Builder setPolicies(int index, com.google.iam.v2.Policy value) { - if (policiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoliciesIsMutable(); - policies_.set(index, value); - onChanged(); - } else { - policiesBuilder_.setMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Ordered list starting from the resource on which this API was called
-     * then proceeding up the hierarchy. Policies for the same attachment point
-     * will be grouped, but no further ordering is guaranteed.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public Builder setPolicies(int index, com.google.iam.v2.Policy.Builder builderForValue) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.set(index, builderForValue.build()); - onChanged(); - } else { - policiesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Ordered list starting from the resource on which this API was called
-     * then proceeding up the hierarchy. Policies for the same attachment point
-     * will be grouped, but no further ordering is guaranteed.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public Builder addPolicies(com.google.iam.v2.Policy value) { - if (policiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoliciesIsMutable(); - policies_.add(value); - onChanged(); - } else { - policiesBuilder_.addMessage(value); - } - return this; - } - /** - * - * - *
-     * Ordered list starting from the resource on which this API was called
-     * then proceeding up the hierarchy. Policies for the same attachment point
-     * will be grouped, but no further ordering is guaranteed.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public Builder addPolicies(int index, com.google.iam.v2.Policy value) { - if (policiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoliciesIsMutable(); - policies_.add(index, value); - onChanged(); - } else { - policiesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Ordered list starting from the resource on which this API was called
-     * then proceeding up the hierarchy. Policies for the same attachment point
-     * will be grouped, but no further ordering is guaranteed.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public Builder addPolicies(com.google.iam.v2.Policy.Builder builderForValue) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.add(builderForValue.build()); - onChanged(); - } else { - policiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Ordered list starting from the resource on which this API was called
-     * then proceeding up the hierarchy. Policies for the same attachment point
-     * will be grouped, but no further ordering is guaranteed.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public Builder addPolicies(int index, com.google.iam.v2.Policy.Builder builderForValue) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.add(index, builderForValue.build()); - onChanged(); - } else { - policiesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Ordered list starting from the resource on which this API was called
-     * then proceeding up the hierarchy. Policies for the same attachment point
-     * will be grouped, but no further ordering is guaranteed.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public Builder addAllPolicies(java.lang.Iterable values) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, policies_); - onChanged(); - } else { - policiesBuilder_.addAllMessages(values); - } - return this; - } - /** - * - * - *
-     * Ordered list starting from the resource on which this API was called
-     * then proceeding up the hierarchy. Policies for the same attachment point
-     * will be grouped, but no further ordering is guaranteed.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public Builder clearPolicies() { - if (policiesBuilder_ == null) { - policies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - policiesBuilder_.clear(); - } - return this; - } - /** - * - * - *
-     * Ordered list starting from the resource on which this API was called
-     * then proceeding up the hierarchy. Policies for the same attachment point
-     * will be grouped, but no further ordering is guaranteed.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public Builder removePolicies(int index) { - if (policiesBuilder_ == null) { - ensurePoliciesIsMutable(); - policies_.remove(index); - onChanged(); - } else { - policiesBuilder_.remove(index); - } - return this; - } - /** - * - * - *
-     * Ordered list starting from the resource on which this API was called
-     * then proceeding up the hierarchy. Policies for the same attachment point
-     * will be grouped, but no further ordering is guaranteed.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public com.google.iam.v2.Policy.Builder getPoliciesBuilder(int index) { - return getPoliciesFieldBuilder().getBuilder(index); - } - /** - * - * - *
-     * Ordered list starting from the resource on which this API was called
-     * then proceeding up the hierarchy. Policies for the same attachment point
-     * will be grouped, but no further ordering is guaranteed.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public com.google.iam.v2.PolicyOrBuilder getPoliciesOrBuilder(int index) { - if (policiesBuilder_ == null) { - return policies_.get(index); - } else { - return policiesBuilder_.getMessageOrBuilder(index); - } - } - /** - * - * - *
-     * Ordered list starting from the resource on which this API was called
-     * then proceeding up the hierarchy. Policies for the same attachment point
-     * will be grouped, but no further ordering is guaranteed.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public java.util.List getPoliciesOrBuilderList() { - if (policiesBuilder_ != null) { - return policiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(policies_); - } - } - /** - * - * - *
-     * Ordered list starting from the resource on which this API was called
-     * then proceeding up the hierarchy. Policies for the same attachment point
-     * will be grouped, but no further ordering is guaranteed.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public com.google.iam.v2.Policy.Builder addPoliciesBuilder() { - return getPoliciesFieldBuilder().addBuilder(com.google.iam.v2.Policy.getDefaultInstance()); - } - /** - * - * - *
-     * Ordered list starting from the resource on which this API was called
-     * then proceeding up the hierarchy. Policies for the same attachment point
-     * will be grouped, but no further ordering is guaranteed.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public com.google.iam.v2.Policy.Builder addPoliciesBuilder(int index) { - return getPoliciesFieldBuilder() - .addBuilder(index, com.google.iam.v2.Policy.getDefaultInstance()); - } - /** - * - * - *
-     * Ordered list starting from the resource on which this API was called
-     * then proceeding up the hierarchy. Policies for the same attachment point
-     * will be grouped, but no further ordering is guaranteed.
-     * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - public java.util.List getPoliciesBuilderList() { - return getPoliciesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v2.Policy, - com.google.iam.v2.Policy.Builder, - com.google.iam.v2.PolicyOrBuilder> - getPoliciesFieldBuilder() { - if (policiesBuilder_ == null) { - policiesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.iam.v2.Policy, - com.google.iam.v2.Policy.Builder, - com.google.iam.v2.PolicyOrBuilder>( - policies_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - policies_ = null; - } - return policiesBuilder_; - } - - private com.google.protobuf.LazyStringList inaccessible_ = - com.google.protobuf.LazyStringArrayList.EMPTY; - - private void ensureInaccessibleIsMutable() { - if (!((bitField0_ & 0x00000002) != 0)) { - inaccessible_ = new com.google.protobuf.LazyStringArrayList(inaccessible_); - bitField0_ |= 0x00000002; - } - } - /** - * - * - *
-     * A list of resources that the caller does not have permission to retrieve.
-     * List or Get can be used to get detailed error messages.
-     * Get: `policies/{attachment-point}/denypolicies/{policy-id}`
-     * List: `policies/{attachment-point}/denypolicies`
-     * 
- * - * repeated string inaccessible = 2; - * - * @return A list containing the inaccessible. - */ - public com.google.protobuf.ProtocolStringList getInaccessibleList() { - return inaccessible_.getUnmodifiableView(); - } - /** - * - * - *
-     * A list of resources that the caller does not have permission to retrieve.
-     * List or Get can be used to get detailed error messages.
-     * Get: `policies/{attachment-point}/denypolicies/{policy-id}`
-     * List: `policies/{attachment-point}/denypolicies`
-     * 
- * - * repeated string inaccessible = 2; - * - * @return The count of inaccessible. - */ - public int getInaccessibleCount() { - return inaccessible_.size(); - } - /** - * - * - *
-     * A list of resources that the caller does not have permission to retrieve.
-     * List or Get can be used to get detailed error messages.
-     * Get: `policies/{attachment-point}/denypolicies/{policy-id}`
-     * List: `policies/{attachment-point}/denypolicies`
-     * 
- * - * repeated string inaccessible = 2; - * - * @param index The index of the element to return. - * @return The inaccessible at the given index. - */ - public java.lang.String getInaccessible(int index) { - return inaccessible_.get(index); - } - /** - * - * - *
-     * A list of resources that the caller does not have permission to retrieve.
-     * List or Get can be used to get detailed error messages.
-     * Get: `policies/{attachment-point}/denypolicies/{policy-id}`
-     * List: `policies/{attachment-point}/denypolicies`
-     * 
- * - * repeated string inaccessible = 2; - * - * @param index The index of the value to return. - * @return The bytes of the inaccessible at the given index. - */ - public com.google.protobuf.ByteString getInaccessibleBytes(int index) { - return inaccessible_.getByteString(index); - } - /** - * - * - *
-     * A list of resources that the caller does not have permission to retrieve.
-     * List or Get can be used to get detailed error messages.
-     * Get: `policies/{attachment-point}/denypolicies/{policy-id}`
-     * List: `policies/{attachment-point}/denypolicies`
-     * 
- * - * repeated string inaccessible = 2; - * - * @param index The index to set the value at. - * @param value The inaccessible to set. - * @return This builder for chaining. - */ - public Builder setInaccessible(int index, java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureInaccessibleIsMutable(); - inaccessible_.set(index, value); - onChanged(); - return this; - } - /** - * - * - *
-     * A list of resources that the caller does not have permission to retrieve.
-     * List or Get can be used to get detailed error messages.
-     * Get: `policies/{attachment-point}/denypolicies/{policy-id}`
-     * List: `policies/{attachment-point}/denypolicies`
-     * 
- * - * repeated string inaccessible = 2; - * - * @param value The inaccessible to add. - * @return This builder for chaining. - */ - public Builder addInaccessible(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - ensureInaccessibleIsMutable(); - inaccessible_.add(value); - onChanged(); - return this; - } - /** - * - * - *
-     * A list of resources that the caller does not have permission to retrieve.
-     * List or Get can be used to get detailed error messages.
-     * Get: `policies/{attachment-point}/denypolicies/{policy-id}`
-     * List: `policies/{attachment-point}/denypolicies`
-     * 
- * - * repeated string inaccessible = 2; - * - * @param values The inaccessible to add. - * @return This builder for chaining. - */ - public Builder addAllInaccessible(java.lang.Iterable values) { - ensureInaccessibleIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, inaccessible_); - onChanged(); - return this; - } - /** - * - * - *
-     * A list of resources that the caller does not have permission to retrieve.
-     * List or Get can be used to get detailed error messages.
-     * Get: `policies/{attachment-point}/denypolicies/{policy-id}`
-     * List: `policies/{attachment-point}/denypolicies`
-     * 
- * - * repeated string inaccessible = 2; - * - * @return This builder for chaining. - */ - public Builder clearInaccessible() { - inaccessible_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - return this; - } - /** - * - * - *
-     * A list of resources that the caller does not have permission to retrieve.
-     * List or Get can be used to get detailed error messages.
-     * Get: `policies/{attachment-point}/denypolicies/{policy-id}`
-     * List: `policies/{attachment-point}/denypolicies`
-     * 
- * - * repeated string inaccessible = 2; - * - * @param value The bytes of the inaccessible to add. - * @return This builder for chaining. - */ - public Builder addInaccessibleBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - ensureInaccessibleIsMutable(); - inaccessible_.add(value); - onChanged(); - return this; - } - - private java.lang.Object nextPageToken_ = ""; - /** - * - * - *
-     * A page token that can be used in a
-     * [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest]
-     * to retrieve the next page. If this field is blank, there are no additional
-     * pages.
-     * 
- * - * string next_page_token = 3; - * - * @return The nextPageToken. - */ - public java.lang.String getNextPageToken() { - java.lang.Object ref = nextPageToken_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - nextPageToken_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-     * A page token that can be used in a
-     * [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest]
-     * to retrieve the next page. If this field is blank, there are no additional
-     * pages.
-     * 
- * - * string next_page_token = 3; - * - * @return The bytes for nextPageToken. - */ - public com.google.protobuf.ByteString getNextPageTokenBytes() { - java.lang.Object ref = nextPageToken_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - nextPageToken_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-     * A page token that can be used in a
-     * [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest]
-     * to retrieve the next page. If this field is blank, there are no additional
-     * pages.
-     * 
- * - * string next_page_token = 3; - * - * @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; - } - /** - * - * - *
-     * A page token that can be used in a
-     * [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest]
-     * to retrieve the next page. If this field is blank, there are no additional
-     * pages.
-     * 
- * - * string next_page_token = 3; - * - * @return This builder for chaining. - */ - public Builder clearNextPageToken() { - - nextPageToken_ = getDefaultInstance().getNextPageToken(); - onChanged(); - return this; - } - /** - * - * - *
-     * A page token that can be used in a
-     * [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest]
-     * to retrieve the next page. If this field is blank, there are no additional
-     * pages.
-     * 
- * - * string next_page_token = 3; - * - * @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.iam.v2.ListApplicablePoliciesResponse) - } - - // @@protoc_insertion_point(class_scope:google.iam.v2.ListApplicablePoliciesResponse) - private static final com.google.iam.v2.ListApplicablePoliciesResponse DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.iam.v2.ListApplicablePoliciesResponse(); - } - - public static com.google.iam.v2.ListApplicablePoliciesResponse getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public ListApplicablePoliciesResponse parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new ListApplicablePoliciesResponse(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.iam.v2.ListApplicablePoliciesResponse getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesResponseOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesResponseOrBuilder.java deleted file mode 100644 index f83bbeda..00000000 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListApplicablePoliciesResponseOrBuilder.java +++ /dev/null @@ -1,180 +0,0 @@ -/* - * 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/iam/v2/policy.proto - -package com.google.iam.v2; - -public interface ListApplicablePoliciesResponseOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.iam.v2.ListApplicablePoliciesResponse) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-   * Ordered list starting from the resource on which this API was called
-   * then proceeding up the hierarchy. Policies for the same attachment point
-   * will be grouped, but no further ordering is guaranteed.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - java.util.List getPoliciesList(); - /** - * - * - *
-   * Ordered list starting from the resource on which this API was called
-   * then proceeding up the hierarchy. Policies for the same attachment point
-   * will be grouped, but no further ordering is guaranteed.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - com.google.iam.v2.Policy getPolicies(int index); - /** - * - * - *
-   * Ordered list starting from the resource on which this API was called
-   * then proceeding up the hierarchy. Policies for the same attachment point
-   * will be grouped, but no further ordering is guaranteed.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - int getPoliciesCount(); - /** - * - * - *
-   * Ordered list starting from the resource on which this API was called
-   * then proceeding up the hierarchy. Policies for the same attachment point
-   * will be grouped, but no further ordering is guaranteed.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - java.util.List getPoliciesOrBuilderList(); - /** - * - * - *
-   * Ordered list starting from the resource on which this API was called
-   * then proceeding up the hierarchy. Policies for the same attachment point
-   * will be grouped, but no further ordering is guaranteed.
-   * 
- * - * repeated .google.iam.v2.Policy policies = 1; - */ - com.google.iam.v2.PolicyOrBuilder getPoliciesOrBuilder(int index); - - /** - * - * - *
-   * A list of resources that the caller does not have permission to retrieve.
-   * List or Get can be used to get detailed error messages.
-   * Get: `policies/{attachment-point}/denypolicies/{policy-id}`
-   * List: `policies/{attachment-point}/denypolicies`
-   * 
- * - * repeated string inaccessible = 2; - * - * @return A list containing the inaccessible. - */ - java.util.List getInaccessibleList(); - /** - * - * - *
-   * A list of resources that the caller does not have permission to retrieve.
-   * List or Get can be used to get detailed error messages.
-   * Get: `policies/{attachment-point}/denypolicies/{policy-id}`
-   * List: `policies/{attachment-point}/denypolicies`
-   * 
- * - * repeated string inaccessible = 2; - * - * @return The count of inaccessible. - */ - int getInaccessibleCount(); - /** - * - * - *
-   * A list of resources that the caller does not have permission to retrieve.
-   * List or Get can be used to get detailed error messages.
-   * Get: `policies/{attachment-point}/denypolicies/{policy-id}`
-   * List: `policies/{attachment-point}/denypolicies`
-   * 
- * - * repeated string inaccessible = 2; - * - * @param index The index of the element to return. - * @return The inaccessible at the given index. - */ - java.lang.String getInaccessible(int index); - /** - * - * - *
-   * A list of resources that the caller does not have permission to retrieve.
-   * List or Get can be used to get detailed error messages.
-   * Get: `policies/{attachment-point}/denypolicies/{policy-id}`
-   * List: `policies/{attachment-point}/denypolicies`
-   * 
- * - * repeated string inaccessible = 2; - * - * @param index The index of the value to return. - * @return The bytes of the inaccessible at the given index. - */ - com.google.protobuf.ByteString getInaccessibleBytes(int index); - - /** - * - * - *
-   * A page token that can be used in a
-   * [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest]
-   * to retrieve the next page. If this field is blank, there are no additional
-   * pages.
-   * 
- * - * string next_page_token = 3; - * - * @return The nextPageToken. - */ - java.lang.String getNextPageToken(); - /** - * - * - *
-   * A page token that can be used in a
-   * [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest]
-   * to retrieve the next page. If this field is blank, there are no additional
-   * pages.
-   * 
- * - * string next_page_token = 3; - * - * @return The bytes for nextPageToken. - */ - com.google.protobuf.ByteString getNextPageTokenBytes(); -} diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequest.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequest.java index 5665c5b7..124798c3 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequest.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListPoliciesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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.iam.v2.PolicyProto .internal_static_google_iam_v2_ListPoliciesRequest_descriptor; @@ -132,8 +74,9 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { * * *
-   * Required. The resource that the policy is attached to, along with the kind
-   * of policy to list. Format: `policies/{attachment_point}/denypolicies`
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to list. Format:
+   * `policies/{attachment_point}/denypolicies`
    * The attachment point is identified by its URL-encoded full resource name,
    * which means that the forward-slash character, `/`, must be written as
    * `%2F`. For example,
@@ -162,8 +105,9 @@ public java.lang.String getParent() {
    *
    *
    * 
-   * Required. The resource that the policy is attached to, along with the kind
-   * of policy to list. Format: `policies/{attachment_point}/denypolicies`
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to list. Format:
+   * `policies/{attachment_point}/denypolicies`
    * The attachment point is identified by its URL-encoded full resource name,
    * which means that the forward-slash character, `/`, must be written as
    * `%2F`. For example,
@@ -214,9 +158,8 @@ public int getPageSize() {
    *
    *
    * 
-   * A page token received in a
-   * [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this
-   * token to retrieve the next page.
+   * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
+   * retrieve the next page.
    * 
* * string page_token = 3; @@ -239,9 +182,8 @@ public java.lang.String getPageToken() { * * *
-   * A page token received in a
-   * [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this
-   * token to retrieve the next page.
+   * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
+   * retrieve the next page.
    * 
* * string page_token = 3; @@ -284,7 +226,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 @@ -302,7 +244,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; } @@ -320,7 +262,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; } @@ -337,7 +279,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; } @@ -465,17 +407,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2.ListPoliciesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -577,7 +512,7 @@ public Builder mergeFrom(com.google.iam.v2.ListPoliciesRequest other) { pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -592,17 +527,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2.ListPoliciesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } 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.iam.v2.ListPoliciesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -611,8 +578,9 @@ public Builder mergeFrom( * * *
-     * Required. The resource that the policy is attached to, along with the kind
-     * of policy to list. Format: `policies/{attachment_point}/denypolicies`
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to list. Format:
+     * `policies/{attachment_point}/denypolicies`
      * The attachment point is identified by its URL-encoded full resource name,
      * which means that the forward-slash character, `/`, must be written as
      * `%2F`. For example,
@@ -640,8 +608,9 @@ public java.lang.String getParent() {
      *
      *
      * 
-     * Required. The resource that the policy is attached to, along with the kind
-     * of policy to list. Format: `policies/{attachment_point}/denypolicies`
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to list. Format:
+     * `policies/{attachment_point}/denypolicies`
      * The attachment point is identified by its URL-encoded full resource name,
      * which means that the forward-slash character, `/`, must be written as
      * `%2F`. For example,
@@ -669,8 +638,9 @@ public com.google.protobuf.ByteString getParentBytes() {
      *
      *
      * 
-     * Required. The resource that the policy is attached to, along with the kind
-     * of policy to list. Format: `policies/{attachment_point}/denypolicies`
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to list. Format:
+     * `policies/{attachment_point}/denypolicies`
      * The attachment point is identified by its URL-encoded full resource name,
      * which means that the forward-slash character, `/`, must be written as
      * `%2F`. For example,
@@ -697,8 +667,9 @@ public Builder setParent(java.lang.String value) {
      *
      *
      * 
-     * Required. The resource that the policy is attached to, along with the kind
-     * of policy to list. Format: `policies/{attachment_point}/denypolicies`
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to list. Format:
+     * `policies/{attachment_point}/denypolicies`
      * The attachment point is identified by its URL-encoded full resource name,
      * which means that the forward-slash character, `/`, must be written as
      * `%2F`. For example,
@@ -721,8 +692,9 @@ public Builder clearParent() {
      *
      *
      * 
-     * Required. The resource that the policy is attached to, along with the kind
-     * of policy to list. Format: `policies/{attachment_point}/denypolicies`
+     * Required. The resource that the policy is attached to, along with the kind of policy
+     * to list. Format:
+     * `policies/{attachment_point}/denypolicies`
      * The attachment point is identified by its URL-encoded full resource name,
      * which means that the forward-slash character, `/`, must be written as
      * `%2F`. For example,
@@ -807,9 +779,8 @@ public Builder clearPageSize() {
      *
      *
      * 
-     * A page token received in a
-     * [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this
-     * token to retrieve the next page.
+     * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
+     * retrieve the next page.
      * 
* * string page_token = 3; @@ -831,9 +802,8 @@ public java.lang.String getPageToken() { * * *
-     * A page token received in a
-     * [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this
-     * token to retrieve the next page.
+     * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
+     * retrieve the next page.
      * 
* * string page_token = 3; @@ -855,9 +825,8 @@ public com.google.protobuf.ByteString getPageTokenBytes() { * * *
-     * A page token received in a
-     * [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this
-     * token to retrieve the next page.
+     * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
+     * retrieve the next page.
      * 
* * string page_token = 3; @@ -878,9 +847,8 @@ public Builder setPageToken(java.lang.String value) { * * *
-     * A page token received in a
-     * [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this
-     * token to retrieve the next page.
+     * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
+     * retrieve the next page.
      * 
* * string page_token = 3; @@ -897,9 +865,8 @@ public Builder clearPageToken() { * * *
-     * A page token received in a
-     * [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this
-     * token to retrieve the next page.
+     * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
+     * retrieve the next page.
      * 
* * string page_token = 3; @@ -950,7 +917,18 @@ public ListPoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListPoliciesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequestOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequestOrBuilder.java index 5ccf0c27..bfea871b 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequestOrBuilder.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesRequestOrBuilder.java @@ -27,8 +27,9 @@ public interface ListPoliciesRequestOrBuilder * * *
-   * Required. The resource that the policy is attached to, along with the kind
-   * of policy to list. Format: `policies/{attachment_point}/denypolicies`
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to list. Format:
+   * `policies/{attachment_point}/denypolicies`
    * The attachment point is identified by its URL-encoded full resource name,
    * which means that the forward-slash character, `/`, must be written as
    * `%2F`. For example,
@@ -46,8 +47,9 @@ public interface ListPoliciesRequestOrBuilder
    *
    *
    * 
-   * Required. The resource that the policy is attached to, along with the kind
-   * of policy to list. Format: `policies/{attachment_point}/denypolicies`
+   * Required. The resource that the policy is attached to, along with the kind of policy
+   * to list. Format:
+   * `policies/{attachment_point}/denypolicies`
    * The attachment point is identified by its URL-encoded full resource name,
    * which means that the forward-slash character, `/`, must be written as
    * `%2F`. For example,
@@ -80,9 +82,8 @@ public interface ListPoliciesRequestOrBuilder
    *
    *
    * 
-   * A page token received in a
-   * [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this
-   * token to retrieve the next page.
+   * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
+   * retrieve the next page.
    * 
* * string page_token = 3; @@ -94,9 +95,8 @@ public interface ListPoliciesRequestOrBuilder * * *
-   * A page token received in a
-   * [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this
-   * token to retrieve the next page.
+   * A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to
+   * retrieve the next page.
    * 
* * string page_token = 3; diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponse.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponse.java index fa2820bd..62cdb5ec 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponse.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponse.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListPoliciesResponse( - 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)) { - policies_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - policies_.add( - input.readMessage(com.google.iam.v2.Policy.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)) { - policies_ = java.util.Collections.unmodifiableList(policies_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v2.PolicyProto .internal_static_google_iam_v2_ListPoliciesResponse_descriptor; @@ -202,8 +142,7 @@ public com.google.iam.v2.PolicyOrBuilder getPoliciesOrBuilder(int index) { * * *
-   * A page token that you can use in a
-   * [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
+   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
    * next page. If this field is omitted, there are no additional pages.
    * 
* @@ -227,8 +166,7 @@ public java.lang.String getNextPageToken() { * * *
-   * A page token that you can use in a
-   * [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
+   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
    * next page. If this field is omitted, there are no additional pages.
    * 
* @@ -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; } @@ -301,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPoliciesList().equals(other.getPoliciesList())) 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; } @@ -447,19 +385,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2.ListPoliciesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPoliciesFieldBuilder(); - } } @java.lang.Override @@ -467,10 +396,11 @@ public Builder clear() { super.clear(); if (policiesBuilder_ == null) { policies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + policies_ = null; policiesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -591,7 +521,7 @@ public Builder mergeFrom(com.google.iam.v2.ListPoliciesResponse other) { nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -606,17 +536,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2.ListPoliciesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } 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.iam.v2.Policy m = + input.readMessage(com.google.iam.v2.Policy.parser(), extensionRegistry); + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + policies_.add(m); + } else { + policiesBuilder_.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.iam.v2.ListPoliciesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -969,8 +931,7 @@ public java.util.List getPoliciesBuilderList() * * *
-     * A page token that you can use in a
-     * [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
+     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
      * next page. If this field is omitted, there are no additional pages.
      * 
* @@ -993,8 +954,7 @@ public java.lang.String getNextPageToken() { * * *
-     * A page token that you can use in a
-     * [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
+     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
      * next page. If this field is omitted, there are no additional pages.
      * 
* @@ -1017,8 +977,7 @@ public com.google.protobuf.ByteString getNextPageTokenBytes() { * * *
-     * A page token that you can use in a
-     * [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
+     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
      * next page. If this field is omitted, there are no additional pages.
      * 
* @@ -1040,8 +999,7 @@ public Builder setNextPageToken(java.lang.String value) { * * *
-     * A page token that you can use in a
-     * [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
+     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
      * next page. If this field is omitted, there are no additional pages.
      * 
* @@ -1059,8 +1017,7 @@ public Builder clearNextPageToken() { * * *
-     * A page token that you can use in a
-     * [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
+     * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
      * next page. If this field is omitted, there are no additional pages.
      * 
* @@ -1112,7 +1069,18 @@ public ListPoliciesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListPoliciesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponseOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponseOrBuilder.java index 54a77f75..1faeb31c 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponseOrBuilder.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/ListPoliciesResponseOrBuilder.java @@ -78,8 +78,7 @@ public interface ListPoliciesResponseOrBuilder * * *
-   * A page token that you can use in a
-   * [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
+   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
    * next page. If this field is omitted, there are no additional pages.
    * 
* @@ -92,8 +91,7 @@ public interface ListPoliciesResponseOrBuilder * * *
-   * A page token that you can use in a
-   * [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
+   * A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the
    * next page. If this field is omitted, there are no additional pages.
    * 
* diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/Policy.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/Policy.java index 2de2078e..82a241e7 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/Policy.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/Policy.java @@ -58,161 +58,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Policy( - 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(); - - uid_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - kind_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - annotations_ = - com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry annotations__ = - input.readMessage( - AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 58: - { - 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 66: - { - 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 74: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (deleteTime_ != null) { - subBuilder = deleteTime_.toBuilder(); - } - deleteTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deleteTime_); - deleteTime_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - rules_.add( - input.readMessage(com.google.iam.v2.PolicyRule.parser(), extensionRegistry)); - break; - } - case 90: - { - java.lang.String s = input.readStringRequireUtf8(); - - managingAuthority_ = 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)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_Policy_descriptor; } @@ -307,8 +152,8 @@ public com.google.protobuf.ByteString getNameBytes() { * * *
-   * Immutable. The globally unique ID of the `Policy`. Assigned automatically
-   * when the `Policy` is created.
+   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+   * `Policy` is created.
    * 
* * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; @@ -331,8 +176,8 @@ public java.lang.String getUid() { * * *
-   * Immutable. The globally unique ID of the `Policy`. Assigned automatically
-   * when the `Policy` is created.
+   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+   * `Policy` is created.
    * 
* * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; @@ -358,8 +203,7 @@ public com.google.protobuf.ByteString getUidBytes() { * * *
-   * Output only. The kind of the `Policy`. Always contains the value
-   * `DenyPolicy`.
+   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
    * 
* * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -382,8 +226,7 @@ public java.lang.String getKind() { * * *
-   * Output only. The kind of the `Policy`. Always contains the value
-   * `DenyPolicy`.
+   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
    * 
* * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -719,8 +562,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *
-   * Output only. The time when the `Policy` was deleted. Empty if the policy is
-   * not deleted.
+   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
    * 
* * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -736,8 +578,7 @@ public boolean hasDeleteTime() { * * *
-   * Output only. The time when the `Policy` was deleted. Empty if the policy is
-   * not deleted.
+   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
    * 
* * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -753,8 +594,7 @@ public com.google.protobuf.Timestamp getDeleteTime() { * * *
-   * Output only. The time when the `Policy` was deleted. Empty if the policy is
-   * not deleted.
+   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
    * 
* * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -844,8 +684,8 @@ public com.google.iam.v2.PolicyRuleOrBuilder getRulesOrBuilder(int index) { * * *
-   * Immutable. Specifies that this policy is managed by an authority and can
-   * only be modified by that authority. Usage is restricted.
+   * Immutable. Specifies that this policy is managed by an authority and can only be
+   * modified by that authority. Usage is restricted.
    * 
* * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; @@ -868,8 +708,8 @@ public java.lang.String getManagingAuthority() { * * *
-   * Immutable. Specifies that this policy is managed by an authority and can
-   * only be modified by that authority. Usage is restricted.
+   * Immutable. Specifies that this policy is managed by an authority and can only be
+   * modified by that authority. Usage is restricted.
    * 
* * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; @@ -935,7 +775,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(managingAuthority_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 11, managingAuthority_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -984,7 +824,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(managingAuthority_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, managingAuthority_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -1019,7 +859,7 @@ public boolean equals(final java.lang.Object obj) { } if (!getRulesList().equals(other.getRulesList())) return false; if (!getManagingAuthority().equals(other.getManagingAuthority())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -1062,7 +902,7 @@ public int hashCode() { } hash = (37 * hash) + MANAGING_AUTHORITY_FIELD_NUMBER; hash = (53 * hash) + getManagingAuthority().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1207,19 +1047,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.iam.v2.Policy.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRulesFieldBuilder(); - } } @java.lang.Override @@ -1256,10 +1087,11 @@ public Builder clear() { } if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + rules_ = null; rulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); managingAuthority_ = ""; return this; @@ -1430,7 +1262,7 @@ public Builder mergeFrom(com.google.iam.v2.Policy other) { managingAuthority_ = other.managingAuthority_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1445,17 +1277,108 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2.Policy parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } 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: + { + uid_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + kind_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + break; + } // case 42 + case 50: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 66: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 + case 74: + { + input.readMessage(getDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 74 + case 82: + { + com.google.iam.v2.PolicyRule m = + input.readMessage(com.google.iam.v2.PolicyRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 82 + case 90: + { + managingAuthority_ = input.readStringRequireUtf8(); + + 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.iam.v2.Policy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1612,8 +1535,8 @@ public Builder setNameBytes(com.google.protobuf.ByteString value) { * * *
-     * Immutable. The globally unique ID of the `Policy`. Assigned automatically
-     * when the `Policy` is created.
+     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+     * `Policy` is created.
      * 
* * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; @@ -1635,8 +1558,8 @@ public java.lang.String getUid() { * * *
-     * Immutable. The globally unique ID of the `Policy`. Assigned automatically
-     * when the `Policy` is created.
+     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+     * `Policy` is created.
      * 
* * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; @@ -1658,8 +1581,8 @@ public com.google.protobuf.ByteString getUidBytes() { * * *
-     * Immutable. The globally unique ID of the `Policy`. Assigned automatically
-     * when the `Policy` is created.
+     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+     * `Policy` is created.
      * 
* * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; @@ -1680,8 +1603,8 @@ public Builder setUid(java.lang.String value) { * * *
-     * Immutable. The globally unique ID of the `Policy`. Assigned automatically
-     * when the `Policy` is created.
+     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+     * `Policy` is created.
      * 
* * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; @@ -1698,8 +1621,8 @@ public Builder clearUid() { * * *
-     * Immutable. The globally unique ID of the `Policy`. Assigned automatically
-     * when the `Policy` is created.
+     * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+     * `Policy` is created.
      * 
* * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; @@ -1723,8 +1646,7 @@ public Builder setUidBytes(com.google.protobuf.ByteString value) { * * *
-     * Output only. The kind of the `Policy`. Always contains the value
-     * `DenyPolicy`.
+     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
      * 
* * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1746,8 +1668,7 @@ public java.lang.String getKind() { * * *
-     * Output only. The kind of the `Policy`. Always contains the value
-     * `DenyPolicy`.
+     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
      * 
* * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1769,8 +1690,7 @@ public com.google.protobuf.ByteString getKindBytes() { * * *
-     * Output only. The kind of the `Policy`. Always contains the value
-     * `DenyPolicy`.
+     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
      * 
* * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1791,8 +1711,7 @@ public Builder setKind(java.lang.String value) { * * *
-     * Output only. The kind of the `Policy`. Always contains the value
-     * `DenyPolicy`.
+     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
      * 
* * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -1809,8 +1728,7 @@ public Builder clearKind() { * * *
-     * Output only. The kind of the `Policy`. Always contains the value
-     * `DenyPolicy`.
+     * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
      * 
* * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -2646,8 +2564,7 @@ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { * * *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is
-     * not deleted.
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
      * 
* * @@ -2663,8 +2580,7 @@ public boolean hasDeleteTime() { * * *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is
-     * not deleted.
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
      * 
* * @@ -2686,8 +2602,7 @@ public com.google.protobuf.Timestamp getDeleteTime() { * * *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is
-     * not deleted.
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
      * 
* * @@ -2711,8 +2626,7 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is
-     * not deleted.
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
      * 
* * @@ -2733,8 +2647,7 @@ public Builder setDeleteTime(com.google.protobuf.Timestamp.Builder builderForVal * * *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is
-     * not deleted.
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
      * 
* * @@ -2760,8 +2673,7 @@ public Builder mergeDeleteTime(com.google.protobuf.Timestamp value) { * * *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is
-     * not deleted.
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
      * 
* * @@ -2783,8 +2695,7 @@ public Builder clearDeleteTime() { * * *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is
-     * not deleted.
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
      * 
* * @@ -2800,8 +2711,7 @@ public com.google.protobuf.Timestamp.Builder getDeleteTimeBuilder() { * * *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is
-     * not deleted.
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
      * 
* * @@ -2821,8 +2731,7 @@ public com.google.protobuf.TimestampOrBuilder getDeleteTimeOrBuilder() { * * *
-     * Output only. The time when the `Policy` was deleted. Empty if the policy is
-     * not deleted.
+     * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
      * 
* * @@ -3211,8 +3120,8 @@ public java.util.List getRulesBuilderList( * * *
-     * Immutable. Specifies that this policy is managed by an authority and can
-     * only be modified by that authority. Usage is restricted.
+     * Immutable. Specifies that this policy is managed by an authority and can only be
+     * modified by that authority. Usage is restricted.
      * 
* * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; @@ -3234,8 +3143,8 @@ public java.lang.String getManagingAuthority() { * * *
-     * Immutable. Specifies that this policy is managed by an authority and can
-     * only be modified by that authority. Usage is restricted.
+     * Immutable. Specifies that this policy is managed by an authority and can only be
+     * modified by that authority. Usage is restricted.
      * 
* * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; @@ -3257,8 +3166,8 @@ public com.google.protobuf.ByteString getManagingAuthorityBytes() { * * *
-     * Immutable. Specifies that this policy is managed by an authority and can
-     * only be modified by that authority. Usage is restricted.
+     * Immutable. Specifies that this policy is managed by an authority and can only be
+     * modified by that authority. Usage is restricted.
      * 
* * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; @@ -3279,8 +3188,8 @@ public Builder setManagingAuthority(java.lang.String value) { * * *
-     * Immutable. Specifies that this policy is managed by an authority and can
-     * only be modified by that authority. Usage is restricted.
+     * Immutable. Specifies that this policy is managed by an authority and can only be
+     * modified by that authority. Usage is restricted.
      * 
* * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; @@ -3297,8 +3206,8 @@ public Builder clearManagingAuthority() { * * *
-     * Immutable. Specifies that this policy is managed by an authority and can
-     * only be modified by that authority. Usage is restricted.
+     * Immutable. Specifies that this policy is managed by an authority and can only be
+     * modified by that authority. Usage is restricted.
      * 
* * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; @@ -3349,7 +3258,18 @@ public Policy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Policy(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadata.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadata.java index 3f3b95fc..b8aae544 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadata.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOperationMetadata.java @@ -50,60 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PolicyOperationMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v2.PolicyProto .internal_static_google_iam_v2_PolicyOperationMetadata_descriptor; @@ -182,7 +128,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (createTime_ != null) { output.writeMessage(1, getCreateTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -194,7 +140,7 @@ public int getSerializedSize() { if (createTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +160,7 @@ public boolean equals(final java.lang.Object obj) { if (hasCreateTime()) { if (!getCreateTime().equals(other.getCreateTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -229,7 +175,7 @@ public int hashCode() { hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreateTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -358,17 +304,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2.PolicyOperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -464,7 +403,7 @@ public Builder mergeFrom(com.google.iam.v2.PolicyOperationMetadata other) { if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -479,17 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2.PolicyOperationMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } 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 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2.PolicyOperationMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -708,7 +667,18 @@ public PolicyOperationMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyOperationMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOrBuilder.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOrBuilder.java index 276617f9..84433497 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOrBuilder.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyOrBuilder.java @@ -68,8 +68,8 @@ public interface PolicyOrBuilder * * *
-   * Immutable. The globally unique ID of the `Policy`. Assigned automatically
-   * when the `Policy` is created.
+   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+   * `Policy` is created.
    * 
* * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; @@ -81,8 +81,8 @@ public interface PolicyOrBuilder * * *
-   * Immutable. The globally unique ID of the `Policy`. Assigned automatically
-   * when the `Policy` is created.
+   * Immutable. The globally unique ID of the `Policy`. Assigned automatically when the
+   * `Policy` is created.
    * 
* * string uid = 2 [(.google.api.field_behavior) = IMMUTABLE]; @@ -95,8 +95,7 @@ public interface PolicyOrBuilder * * *
-   * Output only. The kind of the `Policy`. Always contains the value
-   * `DenyPolicy`.
+   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
    * 
* * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -108,8 +107,7 @@ public interface PolicyOrBuilder * * *
-   * Output only. The kind of the `Policy`. Always contains the value
-   * `DenyPolicy`.
+   * Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`.
    * 
* * string kind = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -322,8 +320,7 @@ java.lang.String getAnnotationsOrDefault( * * *
-   * Output only. The time when the `Policy` was deleted. Empty if the policy is
-   * not deleted.
+   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
    * 
* * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -336,8 +333,7 @@ java.lang.String getAnnotationsOrDefault( * * *
-   * Output only. The time when the `Policy` was deleted. Empty if the policy is
-   * not deleted.
+   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
    * 
* * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -350,8 +346,7 @@ java.lang.String getAnnotationsOrDefault( * * *
-   * Output only. The time when the `Policy` was deleted. Empty if the policy is
-   * not deleted.
+   * Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted.
    * 
* * .google.protobuf.Timestamp delete_time = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; @@ -419,8 +414,8 @@ java.lang.String getAnnotationsOrDefault( * * *
-   * Immutable. Specifies that this policy is managed by an authority and can
-   * only be modified by that authority. Usage is restricted.
+   * Immutable. Specifies that this policy is managed by an authority and can only be
+   * modified by that authority. Usage is restricted.
    * 
* * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; @@ -432,8 +427,8 @@ java.lang.String getAnnotationsOrDefault( * * *
-   * Immutable. Specifies that this policy is managed by an authority and can
-   * only be modified by that authority. Usage is restricted.
+   * Immutable. Specifies that this policy is managed by an authority and can only be
+   * modified by that authority. Usage is restricted.
    * 
* * string managing_authority = 11 [(.google.api.field_behavior) = IMMUTABLE]; diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyProto.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyProto.java index 7b921a99..9cbab033 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyProto.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyProto.java @@ -63,14 +63,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_iam_v2_DeletePolicyRequest_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_iam_v2_DeletePolicyRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2_ListApplicablePoliciesRequest_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2_ListApplicablePoliciesRequest_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_iam_v2_ListApplicablePoliciesResponse_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_iam_v2_ListApplicablePoliciesResponse_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_iam_v2_PolicyOperationMetadata_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -114,44 +106,34 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "id\030\003 \001(\t\"A\n\023UpdatePolicyRequest\022*\n\006polic" + "y\030\001 \001(\0132\025.google.iam.v2.PolicyB\003\340A\002\";\n\023D" + "eletePolicyRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\021\n" - + "\004etag\030\002 \001(\tB\003\340A\001\"u\n\035ListApplicablePolici" - + "esRequest\022\035\n\020attachment_point\030\001 \001(\tB\003\340A\002" - + "\022\016\n\006filter\030\002 \001(\t\022\022\n\npage_token\030\003 \001(\t\022\021\n\t" - + "page_size\030\004 \001(\005\"x\n\036ListApplicablePolicie" - + "sResponse\022\'\n\010policies\030\001 \003(\0132\025.google.iam" - + ".v2.Policy\022\024\n\014inaccessible\030\002 \003(\t\022\027\n\017next" - + "_page_token\030\003 \001(\t\"J\n\027PolicyOperationMeta" - + "data\022/\n\013create_time\030\001 \001(\0132\032.google.proto" - + "buf.Timestamp2\224\010\n\010Policies\022\203\001\n\014ListPolic" - + "ies\022\".google.iam.v2.ListPoliciesRequest\032" - + "#.google.iam.v2.ListPoliciesResponse\"*\202\323" - + "\344\223\002\033\022\031/v2/{parent=policies/*/*}\332A\006parent" - + "\022m\n\tGetPolicy\022\037.google.iam.v2.GetPolicyR" - + "equest\032\025.google.iam.v2.Policy\"(\202\323\344\223\002\033\022\031/" - + "v2/{name=policies/*/*/*}\332A\004name\022\272\001\n\014Crea" - + "tePolicy\022\".google.iam.v2.CreatePolicyReq" - + "uest\032\035.google.longrunning.Operation\"g\202\323\344" - + "\223\002#\"\031/v2/{parent=policies/*/*}:\006policy\332A" - + "\027parent,policy,policy_id\312A!\n\006Policy\022\027Pol" - + "icyOperationMetadata\022\247\001\n\014UpdatePolicy\022\"." - + "google.iam.v2.UpdatePolicyRequest\032\035.goog" - + "le.longrunning.Operation\"T\202\323\344\223\002*\032 /v2/{p" - + "olicy.name=policies/*/*/*}:\006policy\312A!\n\006P" - + "olicy\022\027PolicyOperationMetadata\022\237\001\n\014Delet" - + "ePolicy\022\".google.iam.v2.DeletePolicyRequ" - + "est\032\035.google.longrunning.Operation\"L\202\323\344\223" - + "\002\033*\031/v2/{name=policies/*/*/*}\332A\004name\312A!\n" - + "\006Policy\022\027PolicyOperationMetadata\022\301\001\n\026Lis" - + "tApplicablePolicies\022,.google.iam.v2.List" - + "ApplicablePoliciesRequest\032-.google.iam.v" - + "2.ListApplicablePoliciesResponse\"J\202\323\344\223\0021" - + "\022//v2/{attachment_point=*}:listApplicabl" - + "ePolicies\332A\020attachment_point\032F\312A\022iam.goo" - + "gleapis.com\322A.https://www.googleapis.com" - + "/auth/cloud-platformB\200\001\n\021com.google.iam." - + "v2B\013PolicyProtoP\001Z0google.golang.org/gen" - + "proto/googleapis/iam/v2;iam\252\002\023Google.Clo" - + "ud.Iam.V2\312\002\023Google\\Cloud\\Iam\\V2b\006proto3" + + "\004etag\030\002 \001(\tB\003\340A\001\"J\n\027PolicyOperationMetad" + + "ata\022/\n\013create_time\030\001 \001(\0132\032.google.protob" + + "uf.Timestamp2\320\006\n\010Policies\022\203\001\n\014ListPolici" + + "es\022\".google.iam.v2.ListPoliciesRequest\032#" + + ".google.iam.v2.ListPoliciesResponse\"*\202\323\344" + + "\223\002\033\022\031/v2/{parent=policies/*/*}\332A\006parent\022" + + "m\n\tGetPolicy\022\037.google.iam.v2.GetPolicyRe" + + "quest\032\025.google.iam.v2.Policy\"(\202\323\344\223\002\033\022\031/v" + + "2/{name=policies/*/*/*}\332A\004name\022\272\001\n\014Creat" + + "ePolicy\022\".google.iam.v2.CreatePolicyRequ" + + "est\032\035.google.longrunning.Operation\"g\202\323\344\223" + + "\002#\"\031/v2/{parent=policies/*/*}:\006policy\332A\027" + + "parent,policy,policy_id\312A!\n\006Policy\022\027Poli" + + "cyOperationMetadata\022\247\001\n\014UpdatePolicy\022\".g" + + "oogle.iam.v2.UpdatePolicyRequest\032\035.googl" + + "e.longrunning.Operation\"T\202\323\344\223\002*\032 /v2/{po" + + "licy.name=policies/*/*/*}:\006policy\312A!\n\006Po" + + "licy\022\027PolicyOperationMetadata\022\237\001\n\014Delete" + + "Policy\022\".google.iam.v2.DeletePolicyReque" + + "st\032\035.google.longrunning.Operation\"L\202\323\344\223\002" + + "\033*\031/v2/{name=policies/*/*/*}\332A\004name\312A!\n\006" + + "Policy\022\027PolicyOperationMetadata\032F\312A\022iam." + + "googleapis.com\322A.https://www.googleapis." + + "com/auth/cloud-platformB\200\001\n\021com.google.i" + + "am.v2B\013PolicyProtoP\001Z0google.golang.org/" + + "genproto/googleapis/iam/v2;iam\252\002\023Google." + + "Cloud.Iam.V2\312\002\023Google\\Cloud\\Iam\\V2b\006prot" + + "o3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -244,24 +226,8 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new java.lang.String[] { "Name", "Etag", }); - internal_static_google_iam_v2_ListApplicablePoliciesRequest_descriptor = - getDescriptor().getMessageTypes().get(8); - internal_static_google_iam_v2_ListApplicablePoliciesRequest_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2_ListApplicablePoliciesRequest_descriptor, - new java.lang.String[] { - "AttachmentPoint", "Filter", "PageToken", "PageSize", - }); - internal_static_google_iam_v2_ListApplicablePoliciesResponse_descriptor = - getDescriptor().getMessageTypes().get(9); - internal_static_google_iam_v2_ListApplicablePoliciesResponse_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_iam_v2_ListApplicablePoliciesResponse_descriptor, - new java.lang.String[] { - "Policies", "Inaccessible", "NextPageToken", - }); internal_static_google_iam_v2_PolicyOperationMetadata_descriptor = - getDescriptor().getMessageTypes().get(10); + getDescriptor().getMessageTypes().get(8); internal_static_google_iam_v2_PolicyOperationMetadata_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_iam_v2_PolicyOperationMetadata_descriptor, diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyRule.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyRule.java index c1de50c9..032fa2bb 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyRule.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/PolicyRule.java @@ -52,66 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PolicyRule( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - description_ = s; - break; - } - case 18: - { - com.google.iam.v2.DenyRule.Builder subBuilder = null; - if (kindCase_ == 2) { - subBuilder = ((com.google.iam.v2.DenyRule) kind_).toBuilder(); - } - kind_ = input.readMessage(com.google.iam.v2.DenyRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.iam.v2.DenyRule) kind_); - kind_ = subBuilder.buildPartial(); - } - kindCase_ = 2; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v2.PolicyProto.internal_static_google_iam_v2_PolicyRule_descriptor; } @@ -290,7 +230,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (kindCase_ == 2) { output.writeMessage(2, (com.google.iam.v2.DenyRule) kind_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -307,7 +247,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, (com.google.iam.v2.DenyRule) kind_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -331,7 +271,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; } @@ -352,7 +292,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -478,22 +418,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2.PolicyRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private 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 (denyRuleBuilder_ != null) { + denyRuleBuilder_.clear(); + } description_ = ""; kindCase_ = 0; @@ -596,7 +532,7 @@ public Builder mergeFrom(com.google.iam.v2.PolicyRule other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -611,17 +547,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2.PolicyRule parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getDenyRuleFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2.PolicyRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -987,7 +949,18 @@ public PolicyRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequest.java b/proto-google-iam-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequest.java index d9f857e3..d7810fed 100644 --- a/proto-google-iam-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequest.java +++ b/proto-google-iam-v2/src/main/java/com/google/iam/v2/UpdatePolicyRequest.java @@ -50,59 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdatePolicyRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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.iam.v2.Policy.Builder subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = input.readMessage(com.google.iam.v2.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = 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.iam.v2.PolicyProto .internal_static_google_iam_v2_UpdatePolicyRequest_descriptor; @@ -190,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (policy_ != null) { output.writeMessage(1, getPolicy()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -202,7 +149,7 @@ public int getSerializedSize() { if (policy_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicy()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -221,7 +168,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPolicy()) { if (!getPolicy().equals(other.getPolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -236,7 +183,7 @@ public int hashCode() { hash = (37 * hash) + POLICY_FIELD_NUMBER; hash = (53 * hash) + getPolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -364,17 +311,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2.UpdatePolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -470,7 +410,7 @@ public Builder mergeFrom(com.google.iam.v2.UpdatePolicyRequest other) { if (other.hasPolicy()) { mergePolicy(other.getPolicy()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -485,17 +425,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2.UpdatePolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } 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(getPolicyFieldBuilder().getBuilder(), extensionRegistry); + + 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.iam.v2.UpdatePolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -735,7 +695,18 @@ public UpdatePolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdatePolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2/src/main/proto/google/iam/v2/policy.proto b/proto-google-iam-v2/src/main/proto/google/iam/v2/policy.proto index b21d44fa..d8923d3b 100644 --- a/proto-google-iam-v2/src/main/proto/google/iam/v2/policy.proto +++ b/proto-google-iam-v2/src/main/proto/google/iam/v2/policy.proto @@ -33,8 +33,7 @@ option php_namespace = "Google\\Cloud\\Iam\\V2"; // An interface for managing Identity and Access Management (IAM) policies. service Policies { option (google.api.default_host) = "iam.googleapis.com"; - option (google.api.oauth_scopes) = - "https://www.googleapis.com/auth/cloud-platform"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/cloud-platform"; // Retrieves the policies of the specified kind that are attached to a // resource. @@ -75,8 +74,7 @@ service Policies { // // To update a policy, you should use a read-modify-write loop: // - // 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current - // version of the policy. + // 1. Use [GetPolicy][google.iam.v2.Policies.GetPolicy] to read the current version of the policy. // 2. Modify the policy as needed. // 3. Use `UpdatePolicy` to write the updated policy. // @@ -103,24 +101,6 @@ service Policies { metadata_type: "PolicyOperationMetadata" }; } - - // Retrieves all the policies that are attached to the specified resource, - // or anywhere in the ancestry of the resource. For example, for a project - // this endpoint would return all the `denyPolicy` kind policies attached to - // the project, its parent folder (if any), and its parent organization (if - // any). - // The endpoint requires the same permissions that it would take to call - // `ListPolicies` or `GetPolicy`. - // - // The main reason to use this endpoint is as a policy admin to debug access - // issues for a resource. - rpc ListApplicablePolicies(ListApplicablePoliciesRequest) - returns (ListApplicablePoliciesResponse) { - option (google.api.http) = { - get: "/v2/{attachment_point=*}:listApplicablePolicies" - }; - option (google.api.method_signature) = "attachment_point"; - } } // Data for an IAM policy. @@ -139,12 +119,11 @@ message Policy { // Responses always contain the numeric ID. string name = 1 [(google.api.field_behavior) = IMMUTABLE]; - // Immutable. The globally unique ID of the `Policy`. Assigned automatically - // when the `Policy` is created. + // Immutable. The globally unique ID of the `Policy`. Assigned automatically when the + // `Policy` is created. string uid = 2 [(google.api.field_behavior) = IMMUTABLE]; - // Output only. The kind of the `Policy`. Always contains the value - // `DenyPolicy`. + // Output only. The kind of the `Policy`. Always contains the value `DenyPolicy`. string kind = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; // A user-specified description of the `Policy`. This value can be up to 63 @@ -164,24 +143,20 @@ message Policy { string etag = 6; // Output only. The time when the `Policy` was created. - google.protobuf.Timestamp create_time = 7 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The time when the `Policy` was last updated. - google.protobuf.Timestamp update_time = 8 - [(google.api.field_behavior) = OUTPUT_ONLY]; + google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. The time when the `Policy` was deleted. Empty if the policy is - // not deleted. - google.protobuf.Timestamp delete_time = 9 - [(google.api.field_behavior) = OUTPUT_ONLY]; + // Output only. The time when the `Policy` was deleted. Empty if the policy is not deleted. + google.protobuf.Timestamp delete_time = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; // A list of rules that specify the behavior of the `Policy`. All of the rules // should be of the `kind` specified in the `Policy`. repeated PolicyRule rules = 10; - // Immutable. Specifies that this policy is managed by an authority and can - // only be modified by that authority. Usage is restricted. + // Immutable. Specifies that this policy is managed by an authority and can only be + // modified by that authority. Usage is restricted. string managing_authority = 11 [(google.api.field_behavior) = IMMUTABLE]; } @@ -199,8 +174,9 @@ message PolicyRule { // Request message for `ListPolicies`. message ListPoliciesRequest { - // Required. The resource that the policy is attached to, along with the kind - // of policy to list. Format: `policies/{attachment_point}/denypolicies` + // Required. The resource that the policy is attached to, along with the kind of policy + // to list. Format: + // `policies/{attachment_point}/denypolicies` // // // The attachment point is identified by its URL-encoded full resource name, @@ -216,9 +192,8 @@ message ListPoliciesRequest { // the value 1000. int32 page_size = 2; - // A page token received in a - // [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this - // token to retrieve the next page. + // A page token received in a [ListPoliciesResponse][google.iam.v2.ListPoliciesResponse]. Provide this token to + // retrieve the next page. string page_token = 3; } @@ -227,8 +202,7 @@ message ListPoliciesResponse { // Metadata for the policies that are attached to the resource. repeated Policy policies = 1; - // A page token that you can use in a - // [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the + // A page token that you can use in a [ListPoliciesRequest][google.iam.v2.ListPoliciesRequest] to retrieve the // next page. If this field is omitted, there are no additional pages. string next_page_token = 2; } @@ -250,8 +224,8 @@ message GetPolicyRequest { // Request message for `CreatePolicy`. message CreatePolicyRequest { - // Required. The resource that the policy is attached to, along with the kind - // of policy to create. Format: `policies/{attachment_point}/denypolicies` + // Required. The resource that the policy is attached to, along with the kind of policy + // to create. Format: `policies/{attachment_point}/denypolicies` // // // The attachment point is identified by its URL-encoded full resource name, @@ -297,78 +271,15 @@ message DeletePolicyRequest { // name. For projects, you can use the alphanumeric or the numeric ID. string name = 1 [(google.api.field_behavior) = REQUIRED]; - // Optional. The expected `etag` of the policy to delete. If the value does - // not match the value that is stored in IAM, the request fails with a `409` - // error code and `ABORTED` status. + // Optional. The expected `etag` of the policy to delete. If the value does not match + // the value that is stored in IAM, the request fails with a `409` error code + // and `ABORTED` status. // // If you omit this field, the policy is deleted regardless of its current // `etag`. string etag = 2 [(google.api.field_behavior) = OPTIONAL]; } -// `ListApplicablePoliciesRequest` represents the Request message for the -// `ListApplicablePolicies` method. It provides the input for a filterable query -// of Policies that apply to a certain GCP Resource, specified by the field -// `attachment_point`, found on this message. -// Example: -// ``` -// { -// attachment_point: -// 'cloudresourcemanager.googleapis.com%2Forganizations%2F212345678901' -// filter: 'kind:denyPolicies' -// } -// ``` -message ListApplicablePoliciesRequest { - // Required. The Cloud resource at which the applicable policies are to be - // retrieved. Format: `{attachment-point}` Use the URL-encoded full resource - // name, which means that the forward-slash character, `/`, must be written as - // `%2F`. For example, - // `cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project`. - string attachment_point = 1 [(google.api.field_behavior) = REQUIRED]; - - // Filtering currently only supports the kind of policies to return, and - // must be in the format “kind:[policyKind1] OR kind:[policyKind2]”. New - // policy kinds may be added in the future without notice. - // - // Example value: “kind:denyPolicies” - string filter = 2; - - // If present, then retrieve the batch of results following the results from - // the preceding call to this method. `page_token` must be the value of - // `next_page_token` - // [ListApplicablePoliciesResponse.next_page_token][google.iam.v2.ListApplicablePoliciesResponse.next_page_token] - // from the previous response. The values of other method parameters should - // be identical to those in the previous call. - string page_token = 3; - - // Limit on the number of policies to include in the response. - // Further policies can subsequently be obtained by including the - // [ListApplicablePoliciesResponse.next_page_token][google.iam.admin.v1.ListApplicablePoliciesResponse.next_page_token] - // in a subsequent request. - // The minimum is 25, and the maximum is 100. - int32 page_size = 4; -} - -// Response message for [ListApplicablePolicies][] method. -message ListApplicablePoliciesResponse { - // Ordered list starting from the resource on which this API was called - // then proceeding up the hierarchy. Policies for the same attachment point - // will be grouped, but no further ordering is guaranteed. - repeated Policy policies = 1; - - // A list of resources that the caller does not have permission to retrieve. - // List or Get can be used to get detailed error messages. - // Get: `policies/{attachment-point}/denypolicies/{policy-id}` - // List: `policies/{attachment-point}/denypolicies` - repeated string inaccessible = 2; - - // A page token that can be used in a - // [ListApplicablePoliciesRequest][google.iam.v2.ListApplicablePoliciesRequest] - // to retrieve the next page. If this field is blank, there are no additional - // pages. - string next_page_token = 3; -} - // Metadata for long-running `Policy` operations. message PolicyOperationMetadata { // Timestamp when the `google.longrunning.Operation` was created. diff --git a/proto-google-iam-v2beta/pom.xml b/proto-google-iam-v2beta/pom.xml index 2954a33e..cb827650 100644 --- a/proto-google-iam-v2beta/pom.xml +++ b/proto-google-iam-v2beta/pom.xml @@ -4,13 +4,13 @@ 4.0.0 com.google.api.grpc proto-google-iam-v2beta - 1.6.1 + 1.6.2 proto-google-iam-v2beta Proto library for proto-google-iam-v1 com.google.cloud google-iam-parent - 1.6.1 + 1.6.2 diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequest.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequest.java index dc8b15da..4c91193e 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequest.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/CreatePolicyRequest.java @@ -53,73 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private CreatePolicyRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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.iam.v2beta.Policy.Builder subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = input.readMessage(com.google.iam.v2beta.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = subBuilder.buildPartial(); - } - - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - policyId_ = 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.iam.v2beta.PolicyProto .internal_static_google_iam_v2beta_CreatePolicyRequest_descriptor; @@ -322,7 +255,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyId_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 3, policyId_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -340,7 +273,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(policyId_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, policyId_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -362,7 +295,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPolicy().equals(other.getPolicy())) return false; } if (!getPolicyId().equals(other.getPolicyId())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -381,7 +314,7 @@ public int hashCode() { } hash = (37 * hash) + POLICY_ID_FIELD_NUMBER; hash = (53 * hash) + getPolicyId().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -510,17 +443,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2beta.CreatePolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -630,7 +556,7 @@ public Builder mergeFrom(com.google.iam.v2beta.CreatePolicyRequest other) { policyId_ = other.policyId_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -645,17 +571,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2beta.CreatePolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } 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(getPolicyFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 18 + case 26: + { + policyId_ = 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.iam.v2beta.CreatePolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1132,7 +1090,18 @@ public CreatePolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new CreatePolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequest.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequest.java index 9899a5c3..255a71ec 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequest.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DeletePolicyRequest.java @@ -53,59 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DeletePolicyRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - etag_ = 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.iam.v2beta.PolicyProto .internal_static_google_iam_v2beta_DeletePolicyRequest_descriptor; @@ -259,7 +206,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, etag_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -274,7 +221,7 @@ public int getSerializedSize() { if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(etag_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, etag_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -292,7 +239,7 @@ public boolean equals(final java.lang.Object obj) { if (!getName().equals(other.getName())) return false; if (!getEtag().equals(other.getEtag())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -307,7 +254,7 @@ public int hashCode() { hash = (53 * hash) + getName().hashCode(); hash = (37 * hash) + ETAG_FIELD_NUMBER; hash = (53 * hash) + getEtag().hashCode(); - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -436,17 +383,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2beta.DeletePolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private 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 +482,7 @@ public Builder mergeFrom(com.google.iam.v2beta.DeletePolicyRequest other) { etag_ = other.etag_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -557,17 +497,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2beta.DeletePolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } 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: + { + etag_ = 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.iam.v2beta.DeletePolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -865,7 +831,18 @@ public DeletePolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DeletePolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRule.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRule.java index d7af806b..b776f7b1 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRule.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/DenyRule.java @@ -55,113 +55,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private DenyRule( - 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)) { - deniedPrincipals_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000001; - } - deniedPrincipals_.add(s); - break; - } - case 18: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - exceptionPrincipals_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000002; - } - exceptionPrincipals_.add(s); - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000004) != 0)) { - deniedPermissions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000004; - } - deniedPermissions_.add(s); - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - if (!((mutable_bitField0_ & 0x00000008) != 0)) { - exceptionPermissions_ = new com.google.protobuf.LazyStringArrayList(); - mutable_bitField0_ |= 0x00000008; - } - exceptionPermissions_.add(s); - break; - } - case 42: - { - com.google.type.Expr.Builder subBuilder = null; - if (denialCondition_ != null) { - subBuilder = denialCondition_.toBuilder(); - } - denialCondition_ = - input.readMessage(com.google.type.Expr.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(denialCondition_); - denialCondition_ = 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)) { - deniedPrincipals_ = deniedPrincipals_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000002) != 0)) { - exceptionPrincipals_ = exceptionPrincipals_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000004) != 0)) { - deniedPermissions_ = deniedPermissions_.getUnmodifiableView(); - } - if (((mutable_bitField0_ & 0x00000008) != 0)) { - exceptionPermissions_ = exceptionPermissions_.getUnmodifiableView(); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v2beta.DenyRuleProto .internal_static_google_iam_v2beta_DenyRule_descriptor; @@ -700,7 +593,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (denialCondition_ != null) { output.writeMessage(5, getDenialCondition()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -744,7 +637,7 @@ public int getSerializedSize() { if (denialCondition_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getDenialCondition()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -767,7 +660,7 @@ public boolean equals(final java.lang.Object obj) { if (hasDenialCondition()) { if (!getDenialCondition().equals(other.getDenialCondition())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -798,7 +691,7 @@ public int hashCode() { hash = (37 * hash) + DENIAL_CONDITION_FIELD_NUMBER; hash = (53 * hash) + getDenialCondition().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -925,17 +818,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2beta.DenyRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -1099,7 +985,7 @@ public Builder mergeFrom(com.google.iam.v2beta.DenyRule other) { if (other.hasDenialCondition()) { mergeDenialCondition(other.getDenialCondition()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1114,17 +1000,65 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2beta.DenyRule parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } 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(); + ensureDeniedPrincipalsIsMutable(); + deniedPrincipals_.add(s); + break; + } // case 10 + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExceptionPrincipalsIsMutable(); + exceptionPrincipals_.add(s); + break; + } // case 18 + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureDeniedPermissionsIsMutable(); + deniedPermissions_.add(s); + break; + } // case 26 + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + ensureExceptionPermissionsIsMutable(); + exceptionPermissions_.add(s); + break; + } // case 34 + case 42: + { + input.readMessage(getDenialConditionFieldBuilder().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.iam.v2beta.DenyRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -2488,7 +2422,18 @@ public DenyRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new DenyRule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequest.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequest.java index 2775a53c..b579600e 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequest.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/GetPolicyRequest.java @@ -52,52 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private GetPolicyRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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.iam.v2beta.PolicyProto .internal_static_google_iam_v2beta_GetPolicyRequest_descriptor; @@ -191,7 +145,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 @@ -203,7 +157,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; } @@ -219,7 +173,7 @@ public boolean equals(final java.lang.Object obj) { com.google.iam.v2beta.GetPolicyRequest other = (com.google.iam.v2beta.GetPolicyRequest) obj; if (!getName().equals(other.getName())) 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) + 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.iam.v2beta.GetPolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private 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.iam.v2beta.GetPolicyRequest 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.iam.v2beta.GetPolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } 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.iam.v2beta.GetPolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -657,7 +624,18 @@ public GetPolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new GetPolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequest.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequest.java index 5f6f150c..c66f7d36 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequest.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesRequest.java @@ -53,64 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListPoliciesRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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.iam.v2beta.PolicyProto .internal_static_google_iam_v2beta_ListPoliciesRequest_descriptor; @@ -284,7 +226,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 @@ -302,7 +244,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; } @@ -321,7 +263,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; } @@ -338,7 +280,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; } @@ -467,17 +409,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2beta.ListPoliciesRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -579,7 +514,7 @@ public Builder mergeFrom(com.google.iam.v2beta.ListPoliciesRequest other) { pageToken_ = other.pageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -594,17 +529,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2beta.ListPoliciesRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } 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.iam.v2beta.ListPoliciesRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -952,7 +919,18 @@ public ListPoliciesRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListPoliciesRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponse.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponse.java index 68ede72d..b7559c50 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponse.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/ListPoliciesResponse.java @@ -53,66 +53,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private ListPoliciesResponse( - 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)) { - policies_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000001; - } - policies_.add( - input.readMessage(com.google.iam.v2beta.Policy.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)) { - policies_ = java.util.Collections.unmodifiableList(policies_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v2beta.PolicyProto .internal_static_google_iam_v2beta_ListPoliciesResponse_descriptor; @@ -268,7 +208,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 +223,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 +241,7 @@ public boolean equals(final java.lang.Object obj) { if (!getPoliciesList().equals(other.getPoliciesList())) 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 +258,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; } @@ -447,19 +387,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2beta.ListPoliciesResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getPoliciesFieldBuilder(); - } } @java.lang.Override @@ -467,10 +398,11 @@ public Builder clear() { super.clear(); if (policiesBuilder_ == null) { policies_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); } else { + policies_ = null; policiesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000001); nextPageToken_ = ""; return this; @@ -591,7 +523,7 @@ public Builder mergeFrom(com.google.iam.v2beta.ListPoliciesResponse other) { nextPageToken_ = other.nextPageToken_; onChanged(); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -606,17 +538,49 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2beta.ListPoliciesResponse parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } 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.iam.v2beta.Policy m = + input.readMessage(com.google.iam.v2beta.Policy.parser(), extensionRegistry); + if (policiesBuilder_ == null) { + ensurePoliciesIsMutable(); + policies_.add(m); + } else { + policiesBuilder_.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.iam.v2beta.ListPoliciesResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -1111,7 +1075,18 @@ public ListPoliciesResponse parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new ListPoliciesResponse(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/Policy.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/Policy.java index 08ae40c8..a2e1a8b7 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/Policy.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/Policy.java @@ -57,154 +57,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private Policy( - 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(); - - uid_ = s; - break; - } - case 26: - { - java.lang.String s = input.readStringRequireUtf8(); - - kind_ = s; - break; - } - case 34: - { - java.lang.String s = input.readStringRequireUtf8(); - - displayName_ = s; - break; - } - case 42: - { - if (!((mutable_bitField0_ & 0x00000001) != 0)) { - annotations_ = - com.google.protobuf.MapField.newMapField( - AnnotationsDefaultEntryHolder.defaultEntry); - mutable_bitField0_ |= 0x00000001; - } - com.google.protobuf.MapEntry annotations__ = - input.readMessage( - AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), - extensionRegistry); - annotations_.getMutableMap().put(annotations__.getKey(), annotations__.getValue()); - break; - } - case 50: - { - java.lang.String s = input.readStringRequireUtf8(); - - etag_ = s; - break; - } - case 58: - { - 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 66: - { - 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 74: - { - com.google.protobuf.Timestamp.Builder subBuilder = null; - if (deleteTime_ != null) { - subBuilder = deleteTime_.toBuilder(); - } - deleteTime_ = - input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(deleteTime_); - deleteTime_ = subBuilder.buildPartial(); - } - - break; - } - case 82: - { - if (!((mutable_bitField0_ & 0x00000002) != 0)) { - rules_ = new java.util.ArrayList(); - mutable_bitField0_ |= 0x00000002; - } - rules_.add( - input.readMessage(com.google.iam.v2beta.PolicyRule.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_ & 0x00000002) != 0)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - } - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v2beta.PolicyProto.internal_static_google_iam_v2beta_Policy_descriptor; } @@ -870,7 +722,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < rules_.size(); i++) { output.writeMessage(10, rules_.get(i)); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -916,7 +768,7 @@ public int getSerializedSize() { for (int i = 0; i < rules_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(10, rules_.get(i)); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -950,7 +802,7 @@ public boolean equals(final java.lang.Object obj) { if (!getDeleteTime().equals(other.getDeleteTime())) return false; } if (!getRulesList().equals(other.getRulesList())) return false; - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -991,7 +843,7 @@ public int hashCode() { hash = (37 * hash) + RULES_FIELD_NUMBER; hash = (53 * hash) + getRulesList().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -1137,19 +989,10 @@ protected com.google.protobuf.MapField internalGetMutableMapField(int number) { } // Construct using com.google.iam.v2beta.Policy.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getRulesFieldBuilder(); - } } @java.lang.Override @@ -1186,10 +1029,11 @@ public Builder clear() { } if (rulesBuilder_ == null) { rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); } else { + rules_ = null; rulesBuilder_.clear(); } + bitField0_ = (bitField0_ & ~0x00000002); return this; } @@ -1353,7 +1197,7 @@ public Builder mergeFrom(com.google.iam.v2beta.Policy other) { } } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -1368,17 +1212,102 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2beta.Policy parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } 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: + { + uid_ = input.readStringRequireUtf8(); + + break; + } // case 18 + case 26: + { + kind_ = input.readStringRequireUtf8(); + + break; + } // case 26 + case 34: + { + displayName_ = input.readStringRequireUtf8(); + + break; + } // case 34 + case 42: + { + com.google.protobuf.MapEntry annotations__ = + input.readMessage( + AnnotationsDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + internalGetMutableAnnotations() + .getMutableMap() + .put(annotations__.getKey(), annotations__.getValue()); + break; + } // case 42 + case 50: + { + etag_ = input.readStringRequireUtf8(); + + break; + } // case 50 + case 58: + { + input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 58 + case 66: + { + input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 66 + case 74: + { + input.readMessage(getDeleteTimeFieldBuilder().getBuilder(), extensionRegistry); + + break; + } // case 74 + case 82: + { + com.google.iam.v2beta.PolicyRule m = + input.readMessage(com.google.iam.v2beta.PolicyRule.parser(), extensionRegistry); + if (rulesBuilder_ == null) { + ensureRulesIsMutable(); + rules_.add(m); + } else { + rulesBuilder_.addMessage(m); + } + break; + } // case 82 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2beta.Policy) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -3151,7 +3080,18 @@ public Policy parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new Policy(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadata.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadata.java index c1bdb7b3..766a87f7 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadata.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyOperationMetadata.java @@ -50,60 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PolicyOperationMetadata( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v2beta.PolicyProto .internal_static_google_iam_v2beta_PolicyOperationMetadata_descriptor; @@ -182,7 +128,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (createTime_ != null) { output.writeMessage(1, getCreateTime()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -194,7 +140,7 @@ public int getSerializedSize() { if (createTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCreateTime()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -214,7 +160,7 @@ public boolean equals(final java.lang.Object obj) { if (hasCreateTime()) { if (!getCreateTime().equals(other.getCreateTime())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -229,7 +175,7 @@ public int hashCode() { hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; hash = (53 * hash) + getCreateTime().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -358,17 +304,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2beta.PolicyOperationMetadata.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); - maybeForceBuilderInitialization(); - } - - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} } @java.lang.Override @@ -464,7 +403,7 @@ public Builder mergeFrom(com.google.iam.v2beta.PolicyOperationMetadata other) { if (other.hasCreateTime()) { mergeCreateTime(other.getCreateTime()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -479,17 +418,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2beta.PolicyOperationMetadata parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } 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 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2beta.PolicyOperationMetadata) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -708,7 +667,18 @@ public PolicyOperationMetadata parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyOperationMetadata(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyRule.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyRule.java index d58b2590..27084c7c 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyRule.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/PolicyRule.java @@ -52,66 +52,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private PolicyRule( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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(); - - description_ = s; - break; - } - case 18: - { - com.google.iam.v2beta.DenyRule.Builder subBuilder = null; - if (kindCase_ == 2) { - subBuilder = ((com.google.iam.v2beta.DenyRule) kind_).toBuilder(); - } - kind_ = input.readMessage(com.google.iam.v2beta.DenyRule.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom((com.google.iam.v2beta.DenyRule) kind_); - kind_ = subBuilder.buildPartial(); - } - kindCase_ = 2; - break; - } - default: - { - if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { - done = true; - } - break; - } - } - } - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(this); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException().setUnfinishedMessage(this); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); - } finally { - this.unknownFields = unknownFields.build(); - makeExtensionsImmutable(); - } - } - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.iam.v2beta.PolicyProto .internal_static_google_iam_v2beta_PolicyRule_descriptor; @@ -292,7 +232,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (kindCase_ == 2) { output.writeMessage(2, (com.google.iam.v2beta.DenyRule) kind_); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -309,7 +249,7 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 2, (com.google.iam.v2beta.DenyRule) kind_); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -333,7 +273,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; } @@ -354,7 +294,7 @@ public int hashCode() { case 0: default: } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -482,22 +422,18 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2beta.PolicyRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private 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 (denyRuleBuilder_ != null) { + denyRuleBuilder_.clear(); + } description_ = ""; kindCase_ = 0; @@ -601,7 +537,7 @@ public Builder mergeFrom(com.google.iam.v2beta.PolicyRule other) { break; } } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -616,17 +552,43 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2beta.PolicyRule parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + description_ = input.readStringRequireUtf8(); + + break; + } // case 10 + case 18: + { + input.readMessage(getDenyRuleFieldBuilder().getBuilder(), extensionRegistry); + kindCase_ = 2; + break; + } // case 18 + default: + { + if (!super.parseUnknownField(input, extensionRegistry, tag)) { + done = true; // was an endgroup tag + } + break; + } // default: + } // switch (tag) + } // while (!done) } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.iam.v2beta.PolicyRule) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -992,7 +954,18 @@ public PolicyRule parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new PolicyRule(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequest.java b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequest.java index 5904fc84..95eabcdd 100644 --- a/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequest.java +++ b/proto-google-iam-v2beta/src/main/java/com/google/iam/v2beta/UpdatePolicyRequest.java @@ -50,59 +50,6 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private UpdatePolicyRequest( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - this(); - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - com.google.protobuf.UnknownFieldSet.Builder unknownFields = - 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.iam.v2beta.Policy.Builder subBuilder = null; - if (policy_ != null) { - subBuilder = policy_.toBuilder(); - } - policy_ = input.readMessage(com.google.iam.v2beta.Policy.parser(), extensionRegistry); - if (subBuilder != null) { - subBuilder.mergeFrom(policy_); - policy_ = 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.iam.v2beta.PolicyProto .internal_static_google_iam_v2beta_UpdatePolicyRequest_descriptor; @@ -190,7 +137,7 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (policy_ != null) { output.writeMessage(1, getPolicy()); } - unknownFields.writeTo(output); + getUnknownFields().writeTo(output); } @java.lang.Override @@ -202,7 +149,7 @@ public int getSerializedSize() { if (policy_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getPolicy()); } - size += unknownFields.getSerializedSize(); + size += getUnknownFields().getSerializedSize(); memoizedSize = size; return size; } @@ -222,7 +169,7 @@ public boolean equals(final java.lang.Object obj) { if (hasPolicy()) { if (!getPolicy().equals(other.getPolicy())) return false; } - if (!unknownFields.equals(other.unknownFields)) return false; + if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -237,7 +184,7 @@ public int hashCode() { hash = (37 * hash) + POLICY_FIELD_NUMBER; hash = (53 * hash) + getPolicy().hashCode(); } - hash = (29 * hash) + unknownFields.hashCode(); + hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } @@ -366,17 +313,10 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } // Construct using com.google.iam.v2beta.UpdatePolicyRequest.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private 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 +412,7 @@ public Builder mergeFrom(com.google.iam.v2beta.UpdatePolicyRequest other) { if (other.hasPolicy()) { mergePolicy(other.getPolicy()); } - this.mergeUnknownFields(other.unknownFields); + this.mergeUnknownFields(other.getUnknownFields()); onChanged(); return this; } @@ -487,17 +427,37 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.iam.v2beta.UpdatePolicyRequest parsedMessage = null; + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } 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(getPolicyFieldBuilder().getBuilder(), extensionRegistry); + + 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.iam.v2beta.UpdatePolicyRequest) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } + onChanged(); + } // finally return this; } @@ -739,7 +699,18 @@ public UpdatePolicyRequest parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { - return new UpdatePolicyRequest(input, extensionRegistry); + Builder builder = newBuilder(); + try { + builder.mergeFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(builder.buildPartial()); + } catch (com.google.protobuf.UninitializedMessageException e) { + throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e) + .setUnfinishedMessage(builder.buildPartial()); + } + return builder.buildPartial(); } }; diff --git a/renovate.json b/renovate.json index 0d9e4a62..c52f7a39 100644 --- a/renovate.json +++ b/renovate.json @@ -10,6 +10,7 @@ ":maintainLockFilesDisabled", ":autodetectPinVersions" ], + "ignorePaths": [".kokoro/requirements.txt"], "packageRules": [ { "packagePatterns": [ diff --git a/samples/cloud-client/snippets/pom.xml b/samples/cloud-client/snippets/pom.xml index b1fb9963..44a9522b 100644 --- a/samples/cloud-client/snippets/pom.xml +++ b/samples/cloud-client/snippets/pom.xml @@ -26,7 +26,7 @@ com.google.apis google-api-services-cloudresourcemanager - v3-rev20220828-2.0.0 + v3-rev20220925-2.0.0 com.google.auth @@ -39,9 +39,10 @@ 1.42.2 - com.google.apis - google-api-services-iam - v2beta-rev20220713-2.0.0 + com.google.cloud + google-iam-policy + 1.6.1 + compile com.google.apis diff --git a/samples/cloud-client/snippets/src/main/java/CreateDenyPolicy.java b/samples/cloud-client/snippets/src/main/java/CreateDenyPolicy.java index 5cbc966e..d9ea32da 100644 --- a/samples/cloud-client/snippets/src/main/java/CreateDenyPolicy.java +++ b/samples/cloud-client/snippets/src/main/java/CreateDenyPolicy.java @@ -16,11 +16,11 @@ // [START iam_create_deny_policy] -import com.google.iam.v2beta.CreatePolicyRequest; -import com.google.iam.v2beta.DenyRule; -import com.google.iam.v2beta.PoliciesClient; -import com.google.iam.v2beta.Policy; -import com.google.iam.v2beta.PolicyRule; +import com.google.iam.v2.CreatePolicyRequest; +import com.google.iam.v2.DenyRule; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; +import com.google.iam.v2.PolicyRule; import com.google.longrunning.Operation; import com.google.type.Expr; import java.io.IOException; diff --git a/samples/cloud-client/snippets/src/main/java/DeleteDenyPolicy.java b/samples/cloud-client/snippets/src/main/java/DeleteDenyPolicy.java index bf98545c..ef0b9d49 100644 --- a/samples/cloud-client/snippets/src/main/java/DeleteDenyPolicy.java +++ b/samples/cloud-client/snippets/src/main/java/DeleteDenyPolicy.java @@ -16,8 +16,8 @@ // [START iam_delete_deny_policy] -import com.google.iam.v2beta.DeletePolicyRequest; -import com.google.iam.v2beta.PoliciesClient; +import com.google.iam.v2.DeletePolicyRequest; +import com.google.iam.v2.PoliciesClient; import com.google.longrunning.Operation; import java.io.IOException; import java.net.URLEncoder; diff --git a/samples/cloud-client/snippets/src/main/java/GetDenyPolicy.java b/samples/cloud-client/snippets/src/main/java/GetDenyPolicy.java index 10b1b5c2..0cf4e96c 100644 --- a/samples/cloud-client/snippets/src/main/java/GetDenyPolicy.java +++ b/samples/cloud-client/snippets/src/main/java/GetDenyPolicy.java @@ -16,9 +16,9 @@ // [START iam_get_deny_policy] -import com.google.iam.v2beta.GetPolicyRequest; -import com.google.iam.v2beta.PoliciesClient; -import com.google.iam.v2beta.Policy; +import com.google.iam.v2.GetPolicyRequest; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; import java.io.IOException; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; diff --git a/samples/cloud-client/snippets/src/main/java/ListDenyPolicies.java b/samples/cloud-client/snippets/src/main/java/ListDenyPolicies.java index b8f89da3..566a5946 100644 --- a/samples/cloud-client/snippets/src/main/java/ListDenyPolicies.java +++ b/samples/cloud-client/snippets/src/main/java/ListDenyPolicies.java @@ -16,8 +16,8 @@ // [START iam_list_deny_policy] -import com.google.iam.v2beta.PoliciesClient; -import com.google.iam.v2beta.Policy; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; import java.io.IOException; import java.net.URLEncoder; import java.nio.charset.StandardCharsets; diff --git a/samples/cloud-client/snippets/src/main/java/UpdateDenyPolicy.java b/samples/cloud-client/snippets/src/main/java/UpdateDenyPolicy.java index e0846d7c..28e6bb91 100644 --- a/samples/cloud-client/snippets/src/main/java/UpdateDenyPolicy.java +++ b/samples/cloud-client/snippets/src/main/java/UpdateDenyPolicy.java @@ -16,11 +16,11 @@ // [START iam_update_deny_policy] -import com.google.iam.v2beta.DenyRule; -import com.google.iam.v2beta.PoliciesClient; -import com.google.iam.v2beta.Policy; -import com.google.iam.v2beta.PolicyRule; -import com.google.iam.v2beta.UpdatePolicyRequest; +import com.google.iam.v2.DenyRule; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; +import com.google.iam.v2.PolicyRule; +import com.google.iam.v2.UpdatePolicyRequest; import com.google.longrunning.Operation; import com.google.type.Expr; import java.io.IOException; diff --git a/samples/cloud-client/snippets/src/test/java/DenyIT.java b/samples/cloud-client/snippets/src/test/java/DenyIT.java index a0af4cbc..76db0dbc 100644 --- a/samples/cloud-client/snippets/src/test/java/DenyIT.java +++ b/samples/cloud-client/snippets/src/test/java/DenyIT.java @@ -17,8 +17,8 @@ import static com.google.common.truth.Truth.assertThat; import static com.google.common.truth.Truth.assertWithMessage; -import com.google.iam.v2beta.PoliciesClient; -import com.google.iam.v2beta.Policy; +import com.google.iam.v2.PoliciesClient; +import com.google.iam.v2.Policy; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.PrintStream; diff --git a/versions.txt b/versions.txt index e1f86383..361cf793 100644 --- a/versions.txt +++ b/versions.txt @@ -1,10 +1,10 @@ # Format: # module:released-version:current-version -proto-google-iam-v1:1.6.1:1.6.1 -grpc-google-iam-v1:1.6.1:1.6.1 -proto-google-iam-v2beta:1.6.1:1.6.1 -grpc-google-iam-v2beta:1.6.1:1.6.1 -google-iam-policy:1.6.1:1.6.1 -proto-google-iam-v2:1.6.1:1.6.1 -grpc-google-iam-v2:1.6.1:1.6.1 +proto-google-iam-v1:1.6.2:1.6.2 +grpc-google-iam-v1:1.6.2:1.6.2 +proto-google-iam-v2beta:1.6.2:1.6.2 +grpc-google-iam-v2beta:1.6.2:1.6.2 +google-iam-policy:1.6.2:1.6.2 +proto-google-iam-v2:1.6.2:1.6.2 +grpc-google-iam-v2:1.6.2:1.6.2