diff --git a/.github/.OwlBot.lock.yaml b/.github/.OwlBot.lock.yaml index a3da1b0d..5d9542b1 100644 --- a/.github/.OwlBot.lock.yaml +++ b/.github/.OwlBot.lock.yaml @@ -1,4 +1,4 @@ -# Copyright 2023 Google LLC +# Copyright 2024 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -13,5 +13,5 @@ # limitations under the License. docker: image: gcr.io/cloud-devrel-public-resources/owlbot-python:latest - digest: sha256:3e3800bb100af5d7f9e810d48212b37812c1856d20ffeafb99ebe66461b61fc7 -# created: 2023-08-02T10:53:29.114535628Z + digest: sha256:3741fd1f5f5150378563c76afa06bcc12777b5fe54c5ee01115218f83872134f +# created: 2024-03-15T16:26:15.743347415Z diff --git a/.github/workflows/generate.yaml b/.github/workflows/generate.yaml index 2c0bfdcf..2b9f9199 100644 --- a/.github/workflows/generate.yaml +++ b/.github/workflows/generate.yaml @@ -46,7 +46,7 @@ jobs: path: ${{ env.DATA_SOURCE_CHECKOUT_PATH }} - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' cache: 'pip' @@ -113,7 +113,7 @@ jobs: - name: Notify for failure if: ${{ failure() && github.event_name == 'schedule' }} - uses: actions/github-script@v6 + uses: actions/github-script@v7 with: script: | github.rest.issues.create({ diff --git a/.github/workflows/test_generation.yaml b/.github/workflows/test_generation.yaml index 4c9c5332..9e3c3da4 100644 --- a/.github/workflows/test_generation.yaml +++ b/.github/workflows/test_generation.yaml @@ -47,7 +47,7 @@ jobs: path: ${{ env.DATA_SOURCE_CHECKOUT_PATH }} - name: Setup Python - uses: actions/setup-python@v4 + uses: actions/setup-python@v5 with: python-version: '3.10' cache: 'pip' diff --git a/.kokoro/build.sh b/.kokoro/build.sh index 7ce8d562..4eedb7dc 100755 --- a/.kokoro/build.sh +++ b/.kokoro/build.sh @@ -33,13 +33,6 @@ export GOOGLE_APPLICATION_CREDENTIALS=${KOKORO_GFILE_DIR}/service-account.json # Setup project id. export PROJECT_ID=$(cat "${KOKORO_GFILE_DIR}/project-id.json") -# Remove old nox -python3 -m pip uninstall --yes --quiet nox-automation - -# Install nox -python3 -m pip install --upgrade --quiet nox -python3 -m nox --version - # If this is a continuous build, send the test log to the FlakyBot. # See https://github.com/googleapis/repo-automation-bots/tree/main/packages/flakybot. if [[ $KOKORO_BUILD_ARTIFACTS_SUBDIR = *"continuous"* ]]; then diff --git a/.kokoro/requirements.txt b/.kokoro/requirements.txt index 029bd342..bda8e38c 100644 --- a/.kokoro/requirements.txt +++ b/.kokoro/requirements.txt @@ -4,91 +4,75 @@ # # pip-compile --allow-unsafe --generate-hashes requirements.in # -argcomplete==2.0.0 \ - --hash=sha256:6372ad78c89d662035101418ae253668445b391755cfe94ea52f1b9d22425b20 \ - --hash=sha256:cffa11ea77999bb0dd27bb25ff6dc142a6796142f68d45b1a26b11f58724561e +argcomplete==3.1.4 \ + --hash=sha256:72558ba729e4c468572609817226fb0a6e7e9a0a7d477b882be168c0b4a62b94 \ + --hash=sha256:fbe56f8cda08aa9a04b307d8482ea703e96a6a801611acb4be9bf3942017989f # via nox -attrs==22.1.0 \ - --hash=sha256:29adc2665447e5191d0e7c568fde78b21f9672d344281d0c6e1ab085429b22b6 \ - --hash=sha256:86efa402f67bf2df34f51a335487cf46b1ec130d02b8d39fd248abfd30da551c +attrs==23.1.0 \ + --hash=sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04 \ + --hash=sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015 # via gcp-releasetool -bleach==5.0.1 \ - --hash=sha256:085f7f33c15bd408dd9b17a4ad77c577db66d76203e5984b1bd59baeee948b2a \ - --hash=sha256:0d03255c47eb9bd2f26aa9bb7f2107732e7e8fe195ca2f64709fcf3b0a4a085c - # via readme-renderer -cachetools==5.2.0 \ - --hash=sha256:6a94c6402995a99c3970cc7e4884bb60b4a8639938157eeed436098bf9831757 \ - --hash=sha256:f9f17d2aec496a9aa6b76f53e3b614c965223c061982d434d160f930c698a9db +cachetools==5.3.2 \ + --hash=sha256:086ee420196f7b2ab9ca2db2520aca326318b68fe5ba8bc4d49cca91add450f2 \ + --hash=sha256:861f35a13a451f94e301ce2bec7cac63e881232ccce7ed67fab9b5df4d3beaa1 # via google-auth certifi==2023.7.22 \ --hash=sha256:539cc1d13202e33ca466e88b2807e29f4c13049d6d87031a3c110744495cb082 \ --hash=sha256:92d6037539857d8206b8f6ae472e8b77db8058fec5937a1ef3f54304089edbb9 # 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 +cffi==1.16.0 \ + --hash=sha256:0c9ef6ff37e974b73c25eecc13952c55bceed9112be2d9d938ded8e856138bcc \ + --hash=sha256:131fd094d1065b19540c3d72594260f118b231090295d8c34e19a7bbcf2e860a \ + --hash=sha256:1b8ebc27c014c59692bb2664c7d13ce7a6e9a629be20e54e7271fa696ff2b417 \ + --hash=sha256:2c56b361916f390cd758a57f2e16233eb4f64bcbeee88a4881ea90fca14dc6ab \ + --hash=sha256:2d92b25dbf6cae33f65005baf472d2c245c050b1ce709cc4588cdcdd5495b520 \ + --hash=sha256:31d13b0f99e0836b7ff893d37af07366ebc90b678b6664c955b54561fc36ef36 \ + --hash=sha256:32c68ef735dbe5857c810328cb2481e24722a59a2003018885514d4c09af9743 \ + --hash=sha256:3686dffb02459559c74dd3d81748269ffb0eb027c39a6fc99502de37d501faa8 \ + --hash=sha256:582215a0e9adbe0e379761260553ba11c58943e4bbe9c36430c4ca6ac74b15ed \ + --hash=sha256:5b50bf3f55561dac5438f8e70bfcdfd74543fd60df5fa5f62d94e5867deca684 \ + --hash=sha256:5bf44d66cdf9e893637896c7faa22298baebcd18d1ddb6d2626a6e39793a1d56 \ + --hash=sha256:6602bc8dc6f3a9e02b6c22c4fc1e47aa50f8f8e6d3f78a5e16ac33ef5fefa324 \ + --hash=sha256:673739cb539f8cdaa07d92d02efa93c9ccf87e345b9a0b556e3ecc666718468d \ + --hash=sha256:68678abf380b42ce21a5f2abde8efee05c114c2fdb2e9eef2efdb0257fba1235 \ + --hash=sha256:68e7c44931cc171c54ccb702482e9fc723192e88d25a0e133edd7aff8fcd1f6e \ + --hash=sha256:6b3d6606d369fc1da4fd8c357d026317fbb9c9b75d36dc16e90e84c26854b088 \ + --hash=sha256:748dcd1e3d3d7cd5443ef03ce8685043294ad6bd7c02a38d1bd367cfd968e000 \ + --hash=sha256:7651c50c8c5ef7bdb41108b7b8c5a83013bfaa8a935590c5d74627c047a583c7 \ + --hash=sha256:7b78010e7b97fef4bee1e896df8a4bbb6712b7f05b7ef630f9d1da00f6444d2e \ + --hash=sha256:7e61e3e4fa664a8588aa25c883eab612a188c725755afff6289454d6362b9673 \ + --hash=sha256:80876338e19c951fdfed6198e70bc88f1c9758b94578d5a7c4c91a87af3cf31c \ + --hash=sha256:8895613bcc094d4a1b2dbe179d88d7fb4a15cee43c052e8885783fac397d91fe \ + --hash=sha256:88e2b3c14bdb32e440be531ade29d3c50a1a59cd4e51b1dd8b0865c54ea5d2e2 \ + --hash=sha256:8f8e709127c6c77446a8c0a8c8bf3c8ee706a06cd44b1e827c3e6a2ee6b8c098 \ + --hash=sha256:9cb4a35b3642fc5c005a6755a5d17c6c8b6bcb6981baf81cea8bfbc8903e8ba8 \ + --hash=sha256:9f90389693731ff1f659e55c7d1640e2ec43ff725cc61b04b2f9c6d8d017df6a \ + --hash=sha256:a09582f178759ee8128d9270cd1344154fd473bb77d94ce0aeb2a93ebf0feaf0 \ + --hash=sha256:a6a14b17d7e17fa0d207ac08642c8820f84f25ce17a442fd15e27ea18d67c59b \ + --hash=sha256:a72e8961a86d19bdb45851d8f1f08b041ea37d2bd8d4fd19903bc3083d80c896 \ + --hash=sha256:abd808f9c129ba2beda4cfc53bde801e5bcf9d6e0f22f095e45327c038bfe68e \ + --hash=sha256:ac0f5edd2360eea2f1daa9e26a41db02dd4b0451b48f7c318e217ee092a213e9 \ + --hash=sha256:b29ebffcf550f9da55bec9e02ad430c992a87e5f512cd63388abb76f1036d8d2 \ + --hash=sha256:b2ca4e77f9f47c55c194982e10f058db063937845bb2b7a86c84a6cfe0aefa8b \ + --hash=sha256:b7be2d771cdba2942e13215c4e340bfd76398e9227ad10402a8767ab1865d2e6 \ + --hash=sha256:b84834d0cf97e7d27dd5b7f3aca7b6e9263c56308ab9dc8aae9784abb774d404 \ + --hash=sha256:b86851a328eedc692acf81fb05444bdf1891747c25af7529e39ddafaf68a4f3f \ + --hash=sha256:bcb3ef43e58665bbda2fb198698fcae6776483e0c4a631aa5647806c25e02cc0 \ + --hash=sha256:c0f31130ebc2d37cdd8e44605fb5fa7ad59049298b3f745c74fa74c62fbfcfc4 \ + --hash=sha256:c6a164aa47843fb1b01e941d385aab7215563bb8816d80ff3a363a9f8448a8dc \ + --hash=sha256:d8a9d3ebe49f084ad71f9269834ceccbf398253c9fac910c4fd7053ff1386936 \ + --hash=sha256:db8e577c19c0fda0beb7e0d4e09e0ba74b1e4c092e0e40bfa12fe05b6f6d75ba \ + --hash=sha256:dc9b18bf40cc75f66f40a7379f6a9513244fe33c0e8aa72e2d56b0196a7ef872 \ + --hash=sha256:e09f3ff613345df5e8c3667da1d918f9149bd623cd9070c983c013792a9a62eb \ + --hash=sha256:e4108df7fe9b707191e55f33efbcb2d81928e10cea45527879a4749cbe472614 \ + --hash=sha256:e6024675e67af929088fda399b2094574609396b1decb609c55fa58b028a32a1 \ + --hash=sha256:e70f54f1796669ef691ca07d046cd81a29cb4deb1e5f942003f401c0c4a2695d \ + --hash=sha256:e715596e683d2ce000574bae5d07bd522c781a822866c20495e52520564f0969 \ + --hash=sha256:e760191dd42581e023a68b758769e2da259b5d52e3103c6060ddc02c9edb8d7b \ + --hash=sha256:ed86a35631f7bfbb28e108dd96773b9d5a6ce4811cf6ea468bb6a359b256b1e4 \ + --hash=sha256:ee07e47c12890ef248766a6e55bd38ebfb2bb8edd4142d56db91b21ea68b7627 \ + --hash=sha256:fa3a0128b152627161ce47201262d3140edb5a5c3da88d73a1b790a959126956 \ + --hash=sha256:fcc8eb6d5902bb1cf6dc4f187ee3ea80a1eba0a89aba40a5cb20a5087d961357 # via cryptography charset-normalizer==2.1.1 \ --hash=sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845 \ @@ -109,78 +93,83 @@ colorlog==6.7.0 \ # via # gcp-docuploader # nox -commonmark==0.9.1 \ - --hash=sha256:452f9dc859be7f06631ddcb328b6919c67984aca654e5fefb3914d54691aed60 \ - --hash=sha256:da2f38c92590f83de410ba1a3cbceafbc74fee9def35f9251ba9a971d6d66fd9 - # via rich -cryptography==41.0.3 \ - --hash=sha256:0d09fb5356f975974dbcb595ad2d178305e5050656affb7890a1583f5e02a306 \ - --hash=sha256:23c2d778cf829f7d0ae180600b17e9fceea3c2ef8b31a99e3c694cbbf3a24b84 \ - --hash=sha256:3fb248989b6363906827284cd20cca63bb1a757e0a2864d4c1682a985e3dca47 \ - --hash=sha256:41d7aa7cdfded09b3d73a47f429c298e80796c8e825ddfadc84c8a7f12df212d \ - --hash=sha256:42cb413e01a5d36da9929baa9d70ca90d90b969269e5a12d39c1e0d475010116 \ - --hash=sha256:4c2f0d35703d61002a2bbdcf15548ebb701cfdd83cdc12471d2bae80878a4207 \ - --hash=sha256:4fd871184321100fb400d759ad0cddddf284c4b696568204d281c902fc7b0d81 \ - --hash=sha256:5259cb659aa43005eb55a0e4ff2c825ca111a0da1814202c64d28a985d33b087 \ - --hash=sha256:57a51b89f954f216a81c9d057bf1a24e2f36e764a1ca9a501a6964eb4a6800dd \ - --hash=sha256:652627a055cb52a84f8c448185922241dd5217443ca194d5739b44612c5e6507 \ - --hash=sha256:67e120e9a577c64fe1f611e53b30b3e69744e5910ff3b6e97e935aeb96005858 \ - --hash=sha256:6af1c6387c531cd364b72c28daa29232162010d952ceb7e5ca8e2827526aceae \ - --hash=sha256:6d192741113ef5e30d89dcb5b956ef4e1578f304708701b8b73d38e3e1461f34 \ - --hash=sha256:7efe8041897fe7a50863e51b77789b657a133c75c3b094e51b5e4b5cec7bf906 \ - --hash=sha256:84537453d57f55a50a5b6835622ee405816999a7113267739a1b4581f83535bd \ - --hash=sha256:8f09daa483aedea50d249ef98ed500569841d6498aa9c9f4b0531b9964658922 \ - --hash=sha256:95dd7f261bb76948b52a5330ba5202b91a26fbac13ad0e9fc8a3ac04752058c7 \ - --hash=sha256:a74fbcdb2a0d46fe00504f571a2a540532f4c188e6ccf26f1f178480117b33c4 \ - --hash=sha256:a983e441a00a9d57a4d7c91b3116a37ae602907a7618b882c8013b5762e80574 \ - --hash=sha256:ab8de0d091acbf778f74286f4989cf3d1528336af1b59f3e5d2ebca8b5fe49e1 \ - --hash=sha256:aeb57c421b34af8f9fe830e1955bf493a86a7996cc1338fe41b30047d16e962c \ - --hash=sha256:ce785cf81a7bdade534297ef9e490ddff800d956625020ab2ec2780a556c313e \ - --hash=sha256:d0d651aa754ef58d75cec6edfbd21259d93810b73f6ec246436a21b7841908de +cryptography==42.0.4 \ + --hash=sha256:01911714117642a3f1792c7f376db572aadadbafcd8d75bb527166009c9f1d1b \ + --hash=sha256:0e89f7b84f421c56e7ff69f11c441ebda73b8a8e6488d322ef71746224c20fce \ + --hash=sha256:12d341bd42cdb7d4937b0cabbdf2a94f949413ac4504904d0cdbdce4a22cbf88 \ + --hash=sha256:15a1fb843c48b4a604663fa30af60818cd28f895572386e5f9b8a665874c26e7 \ + --hash=sha256:1cdcdbd117681c88d717437ada72bdd5be9de117f96e3f4d50dab3f59fd9ab20 \ + --hash=sha256:1df6fcbf60560d2113b5ed90f072dc0b108d64750d4cbd46a21ec882c7aefce9 \ + --hash=sha256:3c6048f217533d89f2f8f4f0fe3044bf0b2090453b7b73d0b77db47b80af8dff \ + --hash=sha256:3e970a2119507d0b104f0a8e281521ad28fc26f2820687b3436b8c9a5fcf20d1 \ + --hash=sha256:44a64043f743485925d3bcac548d05df0f9bb445c5fcca6681889c7c3ab12764 \ + --hash=sha256:4e36685cb634af55e0677d435d425043967ac2f3790ec652b2b88ad03b85c27b \ + --hash=sha256:5f8907fcf57392cd917892ae83708761c6ff3c37a8e835d7246ff0ad251d9298 \ + --hash=sha256:69b22ab6506a3fe483d67d1ed878e1602bdd5912a134e6202c1ec672233241c1 \ + --hash=sha256:6bfadd884e7280df24d26f2186e4e07556a05d37393b0f220a840b083dc6a824 \ + --hash=sha256:6d0fbe73728c44ca3a241eff9aefe6496ab2656d6e7a4ea2459865f2e8613257 \ + --hash=sha256:6ffb03d419edcab93b4b19c22ee80c007fb2d708429cecebf1dd3258956a563a \ + --hash=sha256:810bcf151caefc03e51a3d61e53335cd5c7316c0a105cc695f0959f2c638b129 \ + --hash=sha256:831a4b37accef30cccd34fcb916a5d7b5be3cbbe27268a02832c3e450aea39cb \ + --hash=sha256:887623fe0d70f48ab3f5e4dbf234986b1329a64c066d719432d0698522749929 \ + --hash=sha256:a0298bdc6e98ca21382afe914c642620370ce0470a01e1bef6dd9b5354c36854 \ + --hash=sha256:a1327f280c824ff7885bdeef8578f74690e9079267c1c8bd7dc5cc5aa065ae52 \ + --hash=sha256:c1f25b252d2c87088abc8bbc4f1ecbf7c919e05508a7e8628e6875c40bc70923 \ + --hash=sha256:c3a5cbc620e1e17009f30dd34cb0d85c987afd21c41a74352d1719be33380885 \ + --hash=sha256:ce8613beaffc7c14f091497346ef117c1798c202b01153a8cc7b8e2ebaaf41c0 \ + --hash=sha256:d2a27aca5597c8a71abbe10209184e1a8e91c1fd470b5070a2ea60cafec35bcd \ + --hash=sha256:dad9c385ba8ee025bb0d856714f71d7840020fe176ae0229de618f14dae7a6e2 \ + --hash=sha256:db4b65b02f59035037fde0998974d84244a64c3265bdef32a827ab9b63d61b18 \ + --hash=sha256:e09469a2cec88fb7b078e16d4adec594414397e8879a4341c6ace96013463d5b \ + --hash=sha256:e53dc41cda40b248ebc40b83b31516487f7db95ab8ceac1f042626bc43a2f992 \ + --hash=sha256:f1e85a178384bf19e36779d91ff35c7617c885da487d689b05c1366f9933ad74 \ + --hash=sha256:f47be41843200f7faec0683ad751e5ef11b9a56a220d57f300376cd8aba81660 \ + --hash=sha256:fb0cef872d8193e487fc6bdb08559c3aa41b659a7d9be48b2e10747f47863925 \ + --hash=sha256:ffc73996c4fca3d2b6c1c8c12bfd3ad00def8621da24f547626bf06441400449 # via # gcp-releasetool # secretstorage -distlib==0.3.6 \ - --hash=sha256:14bad2d9b04d3a36127ac97f30b12a19268f211063d8f8ee4f47108896e11b46 \ - --hash=sha256:f35c4b692542ca110de7ef0bea44d73981caeb34ca0b9b6b2e6d7790dda8f80e +distlib==0.3.7 \ + --hash=sha256:2e24928bc811348f0feb63014e97aaae3037f2cf48712d51ae61df7fd6075057 \ + --hash=sha256:9dafe54b34a028eafd95039d5e5d4851a13734540f1331060d31c9916e7147a8 # via virtualenv -docutils==0.19 \ - --hash=sha256:33995a6753c30b7f577febfc2c50411fec6aac7f7ffeb7c4cfe5991072dcf9e6 \ - --hash=sha256:5e1de4d849fee02c63b040a4a3fd567f4ab104defd8a5511fbbc24a8a017efbc +docutils==0.20.1 \ + --hash=sha256:96f387a2c5562db4476f09f13bbab2192e764cac08ebbf3a34a95d9b1e4a59d6 \ + --hash=sha256:f08a4e276c3a1583a86dce3e34aba3fe04d02bba2dd51ed16106244e8a923e3b # via readme-renderer -filelock==3.8.0 \ - --hash=sha256:55447caa666f2198c5b6b13a26d2084d26fa5b115c00d065664b2124680c4edc \ - --hash=sha256:617eb4e5eedc82fc5f47b6d61e4d11cb837c56cb4544e39081099fa17ad109d4 +filelock==3.13.1 \ + --hash=sha256:521f5f56c50f8426f5e03ad3b281b490a87ef15bc6c526f168290f0c7148d44e \ + --hash=sha256:57dbda9b35157b05fb3e58ee91448612eb674172fab98ee235ccb0b5bee19a1c # via virtualenv -gcp-docuploader==0.6.4 \ - --hash=sha256:01486419e24633af78fd0167db74a2763974765ee8078ca6eb6964d0ebd388af \ - --hash=sha256:70861190c123d907b3b067da896265ead2eeb9263969d6955c9e0bb091b5ccbf +gcp-docuploader==0.6.5 \ + --hash=sha256:30221d4ac3e5a2b9c69aa52fdbef68cc3f27d0e6d0d90e220fc024584b8d2318 \ + --hash=sha256:b7458ef93f605b9d46a4bf3a8dc1755dad1f31d030c8679edf304e343b347eea # via -r requirements.in -gcp-releasetool==1.10.5 \ - --hash=sha256:174b7b102d704b254f2a26a3eda2c684fd3543320ec239baf771542a2e58e109 \ - --hash=sha256:e29d29927fe2ca493105a82958c6873bb2b90d503acac56be2c229e74de0eec9 +gcp-releasetool==1.16.0 \ + --hash=sha256:27bf19d2e87aaa884096ff941aa3c592c482be3d6a2bfe6f06afafa6af2353e3 \ + --hash=sha256:a316b197a543fd036209d0caba7a8eb4d236d8e65381c80cbc6d7efaa7606d63 # via -r requirements.in -google-api-core==2.10.2 \ - --hash=sha256:10c06f7739fe57781f87523375e8e1a3a4674bf6392cd6131a3222182b971320 \ - --hash=sha256:34f24bd1d5f72a8c4519773d99ca6bf080a6c4e041b4e9f024fe230191dda62e +google-api-core==2.12.0 \ + --hash=sha256:c22e01b1e3c4dcd90998494879612c38d0a3411d1f7b679eb89e2abe3ce1f553 \ + --hash=sha256:ec6054f7d64ad13b41e43d96f735acbd763b0f3b695dabaa2d579673f6a6e160 # via # google-cloud-core # google-cloud-storage -google-auth==2.14.1 \ - --hash=sha256:ccaa901f31ad5cbb562615eb8b664b3dd0bf5404a67618e642307f00613eda4d \ - --hash=sha256:f5d8701633bebc12e0deea4df8abd8aff31c28b355360597f7f2ee60f2e4d016 +google-auth==2.23.4 \ + --hash=sha256:79905d6b1652187def79d491d6e23d0cbb3a21d3c7ba0dbaa9c8a01906b13ff3 \ + --hash=sha256:d4bbc92fe4b8bfd2f3e8d88e5ba7085935da208ee38a134fc280e7ce682a05f2 # via # gcp-releasetool # google-api-core # google-cloud-core # google-cloud-storage -google-cloud-core==2.3.2 \ - --hash=sha256:8417acf6466be2fa85123441696c4badda48db314c607cf1e5d543fa8bdc22fe \ - --hash=sha256:b9529ee7047fd8d4bf4a2182de619154240df17fbe60ead399078c1ae152af9a +google-cloud-core==2.3.3 \ + --hash=sha256:37b80273c8d7eee1ae816b3a20ae43585ea50506cb0e60f3cf5be5f87f1373cb \ + --hash=sha256:fbd11cad3e98a7e5b0343dc07cb1039a5ffd7a5bb96e1f1e27cee4bda4a90863 # via google-cloud-storage -google-cloud-storage==2.6.0 \ - --hash=sha256:104ca28ae61243b637f2f01455cc8a05e8f15a2a18ced96cb587241cdd3820f5 \ - --hash=sha256:4ad0415ff61abdd8bb2ae81c1f8f7ec7d91a1011613f2db87c614c550f97bfe9 +google-cloud-storage==2.13.0 \ + --hash=sha256:ab0bf2e1780a1b74cf17fccb13788070b729f50c252f0c94ada2aae0ca95437d \ + --hash=sha256:f62dc4c7b6cd4360d072e3deb28035fbdad491ac3d9b0b1815a12daea10f37c7 # via gcp-docuploader google-crc32c==1.5.0 \ --hash=sha256:024894d9d3cfbc5943f8f230e23950cd4906b2fe004c72e29b209420a1e6b05a \ @@ -251,29 +240,31 @@ google-crc32c==1.5.0 \ --hash=sha256:f583edb943cf2e09c60441b910d6a20b4d9d626c75a36c8fcac01a6c96c01183 \ --hash=sha256:fd8536e902db7e365f49e7d9029283403974ccf29b13fc7028b97e2295b33556 \ --hash=sha256:fe70e325aa68fa4b5edf7d1a4b6f691eb04bbccac0ace68e34820d283b5f80d4 - # via google-resumable-media -google-resumable-media==2.4.0 \ - --hash=sha256:2aa004c16d295c8f6c33b2b4788ba59d366677c0a25ae7382436cb30f776deaa \ - --hash=sha256:8d5518502f92b9ecc84ac46779bd4f09694ecb3ba38a3e7ca737a86d15cbca1f + # via + # google-cloud-storage + # google-resumable-media +google-resumable-media==2.6.0 \ + --hash=sha256:972852f6c65f933e15a4a210c2b96930763b47197cdf4aa5f5bea435efb626e7 \ + --hash=sha256:fc03d344381970f79eebb632a3c18bb1828593a2dc5572b5f90115ef7d11e81b # via google-cloud-storage -googleapis-common-protos==1.57.0 \ - --hash=sha256:27a849d6205838fb6cc3c1c21cb9800707a661bb21c6ce7fb13e99eb1f8a0c46 \ - --hash=sha256:a9f4a1d7f6d9809657b7f1316a1aa527f6664891531bcfcc13b6696e685f443c +googleapis-common-protos==1.61.0 \ + --hash=sha256:22f1915393bb3245343f6efe87f6fe868532efc12aa26b391b15132e1279f1c0 \ + --hash=sha256:8a64866a97f6304a7179873a465d6eee97b7a24ec6cfd78e0f575e96b821240b # via google-api-core idna==3.4 \ --hash=sha256:814f528e8dead7d329833b91c5faa87d60bf71824cd12a7530b5526063d02cb4 \ --hash=sha256:90b77e79eaa3eba6de819a0c442c0b4ceefc341a7a2ab77d7562bf49f425c5c2 # via requests -importlib-metadata==5.0.0 \ - --hash=sha256:da31db32b304314d044d3c12c79bd59e307889b287ad12ff387b3500835fc2ab \ - --hash=sha256:ddb0e35065e8938f867ed4928d0ae5bf2a53b7773871bfe6bcc7e4fcdc7dea43 +importlib-metadata==6.8.0 \ + --hash=sha256:3ebb78df84a805d7698245025b975d9d67053cd94c79245ba4b3eb694abe68bb \ + --hash=sha256:dbace7892d8c0c4ac1ad096662232f831d4e64f4c4545bd53016a3e9d4654743 # via # -r requirements.in # keyring # twine -jaraco-classes==3.2.3 \ - --hash=sha256:2353de3288bc6b82120752201c6b1c1a14b058267fa424ed5ce5984e3b922158 \ - --hash=sha256:89559fa5c1d3c34eff6f631ad80bb21f378dbcbb35dd161fd2c6b93f5be2f98a +jaraco-classes==3.3.0 \ + --hash=sha256:10afa92b6743f25c0cf5f37c6bb6e18e2c5bb84a16527ccfc0040ea377e7aaeb \ + --hash=sha256:c063dd08e89217cee02c8d5e5ec560f2c8ce6cdc2fcdc2e68f7b2e5547ed3621 # via keyring jeepney==0.8.0 \ --hash=sha256:5efe48d255973902f6badc3ce55e2aa6c5c3b3bc642059ef3a91247bcfcc5806 \ @@ -281,79 +272,125 @@ jeepney==0.8.0 \ # via # keyring # secretstorage -jinja2==3.1.2 \ - --hash=sha256:31351a702a408a9e7595a8fc6150fc3f43bb6bf7e319770cbc0db9df9437e852 \ - --hash=sha256:6088930bfe239f0e6710546ab9c19c9ef35e29792895fed6e6e31a023a182a61 +jinja2==3.1.3 \ + --hash=sha256:7d6d50dd97d52cbc355597bd845fabfbac3f551e1f99619e39a35ce8c370b5fa \ + --hash=sha256:ac8bd6544d4bb2c9792bf3a159e80bba8fda7f07e81bc3aed565432d5925ba90 # via gcp-releasetool -keyring==23.11.0 \ - --hash=sha256:3dd30011d555f1345dec2c262f0153f2f0ca6bca041fb1dc4588349bb4c0ac1e \ - --hash=sha256:ad192263e2cdd5f12875dedc2da13534359a7e760e77f8d04b50968a821c2361 +keyring==24.2.0 \ + --hash=sha256:4901caaf597bfd3bbd78c9a0c7c4c29fcd8310dab2cffefe749e916b6527acd6 \ + --hash=sha256:ca0746a19ec421219f4d713f848fa297a661a8a8c1504867e55bfb5e09091509 # via # gcp-releasetool # twine -markupsafe==2.1.1 \ - --hash=sha256:0212a68688482dc52b2d45013df70d169f542b7394fc744c02a57374a4207003 \ - --hash=sha256:089cf3dbf0cd6c100f02945abeb18484bd1ee57a079aefd52cffd17fba910b88 \ - --hash=sha256:10c1bfff05d95783da83491be968e8fe789263689c02724e0c691933c52994f5 \ - --hash=sha256:33b74d289bd2f5e527beadcaa3f401e0df0a89927c1559c8566c066fa4248ab7 \ - --hash=sha256:3799351e2336dc91ea70b034983ee71cf2f9533cdff7c14c90ea126bfd95d65a \ - --hash=sha256:3ce11ee3f23f79dbd06fb3d63e2f6af7b12db1d46932fe7bd8afa259a5996603 \ - --hash=sha256:421be9fbf0ffe9ffd7a378aafebbf6f4602d564d34be190fc19a193232fd12b1 \ - --hash=sha256:43093fb83d8343aac0b1baa75516da6092f58f41200907ef92448ecab8825135 \ - --hash=sha256:46d00d6cfecdde84d40e572d63735ef81423ad31184100411e6e3388d405e247 \ - --hash=sha256:4a33dea2b688b3190ee12bd7cfa29d39c9ed176bda40bfa11099a3ce5d3a7ac6 \ - --hash=sha256:4b9fe39a2ccc108a4accc2676e77da025ce383c108593d65cc909add5c3bd601 \ - --hash=sha256:56442863ed2b06d19c37f94d999035e15ee982988920e12a5b4ba29b62ad1f77 \ - --hash=sha256:671cd1187ed5e62818414afe79ed29da836dde67166a9fac6d435873c44fdd02 \ - --hash=sha256:694deca8d702d5db21ec83983ce0bb4b26a578e71fbdbd4fdcd387daa90e4d5e \ - --hash=sha256:6a074d34ee7a5ce3effbc526b7083ec9731bb3cbf921bbe1d3005d4d2bdb3a63 \ - --hash=sha256:6d0072fea50feec76a4c418096652f2c3238eaa014b2f94aeb1d56a66b41403f \ - --hash=sha256:6fbf47b5d3728c6aea2abb0589b5d30459e369baa772e0f37a0320185e87c980 \ - --hash=sha256:7f91197cc9e48f989d12e4e6fbc46495c446636dfc81b9ccf50bb0ec74b91d4b \ - --hash=sha256:86b1f75c4e7c2ac2ccdaec2b9022845dbb81880ca318bb7a0a01fbf7813e3812 \ - --hash=sha256:8dc1c72a69aa7e082593c4a203dcf94ddb74bb5c8a731e4e1eb68d031e8498ff \ - --hash=sha256:8e3dcf21f367459434c18e71b2a9532d96547aef8a871872a5bd69a715c15f96 \ - --hash=sha256:8e576a51ad59e4bfaac456023a78f6b5e6e7651dcd383bcc3e18d06f9b55d6d1 \ - --hash=sha256:96e37a3dc86e80bf81758c152fe66dbf60ed5eca3d26305edf01892257049925 \ - --hash=sha256:97a68e6ada378df82bc9f16b800ab77cbf4b2fada0081794318520138c088e4a \ - --hash=sha256:99a2a507ed3ac881b975a2976d59f38c19386d128e7a9a18b7df6fff1fd4c1d6 \ - --hash=sha256:a49907dd8420c5685cfa064a1335b6754b74541bbb3706c259c02ed65b644b3e \ - --hash=sha256:b09bf97215625a311f669476f44b8b318b075847b49316d3e28c08e41a7a573f \ - --hash=sha256:b7bd98b796e2b6553da7225aeb61f447f80a1ca64f41d83612e6139ca5213aa4 \ - --hash=sha256:b87db4360013327109564f0e591bd2a3b318547bcef31b468a92ee504d07ae4f \ - --hash=sha256:bcb3ed405ed3222f9904899563d6fc492ff75cce56cba05e32eff40e6acbeaa3 \ - --hash=sha256:d4306c36ca495956b6d568d276ac11fdd9c30a36f1b6eb928070dc5360b22e1c \ - --hash=sha256:d5ee4f386140395a2c818d149221149c54849dfcfcb9f1debfe07a8b8bd63f9a \ - --hash=sha256:dda30ba7e87fbbb7eab1ec9f58678558fd9a6b8b853530e176eabd064da81417 \ - --hash=sha256:e04e26803c9c3851c931eac40c695602c6295b8d432cbe78609649ad9bd2da8a \ - --hash=sha256:e1c0b87e09fa55a220f058d1d49d3fb8df88fbfab58558f1198e08c1e1de842a \ - --hash=sha256:e72591e9ecd94d7feb70c1cbd7be7b3ebea3f548870aa91e2732960fa4d57a37 \ - --hash=sha256:e8c843bbcda3a2f1e3c2ab25913c80a3c5376cd00c6e8c4a86a89a28c8dc5452 \ - --hash=sha256:efc1913fd2ca4f334418481c7e595c00aad186563bbc1ec76067848c7ca0a933 \ - --hash=sha256:f121a1420d4e173a5d96e47e9a0c0dcff965afdf1626d28de1460815f7c4ee7a \ - --hash=sha256:fc7b548b17d238737688817ab67deebb30e8073c95749d55538ed473130ec0c7 +markdown-it-py==3.0.0 \ + --hash=sha256:355216845c60bd96232cd8d8c40e8f9765cc86f46880e43a8fd22dc1a1a8cab1 \ + --hash=sha256:e3f60a94fa066dc52ec76661e37c851cb232d92f9886b15cb560aaada2df8feb + # via rich +markupsafe==2.1.3 \ + --hash=sha256:05fb21170423db021895e1ea1e1f3ab3adb85d1c2333cbc2310f2a26bc77272e \ + --hash=sha256:0a4e4a1aff6c7ac4cd55792abf96c915634c2b97e3cc1c7129578aa68ebd754e \ + --hash=sha256:10bbfe99883db80bdbaff2dcf681dfc6533a614f700da1287707e8a5d78a8431 \ + --hash=sha256:134da1eca9ec0ae528110ccc9e48041e0828d79f24121a1a146161103c76e686 \ + --hash=sha256:14ff806850827afd6b07a5f32bd917fb7f45b046ba40c57abdb636674a8b559c \ + --hash=sha256:1577735524cdad32f9f694208aa75e422adba74f1baee7551620e43a3141f559 \ + --hash=sha256:1b40069d487e7edb2676d3fbdb2b0829ffa2cd63a2ec26c4938b2d34391b4ecc \ + --hash=sha256:1b8dd8c3fd14349433c79fa8abeb573a55fc0fdd769133baac1f5e07abf54aeb \ + --hash=sha256:1f67c7038d560d92149c060157d623c542173016c4babc0c1913cca0564b9939 \ + --hash=sha256:282c2cb35b5b673bbcadb33a585408104df04f14b2d9b01d4c345a3b92861c2c \ + --hash=sha256:2c1b19b3aaacc6e57b7e25710ff571c24d6c3613a45e905b1fde04d691b98ee0 \ + --hash=sha256:2ef12179d3a291be237280175b542c07a36e7f60718296278d8593d21ca937d4 \ + --hash=sha256:338ae27d6b8745585f87218a3f23f1512dbf52c26c28e322dbe54bcede54ccb9 \ + --hash=sha256:3c0fae6c3be832a0a0473ac912810b2877c8cb9d76ca48de1ed31e1c68386575 \ + --hash=sha256:3fd4abcb888d15a94f32b75d8fd18ee162ca0c064f35b11134be77050296d6ba \ + --hash=sha256:42de32b22b6b804f42c5d98be4f7e5e977ecdd9ee9b660fda1a3edf03b11792d \ + --hash=sha256:47d4f1c5f80fc62fdd7777d0d40a2e9dda0a05883ab11374334f6c4de38adffd \ + --hash=sha256:504b320cd4b7eff6f968eddf81127112db685e81f7e36e75f9f84f0df46041c3 \ + --hash=sha256:525808b8019e36eb524b8c68acdd63a37e75714eac50e988180b169d64480a00 \ + --hash=sha256:56d9f2ecac662ca1611d183feb03a3fa4406469dafe241673d521dd5ae92a155 \ + --hash=sha256:5bbe06f8eeafd38e5d0a4894ffec89378b6c6a625ff57e3028921f8ff59318ac \ + --hash=sha256:65c1a9bcdadc6c28eecee2c119465aebff8f7a584dd719facdd9e825ec61ab52 \ + --hash=sha256:68e78619a61ecf91e76aa3e6e8e33fc4894a2bebe93410754bd28fce0a8a4f9f \ + --hash=sha256:69c0f17e9f5a7afdf2cc9fb2d1ce6aabdb3bafb7f38017c0b77862bcec2bbad8 \ + --hash=sha256:6b2b56950d93e41f33b4223ead100ea0fe11f8e6ee5f641eb753ce4b77a7042b \ + --hash=sha256:715d3562f79d540f251b99ebd6d8baa547118974341db04f5ad06d5ea3eb8007 \ + --hash=sha256:787003c0ddb00500e49a10f2844fac87aa6ce977b90b0feaaf9de23c22508b24 \ + --hash=sha256:7ef3cb2ebbf91e330e3bb937efada0edd9003683db6b57bb108c4001f37a02ea \ + --hash=sha256:8023faf4e01efadfa183e863fefde0046de576c6f14659e8782065bcece22198 \ + --hash=sha256:8758846a7e80910096950b67071243da3e5a20ed2546e6392603c096778d48e0 \ + --hash=sha256:8afafd99945ead6e075b973fefa56379c5b5c53fd8937dad92c662da5d8fd5ee \ + --hash=sha256:8c41976a29d078bb235fea9b2ecd3da465df42a562910f9022f1a03107bd02be \ + --hash=sha256:8e254ae696c88d98da6555f5ace2279cf7cd5b3f52be2b5cf97feafe883b58d2 \ + --hash=sha256:8f9293864fe09b8149f0cc42ce56e3f0e54de883a9de90cd427f191c346eb2e1 \ + --hash=sha256:9402b03f1a1b4dc4c19845e5c749e3ab82d5078d16a2a4c2cd2df62d57bb0707 \ + --hash=sha256:962f82a3086483f5e5f64dbad880d31038b698494799b097bc59c2edf392fce6 \ + --hash=sha256:9aad3c1755095ce347e26488214ef77e0485a3c34a50c5a5e2471dff60b9dd9c \ + --hash=sha256:9dcdfd0eaf283af041973bff14a2e143b8bd64e069f4c383416ecd79a81aab58 \ + --hash=sha256:aa57bd9cf8ae831a362185ee444e15a93ecb2e344c8e52e4d721ea3ab6ef1823 \ + --hash=sha256:aa7bd130efab1c280bed0f45501b7c8795f9fdbeb02e965371bbef3523627779 \ + --hash=sha256:ab4a0df41e7c16a1392727727e7998a467472d0ad65f3ad5e6e765015df08636 \ + --hash=sha256:ad9e82fb8f09ade1c3e1b996a6337afac2b8b9e365f926f5a61aacc71adc5b3c \ + --hash=sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad \ + --hash=sha256:b076b6226fb84157e3f7c971a47ff3a679d837cf338547532ab866c57930dbee \ + --hash=sha256:b7ff0f54cb4ff66dd38bebd335a38e2c22c41a8ee45aa608efc890ac3e3931bc \ + --hash=sha256:bfce63a9e7834b12b87c64d6b155fdd9b3b96191b6bd334bf37db7ff1fe457f2 \ + --hash=sha256:c011a4149cfbcf9f03994ec2edffcb8b1dc2d2aede7ca243746df97a5d41ce48 \ + --hash=sha256:c9c804664ebe8f83a211cace637506669e7890fec1b4195b505c214e50dd4eb7 \ + --hash=sha256:ca379055a47383d02a5400cb0d110cef0a776fc644cda797db0c5696cfd7e18e \ + --hash=sha256:cb0932dc158471523c9637e807d9bfb93e06a95cbf010f1a38b98623b929ef2b \ + --hash=sha256:cd0f502fe016460680cd20aaa5a76d241d6f35a1c3350c474bac1273803893fa \ + --hash=sha256:ceb01949af7121f9fc39f7d27f91be8546f3fb112c608bc4029aef0bab86a2a5 \ + --hash=sha256:d080e0a5eb2529460b30190fcfcc4199bd7f827663f858a226a81bc27beaa97e \ + --hash=sha256:dd15ff04ffd7e05ffcb7fe79f1b98041b8ea30ae9234aed2a9168b5797c3effb \ + --hash=sha256:df0be2b576a7abbf737b1575f048c23fb1d769f267ec4358296f31c2479db8f9 \ + --hash=sha256:e09031c87a1e51556fdcb46e5bd4f59dfb743061cf93c4d6831bf894f125eb57 \ + --hash=sha256:e4dd52d80b8c83fdce44e12478ad2e85c64ea965e75d66dbeafb0a3e77308fcc \ + --hash=sha256:f698de3fd0c4e6972b92290a45bd9b1536bffe8c6759c62471efaa8acb4c37bc \ + --hash=sha256:fec21693218efe39aa7f8599346e90c705afa52c5b31ae019b2e57e8f6542bb2 \ + --hash=sha256:ffcc3f7c66b5f5b7931a5aa68fc9cecc51e685ef90282f4a82f0f5e9b704ad11 # via jinja2 -more-itertools==9.0.0 \ - --hash=sha256:250e83d7e81d0c87ca6bd942e6aeab8cc9daa6096d12c5308f3f92fa5e5c1f41 \ - --hash=sha256:5a6257e40878ef0520b1803990e3e22303a41b5714006c32a3fd8304b26ea1ab +mdurl==0.1.2 \ + --hash=sha256:84008a41e51615a49fc9966191ff91509e3c40b939176e643fd50a5c2196b8f8 \ + --hash=sha256:bb413d29f5eea38f31dd4754dd7377d4465116fb207585f97bf925588687c1ba + # via markdown-it-py +more-itertools==10.1.0 \ + --hash=sha256:626c369fa0eb37bac0291bce8259b332fd59ac792fa5497b59837309cd5b114a \ + --hash=sha256:64e0735fcfdc6f3464ea133afe8ea4483b1c5fe3a3d69852e6503b43a0b222e6 # via jaraco-classes -nox==2022.11.21 \ - --hash=sha256:0e41a990e290e274cb205a976c4c97ee3c5234441a8132c8c3fd9ea3c22149eb \ - --hash=sha256:e21c31de0711d1274ca585a2c5fde36b1aa962005ba8e9322bf5eeed16dcd684 +nh3==0.2.14 \ + --hash=sha256:116c9515937f94f0057ef50ebcbcc10600860065953ba56f14473ff706371873 \ + --hash=sha256:18415df36db9b001f71a42a3a5395db79cf23d556996090d293764436e98e8ad \ + --hash=sha256:203cac86e313cf6486704d0ec620a992c8bc164c86d3a4fd3d761dd552d839b5 \ + --hash=sha256:2b0be5c792bd43d0abef8ca39dd8acb3c0611052ce466d0401d51ea0d9aa7525 \ + --hash=sha256:377aaf6a9e7c63962f367158d808c6a1344e2b4f83d071c43fbd631b75c4f0b2 \ + --hash=sha256:525846c56c2bcd376f5eaee76063ebf33cf1e620c1498b2a40107f60cfc6054e \ + --hash=sha256:5529a3bf99402c34056576d80ae5547123f1078da76aa99e8ed79e44fa67282d \ + --hash=sha256:7771d43222b639a4cd9e341f870cee336b9d886de1ad9bec8dddab22fe1de450 \ + --hash=sha256:88c753efbcdfc2644a5012938c6b9753f1c64a5723a67f0301ca43e7b85dcf0e \ + --hash=sha256:93a943cfd3e33bd03f77b97baa11990148687877b74193bf777956b67054dcc6 \ + --hash=sha256:9be2f68fb9a40d8440cbf34cbf40758aa7f6093160bfc7fb018cce8e424f0c3a \ + --hash=sha256:a0c509894fd4dccdff557068e5074999ae3b75f4c5a2d6fb5415e782e25679c4 \ + --hash=sha256:ac8056e937f264995a82bf0053ca898a1cb1c9efc7cd68fa07fe0060734df7e4 \ + --hash=sha256:aed56a86daa43966dd790ba86d4b810b219f75b4bb737461b6886ce2bde38fd6 \ + --hash=sha256:e8986f1dd3221d1e741fda0a12eaa4a273f1d80a35e31a1ffe579e7c621d069e \ + --hash=sha256:f99212a81c62b5f22f9e7c3e347aa00491114a5647e1f13bbebd79c3e5f08d75 + # via readme-renderer +nox==2023.4.22 \ + --hash=sha256:0b1adc619c58ab4fa57d6ab2e7823fe47a32e70202f287d78474adcc7bda1891 \ + --hash=sha256:46c0560b0dc609d7d967dc99e22cb463d3c4caf54a5fda735d6c11b5177e3a9f # via -r requirements.in -packaging==21.3 \ - --hash=sha256:dd47c42927d89ab911e606518907cc2d3a1f38bbd026385970643f9c5b8ecfeb \ - --hash=sha256:ef103e05f519cdc783ae24ea4e2e0f508a9c99b2d4969652eed6a2e1ea5bd522 +packaging==23.2 \ + --hash=sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5 \ + --hash=sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7 # via # gcp-releasetool # nox -pkginfo==1.8.3 \ - --hash=sha256:848865108ec99d4901b2f7e84058b6e7660aae8ae10164e015a6dcf5b242a594 \ - --hash=sha256:a84da4318dd86f870a9447a8c98340aa06216bfc6f2b7bdc4b8766984ae1867c +pkginfo==1.9.6 \ + --hash=sha256:4b7a555a6d5a22169fcc9cf7bfd78d296b0361adad412a346c1226849af5e546 \ + --hash=sha256:8fd5896e8718a4372f0ea9cc9d96f6417c9b986e23a4d116dda26b62cc29d046 # via twine -platformdirs==2.5.4 \ - --hash=sha256:1006647646d80f16130f052404c6b901e80ee4ed6bef6792e1f238a8969106f7 \ - --hash=sha256:af0276409f9a02373d540bf8480021a048711d572745aef4b7842dad245eba10 +platformdirs==3.11.0 \ + --hash=sha256:cf8ee52a3afdb965072dcc652433e0c7e3e40cf5ea1477cd4b3b1d2eb75495b3 \ + --hash=sha256:e9d171d00af68be50e9202731309c4e658fd8bc76f55c11c7dd760d023bda68e # via virtualenv protobuf==3.20.3 \ --hash=sha256:03038ac1cfbc41aa21f6afcbcd357281d7521b4157926f30ebecc8d4ea59dcb7 \ @@ -382,34 +419,31 @@ protobuf==3.20.3 \ # gcp-docuploader # gcp-releasetool # google-api-core -pyasn1==0.4.8 \ - --hash=sha256:39c7e2ec30515947ff4e87fb6f456dfc6e84857d34be479c9d4a4ba4bf46aa5d \ - --hash=sha256:aef77c9fb94a3ac588e87841208bdec464471d9871bd5050a287cc9a475cd0ba + # googleapis-common-protos +pyasn1==0.5.0 \ + --hash=sha256:87a2121042a1ac9358cabcaf1d07680ff97ee6404333bacca15f76aa8ad01a57 \ + --hash=sha256:97b7290ca68e62a832558ec3976f15cbf911bf5d7c7039d8b861c2a0ece69fde # via # pyasn1-modules # rsa -pyasn1-modules==0.2.8 \ - --hash=sha256:905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e \ - --hash=sha256:a50b808ffeb97cb3601dd25981f6b016cbb3d31fbf57a8b8a87428e6158d0c74 +pyasn1-modules==0.3.0 \ + --hash=sha256:5bd01446b736eb9d31512a30d46c1ac3395d676c6f3cafa4c03eb54b9925631c \ + --hash=sha256:d3ccd6ed470d9ffbc716be08bd90efbd44d0734bc9303818f7336070984a162d # via google-auth pycparser==2.21 \ --hash=sha256:8ee45429555515e1f6b185e78100aea234072576aa43ab53aefcae078162fca9 \ --hash=sha256:e644fdec12f7872f86c58ff790da456218b10f863970249516d60a5eaca77206 # via cffi -pygments==2.15.0 \ - --hash=sha256:77a3299119af881904cd5ecd1ac6a66214b6e9bed1f2db16993b54adede64094 \ - --hash=sha256:f7e36cffc4c517fbc252861b9a6e4644ca0e5abadf9a113c72d1358ad09b9500 +pygments==2.16.1 \ + --hash=sha256:13fc09fa63bc8d8671a6d247e1eb303c4b343eaee81d861f3404db2935653692 \ + --hash=sha256:1daff0494820c69bc8941e407aa20f577374ee88364ee10a98fdbe0aece96e29 # via # readme-renderer # rich -pyjwt==2.6.0 \ - --hash=sha256:69285c7e31fc44f68a1feb309e948e0df53259d579295e6cfe2b1792329f05fd \ - --hash=sha256:d83c3d892a77bbb74d3e1a2cfa90afaadb60945205d1095d9221f04466f64c14 +pyjwt==2.8.0 \ + --hash=sha256:57e28d156e3d5c10088e0c68abb90bfac3df82b40a71bd0daa20c65ccd5c23de \ + --hash=sha256:59127c392cc44c2da5bb3192169a91f429924e17aff6534d70fdc02ab3e04320 # via gcp-releasetool -pyparsing==3.0.9 \ - --hash=sha256:2b020ecf7d21b687f219b71ecad3631f644a47f01403fa1d1036b0c6416d70fb \ - --hash=sha256:5026bae9a10eeaefb61dab2f09052b9f4307d44aee4eda64b309723d8d206bbc - # via packaging pyperclip==1.8.2 \ --hash=sha256:105254a8b04934f0bc84e9c24eb360a591aaf6535c9def5f29d92af107a9bf57 # via gcp-releasetool @@ -417,9 +451,9 @@ python-dateutil==2.8.2 \ --hash=sha256:0123cacc1627ae19ddf3c27a5de5bd67ee4586fbdd6440d9748f8abb483d3e86 \ --hash=sha256:961d03dc3453ebbc59dbdea9e4e11c5651520a876d0f4db161e8674aae935da9 # via gcp-releasetool -readme-renderer==37.3 \ - --hash=sha256:cd653186dfc73055656f090f227f5cb22a046d7f71a841dfa305f55c9a513273 \ - --hash=sha256:f67a16caedfa71eef48a31b39708637a6f4664c4394801a7b0d6432d13907343 +readme-renderer==42.0 \ + --hash=sha256:13d039515c1f24de668e2c93f2e877b9dbe6c6c32328b90a40a49d8b2b85f36d \ + --hash=sha256:2d55489f83be4992fe4454939d1a051c33edbab778e82761d060c9fc6b308cd1 # via twine requests==2.31.0 \ --hash=sha256:58cd2187c01e70e6e26505bca751777aa9f2ee0b7f4300988b709f44e013003f \ @@ -430,17 +464,17 @@ requests==2.31.0 \ # google-cloud-storage # requests-toolbelt # twine -requests-toolbelt==0.10.1 \ - --hash=sha256:18565aa58116d9951ac39baa288d3adb5b3ff975c4f25eee78555d89e8f247f7 \ - --hash=sha256:62e09f7ff5ccbda92772a29f394a49c3ad6cb181d568b1337626b2abb628a63d +requests-toolbelt==1.0.0 \ + --hash=sha256:7681a0a3d047012b5bdc0ee37d7f8f07ebe76ab08caeccfc3921ce23c88d5bc6 \ + --hash=sha256:cccfdd665f0a24fcf4726e690f65639d272bb0637b9b92dfd91a5568ccf6bd06 # via twine rfc3986==2.0.0 \ --hash=sha256:50b1502b60e289cb37883f3dfd34532b8873c7de9f49bb546641ce9cbd256ebd \ --hash=sha256:97aacf9dbd4bfd829baad6e6309fa6573aaf1be3f6fa735c8ab05e46cecb261c # via twine -rich==12.6.0 \ - --hash=sha256:a4eb26484f2c82589bd9a17c73d32a010b1e29d89f1604cd9bf3a2097b81bb5e \ - --hash=sha256:ba3a3775974105c221d31141f2c116f4fd65c5ceb0698657a11e9f295ec93fd0 +rich==13.6.0 \ + --hash=sha256:2b38e2fe9ca72c9a00170a1a2d20c63c790d0e10ef1fe35eba76e1e7b1d7d245 \ + --hash=sha256:5c14d22737e6d5084ef4771b62d5d4363165b403455a30a1c8ca39dc7b644bef # via twine rsa==4.9 \ --hash=sha256:90260d9058e514786967344d0ef75fa8727eed8a7d2e43ce9f4bcf1b536174f7 \ @@ -454,43 +488,37 @@ six==1.16.0 \ --hash=sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926 \ --hash=sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254 # via - # bleach # gcp-docuploader - # google-auth # python-dateutil -twine==4.0.1 \ - --hash=sha256:42026c18e394eac3e06693ee52010baa5313e4811d5a11050e7d48436cf41b9e \ - --hash=sha256:96b1cf12f7ae611a4a40b6ae8e9570215daff0611828f5fe1f37a16255ab24a0 +twine==4.0.2 \ + --hash=sha256:929bc3c280033347a00f847236564d1c52a3e61b1ac2516c97c48f3ceab756d8 \ + --hash=sha256:9e102ef5fdd5a20661eb88fad46338806c3bd32cf1db729603fe3697b1bc83c8 # via -r requirements.in -typing-extensions==4.4.0 \ - --hash=sha256:1511434bb92bf8dd198c12b1cc812e800d4181cfcb867674e0f8279cc93087aa \ - --hash=sha256:16fa4864408f655d35ec496218b85f79b3437c829e93320c7c9215ccfd92489e +typing-extensions==4.8.0 \ + --hash=sha256:8f92fc8806f9a6b641eaa5318da32b44d401efaac0f6678c9bc448ba3605faa0 \ + --hash=sha256:df8e4339e9cb77357558cbdbceca33c303714cf861d1eef15e1070055ae8b7ef # via -r requirements.in -urllib3==1.26.12 \ - --hash=sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e \ - --hash=sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997 +urllib3==2.0.7 \ + --hash=sha256:c97dfde1f7bd43a71c8d2a58e369e9b2bf692d1334ea9f9cae55add7d0dd0f84 \ + --hash=sha256:fdb6d215c776278489906c2f8916e6e7d4f5a9b602ccbcfdf7f016fc8da0596e # via # requests # twine -virtualenv==20.16.7 \ - --hash=sha256:8691e3ff9387f743e00f6bb20f70121f5e4f596cae754531f2b3b3a1b1ac696e \ - --hash=sha256:efd66b00386fdb7dbe4822d172303f40cd05e50e01740b19ea42425cbe653e29 +virtualenv==20.24.6 \ + --hash=sha256:02ece4f56fbf939dbbc33c0715159951d6bf14aaf5457b092e4548e1382455af \ + --hash=sha256:520d056652454c5098a00c0f073611ccbea4c79089331f60bf9d7ba247bb7381 # via nox -webencodings==0.5.1 \ - --hash=sha256:a0af1213f3c2226497a97e2b3aa01a7e4bee4f403f95be16fc9acd2947514a78 \ - --hash=sha256:b36a1c245f2d304965eb4e0a82848379241dc04b865afcc4aab16748587e1923 - # via bleach -wheel==0.38.4 \ - --hash=sha256:965f5259b566725405b05e7cf774052044b1ed30119b5d586b2703aafe8719ac \ - --hash=sha256:b60533f3f5d530e971d6737ca6d58681ee434818fab630c83a734bb10c083ce8 +wheel==0.41.3 \ + --hash=sha256:488609bc63a29322326e05560731bf7bfea8e48ad646e1f5e40d366607de0942 \ + --hash=sha256:4d4987ce51a49370ea65c0bfd2234e8ce80a12780820d9dc462597a6e60d0841 # via -r requirements.in -zipp==3.10.0 \ - --hash=sha256:4fcb6f278987a6605757302a6e40e896257570d11c51628968ccb2a47e80c6c1 \ - --hash=sha256:7a7262fd930bd3e36c50b9a64897aec3fafff3dfdeec9623ae22b40e93f99bb8 +zipp==3.17.0 \ + --hash=sha256:0e923e726174922dce09c53c59ad483ff7bbb8e572e00c7f7c46b88556409f31 \ + --hash=sha256:84e64a1c28cf7e91ed2078bb8cc8c259cb19b76942096c8d7b84947690cabaf0 # via importlib-metadata # The following packages are considered to be unsafe in a requirements file: -setuptools==65.5.1 \ - --hash=sha256:d0b9a8433464d5800cbe05094acf5c6d52a91bfac9b52bcfc4d41382be5d5d31 \ - --hash=sha256:e197a19aa8ec9722928f2206f8de752def0e4c9fc6953527360d1c36d94ddb2f +setuptools==68.2.2 \ + --hash=sha256:4ac1475276d2f1c48684874089fefcd83bd7162ddaafb81fac866ba0db282a87 \ + --hash=sha256:b454a35605876da60632df1a60f736524eb73cc47bbc9f3f1ef1b644de74fd2a # via -r requirements.in diff --git a/.kokoro/samples/python3.12/common.cfg b/.kokoro/samples/python3.12/common.cfg new file mode 100644 index 00000000..d4211acf --- /dev/null +++ b/.kokoro/samples/python3.12/common.cfg @@ -0,0 +1,40 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Specify which tests to run +env_vars: { + key: "RUN_TESTS_SESSION" + value: "py-3.12" +} + +# Declare build specific Cloud project. +env_vars: { + key: "BUILD_SPECIFIC_GCLOUD_PROJECT" + value: "python-docs-samples-tests-312" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-cloudevents-python/.kokoro/test-samples.sh" +} + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-samples-testing-docker" +} + +# Download secrets for samples +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/python-docs-samples" + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "google-cloudevents-python/.kokoro/trampoline_v2.sh" \ No newline at end of file diff --git a/.kokoro/samples/python3.12/continuous.cfg b/.kokoro/samples/python3.12/continuous.cfg new file mode 100644 index 00000000..a1c8d975 --- /dev/null +++ b/.kokoro/samples/python3.12/continuous.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/.kokoro/samples/python3.12/periodic-head.cfg b/.kokoro/samples/python3.12/periodic-head.cfg new file mode 100644 index 00000000..23a95be9 --- /dev/null +++ b/.kokoro/samples/python3.12/periodic-head.cfg @@ -0,0 +1,11 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/google-cloudevents-python/.kokoro/test-samples-against-head.sh" +} diff --git a/.kokoro/samples/python3.12/periodic.cfg b/.kokoro/samples/python3.12/periodic.cfg new file mode 100644 index 00000000..71cd1e59 --- /dev/null +++ b/.kokoro/samples/python3.12/periodic.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "False" +} diff --git a/.kokoro/samples/python3.12/presubmit.cfg b/.kokoro/samples/python3.12/presubmit.cfg new file mode 100644 index 00000000..a1c8d975 --- /dev/null +++ b/.kokoro/samples/python3.12/presubmit.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "INSTALL_LIBRARY_FROM_SOURCE" + value: "True" +} \ No newline at end of file diff --git a/CHANGELOG.md b/CHANGELOG.md index cf3e8bcf..37edcd57 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -31,6 +31,15 @@ * Remove outdated files ([#145](https://github.com/googleapis/google-cloudevents-python/issues/145)) ([888ccc5](https://github.com/googleapis/google-cloudevents-python/commit/888ccc54b46225ee27c3485e09eda0922535a195)) * **workflows:** Generator not executable, needs an interpreter. ([#150](https://github.com/googleapis/google-cloudevents-python/issues/150)) ([9c8db0e](https://github.com/googleapis/google-cloudevents-python/commit/9c8db0ea7f343e91ec51d9aaad6d90cad09cb4dd)) +## [0.12.0](https://github.com/googleapis/google-cloudevents-python/compare/v0.11.0...v0.12.0) (2024-03-29) + + +### Features + +* Add event types for [Network Services](https://cloud.google.com/eventarc/docs/reference/supported-events#network-services) ([#266](https://github.com/googleapis/google-cloudevents-python/issues/266)) ([5d66671](https://github.com/googleapis/google-cloudevents-python/commit/5d66671fbeb7b09c865d1cde50c38710b9879ae5)) +* Add event types for [Cloud Batch](https://cloud.google.com/eventarc/docs/reference/supported-events#batch) ([#266](https://github.com/googleapis/google-cloudevents-python/issues/266)) ([5d66671](https://github.com/googleapis/google-cloudevents-python/commit/5d66671fbeb7b09c865d1cde50c38710b9879ae5)) +* Add event types for Speech-to-Text ([#266](https://github.com/googleapis/google-cloudevents-python/issues/266)) ([5d66671](https://github.com/googleapis/google-cloudevents-python/commit/5d66671fbeb7b09c865d1cde50c38710b9879ae5)) + ## [0.11.0](https://github.com/googleapis/google-cloudevents-python/compare/v0.10.0...v0.11.0) (2023-09-21) diff --git a/scripts/requirements.txt b/scripts/requirements.txt index e16158ae..bc16be23 100644 --- a/scripts/requirements.txt +++ b/scripts/requirements.txt @@ -1,4 +1,4 @@ -gapic_generator==1.11.5 -grpcio-tools==1.58.0 -pypandoc_binary==1.11 +gapic_generator==1.16.1 +grpcio-tools==1.62.1 +pypandoc_binary==1.13 requests==2.31.0 \ No newline at end of file diff --git a/setup.cfg b/setup.cfg index ff9cb415..4daeea47 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = google-events -version = 0.11.0 +version = 0.12.0 author = Google LLC author_email = googleapis-packages@google.com description = Google Cloudevents library diff --git a/src/google/events/cloud/batch/__init__.py b/src/google/events/cloud/batch/__init__.py new file mode 100644 index 00000000..e2877fce --- /dev/null +++ b/src/google/events/cloud/batch/__init__.py @@ -0,0 +1,61 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from google.events.cloud.batch import gapic_version as package_version + +__version__ = package_version.__version__ + + + +from google.events.cloud.batch_v1.types.data import AllocationPolicy +from google.events.cloud.batch_v1.types.data import ComputeResource +from google.events.cloud.batch_v1.types.data import Environment +from google.events.cloud.batch_v1.types.data import GCS +from google.events.cloud.batch_v1.types.data import Job +from google.events.cloud.batch_v1.types.data import JobEventData +from google.events.cloud.batch_v1.types.data import JobNotification +from google.events.cloud.batch_v1.types.data import JobStatus +from google.events.cloud.batch_v1.types.data import LifecyclePolicy +from google.events.cloud.batch_v1.types.data import LogsPolicy +from google.events.cloud.batch_v1.types.data import NFS +from google.events.cloud.batch_v1.types.data import Runnable +from google.events.cloud.batch_v1.types.data import ServiceAccount +from google.events.cloud.batch_v1.types.data import StatusEvent +from google.events.cloud.batch_v1.types.data import TaskExecution +from google.events.cloud.batch_v1.types.data import TaskGroup +from google.events.cloud.batch_v1.types.data import TaskSpec +from google.events.cloud.batch_v1.types.data import TaskStatus +from google.events.cloud.batch_v1.types.data import Volume + +__all__ = ('AllocationPolicy', + 'ComputeResource', + 'Environment', + 'GCS', + 'Job', + 'JobEventData', + 'JobNotification', + 'JobStatus', + 'LifecyclePolicy', + 'LogsPolicy', + 'NFS', + 'Runnable', + 'ServiceAccount', + 'StatusEvent', + 'TaskExecution', + 'TaskGroup', + 'TaskSpec', + 'TaskStatus', + 'Volume', +) diff --git a/src/google/events/cloud/batch/gapic_version.py b/src/google/events/cloud/batch/gapic_version.py new file mode 100644 index 00000000..360a0d13 --- /dev/null +++ b/src/google/events/cloud/batch/gapic_version.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +__version__ = "0.0.0" # {x-release-please-version} diff --git a/src/google/events/cloud/batch/py.typed b/src/google/events/cloud/batch/py.typed new file mode 100644 index 00000000..ddbac5b4 --- /dev/null +++ b/src/google/events/cloud/batch/py.typed @@ -0,0 +1,2 @@ +# Marker file for PEP 561. +# The google-events-cloud-batch package uses inline types. diff --git a/src/google/events/cloud/batch_v1/__init__.py b/src/google/events/cloud/batch_v1/__init__.py new file mode 100644 index 00000000..ba47b2e7 --- /dev/null +++ b/src/google/events/cloud/batch_v1/__init__.py @@ -0,0 +1,62 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from google.events.cloud.batch_v1 import gapic_version as package_version + +__version__ = package_version.__version__ + + + +from .types.data import AllocationPolicy +from .types.data import ComputeResource +from .types.data import Environment +from .types.data import GCS +from .types.data import Job +from .types.data import JobEventData +from .types.data import JobNotification +from .types.data import JobStatus +from .types.data import LifecyclePolicy +from .types.data import LogsPolicy +from .types.data import NFS +from .types.data import Runnable +from .types.data import ServiceAccount +from .types.data import StatusEvent +from .types.data import TaskExecution +from .types.data import TaskGroup +from .types.data import TaskSpec +from .types.data import TaskStatus +from .types.data import Volume + +__all__ = ( +'AllocationPolicy', +'ComputeResource', +'Environment', +'GCS', +'Job', +'JobEventData', +'JobNotification', +'JobStatus', +'LifecyclePolicy', +'LogsPolicy', +'NFS', +'Runnable', +'ServiceAccount', +'StatusEvent', +'TaskExecution', +'TaskGroup', +'TaskSpec', +'TaskStatus', +'Volume', +) diff --git a/src/google/events/cloud/batch_v1/gapic_version.py b/src/google/events/cloud/batch_v1/gapic_version.py new file mode 100644 index 00000000..360a0d13 --- /dev/null +++ b/src/google/events/cloud/batch_v1/gapic_version.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +__version__ = "0.0.0" # {x-release-please-version} diff --git a/src/google/events/cloud/batch_v1/py.typed b/src/google/events/cloud/batch_v1/py.typed new file mode 100644 index 00000000..ddbac5b4 --- /dev/null +++ b/src/google/events/cloud/batch_v1/py.typed @@ -0,0 +1,2 @@ +# Marker file for PEP 561. +# The google-events-cloud-batch package uses inline types. diff --git a/src/google/events/cloud/batch_v1/services/__init__.py b/src/google/events/cloud/batch_v1/services/__init__.py new file mode 100644 index 00000000..89a37dc9 --- /dev/null +++ b/src/google/events/cloud/batch_v1/services/__init__.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/src/google/events/cloud/batch_v1/types/__init__.py b/src/google/events/cloud/batch_v1/types/__init__.py new file mode 100644 index 00000000..37516c67 --- /dev/null +++ b/src/google/events/cloud/batch_v1/types/__init__.py @@ -0,0 +1,58 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from .data import ( + AllocationPolicy, + ComputeResource, + Environment, + GCS, + Job, + JobEventData, + JobNotification, + JobStatus, + LifecyclePolicy, + LogsPolicy, + NFS, + Runnable, + ServiceAccount, + StatusEvent, + TaskExecution, + TaskGroup, + TaskSpec, + TaskStatus, + Volume, +) + +__all__ = ( + 'AllocationPolicy', + 'ComputeResource', + 'Environment', + 'GCS', + 'Job', + 'JobEventData', + 'JobNotification', + 'JobStatus', + 'LifecyclePolicy', + 'LogsPolicy', + 'NFS', + 'Runnable', + 'ServiceAccount', + 'StatusEvent', + 'TaskExecution', + 'TaskGroup', + 'TaskSpec', + 'TaskStatus', + 'Volume', +) diff --git a/src/google/events/cloud/batch_v1/types/data.py b/src/google/events/cloud/batch_v1/types/data.py new file mode 100644 index 00000000..125ef462 --- /dev/null +++ b/src/google/events/cloud/batch_v1/types/data.py @@ -0,0 +1,1684 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.protobuf import duration_pb2 # type: ignore +from google.protobuf import timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package='google.events.cloud.batch.v1', + manifest={ + 'Volume', + 'NFS', + 'GCS', + 'ComputeResource', + 'StatusEvent', + 'TaskExecution', + 'TaskStatus', + 'Runnable', + 'TaskSpec', + 'LifecyclePolicy', + 'Environment', + 'Job', + 'LogsPolicy', + 'JobStatus', + 'JobNotification', + 'AllocationPolicy', + 'TaskGroup', + 'ServiceAccount', + 'JobEventData', + }, +) + + +class Volume(proto.Message): + r"""Volume describes a volume and parameters for it to be mounted + to a VM. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + nfs (google.events.cloud.batch_v1.types.NFS): + A Network File System (NFS) volume. For + example, a Filestore file share. + + This field is a member of `oneof`_ ``source``. + gcs (google.events.cloud.batch_v1.types.GCS): + A Google Cloud Storage (GCS) volume. + + This field is a member of `oneof`_ ``source``. + device_name (str): + Device name of an attached disk volume, which should align + with a device_name specified by + job.allocation_policy.instances[0].policy.disks[i].device_name + or defined by the given instance template in + job.allocation_policy.instances[0].instance_template. + + This field is a member of `oneof`_ ``source``. + mount_path (str): + The mount path for the volume, e.g. + /mnt/disks/share. + mount_options (MutableSequence[str]): + For Google Cloud Storage (GCS), mount options + are the options supported by the gcsfuse tool + (https://github.com/GoogleCloudPlatform/gcsfuse). + For existing persistent disks, mount options + provided by the mount command + (https://man7.org/linux/man-pages/man8/mount.8.html) + except writing are supported. This is due to + restrictions of multi-writer mode + (https://cloud.google.com/compute/docs/disks/sharing-disks-between-vms). + For other attached disks and Network File System + (NFS), mount options are these supported by the + mount command + (https://man7.org/linux/man-pages/man8/mount.8.html). + """ + + nfs: 'NFS' = proto.Field( + proto.MESSAGE, + number=1, + oneof='source', + message='NFS', + ) + gcs: 'GCS' = proto.Field( + proto.MESSAGE, + number=3, + oneof='source', + message='GCS', + ) + device_name: str = proto.Field( + proto.STRING, + number=6, + oneof='source', + ) + mount_path: str = proto.Field( + proto.STRING, + number=4, + ) + mount_options: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=5, + ) + + +class NFS(proto.Message): + r"""Represents an NFS volume. + + Attributes: + server (str): + The IP address of the NFS. + remote_path (str): + Remote source path exported from the NFS, + e.g., "/share". + """ + + server: str = proto.Field( + proto.STRING, + number=1, + ) + remote_path: str = proto.Field( + proto.STRING, + number=2, + ) + + +class GCS(proto.Message): + r"""Represents a Google Cloud Storage volume. + + Attributes: + remote_path (str): + Remote path, either a bucket name or a subdirectory of a + bucket, e.g.: bucket_name, bucket_name/subdirectory/ + """ + + remote_path: str = proto.Field( + proto.STRING, + number=1, + ) + + +class ComputeResource(proto.Message): + r"""Compute resource requirements + + Attributes: + cpu_milli (int): + The milliCPU count. + memory_mib (int): + Memory in MiB. + boot_disk_mib (int): + Extra boot disk size in MiB for each task. + """ + + cpu_milli: int = proto.Field( + proto.INT64, + number=1, + ) + memory_mib: int = proto.Field( + proto.INT64, + number=2, + ) + boot_disk_mib: int = proto.Field( + proto.INT64, + number=4, + ) + + +class StatusEvent(proto.Message): + r"""Status event + + Attributes: + type_ (str): + Type of the event. + description (str): + Description of the event. + event_time (google.protobuf.timestamp_pb2.Timestamp): + The time this event occurred. + task_execution (google.events.cloud.batch_v1.types.TaskExecution): + Task Execution + task_state (google.events.cloud.batch_v1.types.TaskStatus.State): + Task State + """ + + type_: str = proto.Field( + proto.STRING, + number=3, + ) + description: str = proto.Field( + proto.STRING, + number=1, + ) + event_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + task_execution: 'TaskExecution' = proto.Field( + proto.MESSAGE, + number=4, + message='TaskExecution', + ) + task_state: 'TaskStatus.State' = proto.Field( + proto.ENUM, + number=5, + enum='TaskStatus.State', + ) + + +class TaskExecution(proto.Message): + r"""This Task Execution field includes detail information for + task execution procedures, based on StatusEvent types. + + Attributes: + exit_code (int): + When task is completed as the status of + FAILED or SUCCEEDED, exit code is for one task + execution result, default is 0 as success. + """ + + exit_code: int = proto.Field( + proto.INT32, + number=1, + ) + + +class TaskStatus(proto.Message): + r"""Status of a task + """ + class State(proto.Enum): + r"""Task states. + + Values: + STATE_UNSPECIFIED (0): + Unknown state. + PENDING (1): + The Task is created and waiting for + resources. + ASSIGNED (2): + The Task is assigned to at least one VM. + RUNNING (3): + The Task is running. + FAILED (4): + The Task has failed. + SUCCEEDED (5): + The Task has succeeded. + UNEXECUTED (6): + The Task has not been executed when the Job + finishes. + """ + STATE_UNSPECIFIED = 0 + PENDING = 1 + ASSIGNED = 2 + RUNNING = 3 + FAILED = 4 + SUCCEEDED = 5 + UNEXECUTED = 6 + + +class Runnable(proto.Message): + r"""Runnable describes instructions for executing a specific + script or container as part of a Task. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + container (google.events.cloud.batch_v1.types.Runnable.Container): + Container runnable. + + This field is a member of `oneof`_ ``executable``. + script (google.events.cloud.batch_v1.types.Runnable.Script): + Script runnable. + + This field is a member of `oneof`_ ``executable``. + barrier (google.events.cloud.batch_v1.types.Runnable.Barrier): + Barrier runnable. + + This field is a member of `oneof`_ ``executable``. + ignore_exit_status (bool): + Normally, a non-zero exit status causes the + Task to fail. This flag allows execution of + other Runnables to continue instead. + background (bool): + This flag allows a Runnable to continue + running in the background while the Task + executes subsequent Runnables. This is useful to + provide services to other Runnables (or to + provide debugging support tools like SSH + servers). + always_run (bool): + By default, after a Runnable fails, no further Runnable are + executed. This flag indicates that this Runnable must be run + even if the Task has already failed. This is useful for + Runnables that copy output files off of the VM or for + debugging. + + The always_run flag does not override the Task's overall + max_run_duration. If the max_run_duration has expired then + no further Runnables will execute, not even always_run + Runnables. + environment (google.events.cloud.batch_v1.types.Environment): + Environment variables for this Runnable + (overrides variables set for the whole Task or + TaskGroup). + timeout (google.protobuf.duration_pb2.Duration): + Timeout for this Runnable. + labels (MutableMapping[str, str]): + Labels for this Runnable. + """ + + class Container(proto.Message): + r"""Container runnable. + + Attributes: + image_uri (str): + The URI to pull the container image from. + commands (MutableSequence[str]): + Overrides the ``CMD`` specified in the container. If there + is an ENTRYPOINT (either in the container image or with the + entrypoint field below) then commands are appended as + arguments to the ENTRYPOINT. + entrypoint (str): + Overrides the ``ENTRYPOINT`` specified in the container. + volumes (MutableSequence[str]): + Volumes to mount (bind mount) from the host + machine files or directories into the container, + formatted to match docker run's --volume option, + e.g. /foo:/bar, or /foo:/bar:ro + options (str): + Arbitrary additional options to include in + the "docker run" command when running this + container, e.g. "--network host". + block_external_network (bool): + If set to true, external network access to and from + container will be blocked, containers that are with + block_external_network as true can still communicate with + each other, network cannot be specified in the + ``container.options`` field. + username (str): + Optional username for logging in to a docker registry. If + username matches ``projects/*/secrets/*/versions/*`` then + Batch will read the username from the Secret Manager. + password (str): + Optional password for logging in to a docker registry. If + password matches ``projects/*/secrets/*/versions/*`` then + Batch will read the password from the Secret Manager; + """ + + image_uri: str = proto.Field( + proto.STRING, + number=1, + ) + commands: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + entrypoint: str = proto.Field( + proto.STRING, + number=3, + ) + volumes: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=7, + ) + options: str = proto.Field( + proto.STRING, + number=8, + ) + block_external_network: bool = proto.Field( + proto.BOOL, + number=9, + ) + username: str = proto.Field( + proto.STRING, + number=10, + ) + password: str = proto.Field( + proto.STRING, + number=11, + ) + + class Script(proto.Message): + r"""Script runnable. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + path (str): + Script file path on the host VM. + + To specify an interpreter, please add a + ``#!``\ (also known as `shebang + line `__) as + the first line of the file.(For example, to execute the + script using bash, ``#!/bin/bash`` should be the first line + of the file. To execute the script using\ ``Python3``, + ``#!/usr/bin/env python3`` should be the first line of the + file.) Otherwise, the file will by default be excuted by + ``/bin/sh``. + + This field is a member of `oneof`_ ``command``. + text (str): + Shell script text. + + To specify an interpreter, please add a + ``#!\n`` at the beginning of the text.(For + example, to execute the script using bash, ``#!/bin/bash\n`` + should be added. To execute the script using\ ``Python3``, + ``#!/usr/bin/env python3\n`` should be added.) Otherwise, + the script will by default be excuted by ``/bin/sh``. + + This field is a member of `oneof`_ ``command``. + """ + + path: str = proto.Field( + proto.STRING, + number=1, + oneof='command', + ) + text: str = proto.Field( + proto.STRING, + number=2, + oneof='command', + ) + + class Barrier(proto.Message): + r"""Barrier runnable blocks until all tasks in a taskgroup reach + it. + + Attributes: + name (str): + Barriers are identified by their index in + runnable list. Names are not required, but if + present should be an identifier. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + + container: Container = proto.Field( + proto.MESSAGE, + number=1, + oneof='executable', + message=Container, + ) + script: Script = proto.Field( + proto.MESSAGE, + number=2, + oneof='executable', + message=Script, + ) + barrier: Barrier = proto.Field( + proto.MESSAGE, + number=6, + oneof='executable', + message=Barrier, + ) + ignore_exit_status: bool = proto.Field( + proto.BOOL, + number=3, + ) + background: bool = proto.Field( + proto.BOOL, + number=4, + ) + always_run: bool = proto.Field( + proto.BOOL, + number=5, + ) + environment: 'Environment' = proto.Field( + proto.MESSAGE, + number=7, + message='Environment', + ) + timeout: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=8, + message=duration_pb2.Duration, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=9, + ) + + +class TaskSpec(proto.Message): + r"""Spec of a task + + Attributes: + runnables (MutableSequence[google.events.cloud.batch_v1.types.Runnable]): + The sequence of scripts or containers to run for this Task. + Each Task using this TaskSpec executes its list of runnables + in order. The Task succeeds if all of its runnables either + exit with a zero status or any that exit with a non-zero + status have the ignore_exit_status flag. + + Background runnables are killed automatically (if they have + not already exited) a short time after all foreground + runnables have completed. Even though this is likely to + result in a non-zero exit status for the background + runnable, these automatic kills are not treated as Task + failures. + compute_resource (google.events.cloud.batch_v1.types.ComputeResource): + ComputeResource requirements. + max_run_duration (google.protobuf.duration_pb2.Duration): + Maximum duration the task should run. + The task will be killed and marked as FAILED if + over this limit. + max_retry_count (int): + Maximum number of retries on failures. The default, 0, which + means never retry. The valid value range is [0, 10]. + lifecycle_policies (MutableSequence[google.events.cloud.batch_v1.types.LifecyclePolicy]): + Lifecycle management schema when any task in a task group is + failed. Currently we only support one lifecycle policy. When + the lifecycle policy condition is met, the action in the + policy will execute. If task execution result does not meet + with the defined lifecycle policy, we consider it as the + default policy. Default policy means if the exit code is 0, + exit task. If task ends with non-zero exit code, retry the + task with max_retry_count. + environments (MutableMapping[str, str]): + Deprecated: please use + environment(non-plural) instead. + volumes (MutableSequence[google.events.cloud.batch_v1.types.Volume]): + Volumes to mount before running Tasks using + this TaskSpec. + environment (google.events.cloud.batch_v1.types.Environment): + Environment variables to set before running + the Task. + """ + + runnables: MutableSequence['Runnable'] = proto.RepeatedField( + proto.MESSAGE, + number=8, + message='Runnable', + ) + compute_resource: 'ComputeResource' = proto.Field( + proto.MESSAGE, + number=3, + message='ComputeResource', + ) + max_run_duration: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=4, + message=duration_pb2.Duration, + ) + max_retry_count: int = proto.Field( + proto.INT32, + number=5, + ) + lifecycle_policies: MutableSequence['LifecyclePolicy'] = proto.RepeatedField( + proto.MESSAGE, + number=9, + message='LifecyclePolicy', + ) + environments: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=6, + ) + volumes: MutableSequence['Volume'] = proto.RepeatedField( + proto.MESSAGE, + number=7, + message='Volume', + ) + environment: 'Environment' = proto.Field( + proto.MESSAGE, + number=10, + message='Environment', + ) + + +class LifecyclePolicy(proto.Message): + r"""LifecyclePolicy describes how to deal with task failures + based on different conditions. + + Attributes: + action (google.events.cloud.batch_v1.types.LifecyclePolicy.Action): + Action to execute when ActionCondition is true. When + RETRY_TASK is specified, we will retry failed tasks if we + notice any exit code match and fail tasks if no match is + found. Likewise, when FAIL_TASK is specified, we will fail + tasks if we notice any exit code match and retry tasks if no + match is found. + action_condition (google.events.cloud.batch_v1.types.LifecyclePolicy.ActionCondition): + Conditions that decide why a task failure is + dealt with a specific action. + """ + class Action(proto.Enum): + r"""Action on task failures based on different conditions. + + Values: + ACTION_UNSPECIFIED (0): + Action unspecified. + RETRY_TASK (1): + Action that tasks in the group will be + scheduled to re-execute. + FAIL_TASK (2): + Action that tasks in the group will be + stopped immediately. + """ + ACTION_UNSPECIFIED = 0 + RETRY_TASK = 1 + FAIL_TASK = 2 + + class ActionCondition(proto.Message): + r"""Conditions for actions to deal with task failures. + + Attributes: + exit_codes (MutableSequence[int]): + Exit codes of a task execution. + If there are more than 1 exit codes, + when task executes with any of the exit code in + the list, the condition is met and the action + will be executed. + """ + + exit_codes: MutableSequence[int] = proto.RepeatedField( + proto.INT32, + number=1, + ) + + action: Action = proto.Field( + proto.ENUM, + number=1, + enum=Action, + ) + action_condition: ActionCondition = proto.Field( + proto.MESSAGE, + number=2, + message=ActionCondition, + ) + + +class Environment(proto.Message): + r"""An Environment describes a collection of environment + variables to set when executing Tasks. + + Attributes: + variables (MutableMapping[str, str]): + A map of environment variable names to + values. + secret_variables (MutableMapping[str, str]): + A map of environment variable names to Secret + Manager secret names. The VM will access the + named secrets to set the value of each + environment variable. + encrypted_variables (google.events.cloud.batch_v1.types.Environment.KMSEnvMap): + An encrypted JSON dictionary where the + key/value pairs correspond to environment + variable names and their values. + """ + + class KMSEnvMap(proto.Message): + r""" + + Attributes: + key_name (str): + The name of the KMS key that will be used to + decrypt the cipher text. + cipher_text (str): + The value of the cipherText response from the ``encrypt`` + method. + """ + + key_name: str = proto.Field( + proto.STRING, + number=1, + ) + cipher_text: str = proto.Field( + proto.STRING, + number=2, + ) + + variables: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=1, + ) + secret_variables: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=2, + ) + encrypted_variables: KMSEnvMap = proto.Field( + proto.MESSAGE, + number=3, + message=KMSEnvMap, + ) + + +class Job(proto.Message): + r"""The Cloud Batch Job description. + + Attributes: + name (str): + Output only. Job name. + For example: + "projects/123456/locations/us-central1/jobs/job01". + uid (str): + Output only. A system generated unique ID (in + UUID4 format) for the Job. + priority (int): + Priority of the Job. The valid value range is [0, 100). + Default value is 0. Higher value indicates higher priority. + A job with higher priority value is more likely to run + earlier if all other requirements are satisfied. + task_groups (MutableSequence[google.events.cloud.batch_v1.types.TaskGroup]): + Required. TaskGroups in the Job. Only one + TaskGroup is supported now. + allocation_policy (google.events.cloud.batch_v1.types.AllocationPolicy): + Compute resource allocation for all + TaskGroups in the Job. + labels (MutableMapping[str, str]): + Labels for the Job. Labels could be user provided or system + generated. For example, "labels": { "department": "finance", + "environment": "test" } You can assign up to 64 labels. + `Google Compute Engine label + restrictions `__ + apply. Label names that start with "goog-" or "google-" are + reserved. + status (google.events.cloud.batch_v1.types.JobStatus): + Output only. Job status. It is read only for + users. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. When the Job was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The last time the Job was + updated. + logs_policy (google.events.cloud.batch_v1.types.LogsPolicy): + Log preservation policy for the Job. + notifications (MutableSequence[google.events.cloud.batch_v1.types.JobNotification]): + Notification configurations. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + uid: str = proto.Field( + proto.STRING, + number=2, + ) + priority: int = proto.Field( + proto.INT64, + number=3, + ) + task_groups: MutableSequence['TaskGroup'] = proto.RepeatedField( + proto.MESSAGE, + number=4, + message='TaskGroup', + ) + allocation_policy: 'AllocationPolicy' = proto.Field( + proto.MESSAGE, + number=7, + message='AllocationPolicy', + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=8, + ) + status: 'JobStatus' = proto.Field( + proto.MESSAGE, + number=9, + message='JobStatus', + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=11, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=12, + message=timestamp_pb2.Timestamp, + ) + logs_policy: 'LogsPolicy' = proto.Field( + proto.MESSAGE, + number=13, + message='LogsPolicy', + ) + notifications: MutableSequence['JobNotification'] = proto.RepeatedField( + proto.MESSAGE, + number=14, + message='JobNotification', + ) + + +class LogsPolicy(proto.Message): + r"""LogsPolicy describes how outputs from a Job's Tasks + (stdout/stderr) will be preserved. + + Attributes: + destination (google.events.cloud.batch_v1.types.LogsPolicy.Destination): + Where logs should be saved. + logs_path (str): + The path to which logs are saved when the + destination = PATH. This can be a local file + path on the VM, or under the mount point of a + Persistent Disk or Filestore, or a Cloud Storage + path. + """ + class Destination(proto.Enum): + r"""The destination (if any) for logs. + + Values: + DESTINATION_UNSPECIFIED (0): + Logs are not preserved. + CLOUD_LOGGING (1): + Logs are streamed to Cloud Logging. + PATH (2): + Logs are saved to a file path. + """ + DESTINATION_UNSPECIFIED = 0 + CLOUD_LOGGING = 1 + PATH = 2 + + destination: Destination = proto.Field( + proto.ENUM, + number=1, + enum=Destination, + ) + logs_path: str = proto.Field( + proto.STRING, + number=2, + ) + + +class JobStatus(proto.Message): + r"""Job status. + + Attributes: + state (google.events.cloud.batch_v1.types.JobStatus.State): + Job state + status_events (MutableSequence[google.events.cloud.batch_v1.types.StatusEvent]): + Job status events + task_groups (MutableMapping[str, google.events.cloud.batch_v1.types.JobStatus.TaskGroupStatus]): + Aggregated task status for each TaskGroup in + the Job. The map key is TaskGroup ID. + run_duration (google.protobuf.duration_pb2.Duration): + The duration of time that the Job spent in + status RUNNING. + """ + class State(proto.Enum): + r"""Valid Job states. + + Values: + STATE_UNSPECIFIED (0): + Job state unspecified. + QUEUED (1): + Job is admitted (validated and persisted) and + waiting for resources. + SCHEDULED (2): + Job is scheduled to run as soon as resource + allocation is ready. The resource allocation may + happen at a later time but with a high chance to + succeed. + RUNNING (3): + Resource allocation has been successful. At + least one Task in the Job is RUNNING. + SUCCEEDED (4): + All Tasks in the Job have finished + successfully. + FAILED (5): + At least one Task in the Job has failed. + DELETION_IN_PROGRESS (6): + The Job will be deleted, but has not been + deleted yet. Typically this is because resources + used by the Job are still being cleaned up. + """ + STATE_UNSPECIFIED = 0 + QUEUED = 1 + SCHEDULED = 2 + RUNNING = 3 + SUCCEEDED = 4 + FAILED = 5 + DELETION_IN_PROGRESS = 6 + + class InstanceStatus(proto.Message): + r"""VM instance status. + + Attributes: + machine_type (str): + The Compute Engine machine type. + provisioning_model (google.events.cloud.batch_v1.types.AllocationPolicy.ProvisioningModel): + The VM instance provisioning model. + task_pack (int): + The max number of tasks can be assigned to + this instance type. + boot_disk (google.events.cloud.batch_v1.types.AllocationPolicy.Disk): + The VM boot disk. + """ + + machine_type: str = proto.Field( + proto.STRING, + number=1, + ) + provisioning_model: 'AllocationPolicy.ProvisioningModel' = proto.Field( + proto.ENUM, + number=2, + enum='AllocationPolicy.ProvisioningModel', + ) + task_pack: int = proto.Field( + proto.INT64, + number=3, + ) + boot_disk: 'AllocationPolicy.Disk' = proto.Field( + proto.MESSAGE, + number=4, + message='AllocationPolicy.Disk', + ) + + class TaskGroupStatus(proto.Message): + r"""Aggregated task status for a TaskGroup. + + Attributes: + counts (MutableMapping[str, int]): + Count of task in each state in the TaskGroup. + The map key is task state name. + instances (MutableSequence[google.events.cloud.batch_v1.types.JobStatus.InstanceStatus]): + Status of instances allocated for the + TaskGroup. + """ + + counts: MutableMapping[str, int] = proto.MapField( + proto.STRING, + proto.INT64, + number=1, + ) + instances: MutableSequence['JobStatus.InstanceStatus'] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message='JobStatus.InstanceStatus', + ) + + state: State = proto.Field( + proto.ENUM, + number=1, + enum=State, + ) + status_events: MutableSequence['StatusEvent'] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message='StatusEvent', + ) + task_groups: MutableMapping[str, TaskGroupStatus] = proto.MapField( + proto.STRING, + proto.MESSAGE, + number=4, + message=TaskGroupStatus, + ) + run_duration: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=5, + message=duration_pb2.Duration, + ) + + +class JobNotification(proto.Message): + r"""Notification configurations. + + Attributes: + pubsub_topic (str): + The Pub/Sub topic where notifications like the job state + changes will be published. This topic exist in the same + project as the job and billings will be charged to this + project. If not specified, no Pub/Sub messages will be sent. + Topic format: ``projects/{project}/topics/{topic}``. + message (google.events.cloud.batch_v1.types.JobNotification.Message): + The attribute requirements of messages to be + sent to this Pub/Sub topic. Without this field, + no message will be sent. + """ + class Type(proto.Enum): + r"""The message type. + + Values: + TYPE_UNSPECIFIED (0): + Unspecified. + JOB_STATE_CHANGED (1): + Notify users that the job state has changed. + TASK_STATE_CHANGED (2): + Notify users that the task state has changed. + """ + TYPE_UNSPECIFIED = 0 + JOB_STATE_CHANGED = 1 + TASK_STATE_CHANGED = 2 + + class Message(proto.Message): + r"""Message details. + Describe the attribute that a message should have. + Without specified message attributes, no message will be sent by + default. + + Attributes: + type_ (google.events.cloud.batch_v1.types.JobNotification.Type): + The message type. + new_job_state (google.events.cloud.batch_v1.types.JobStatus.State): + The new job state. + new_task_state (google.events.cloud.batch_v1.types.TaskStatus.State): + The new task state. + """ + + type_: 'JobNotification.Type' = proto.Field( + proto.ENUM, + number=1, + enum='JobNotification.Type', + ) + new_job_state: 'JobStatus.State' = proto.Field( + proto.ENUM, + number=2, + enum='JobStatus.State', + ) + new_task_state: 'TaskStatus.State' = proto.Field( + proto.ENUM, + number=3, + enum='TaskStatus.State', + ) + + pubsub_topic: str = proto.Field( + proto.STRING, + number=1, + ) + message: Message = proto.Field( + proto.MESSAGE, + number=2, + message=Message, + ) + + +class AllocationPolicy(proto.Message): + r"""A Job's resource allocation policy describes when, where, and + how compute resources should be allocated for the Job. + + Attributes: + location (google.events.cloud.batch_v1.types.AllocationPolicy.LocationPolicy): + Location where compute resources should be + allocated for the Job. + instances (MutableSequence[google.events.cloud.batch_v1.types.AllocationPolicy.InstancePolicyOrTemplate]): + Describe instances that can be created by this + AllocationPolicy. Only instances[0] is supported now. + service_account (google.events.cloud.batch_v1.types.ServiceAccount): + Service account that VMs will run as. + labels (MutableMapping[str, str]): + Labels applied to all VM instances and other resources + created by AllocationPolicy. Labels could be user provided + or system generated. You can assign up to 64 labels. `Google + Compute Engine label + restrictions `__ + apply. Label names that start with "goog-" or "google-" are + reserved. + network (google.events.cloud.batch_v1.types.AllocationPolicy.NetworkPolicy): + The network policy. + placement (google.events.cloud.batch_v1.types.AllocationPolicy.PlacementPolicy): + The placement policy. + """ + class ProvisioningModel(proto.Enum): + r"""Compute Engine VM instance provisioning model. + + Values: + PROVISIONING_MODEL_UNSPECIFIED (0): + Unspecified. + STANDARD (1): + Standard VM. + SPOT (2): + SPOT VM. + PREEMPTIBLE (3): + Preemptible VM (PVM). + + Above SPOT VM is the preferable model for + preemptible VM instances: the old preemptible VM + model (indicated by this field) is the older + model, and has been migrated to use the SPOT + model as the underlying technology. This old + model will still be supported. + """ + PROVISIONING_MODEL_UNSPECIFIED = 0 + STANDARD = 1 + SPOT = 2 + PREEMPTIBLE = 3 + + class LocationPolicy(proto.Message): + r""" + + Attributes: + allowed_locations (MutableSequence[str]): + A list of allowed location names represented by internal + URLs. + + Each location can be a region or a zone. Only one region or + multiple zones in one region is supported now. For example, + ["regions/us-central1"] allow VMs in any zones in region + us-central1. ["zones/us-central1-a", "zones/us-central1-c"] + only allow VMs in zones us-central1-a and us-central1-c. + + All locations end up in different regions would cause + errors. For example, ["regions/us-central1", + "zones/us-central1-a", "zones/us-central1-b", + "zones/us-west1-a"] contains 2 regions "us-central1" and + "us-west1". An error is expected in this case. + """ + + allowed_locations: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + + class Disk(proto.Message): + r"""A new persistent disk or a local ssd. + A VM can only have one local SSD setting but multiple local SSD + partitions. See + https://cloud.google.com/compute/docs/disks#pdspecs and + https://cloud.google.com/compute/docs/disks#localssds. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + image (str): + Name of a public or custom image used as the data source. + For example, the following are all valid URLs: + + - Specify the image by its family name: + projects/{project}/global/images/family/{image_family} + - Specify the image version: + projects/{project}/global/images/{image_version} + + You can also use Batch customized image in short names. The + following image values are supported for a boot disk: + + - "batch-debian": use Batch Debian images. + - "batch-centos": use Batch CentOS images. + - "batch-cos": use Batch Container-Optimized images. + - "batch-hpc-centos": use Batch HPC CentOS images. + + This field is a member of `oneof`_ ``data_source``. + snapshot (str): + Name of a snapshot used as the data source. + Snapshot is not supported as boot disk now. + + This field is a member of `oneof`_ ``data_source``. + type_ (str): + Disk type as shown in ``gcloud compute disk-types list``. + For example, local SSD uses type "local-ssd". Persistent + disks and boot disks use "pd-balanced", "pd-extreme", + "pd-ssd" or "pd-standard". + size_gb (int): + Disk size in GB. + + For persistent disk, this field is ignored if + ``data_source`` is ``image`` or ``snapshot``. For local SSD, + size_gb should be a multiple of 375GB, otherwise, the final + size will be the next greater multiple of 375 GB. For boot + disk, Batch will calculate the boot disk size based on + source image and task requirements if you do not speicify + the size. If both this field and the boot_disk_mib field in + task spec's compute_resource are defined, Batch will only + honor this field. + disk_interface (str): + Local SSDs are available through both "SCSI" + and "NVMe" interfaces. If not indicated, "NVMe" + will be the default one for local ssds. We only + support "SCSI" for persistent disks now. + """ + + image: str = proto.Field( + proto.STRING, + number=4, + oneof='data_source', + ) + snapshot: str = proto.Field( + proto.STRING, + number=5, + oneof='data_source', + ) + type_: str = proto.Field( + proto.STRING, + number=1, + ) + size_gb: int = proto.Field( + proto.INT64, + number=2, + ) + disk_interface: str = proto.Field( + proto.STRING, + number=6, + ) + + class AttachedDisk(proto.Message): + r"""A new or an existing persistent disk (PD) or a local ssd + attached to a VM instance. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + new_disk (google.events.cloud.batch_v1.types.AllocationPolicy.Disk): + + This field is a member of `oneof`_ ``attached``. + existing_disk (str): + Name of an existing PD. + + This field is a member of `oneof`_ ``attached``. + device_name (str): + Device name that the guest operating system will see. It is + used by Runnable.volumes field to mount disks. So please + specify the device_name if you want Batch to help mount the + disk, and it should match the device_name field in volumes. + """ + + new_disk: 'AllocationPolicy.Disk' = proto.Field( + proto.MESSAGE, + number=1, + oneof='attached', + message='AllocationPolicy.Disk', + ) + existing_disk: str = proto.Field( + proto.STRING, + number=2, + oneof='attached', + ) + device_name: str = proto.Field( + proto.STRING, + number=3, + ) + + class Accelerator(proto.Message): + r"""Accelerator describes Compute Engine accelerators to be + attached to the VM. + + Attributes: + type_ (str): + The accelerator type. For example, "nvidia-tesla-t4". See + ``gcloud compute accelerator-types list``. + count (int): + The number of accelerators of this type. + install_gpu_drivers (bool): + Deprecated: please use instances[0].install_gpu_drivers + instead. + """ + + type_: str = proto.Field( + proto.STRING, + number=1, + ) + count: int = proto.Field( + proto.INT64, + number=2, + ) + install_gpu_drivers: bool = proto.Field( + proto.BOOL, + number=3, + ) + + class InstancePolicy(proto.Message): + r"""InstancePolicy describes an instance type and resources + attached to each VM created by this InstancePolicy. + + Attributes: + machine_type (str): + The Compute Engine machine type. + min_cpu_platform (str): + The minimum CPU platform. + See + https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform. + provisioning_model (google.events.cloud.batch_v1.types.AllocationPolicy.ProvisioningModel): + The provisioning model. + accelerators (MutableSequence[google.events.cloud.batch_v1.types.AllocationPolicy.Accelerator]): + The accelerators attached to each VM + instance. + boot_disk (google.events.cloud.batch_v1.types.AllocationPolicy.Disk): + Boot disk to be created and attached to each + VM by this InstancePolicy. Boot disk will be + deleted when the VM is deleted. Batch API now + only supports booting from image. + disks (MutableSequence[google.events.cloud.batch_v1.types.AllocationPolicy.AttachedDisk]): + Non-boot disks to be attached for each VM + created by this InstancePolicy. New disks will + be deleted when the VM is deleted. + """ + + machine_type: str = proto.Field( + proto.STRING, + number=2, + ) + min_cpu_platform: str = proto.Field( + proto.STRING, + number=3, + ) + provisioning_model: 'AllocationPolicy.ProvisioningModel' = proto.Field( + proto.ENUM, + number=4, + enum='AllocationPolicy.ProvisioningModel', + ) + accelerators: MutableSequence['AllocationPolicy.Accelerator'] = proto.RepeatedField( + proto.MESSAGE, + number=5, + message='AllocationPolicy.Accelerator', + ) + boot_disk: 'AllocationPolicy.Disk' = proto.Field( + proto.MESSAGE, + number=8, + message='AllocationPolicy.Disk', + ) + disks: MutableSequence['AllocationPolicy.AttachedDisk'] = proto.RepeatedField( + proto.MESSAGE, + number=6, + message='AllocationPolicy.AttachedDisk', + ) + + class InstancePolicyOrTemplate(proto.Message): + r"""Either an InstancePolicy or an instance template. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + policy (google.events.cloud.batch_v1.types.AllocationPolicy.InstancePolicy): + InstancePolicy. + + This field is a member of `oneof`_ ``policy_template``. + instance_template (str): + Name of an instance template used to create VMs. Named the + field as 'instance_template' instead of 'template' to avoid + c++ keyword conflict. + + This field is a member of `oneof`_ ``policy_template``. + install_gpu_drivers (bool): + Set this field true if users want Batch to help fetch + drivers from a third party location and install them for + GPUs specified in policy.accelerators or instance_template + on their behalf. Default is false. + """ + + policy: 'AllocationPolicy.InstancePolicy' = proto.Field( + proto.MESSAGE, + number=1, + oneof='policy_template', + message='AllocationPolicy.InstancePolicy', + ) + instance_template: str = proto.Field( + proto.STRING, + number=2, + oneof='policy_template', + ) + install_gpu_drivers: bool = proto.Field( + proto.BOOL, + number=3, + ) + + class NetworkInterface(proto.Message): + r"""A network interface. + + Attributes: + network (str): + The URL of an existing network resource. You can specify the + network as a full or partial URL. + + For example, the following are all valid URLs: + + - https://www.googleapis.com/compute/v1/projects/{project}/global/networks/{network} + - projects/{project}/global/networks/{network} + - global/networks/{network} + subnetwork (str): + The URL of an existing subnetwork resource in the network. + You can specify the subnetwork as a full or partial URL. + + For example, the following are all valid URLs: + + - https://www.googleapis.com/compute/v1/projects/{project}/regions/{region}/subnetworks/{subnetwork} + - projects/{project}/regions/{region}/subnetworks/{subnetwork} + - regions/{region}/subnetworks/{subnetwork} + no_external_ip_address (bool): + Default is false (with an external IP + address). Required if no external public IP + address is attached to the VM. If no external + public IP address, additional configuration is + required to allow the VM to access Google + Services. See + https://cloud.google.com/vpc/docs/configure-private-google-access + and + https://cloud.google.com/nat/docs/gce-example#create-nat + for more information. + """ + + network: str = proto.Field( + proto.STRING, + number=1, + ) + subnetwork: str = proto.Field( + proto.STRING, + number=2, + ) + no_external_ip_address: bool = proto.Field( + proto.BOOL, + number=3, + ) + + class NetworkPolicy(proto.Message): + r"""NetworkPolicy describes VM instance network configurations. + + Attributes: + network_interfaces (MutableSequence[google.events.cloud.batch_v1.types.AllocationPolicy.NetworkInterface]): + Network configurations. + """ + + network_interfaces: MutableSequence['AllocationPolicy.NetworkInterface'] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message='AllocationPolicy.NetworkInterface', + ) + + class PlacementPolicy(proto.Message): + r"""PlacementPolicy describes a group placement policy for the + VMs controlled by this AllocationPolicy. + + Attributes: + collocation (str): + UNSPECIFIED vs. COLLOCATED (default + UNSPECIFIED). Use COLLOCATED when you want VMs + to be located close to each other for low + network latency between the VMs. No placement + policy will be generated when collocation is + UNSPECIFIED. + max_distance (int): + When specified, causes the job to fail if more than + max_distance logical switches are required between VMs. + Batch uses the most compact possible placement of VMs even + when max_distance is not specified. An explicit max_distance + makes that level of compactness a strict requirement. Not + yet implemented + """ + + collocation: str = proto.Field( + proto.STRING, + number=1, + ) + max_distance: int = proto.Field( + proto.INT64, + number=2, + ) + + location: LocationPolicy = proto.Field( + proto.MESSAGE, + number=1, + message=LocationPolicy, + ) + instances: MutableSequence[InstancePolicyOrTemplate] = proto.RepeatedField( + proto.MESSAGE, + number=8, + message=InstancePolicyOrTemplate, + ) + service_account: 'ServiceAccount' = proto.Field( + proto.MESSAGE, + number=9, + message='ServiceAccount', + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=6, + ) + network: NetworkPolicy = proto.Field( + proto.MESSAGE, + number=7, + message=NetworkPolicy, + ) + placement: PlacementPolicy = proto.Field( + proto.MESSAGE, + number=10, + message=PlacementPolicy, + ) + + +class TaskGroup(proto.Message): + r"""A TaskGroup defines one or more Tasks that all share the same + TaskSpec. + + Attributes: + name (str): + Output only. TaskGroup name. + The system generates this field based on parent + Job name. For example: + + "projects/123456/locations/us-west1/jobs/job01/taskGroups/group01". + task_spec (google.events.cloud.batch_v1.types.TaskSpec): + Required. Tasks in the group share the same + task spec. + task_count (int): + Number of Tasks in the TaskGroup. + Default is 1. + parallelism (int): + Max number of tasks that can run in parallel. Default to + min(task_count, 1000). Field parallelism must be 1 if the + scheduling_policy is IN_ORDER. + scheduling_policy (google.events.cloud.batch_v1.types.TaskGroup.SchedulingPolicy): + Scheduling policy for Tasks in the TaskGroup. The default + value is AS_SOON_AS_POSSIBLE. + task_environments (MutableSequence[google.events.cloud.batch_v1.types.Environment]): + An array of environment variable mappings, which are passed + to Tasks with matching indices. If task_environments is used + then task_count should not be specified in the request (and + will be ignored). Task count will be the length of + task_environments. + + Tasks get a BATCH_TASK_INDEX and BATCH_TASK_COUNT + environment variable, in addition to any environment + variables set in task_environments, specifying the number of + Tasks in the Task's parent TaskGroup, and the specific + Task's index in the TaskGroup (0 through BATCH_TASK_COUNT - + 1). + task_count_per_node (int): + Max number of tasks that can be run on a VM + at the same time. If not specified, the system + will decide a value based on available compute + resources on a VM and task requirements. + require_hosts_file (bool): + When true, Batch will populate a file with a list of all VMs + assigned to the TaskGroup and set the BATCH_HOSTS_FILE + environment variable to the path of that file. Defaults to + false. + permissive_ssh (bool): + When true, Batch will configure SSH to allow + passwordless login between VMs running the Batch + tasks in the same TaskGroup. + """ + class SchedulingPolicy(proto.Enum): + r"""How Tasks in the TaskGroup should be scheduled relative to + each other. + + Values: + SCHEDULING_POLICY_UNSPECIFIED (0): + Unspecified. + AS_SOON_AS_POSSIBLE (1): + Run Tasks as soon as resources are available. + + Tasks might be executed in parallel depending on parallelism + and task_count values. + IN_ORDER (2): + Run Tasks sequentially with increased task + index. + """ + SCHEDULING_POLICY_UNSPECIFIED = 0 + AS_SOON_AS_POSSIBLE = 1 + IN_ORDER = 2 + + name: str = proto.Field( + proto.STRING, + number=1, + ) + task_spec: 'TaskSpec' = proto.Field( + proto.MESSAGE, + number=3, + message='TaskSpec', + ) + task_count: int = proto.Field( + proto.INT64, + number=4, + ) + parallelism: int = proto.Field( + proto.INT64, + number=5, + ) + scheduling_policy: SchedulingPolicy = proto.Field( + proto.ENUM, + number=6, + enum=SchedulingPolicy, + ) + task_environments: MutableSequence['Environment'] = proto.RepeatedField( + proto.MESSAGE, + number=9, + message='Environment', + ) + task_count_per_node: int = proto.Field( + proto.INT64, + number=10, + ) + require_hosts_file: bool = proto.Field( + proto.BOOL, + number=11, + ) + permissive_ssh: bool = proto.Field( + proto.BOOL, + number=12, + ) + + +class ServiceAccount(proto.Message): + r"""Carries information about a Google Cloud service account. + + Attributes: + email (str): + Email address of the service account. If not + specified, the default Compute Engine service + account for the project will be used. If + instance template is being used, the service + account has to be specified in the instance + template and it has to match the email field + here. + scopes (MutableSequence[str]): + List of scopes to be enabled for this service + account on the VM, in addition to the + cloud-platform API scope that will be added by + default. + """ + + email: str = proto.Field( + proto.STRING, + number=1, + ) + scopes: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + + +class JobEventData(proto.Message): + r"""The data within all Job events. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + payload (google.events.cloud.batch_v1.types.Job): + Optional. The Job event payload. Unset for + deletion events. + + This field is a member of `oneof`_ ``_payload``. + """ + + payload: 'Job' = proto.Field( + proto.MESSAGE, + number=1, + optional=True, + message='Job', + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/src/google/events/cloud/networkservices/__init__.py b/src/google/events/cloud/networkservices/__init__.py new file mode 100644 index 00000000..b0a34b90 --- /dev/null +++ b/src/google/events/cloud/networkservices/__init__.py @@ -0,0 +1,59 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from google.events.cloud.networkservices import gapic_version as package_version + +__version__ = package_version.__version__ + + + +from google.events.cloud.networkservices_v1.types.data import EndpointMatcher +from google.events.cloud.networkservices_v1.types.data import EndpointPolicy +from google.events.cloud.networkservices_v1.types.data import EndpointPolicyEventData +from google.events.cloud.networkservices_v1.types.data import Gateway +from google.events.cloud.networkservices_v1.types.data import GatewayEventData +from google.events.cloud.networkservices_v1.types.data import GrpcRoute +from google.events.cloud.networkservices_v1.types.data import GrpcRouteEventData +from google.events.cloud.networkservices_v1.types.data import HttpRoute +from google.events.cloud.networkservices_v1.types.data import HttpRouteEventData +from google.events.cloud.networkservices_v1.types.data import Mesh +from google.events.cloud.networkservices_v1.types.data import MeshEventData +from google.events.cloud.networkservices_v1.types.data import ServiceBinding +from google.events.cloud.networkservices_v1.types.data import ServiceBindingEventData +from google.events.cloud.networkservices_v1.types.data import TcpRoute +from google.events.cloud.networkservices_v1.types.data import TcpRouteEventData +from google.events.cloud.networkservices_v1.types.data import TlsRoute +from google.events.cloud.networkservices_v1.types.data import TlsRouteEventData +from google.events.cloud.networkservices_v1.types.data import TrafficPortSelector + +__all__ = ('EndpointMatcher', + 'EndpointPolicy', + 'EndpointPolicyEventData', + 'Gateway', + 'GatewayEventData', + 'GrpcRoute', + 'GrpcRouteEventData', + 'HttpRoute', + 'HttpRouteEventData', + 'Mesh', + 'MeshEventData', + 'ServiceBinding', + 'ServiceBindingEventData', + 'TcpRoute', + 'TcpRouteEventData', + 'TlsRoute', + 'TlsRouteEventData', + 'TrafficPortSelector', +) diff --git a/src/google/events/cloud/networkservices/gapic_version.py b/src/google/events/cloud/networkservices/gapic_version.py new file mode 100644 index 00000000..360a0d13 --- /dev/null +++ b/src/google/events/cloud/networkservices/gapic_version.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +__version__ = "0.0.0" # {x-release-please-version} diff --git a/src/google/events/cloud/networkservices/py.typed b/src/google/events/cloud/networkservices/py.typed new file mode 100644 index 00000000..16fbb17d --- /dev/null +++ b/src/google/events/cloud/networkservices/py.typed @@ -0,0 +1,2 @@ +# Marker file for PEP 561. +# The google-events-cloud-networkservices package uses inline types. diff --git a/src/google/events/cloud/networkservices_v1/__init__.py b/src/google/events/cloud/networkservices_v1/__init__.py new file mode 100644 index 00000000..5c1e5381 --- /dev/null +++ b/src/google/events/cloud/networkservices_v1/__init__.py @@ -0,0 +1,60 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from google.events.cloud.networkservices_v1 import gapic_version as package_version + +__version__ = package_version.__version__ + + + +from .types.data import EndpointMatcher +from .types.data import EndpointPolicy +from .types.data import EndpointPolicyEventData +from .types.data import Gateway +from .types.data import GatewayEventData +from .types.data import GrpcRoute +from .types.data import GrpcRouteEventData +from .types.data import HttpRoute +from .types.data import HttpRouteEventData +from .types.data import Mesh +from .types.data import MeshEventData +from .types.data import ServiceBinding +from .types.data import ServiceBindingEventData +from .types.data import TcpRoute +from .types.data import TcpRouteEventData +from .types.data import TlsRoute +from .types.data import TlsRouteEventData +from .types.data import TrafficPortSelector + +__all__ = ( +'EndpointMatcher', +'EndpointPolicy', +'EndpointPolicyEventData', +'Gateway', +'GatewayEventData', +'GrpcRoute', +'GrpcRouteEventData', +'HttpRoute', +'HttpRouteEventData', +'Mesh', +'MeshEventData', +'ServiceBinding', +'ServiceBindingEventData', +'TcpRoute', +'TcpRouteEventData', +'TlsRoute', +'TlsRouteEventData', +'TrafficPortSelector', +) diff --git a/src/google/events/cloud/networkservices_v1/gapic_version.py b/src/google/events/cloud/networkservices_v1/gapic_version.py new file mode 100644 index 00000000..360a0d13 --- /dev/null +++ b/src/google/events/cloud/networkservices_v1/gapic_version.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +__version__ = "0.0.0" # {x-release-please-version} diff --git a/src/google/events/cloud/networkservices_v1/py.typed b/src/google/events/cloud/networkservices_v1/py.typed new file mode 100644 index 00000000..16fbb17d --- /dev/null +++ b/src/google/events/cloud/networkservices_v1/py.typed @@ -0,0 +1,2 @@ +# Marker file for PEP 561. +# The google-events-cloud-networkservices package uses inline types. diff --git a/src/google/events/cloud/networkservices_v1/services/__init__.py b/src/google/events/cloud/networkservices_v1/services/__init__.py new file mode 100644 index 00000000..89a37dc9 --- /dev/null +++ b/src/google/events/cloud/networkservices_v1/services/__init__.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/src/google/events/cloud/networkservices_v1/types/__init__.py b/src/google/events/cloud/networkservices_v1/types/__init__.py new file mode 100644 index 00000000..35ca4b52 --- /dev/null +++ b/src/google/events/cloud/networkservices_v1/types/__init__.py @@ -0,0 +1,56 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from .data import ( + EndpointMatcher, + EndpointPolicy, + EndpointPolicyEventData, + Gateway, + GatewayEventData, + GrpcRoute, + GrpcRouteEventData, + HttpRoute, + HttpRouteEventData, + Mesh, + MeshEventData, + ServiceBinding, + ServiceBindingEventData, + TcpRoute, + TcpRouteEventData, + TlsRoute, + TlsRouteEventData, + TrafficPortSelector, +) + +__all__ = ( + 'EndpointMatcher', + 'EndpointPolicy', + 'EndpointPolicyEventData', + 'Gateway', + 'GatewayEventData', + 'GrpcRoute', + 'GrpcRouteEventData', + 'HttpRoute', + 'HttpRouteEventData', + 'Mesh', + 'MeshEventData', + 'ServiceBinding', + 'ServiceBindingEventData', + 'TcpRoute', + 'TcpRouteEventData', + 'TlsRoute', + 'TlsRouteEventData', + 'TrafficPortSelector', +) diff --git a/src/google/events/cloud/networkservices_v1/types/data.py b/src/google/events/cloud/networkservices_v1/types/data.py new file mode 100644 index 00000000..cfee3d9a --- /dev/null +++ b/src/google/events/cloud/networkservices_v1/types/data.py @@ -0,0 +1,2647 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.protobuf import duration_pb2 # type: ignore +from google.protobuf import timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package='google.events.cloud.networkservices.v1', + manifest={ + 'TrafficPortSelector', + 'EndpointMatcher', + 'EndpointPolicy', + 'Gateway', + 'GrpcRoute', + 'HttpRoute', + 'Mesh', + 'ServiceBinding', + 'TcpRoute', + 'TlsRoute', + 'EndpointPolicyEventData', + 'HttpRouteEventData', + 'ServiceBindingEventData', + 'GatewayEventData', + 'TlsRouteEventData', + 'GrpcRouteEventData', + 'MeshEventData', + 'TcpRouteEventData', + }, +) + + +class TrafficPortSelector(proto.Message): + r"""Specification of a port-based selector. + + Attributes: + ports (MutableSequence[str]): + Optional. A list of ports. Can be port numbers or port range + (example, [80-90] specifies all ports from 80 to 90, + including 80 and 90) or named ports or \* to specify all + ports. If the list is empty, all ports are selected. + """ + + ports: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + + +class EndpointMatcher(proto.Message): + r"""A definition of a matcher that selects endpoints to which the + policies should be applied. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + metadata_label_matcher (google.events.cloud.networkservices_v1.types.EndpointMatcher.MetadataLabelMatcher): + The matcher is based on node metadata + presented by xDS clients. + + This field is a member of `oneof`_ ``matcher_type``. + """ + + class MetadataLabelMatcher(proto.Message): + r"""The matcher that is based on node metadata presented by xDS + clients. + + Attributes: + metadata_label_match_criteria (google.events.cloud.networkservices_v1.types.EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria): + Specifies how matching should be done. + + Supported values are: MATCH_ANY: At least one of the Labels + specified in the matcher should match the metadata presented + by xDS client. MATCH_ALL: The metadata presented by the xDS + client should contain all of the labels specified here. + + The selection is determined based on the best match. For + example, suppose there are three EndpointPolicy resources + P1, P2 and P3 and if P1 has a the matcher as MATCH_ANY , P2 has MATCH_ALL , and P3 has MATCH_ALL + . + + If a client with label connects, the config from P1 + will be selected. + + If a client with label connects, the config from + P2 will be selected. + + If a client with label connects, the config + from P3 will be selected. + + If there is more than one best match, (for example, if a + config P4 with selector exists and if a client + with label connects), an error will be thrown. + metadata_labels (MutableSequence[google.events.cloud.networkservices_v1.types.EndpointMatcher.MetadataLabelMatcher.MetadataLabels]): + The list of label value pairs that must match labels in the + provided metadata based on filterMatchCriteria This list can + have at most 64 entries. The list can be empty if the match + criteria is MATCH_ANY, to specify a wildcard match (i.e this + matches any client). + """ + class MetadataLabelMatchCriteria(proto.Enum): + r"""Possible criteria values that define logic of how matching is + made. + + Values: + METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED (0): + Default value. Should not be used. + MATCH_ANY (1): + At least one of the Labels specified in the + matcher should match the metadata presented by + xDS client. + MATCH_ALL (2): + The metadata presented by the xDS client + should contain all of the labels specified here. + """ + METADATA_LABEL_MATCH_CRITERIA_UNSPECIFIED = 0 + MATCH_ANY = 1 + MATCH_ALL = 2 + + class MetadataLabels(proto.Message): + r"""Defines a name-pair value for a single label. + + Attributes: + label_name (str): + Required. Label name presented as key in xDS + Node Metadata. + label_value (str): + Required. Label value presented as value + corresponding to the above key, in xDS Node + Metadata. + """ + + label_name: str = proto.Field( + proto.STRING, + number=1, + ) + label_value: str = proto.Field( + proto.STRING, + number=2, + ) + + metadata_label_match_criteria: 'EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria' = proto.Field( + proto.ENUM, + number=1, + enum='EndpointMatcher.MetadataLabelMatcher.MetadataLabelMatchCriteria', + ) + metadata_labels: MutableSequence['EndpointMatcher.MetadataLabelMatcher.MetadataLabels'] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message='EndpointMatcher.MetadataLabelMatcher.MetadataLabels', + ) + + metadata_label_matcher: MetadataLabelMatcher = proto.Field( + proto.MESSAGE, + number=1, + oneof='matcher_type', + message=MetadataLabelMatcher, + ) + + +class EndpointPolicy(proto.Message): + r"""EndpointPolicy is a resource that helps apply desired + configuration on the endpoints that match specific criteria. For + example, this resource can be used to apply "authentication + config" an all endpoints that serve on port 8080. + + Attributes: + name (str): + Required. Name of the EndpointPolicy resource. It matches + pattern + ``projects/{project}/locations/global/endpointPolicies/{endpoint_policy}``. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The timestamp when the resource + was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The timestamp when the resource + was updated. + labels (MutableMapping[str, str]): + Optional. Set of label tags associated with + the EndpointPolicy resource. + type_ (google.events.cloud.networkservices_v1.types.EndpointPolicy.EndpointPolicyType): + Required. The type of endpoint policy. This + is primarily used to validate the configuration. + authorization_policy (str): + Optional. This field specifies the URL of + AuthorizationPolicy resource that applies + authorization policies to the inbound traffic at + the matched endpoints. Refer to Authorization. + If this field is not specified, authorization is + disabled(no authz checks) for this endpoint. + endpoint_matcher (google.events.cloud.networkservices_v1.types.EndpointMatcher): + Required. A matcher that selects endpoints to + which the policies should be applied. + traffic_port_selector (google.events.cloud.networkservices_v1.types.TrafficPortSelector): + Optional. Port selector for the (matched) + endpoints. If no port selector is provided, the + matched config is applied to all ports. + description (str): + Optional. A free-text description of the + resource. Max length 1024 characters. + server_tls_policy (str): + Optional. A URL referring to ServerTlsPolicy + resource. ServerTlsPolicy is used to determine + the authentication policy to be applied to + terminate the inbound traffic at the identified + backends. If this field is not set, + authentication is disabled(open) for this + endpoint. + client_tls_policy (str): + Optional. A URL referring to a ClientTlsPolicy resource. + ClientTlsPolicy can be set to specify the authentication for + traffic from the proxy to the actual endpoints. More + specifically, it is applied to the outgoing traffic from the + proxy to the endpoint. This is typically used for sidecar + model where the proxy identifies itself as endpoint to the + control plane, with the connection between sidecar and + endpoint requiring authentication. If this field is not set, + authentication is disabled(open). Applicable only when + EndpointPolicyType is SIDECAR_PROXY. + """ + class EndpointPolicyType(proto.Enum): + r"""The type of endpoint policy. + + Values: + ENDPOINT_POLICY_TYPE_UNSPECIFIED (0): + Default value. Must not be used. + SIDECAR_PROXY (1): + Represents a proxy deployed as a sidecar. + GRPC_SERVER (2): + Represents a proxyless gRPC backend. + """ + ENDPOINT_POLICY_TYPE_UNSPECIFIED = 0 + SIDECAR_PROXY = 1 + GRPC_SERVER = 2 + + name: str = proto.Field( + proto.STRING, + number=1, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=4, + ) + type_: EndpointPolicyType = proto.Field( + proto.ENUM, + number=5, + enum=EndpointPolicyType, + ) + authorization_policy: str = proto.Field( + proto.STRING, + number=7, + ) + endpoint_matcher: 'EndpointMatcher' = proto.Field( + proto.MESSAGE, + number=9, + message='EndpointMatcher', + ) + traffic_port_selector: 'TrafficPortSelector' = proto.Field( + proto.MESSAGE, + number=10, + message='TrafficPortSelector', + ) + description: str = proto.Field( + proto.STRING, + number=11, + ) + server_tls_policy: str = proto.Field( + proto.STRING, + number=12, + ) + client_tls_policy: str = proto.Field( + proto.STRING, + number=13, + ) + + +class Gateway(proto.Message): + r"""Gateway represents the configuration for a proxy, typically a + load balancer. It captures the ip:port over which the services + are exposed by the proxy, along with any policy configurations. + Routes have reference to to Gateways to dictate how requests + should be routed by this Gateway. + + Attributes: + name (str): + Required. Name of the Gateway resource. It matches pattern + ``projects/*/locations/*/gateways/``. + self_link (str): + Output only. Server-defined URL of this + resource + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The timestamp when the resource + was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The timestamp when the resource + was updated. + labels (MutableMapping[str, str]): + Optional. Set of label tags associated with + the Gateway resource. + description (str): + Optional. A free-text description of the + resource. Max length 1024 characters. + type_ (google.events.cloud.networkservices_v1.types.Gateway.Type): + Immutable. The type of the customer managed + gateway. This field is required. If unspecified, + an error is returned. + addresses (MutableSequence[str]): + Optional. Zero or one IPv4 or IPv6 address on which the + Gateway will receive the traffic. When no address is + provided, an IP from the subnetwork is allocated + + This field only applies to gateways of type + 'SECURE_WEB_GATEWAY'. Gateways of type 'OPEN_MESH' listen on + 0.0.0.0 for IPv4 and :: for IPv6. + ports (MutableSequence[int]): + Required. One or more port numbers (1-65535), on which the + Gateway will receive traffic. The proxy binds to the + specified ports. Gateways of type 'SECURE_WEB_GATEWAY' are + limited to 1 port. Gateways of type 'OPEN_MESH' listen on + 0.0.0.0 for IPv4 and :: for IPv6 and support multiple ports. + scope (str): + Optional. Scope determines how configuration + across multiple Gateway instances are merged. + The configuration for multiple Gateway instances + with the same scope will be merged as presented + as a single coniguration to the proxy/load + balancer. + + Max length 64 characters. + Scope should start with a letter and can only + have letters, numbers, hyphens. + server_tls_policy (str): + Optional. A fully-qualified ServerTLSPolicy + URL reference. Specifies how TLS traffic is + terminated. If empty, TLS termination is + disabled. + certificate_urls (MutableSequence[str]): + Optional. A fully-qualified Certificates URL reference. The + proxy presents a Certificate (selected based on SNI) when + establishing a TLS connection. This feature only applies to + gateways of type 'SECURE_WEB_GATEWAY'. + gateway_security_policy (str): + Optional. A fully-qualified GatewaySecurityPolicy URL + reference. Defines how a server should apply security policy + to inbound (VM to Proxy) initiated connections. + + For example: + ``projects/*/locations/*/gatewaySecurityPolicies/swg-policy``. + + This policy is specific to gateways of type + 'SECURE_WEB_GATEWAY'. + network (str): + Optional. The relative resource name identifying the VPC + network that is using this configuration. For example: + ``projects/*/global/networks/network-1``. + + Currently, this field is specific to gateways of type + 'SECURE_WEB_GATEWAY'. + subnetwork (str): + Optional. The relative resource name identifying the + subnetwork in which this SWG is allocated. For example: + ``projects/*/regions/us-central1/subnetworks/network-1`` + + Currently, this field is specific to gateways of type + 'SECURE_WEB_GATEWAY". + """ + class Type(proto.Enum): + r"""The type of the customer-managed gateway. Possible values are: + + - OPEN_MESH + - SECURE_WEB_GATEWAY + + Values: + TYPE_UNSPECIFIED (0): + The type of the customer managed gateway is + unspecified. + OPEN_MESH (1): + The type of the customer managed gateway is + TrafficDirector Open Mesh. + SECURE_WEB_GATEWAY (2): + The type of the customer managed gateway is + SecureWebGateway (SWG). + """ + TYPE_UNSPECIFIED = 0 + OPEN_MESH = 1 + SECURE_WEB_GATEWAY = 2 + + name: str = proto.Field( + proto.STRING, + number=1, + ) + self_link: str = proto.Field( + proto.STRING, + number=13, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=4, + ) + description: str = proto.Field( + proto.STRING, + number=5, + ) + type_: Type = proto.Field( + proto.ENUM, + number=6, + enum=Type, + ) + addresses: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=7, + ) + ports: MutableSequence[int] = proto.RepeatedField( + proto.INT32, + number=11, + ) + scope: str = proto.Field( + proto.STRING, + number=8, + ) + server_tls_policy: str = proto.Field( + proto.STRING, + number=9, + ) + certificate_urls: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=14, + ) + gateway_security_policy: str = proto.Field( + proto.STRING, + number=18, + ) + network: str = proto.Field( + proto.STRING, + number=16, + ) + subnetwork: str = proto.Field( + proto.STRING, + number=17, + ) + + +class GrpcRoute(proto.Message): + r"""GrpcRoute is the resource defining how gRPC traffic routed by + a Mesh or Gateway resource is routed. + + Attributes: + name (str): + Required. Name of the GrpcRoute resource. It matches pattern + ``projects/*/locations/global/grpcRoutes/`` + self_link (str): + Output only. Server-defined URL of this + resource + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The timestamp when the resource + was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The timestamp when the resource + was updated. + labels (MutableMapping[str, str]): + Optional. Set of label tags associated with + the GrpcRoute resource. + description (str): + Optional. A free-text description of the + resource. Max length 1024 characters. + hostnames (MutableSequence[str]): + Required. Service hostnames with an optional port for which + this route describes traffic. + + Format: [:] + + Hostname is the fully qualified domain name of a network + host. This matches the RFC 1123 definition of a hostname + with 2 notable exceptions: + + - IPs are not allowed. + - A hostname may be prefixed with a wildcard label + (``*.``). The wildcard label must appear by itself as the + first label. + + Hostname can be "precise" which is a domain name without the + terminating dot of a network host (e.g. ``foo.example.com``) + or "wildcard", which is a domain name prefixed with a single + wildcard label (e.g. ``*.example.com``). + + Note that as per RFC1035 and RFC1123, a label must consist + of lower case alphanumeric characters or '-', and must start + and end with an alphanumeric character. No other punctuation + is allowed. + + The routes associated with a Mesh or Gateway must have + unique hostnames. If you attempt to attach multiple routes + with conflicting hostnames, the configuration will be + rejected. + + For example, while it is acceptable for routes for the + hostnames ``*.foo.bar.com`` and ``*.bar.com`` to be + associated with the same route, it is not possible to + associate two routes both with ``*.bar.com`` or both with + ``bar.com``. + + If a port is specified, then gRPC clients must use the + channel URI with the port to match this rule (i.e. + "xds:///service:123"), otherwise they must supply the URI + without a port (i.e. "xds:///service"). + meshes (MutableSequence[str]): + Optional. Meshes defines a list of meshes this GrpcRoute is + attached to, as one of the routing rules to route the + requests served by the mesh. + + Each mesh reference should match the pattern: + ``projects/*/locations/global/meshes/`` + gateways (MutableSequence[str]): + Optional. Gateways defines a list of gateways this GrpcRoute + is attached to, as one of the routing rules to route the + requests served by the gateway. + + Each gateway reference should match the pattern: + ``projects/*/locations/global/gateways/`` + rules (MutableSequence[google.events.cloud.networkservices_v1.types.GrpcRoute.RouteRule]): + Required. A list of detailed rules defining + how to route traffic. + Within a single GrpcRoute, the + GrpcRoute.RouteAction associated with the first + matching GrpcRoute.RouteRule will be executed. + At least one rule must be supplied. + """ + + class MethodMatch(proto.Message): + r"""Specifies a match against a method. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + type_ (google.events.cloud.networkservices_v1.types.GrpcRoute.MethodMatch.Type): + Optional. Specifies how to match against the + name. If not specified, a default value of + "EXACT" is used. + grpc_service (str): + Required. Name of the service to match + against. If unspecified, will match all + services. + grpc_method (str): + Required. Name of the method to match + against. If unspecified, will match all methods. + case_sensitive (bool): + Optional. Specifies that matches are case sensitive. The + default value is true. case_sensitive must not be used with + a type of REGULAR_EXPRESSION. + + This field is a member of `oneof`_ ``_case_sensitive``. + """ + class Type(proto.Enum): + r"""The type of the match. + + Values: + TYPE_UNSPECIFIED (0): + Unspecified. + EXACT (1): + Will only match the exact name provided. + REGULAR_EXPRESSION (2): + Will interpret grpc_method and grpc_service as regexes. RE2 + syntax is supported. + """ + TYPE_UNSPECIFIED = 0 + EXACT = 1 + REGULAR_EXPRESSION = 2 + + type_: 'GrpcRoute.MethodMatch.Type' = proto.Field( + proto.ENUM, + number=1, + enum='GrpcRoute.MethodMatch.Type', + ) + grpc_service: str = proto.Field( + proto.STRING, + number=2, + ) + grpc_method: str = proto.Field( + proto.STRING, + number=3, + ) + case_sensitive: bool = proto.Field( + proto.BOOL, + number=4, + optional=True, + ) + + class HeaderMatch(proto.Message): + r"""A match against a collection of headers. + + Attributes: + type_ (google.events.cloud.networkservices_v1.types.GrpcRoute.HeaderMatch.Type): + Optional. Specifies how to match against the + value of the header. If not specified, a default + value of EXACT is used. + key (str): + Required. The key of the header. + value (str): + Required. The value of the header. + """ + class Type(proto.Enum): + r"""The type of match. + + Values: + TYPE_UNSPECIFIED (0): + Unspecified. + EXACT (1): + Will only match the exact value provided. + REGULAR_EXPRESSION (2): + Will match paths conforming to the prefix + specified by value. RE2 syntax is supported. + """ + TYPE_UNSPECIFIED = 0 + EXACT = 1 + REGULAR_EXPRESSION = 2 + + type_: 'GrpcRoute.HeaderMatch.Type' = proto.Field( + proto.ENUM, + number=1, + enum='GrpcRoute.HeaderMatch.Type', + ) + key: str = proto.Field( + proto.STRING, + number=2, + ) + value: str = proto.Field( + proto.STRING, + number=3, + ) + + class RouteMatch(proto.Message): + r"""Criteria for matching traffic. A RouteMatch will be + considered to match when all supplied fields match. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + method (google.events.cloud.networkservices_v1.types.GrpcRoute.MethodMatch): + Optional. A gRPC method to match against. If + this field is empty or omitted, will match all + methods. + + This field is a member of `oneof`_ ``_method``. + headers (MutableSequence[google.events.cloud.networkservices_v1.types.GrpcRoute.HeaderMatch]): + Optional. Specifies a collection of headers + to match. + """ + + method: 'GrpcRoute.MethodMatch' = proto.Field( + proto.MESSAGE, + number=1, + optional=True, + message='GrpcRoute.MethodMatch', + ) + headers: MutableSequence['GrpcRoute.HeaderMatch'] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message='GrpcRoute.HeaderMatch', + ) + + class Destination(proto.Message): + r"""The destination to which traffic will be routed. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + service_name (str): + Required. The URL of a destination service to + which to route traffic. Must refer to either a + BackendService or ServiceDirectoryService. + + This field is a member of `oneof`_ ``destination_type``. + weight (int): + Optional. Specifies the proportion of + requests forwarded to the backend referenced by + the serviceName field. This is computed as: + + weight/Sum(weights in this destination + list). For non-zero values, there may be some + epsilon from the exact proportion defined here + depending on the precision an implementation + supports. + + If only one serviceName is specified and it has + a weight greater than 0, 100% of the traffic is + forwarded to that backend. + + If weights are specified for any one service + name, they need to be specified for all of them. + + If weights are unspecified for all services, + then, traffic is distributed in equal + proportions to all of them. + + This field is a member of `oneof`_ ``_weight``. + """ + + service_name: str = proto.Field( + proto.STRING, + number=1, + oneof='destination_type', + ) + weight: int = proto.Field( + proto.INT32, + number=2, + optional=True, + ) + + class FaultInjectionPolicy(proto.Message): + r"""The specification for fault injection introduced into traffic + to test the resiliency of clients to destination service + failure. As part of fault injection, when clients send requests + to a destination, delays can be introduced on a percentage of + requests before sending those requests to the destination + service. Similarly requests from clients can be aborted by for a + percentage of requests. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + delay (google.events.cloud.networkservices_v1.types.GrpcRoute.FaultInjectionPolicy.Delay): + The specification for injecting delay to + client requests. + + This field is a member of `oneof`_ ``_delay``. + abort (google.events.cloud.networkservices_v1.types.GrpcRoute.FaultInjectionPolicy.Abort): + The specification for aborting to client + requests. + + This field is a member of `oneof`_ ``_abort``. + """ + + class Delay(proto.Message): + r"""Specification of how client requests are delayed as part of + fault injection before being sent to a destination. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + fixed_delay (google.protobuf.duration_pb2.Duration): + Specify a fixed delay before forwarding the + request. + + This field is a member of `oneof`_ ``_fixed_delay``. + percentage (int): + The percentage of traffic on which delay will be injected. + + The value must be between [0, 100] + + This field is a member of `oneof`_ ``_percentage``. + """ + + fixed_delay: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=1, + optional=True, + message=duration_pb2.Duration, + ) + percentage: int = proto.Field( + proto.INT32, + number=2, + optional=True, + ) + + class Abort(proto.Message): + r"""Specification of how client requests are aborted as part of + fault injection before being sent to a destination. + + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + http_status (int): + The HTTP status code used to abort the + request. + The value must be between 200 and 599 inclusive. + + This field is a member of `oneof`_ ``_http_status``. + percentage (int): + The percentage of traffic which will be aborted. + + The value must be between [0, 100] + + This field is a member of `oneof`_ ``_percentage``. + """ + + http_status: int = proto.Field( + proto.INT32, + number=1, + optional=True, + ) + percentage: int = proto.Field( + proto.INT32, + number=2, + optional=True, + ) + + delay: 'GrpcRoute.FaultInjectionPolicy.Delay' = proto.Field( + proto.MESSAGE, + number=1, + optional=True, + message='GrpcRoute.FaultInjectionPolicy.Delay', + ) + abort: 'GrpcRoute.FaultInjectionPolicy.Abort' = proto.Field( + proto.MESSAGE, + number=2, + optional=True, + message='GrpcRoute.FaultInjectionPolicy.Abort', + ) + + class RetryPolicy(proto.Message): + r"""The specifications for retries. + + Attributes: + retry_conditions (MutableSequence[str]): + - connect-failure: Router will retry on failures connecting + to Backend Services, for example due to connection + timeouts. + - refused-stream: Router will retry if the backend service + resets the stream with a REFUSED_STREAM error code. This + reset type indicates that it is safe to retry. + - cancelled: Router will retry if the gRPC status code in + the response header is set to cancelled + - deadline-exceeded: Router will retry if the gRPC status + code in the response header is set to deadline-exceeded + - resource-exhausted: Router will retry if the gRPC status + code in the response header is set to resource-exhausted + - unavailable: Router will retry if the gRPC status code in + the response header is set to unavailable + num_retries (int): + Specifies the allowed number of retries. This + number must be > 0. If not specified, default to + 1. + """ + + retry_conditions: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + num_retries: int = proto.Field( + proto.UINT32, + number=2, + ) + + class RouteAction(proto.Message): + r"""Specifies how to route matched traffic. + + Attributes: + destinations (MutableSequence[google.events.cloud.networkservices_v1.types.GrpcRoute.Destination]): + Optional. The destination services to which + traffic should be forwarded. If multiple + destinations are specified, traffic will be + split between Backend Service(s) according to + the weight field of these destinations. + fault_injection_policy (google.events.cloud.networkservices_v1.types.GrpcRoute.FaultInjectionPolicy): + Optional. The specification for fault injection introduced + into traffic to test the resiliency of clients to + destination service failure. As part of fault injection, + when clients send requests to a destination, delays can be + introduced on a percentage of requests before sending those + requests to the destination service. Similarly requests from + clients can be aborted by for a percentage of requests. + + timeout and retry_policy will be ignored by clients that are + configured with a fault_injection_policy + timeout (google.protobuf.duration_pb2.Duration): + Optional. Specifies the timeout for selected + route. Timeout is computed from the time the + request has been fully processed (i.e. end of + stream) up until the response has been + completely processed. Timeout includes all + retries. + retry_policy (google.events.cloud.networkservices_v1.types.GrpcRoute.RetryPolicy): + Optional. Specifies the retry policy + associated with this route. + """ + + destinations: MutableSequence['GrpcRoute.Destination'] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message='GrpcRoute.Destination', + ) + fault_injection_policy: 'GrpcRoute.FaultInjectionPolicy' = proto.Field( + proto.MESSAGE, + number=3, + message='GrpcRoute.FaultInjectionPolicy', + ) + timeout: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=7, + message=duration_pb2.Duration, + ) + retry_policy: 'GrpcRoute.RetryPolicy' = proto.Field( + proto.MESSAGE, + number=8, + message='GrpcRoute.RetryPolicy', + ) + + class RouteRule(proto.Message): + r"""Describes how to route traffic. + + Attributes: + matches (MutableSequence[google.events.cloud.networkservices_v1.types.GrpcRoute.RouteMatch]): + Optional. Matches define conditions used for + matching the rule against incoming gRPC + requests. Each match is independent, i.e. this + rule will be matched if ANY one of the matches + is satisfied. If no matches field is specified, + this rule will unconditionally match traffic. + action (google.events.cloud.networkservices_v1.types.GrpcRoute.RouteAction): + Required. A detailed rule defining how to + route traffic. This field is required. + """ + + matches: MutableSequence['GrpcRoute.RouteMatch'] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message='GrpcRoute.RouteMatch', + ) + action: 'GrpcRoute.RouteAction' = proto.Field( + proto.MESSAGE, + number=2, + message='GrpcRoute.RouteAction', + ) + + name: str = proto.Field( + proto.STRING, + number=1, + ) + self_link: str = proto.Field( + proto.STRING, + number=12, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=4, + ) + description: str = proto.Field( + proto.STRING, + number=5, + ) + hostnames: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=6, + ) + meshes: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=9, + ) + gateways: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=10, + ) + rules: MutableSequence[RouteRule] = proto.RepeatedField( + proto.MESSAGE, + number=7, + message=RouteRule, + ) + + +class HttpRoute(proto.Message): + r"""HttpRoute is the resource defining how HTTP traffic should be + routed by a Mesh or Gateway resource. + + Attributes: + name (str): + Required. Name of the HttpRoute resource. It matches pattern + ``projects/*/locations/global/httpRoutes/http_route_name>``. + self_link (str): + Output only. Server-defined URL of this + resource + description (str): + Optional. A free-text description of the + resource. Max length 1024 characters. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The timestamp when the resource + was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The timestamp when the resource + was updated. + hostnames (MutableSequence[str]): + Required. Hostnames define a set of hosts that should match + against the HTTP host header to select a HttpRoute to + process the request. Hostname is the fully qualified domain + name of a network host, as defined by RFC 1123 with the + exception that: + + - IPs are not allowed. + - A hostname may be prefixed with a wildcard label + (``*.``). The wildcard label must appear by itself as the + first label. + + Hostname can be "precise" which is a domain name without the + terminating dot of a network host (e.g. ``foo.example.com``) + or "wildcard", which is a domain name prefixed with a single + wildcard label (e.g. ``*.example.com``). + + Note that as per RFC1035 and RFC1123, a label must consist + of lower case alphanumeric characters or '-', and must start + and end with an alphanumeric character. No other punctuation + is allowed. + + The routes associated with a Mesh or Gateways must have + unique hostnames. If you attempt to attach multiple routes + with conflicting hostnames, the configuration will be + rejected. + + For example, while it is acceptable for routes for the + hostnames ``*.foo.bar.com`` and ``*.bar.com`` to be + associated with the same Mesh (or Gateways under the same + scope), it is not possible to associate two routes both with + ``*.bar.com`` or both with ``bar.com``. + meshes (MutableSequence[str]): + Optional. Meshes defines a list of meshes this HttpRoute is + attached to, as one of the routing rules to route the + requests served by the mesh. + + Each mesh reference should match the pattern: + ``projects/*/locations/global/meshes/`` + + The attached Mesh should be of a type SIDECAR + gateways (MutableSequence[str]): + Optional. Gateways defines a list of gateways this HttpRoute + is attached to, as one of the routing rules to route the + requests served by the gateway. + + Each gateway reference should match the pattern: + ``projects/*/locations/global/gateways/`` + labels (MutableMapping[str, str]): + Optional. Set of label tags associated with + the HttpRoute resource. + rules (MutableSequence[google.events.cloud.networkservices_v1.types.HttpRoute.RouteRule]): + Required. Rules that define how traffic is + routed and handled. Rules will be matched + sequentially based on the RouteMatch specified + for the rule. + """ + + class HeaderMatch(proto.Message): + r"""Specifies how to select a route rule based on HTTP request + headers. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + exact_match (str): + The value of the header should match exactly the content of + exact_match. + + This field is a member of `oneof`_ ``MatchType``. + regex_match (str): + The value of the header must match the regular expression + specified in regex_match. For regular expression grammar, + please see: https://github.com/google/re2/wiki/Syntax + + This field is a member of `oneof`_ ``MatchType``. + prefix_match (str): + The value of the header must start with the contents of + prefix_match. + + This field is a member of `oneof`_ ``MatchType``. + present_match (bool): + A header with header_name must exist. The match takes place + whether or not the header has a value. + + This field is a member of `oneof`_ ``MatchType``. + suffix_match (str): + The value of the header must end with the contents of + suffix_match. + + This field is a member of `oneof`_ ``MatchType``. + range_match (google.events.cloud.networkservices_v1.types.HttpRoute.HeaderMatch.IntegerRange): + If specified, the rule will match if the + request header value is within the range. + + This field is a member of `oneof`_ ``MatchType``. + header (str): + The name of the HTTP header to match against. + invert_match (bool): + If specified, the match result will be + inverted before checking. Default value is set + to false. + """ + + class IntegerRange(proto.Message): + r"""Represents an integer value range. + + Attributes: + start (int): + Start of the range (inclusive) + end (int): + End of the range (exclusive) + """ + + start: int = proto.Field( + proto.INT32, + number=1, + ) + end: int = proto.Field( + proto.INT32, + number=2, + ) + + exact_match: str = proto.Field( + proto.STRING, + number=2, + oneof='MatchType', + ) + regex_match: str = proto.Field( + proto.STRING, + number=3, + oneof='MatchType', + ) + prefix_match: str = proto.Field( + proto.STRING, + number=4, + oneof='MatchType', + ) + present_match: bool = proto.Field( + proto.BOOL, + number=5, + oneof='MatchType', + ) + suffix_match: str = proto.Field( + proto.STRING, + number=6, + oneof='MatchType', + ) + range_match: 'HttpRoute.HeaderMatch.IntegerRange' = proto.Field( + proto.MESSAGE, + number=7, + oneof='MatchType', + message='HttpRoute.HeaderMatch.IntegerRange', + ) + header: str = proto.Field( + proto.STRING, + number=1, + ) + invert_match: bool = proto.Field( + proto.BOOL, + number=8, + ) + + class QueryParameterMatch(proto.Message): + r"""Specifications to match a query parameter in the request. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + exact_match (str): + The value of the query parameter must exactly match the + contents of exact_match. + + Only one of exact_match, regex_match, or present_match must + be set. + + This field is a member of `oneof`_ ``MatchType``. + regex_match (str): + The value of the query parameter must match the regular + expression specified by regex_match. For regular expression + grammar, please see + https://github.com/google/re2/wiki/Syntax + + Only one of exact_match, regex_match, or present_match must + be set. + + This field is a member of `oneof`_ ``MatchType``. + present_match (bool): + Specifies that the QueryParameterMatcher matches if request + contains query parameter, irrespective of whether the + parameter has a value or not. + + Only one of exact_match, regex_match, or present_match must + be set. + + This field is a member of `oneof`_ ``MatchType``. + query_parameter (str): + The name of the query parameter to match. + """ + + exact_match: str = proto.Field( + proto.STRING, + number=2, + oneof='MatchType', + ) + regex_match: str = proto.Field( + proto.STRING, + number=3, + oneof='MatchType', + ) + present_match: bool = proto.Field( + proto.BOOL, + number=4, + oneof='MatchType', + ) + query_parameter: str = proto.Field( + proto.STRING, + number=1, + ) + + class RouteMatch(proto.Message): + r"""RouteMatch defines specifications used to match requests. If + multiple match types are set, this RouteMatch will match if ALL + type of matches are matched. + + This message has `oneof`_ fields (mutually exclusive fields). + For each oneof, at most one member field can be set at the same time. + Setting any member of the oneof automatically clears all other + members. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + full_path_match (str): + The HTTP request path value should exactly match this value. + + Only one of full_path_match, prefix_match, or regex_match + should be used. + + This field is a member of `oneof`_ ``PathMatch``. + prefix_match (str): + The HTTP request path value must begin with specified + prefix_match. prefix_match must begin with a /. + + Only one of full_path_match, prefix_match, or regex_match + should be used. + + This field is a member of `oneof`_ ``PathMatch``. + regex_match (str): + The HTTP request path value must satisfy the regular + expression specified by regex_match after removing any query + parameters and anchor supplied with the original URL. For + regular expression grammar, please see + https://github.com/google/re2/wiki/Syntax + + Only one of full_path_match, prefix_match, or regex_match + should be used. + + This field is a member of `oneof`_ ``PathMatch``. + ignore_case (bool): + Specifies if prefix_match and full_path_match matches are + case sensitive. The default value is false. + headers (MutableSequence[google.events.cloud.networkservices_v1.types.HttpRoute.HeaderMatch]): + Specifies a list of HTTP request headers to + match against. ALL of the supplied headers must + be matched. + query_parameters (MutableSequence[google.events.cloud.networkservices_v1.types.HttpRoute.QueryParameterMatch]): + Specifies a list of query parameters to match + against. ALL of the query parameters must be + matched. + """ + + full_path_match: str = proto.Field( + proto.STRING, + number=1, + oneof='PathMatch', + ) + prefix_match: str = proto.Field( + proto.STRING, + number=2, + oneof='PathMatch', + ) + regex_match: str = proto.Field( + proto.STRING, + number=3, + oneof='PathMatch', + ) + ignore_case: bool = proto.Field( + proto.BOOL, + number=4, + ) + headers: MutableSequence['HttpRoute.HeaderMatch'] = proto.RepeatedField( + proto.MESSAGE, + number=5, + message='HttpRoute.HeaderMatch', + ) + query_parameters: MutableSequence['HttpRoute.QueryParameterMatch'] = proto.RepeatedField( + proto.MESSAGE, + number=6, + message='HttpRoute.QueryParameterMatch', + ) + + class Destination(proto.Message): + r"""Specifications of a destination to which the request should + be routed to. + + Attributes: + service_name (str): + The URL of a BackendService to route traffic + to. + weight (int): + Specifies the proportion of requests + forwarded to the backend referenced by the + serviceName field. This is computed as: + + weight/Sum(weights in this destination + list). For non-zero values, there may be some + epsilon from the exact proportion defined here + depending on the precision an implementation + supports. + + If only one serviceName is specified and it has + a weight greater than 0, 100% of the traffic is + forwarded to that backend. + + If weights are specified for any one service + name, they need to be specified for all of them. + + If weights are unspecified for all services, + then, traffic is distributed in equal + proportions to all of them. + """ + + service_name: str = proto.Field( + proto.STRING, + number=1, + ) + weight: int = proto.Field( + proto.INT32, + number=2, + ) + + class Redirect(proto.Message): + r"""The specification for redirecting traffic. + + Attributes: + host_redirect (str): + The host that will be used in the redirect + response instead of the one that was supplied in + the request. + path_redirect (str): + The path that will be used in the redirect response instead + of the one that was supplied in the request. path_redirect + can not be supplied together with prefix_redirect. Supply + one alone or neither. If neither is supplied, the path of + the original request will be used for the redirect. + prefix_rewrite (str): + Indicates that during redirection, the + matched prefix (or path) should be swapped with + this value. This option allows URLs be + dynamically created based on the request. + response_code (google.events.cloud.networkservices_v1.types.HttpRoute.Redirect.ResponseCode): + The HTTP Status code to use for the redirect. + https_redirect (bool): + If set to true, the URL scheme in the + redirected request is set to https. If set to + false, the URL scheme of the redirected request + will remain the same as that of the request. + + The default is set to false. + strip_query (bool): + if set to true, any accompanying query + portion of the original URL is removed prior to + redirecting the request. If set to false, the + query portion of the original URL is retained. + + The default is set to false. + port_redirect (int): + The port that will be used in the redirected + request instead of the one that was supplied in + the request. + """ + class ResponseCode(proto.Enum): + r"""Supported HTTP response code. + + Values: + RESPONSE_CODE_UNSPECIFIED (0): + Default value + MOVED_PERMANENTLY_DEFAULT (1): + Corresponds to 301. + FOUND (2): + Corresponds to 302. + SEE_OTHER (3): + Corresponds to 303. + TEMPORARY_REDIRECT (4): + Corresponds to 307. In this case, the request + method will be retained. + PERMANENT_REDIRECT (5): + Corresponds to 308. In this case, the request + method will be retained. + """ + RESPONSE_CODE_UNSPECIFIED = 0 + MOVED_PERMANENTLY_DEFAULT = 1 + FOUND = 2 + SEE_OTHER = 3 + TEMPORARY_REDIRECT = 4 + PERMANENT_REDIRECT = 5 + + host_redirect: str = proto.Field( + proto.STRING, + number=1, + ) + path_redirect: str = proto.Field( + proto.STRING, + number=2, + ) + prefix_rewrite: str = proto.Field( + proto.STRING, + number=3, + ) + response_code: 'HttpRoute.Redirect.ResponseCode' = proto.Field( + proto.ENUM, + number=4, + enum='HttpRoute.Redirect.ResponseCode', + ) + https_redirect: bool = proto.Field( + proto.BOOL, + number=5, + ) + strip_query: bool = proto.Field( + proto.BOOL, + number=6, + ) + port_redirect: int = proto.Field( + proto.INT32, + number=7, + ) + + class FaultInjectionPolicy(proto.Message): + r"""The specification for fault injection introduced into traffic + to test the resiliency of clients to destination service + failure. As part of fault injection, when clients send requests + to a destination, delays can be introduced by client proxy on a + percentage of requests before sending those requests to the + destination service. Similarly requests can be aborted by client + proxy for a percentage of requests. + + Attributes: + delay (google.events.cloud.networkservices_v1.types.HttpRoute.FaultInjectionPolicy.Delay): + The specification for injecting delay to + client requests. + abort (google.events.cloud.networkservices_v1.types.HttpRoute.FaultInjectionPolicy.Abort): + The specification for aborting to client + requests. + """ + + class Delay(proto.Message): + r"""Specification of how client requests are delayed as part of + fault injection before being sent to a destination. + + Attributes: + fixed_delay (google.protobuf.duration_pb2.Duration): + Specify a fixed delay before forwarding the + request. + percentage (int): + The percentage of traffic on which delay will be injected. + + The value must be between [0, 100] + """ + + fixed_delay: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=1, + message=duration_pb2.Duration, + ) + percentage: int = proto.Field( + proto.INT32, + number=2, + ) + + class Abort(proto.Message): + r"""Specification of how client requests are aborted as part of + fault injection before being sent to a destination. + + Attributes: + http_status (int): + The HTTP status code used to abort the + request. + The value must be between 200 and 599 inclusive. + percentage (int): + The percentage of traffic which will be aborted. + + The value must be between [0, 100] + """ + + http_status: int = proto.Field( + proto.INT32, + number=1, + ) + percentage: int = proto.Field( + proto.INT32, + number=2, + ) + + delay: 'HttpRoute.FaultInjectionPolicy.Delay' = proto.Field( + proto.MESSAGE, + number=1, + message='HttpRoute.FaultInjectionPolicy.Delay', + ) + abort: 'HttpRoute.FaultInjectionPolicy.Abort' = proto.Field( + proto.MESSAGE, + number=2, + message='HttpRoute.FaultInjectionPolicy.Abort', + ) + + class HeaderModifier(proto.Message): + r"""The specification for modifying HTTP header in HTTP request + and HTTP response. + + Attributes: + set (MutableMapping[str, str]): + Completely overwrite/replace the headers with + given map where key is the name of the header, + value is the value of the header. + add (MutableMapping[str, str]): + Add the headers with given map where key is + the name of the header, value is the value of + the header. + remove (MutableSequence[str]): + Remove headers (matching by header names) + specified in the list. + """ + + set: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=1, + ) + add: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=2, + ) + remove: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=3, + ) + + class URLRewrite(proto.Message): + r"""The specification for modifying the URL of the request, prior + to forwarding the request to the destination. + + Attributes: + path_prefix_rewrite (str): + Prior to forwarding the request to the + selected destination, the matching portion of + the requests path is replaced by this value. + host_rewrite (str): + Prior to forwarding the request to the + selected destination, the requests host header + is replaced by this value. + """ + + path_prefix_rewrite: str = proto.Field( + proto.STRING, + number=1, + ) + host_rewrite: str = proto.Field( + proto.STRING, + number=2, + ) + + class RetryPolicy(proto.Message): + r"""The specifications for retries. + + Attributes: + retry_conditions (MutableSequence[str]): + Specifies one or more conditions when this retry policy + applies. Valid values are: 5xx: Proxy will attempt a retry + if the destination service responds with any 5xx response + code, of if the destination service does not respond at all, + example: disconnect, reset, read timeout, connection failure + and refused streams. + + gateway-error: Similar to 5xx, but only applies to response + codes 502, 503, 504. + + reset: Proxy will attempt a retry if the destination service + does not respond at all (disconnect/reset/read timeout) + + connect-failure: Proxy will retry on failures connecting to + destination for example due to connection timeouts. + + retriable-4xx: Proxy will retry fro retriable 4xx response + codes. Currently the only retriable error supported is 409. + + refused-stream: Proxy will retry if the destination resets + the stream with a REFUSED_STREAM error code. This reset type + indicates that it is safe to retry. + num_retries (int): + Specifies the allowed number of retries. This + number must be > 0. If not specified, default to + 1. + per_try_timeout (google.protobuf.duration_pb2.Duration): + Specifies a non-zero timeout per retry + attempt. + """ + + retry_conditions: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + num_retries: int = proto.Field( + proto.INT32, + number=2, + ) + per_try_timeout: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=3, + message=duration_pb2.Duration, + ) + + class RequestMirrorPolicy(proto.Message): + r"""Specifies the policy on how requests are shadowed to a + separate mirrored destination service. The proxy does not wait + for responses from the shadow service. Prior to sending traffic + to the shadow service, the host/authority header is suffixed + with -shadow. + + Attributes: + destination (google.events.cloud.networkservices_v1.types.HttpRoute.Destination): + The destination the requests will be mirrored + to. The weight of the destination will be + ignored. + """ + + destination: 'HttpRoute.Destination' = proto.Field( + proto.MESSAGE, + number=1, + message='HttpRoute.Destination', + ) + + class CorsPolicy(proto.Message): + r"""The Specification for allowing client side cross-origin + requests. + + Attributes: + allow_origins (MutableSequence[str]): + Specifies the list of origins that will be allowed to do + CORS requests. An origin is allowed if it matches either an + item in allow_origins or an item in allow_origin_regexes. + allow_origin_regexes (MutableSequence[str]): + Specifies the regular expression patterns + that match allowed origins. For regular + expression grammar, please see + https://github.com/google/re2/wiki/Syntax. + allow_methods (MutableSequence[str]): + Specifies the content for + Access-Control-Allow-Methods header. + allow_headers (MutableSequence[str]): + Specifies the content for + Access-Control-Allow-Headers header. + expose_headers (MutableSequence[str]): + Specifies the content for + Access-Control-Expose-Headers header. + max_age (str): + Specifies how long result of a preflight + request can be cached in seconds. This + translates to the Access-Control-Max-Age header. + allow_credentials (bool): + In response to a preflight request, setting + this to true indicates that the actual request + can include user credentials. This translates to + the Access-Control-Allow-Credentials header. + + Default value is false. + disabled (bool): + If true, the CORS policy is disabled. The + default value is false, which indicates that the + CORS policy is in effect. + """ + + allow_origins: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + allow_origin_regexes: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + allow_methods: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=3, + ) + allow_headers: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=4, + ) + expose_headers: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=5, + ) + max_age: str = proto.Field( + proto.STRING, + number=6, + ) + allow_credentials: bool = proto.Field( + proto.BOOL, + number=7, + ) + disabled: bool = proto.Field( + proto.BOOL, + number=8, + ) + + class RouteAction(proto.Message): + r"""The specifications for routing traffic and applying + associated policies. + + Attributes: + destinations (MutableSequence[google.events.cloud.networkservices_v1.types.HttpRoute.Destination]): + The destination to which traffic should be + forwarded. + redirect (google.events.cloud.networkservices_v1.types.HttpRoute.Redirect): + If set, the request is directed as configured + by this field. + fault_injection_policy (google.events.cloud.networkservices_v1.types.HttpRoute.FaultInjectionPolicy): + The specification for fault injection introduced into + traffic to test the resiliency of clients to backend service + failure. As part of fault injection, when clients send + requests to a backend service, delays can be introduced on a + percentage of requests before sending those requests to the + backend service. Similarly requests from clients can be + aborted for a percentage of requests. + + timeout and retry_policy will be ignored by clients that are + configured with a fault_injection_policy + request_header_modifier (google.events.cloud.networkservices_v1.types.HttpRoute.HeaderModifier): + The specification for modifying the headers + of a matching request prior to delivery of the + request to the destination. + response_header_modifier (google.events.cloud.networkservices_v1.types.HttpRoute.HeaderModifier): + The specification for modifying the headers + of a response prior to sending the response back + to the client. + url_rewrite (google.events.cloud.networkservices_v1.types.HttpRoute.URLRewrite): + The specification for rewrite URL before + forwarding requests to the destination. + timeout (google.protobuf.duration_pb2.Duration): + Specifies the timeout for selected route. + Timeout is computed from the time the request + has been fully processed (i.e. end of stream) up + until the response has been completely + processed. Timeout includes all retries. + retry_policy (google.events.cloud.networkservices_v1.types.HttpRoute.RetryPolicy): + Specifies the retry policy associated with + this route. + request_mirror_policy (google.events.cloud.networkservices_v1.types.HttpRoute.RequestMirrorPolicy): + Specifies the policy on how requests intended + for the routes destination are shadowed to a + separate mirrored destination. Proxy will not + wait for the shadow destination to respond + before returning the response. Prior to sending + traffic to the shadow service, the + host/authority header is suffixed with -shadow. + cors_policy (google.events.cloud.networkservices_v1.types.HttpRoute.CorsPolicy): + The specification for allowing client side + cross-origin requests. + """ + + destinations: MutableSequence['HttpRoute.Destination'] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message='HttpRoute.Destination', + ) + redirect: 'HttpRoute.Redirect' = proto.Field( + proto.MESSAGE, + number=2, + message='HttpRoute.Redirect', + ) + fault_injection_policy: 'HttpRoute.FaultInjectionPolicy' = proto.Field( + proto.MESSAGE, + number=4, + message='HttpRoute.FaultInjectionPolicy', + ) + request_header_modifier: 'HttpRoute.HeaderModifier' = proto.Field( + proto.MESSAGE, + number=5, + message='HttpRoute.HeaderModifier', + ) + response_header_modifier: 'HttpRoute.HeaderModifier' = proto.Field( + proto.MESSAGE, + number=6, + message='HttpRoute.HeaderModifier', + ) + url_rewrite: 'HttpRoute.URLRewrite' = proto.Field( + proto.MESSAGE, + number=7, + message='HttpRoute.URLRewrite', + ) + timeout: duration_pb2.Duration = proto.Field( + proto.MESSAGE, + number=8, + message=duration_pb2.Duration, + ) + retry_policy: 'HttpRoute.RetryPolicy' = proto.Field( + proto.MESSAGE, + number=9, + message='HttpRoute.RetryPolicy', + ) + request_mirror_policy: 'HttpRoute.RequestMirrorPolicy' = proto.Field( + proto.MESSAGE, + number=10, + message='HttpRoute.RequestMirrorPolicy', + ) + cors_policy: 'HttpRoute.CorsPolicy' = proto.Field( + proto.MESSAGE, + number=11, + message='HttpRoute.CorsPolicy', + ) + + class RouteRule(proto.Message): + r"""Specifies how to match traffic and how to route traffic when + traffic is matched. + + Attributes: + matches (MutableSequence[google.events.cloud.networkservices_v1.types.HttpRoute.RouteMatch]): + A list of matches define conditions used for + matching the rule against incoming HTTP + requests. Each match is independent, i.e. this + rule will be matched if ANY one of the matches + is satisfied. + + If no matches field is specified, this rule will + unconditionally match traffic. + + If a default rule is desired to be configured, + add a rule with no matches specified to the end + of the rules list. + action (google.events.cloud.networkservices_v1.types.HttpRoute.RouteAction): + The detailed rule defining how to route + matched traffic. + """ + + matches: MutableSequence['HttpRoute.RouteMatch'] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message='HttpRoute.RouteMatch', + ) + action: 'HttpRoute.RouteAction' = proto.Field( + proto.MESSAGE, + number=2, + message='HttpRoute.RouteAction', + ) + + name: str = proto.Field( + proto.STRING, + number=1, + ) + self_link: str = proto.Field( + proto.STRING, + number=11, + ) + description: str = proto.Field( + proto.STRING, + number=2, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + hostnames: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=5, + ) + meshes: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=8, + ) + gateways: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=9, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=10, + ) + rules: MutableSequence[RouteRule] = proto.RepeatedField( + proto.MESSAGE, + number=6, + message=RouteRule, + ) + + +class Mesh(proto.Message): + r"""Mesh represents a logical configuration grouping for workload + to workload communication within a service mesh. Routes that + point to mesh dictate how requests are routed within this + logical mesh boundary. + + Attributes: + name (str): + Required. Name of the Mesh resource. It matches pattern + ``projects/*/locations/global/meshes/``. + self_link (str): + Output only. Server-defined URL of this + resource + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The timestamp when the resource + was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The timestamp when the resource + was updated. + labels (MutableMapping[str, str]): + Optional. Set of label tags associated with + the Mesh resource. + description (str): + Optional. A free-text description of the + resource. Max length 1024 characters. + interception_port (int): + Optional. If set to a valid TCP port + (1-65535), instructs the SIDECAR proxy to listen + on the specified port of localhost (127.0.0.1) + address. The SIDECAR proxy will expect all + traffic to be redirected to this port regardless + of its actual ip:port destination. If unset, a + port '15001' is used as the interception port. + This is applicable only for sidecar proxy + deployments. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + self_link: str = proto.Field( + proto.STRING, + number=9, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=4, + ) + description: str = proto.Field( + proto.STRING, + number=5, + ) + interception_port: int = proto.Field( + proto.INT32, + number=8, + ) + + +class ServiceBinding(proto.Message): + r"""ServiceBinding is the resource that defines a Service + Directory Service to be used in a BackendService resource. + + Attributes: + name (str): + Required. Name of the ServiceBinding resource. It matches + pattern + ``projects/*/locations/global/serviceBindings/service_binding_name``. + description (str): + Optional. A free-text description of the + resource. Max length 1024 characters. + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The timestamp when the resource + was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The timestamp when the resource + was updated. + service (str): + Required. The full Service Directory Service name of the + format projects/*/locations/*/namespaces/*/services/* + service_id (str): + Output only. The unique identifier of the + Service Directory Service against which the + Service Binding resource is validated. This is + populated when the Service Binding resource is + used in another resource (like Backend Service). + This is of the UUID4 format. + labels (MutableMapping[str, str]): + Optional. Set of label tags associated with + the ServiceBinding resource. + """ + + name: str = proto.Field( + proto.STRING, + number=1, + ) + description: str = proto.Field( + proto.STRING, + number=2, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=4, + message=timestamp_pb2.Timestamp, + ) + service: str = proto.Field( + proto.STRING, + number=5, + ) + service_id: str = proto.Field( + proto.STRING, + number=8, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=7, + ) + + +class TcpRoute(proto.Message): + r"""TcpRoute is the resource defining how TCP traffic should be + routed by a Mesh/Gateway resource. + + Attributes: + name (str): + Required. Name of the TcpRoute resource. It matches pattern + ``projects/*/locations/global/tcpRoutes/tcp_route_name>``. + self_link (str): + Output only. Server-defined URL of this + resource + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The timestamp when the resource + was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The timestamp when the resource + was updated. + description (str): + Optional. A free-text description of the + resource. Max length 1024 characters. + rules (MutableSequence[google.events.cloud.networkservices_v1.types.TcpRoute.RouteRule]): + Required. Rules that define how traffic is + routed and handled. At least one RouteRule must + be supplied. If there are multiple rules then + the action taken will be the first rule to + match. + meshes (MutableSequence[str]): + Optional. Meshes defines a list of meshes this TcpRoute is + attached to, as one of the routing rules to route the + requests served by the mesh. + + Each mesh reference should match the pattern: + ``projects/*/locations/global/meshes/`` + + The attached Mesh should be of a type SIDECAR + gateways (MutableSequence[str]): + Optional. Gateways defines a list of gateways this TcpRoute + is attached to, as one of the routing rules to route the + requests served by the gateway. + + Each gateway reference should match the pattern: + ``projects/*/locations/global/gateways/`` + labels (MutableMapping[str, str]): + Optional. Set of label tags associated with + the TcpRoute resource. + """ + + class RouteRule(proto.Message): + r"""Specifies how to match traffic and how to route traffic when + traffic is matched. + + Attributes: + matches (MutableSequence[google.events.cloud.networkservices_v1.types.TcpRoute.RouteMatch]): + Optional. RouteMatch defines the predicate + used to match requests to a given action. + Multiple match types are "OR"ed for evaluation. + If no routeMatch field is specified, this rule + will unconditionally match traffic. + action (google.events.cloud.networkservices_v1.types.TcpRoute.RouteAction): + Required. The detailed rule defining how to + route matched traffic. + """ + + matches: MutableSequence['TcpRoute.RouteMatch'] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message='TcpRoute.RouteMatch', + ) + action: 'TcpRoute.RouteAction' = proto.Field( + proto.MESSAGE, + number=2, + message='TcpRoute.RouteAction', + ) + + class RouteMatch(proto.Message): + r"""RouteMatch defines the predicate used to match requests to a + given action. Multiple match types are "OR"ed for evaluation. If + no routeMatch field is specified, this rule will unconditionally + match traffic. + + Attributes: + address (str): + Required. Must be specified in the CIDR range + format. A CIDR range consists of an IP Address + and a prefix length to construct the subnet + mask. By default, the prefix length is 32 (i.e. + matches a single IP address). Only IPV4 + addresses are supported. Examples: "10.0.0.1" - + matches against this exact IP address. + "10.0.0.0/8" - matches against any IP address + within the 10.0.0.0 subnet and 255.255.255.0 + mask. "0.0.0.0/0" + - matches against any IP address'. + port (str): + Required. Specifies the destination port to + match against. + """ + + address: str = proto.Field( + proto.STRING, + number=1, + ) + port: str = proto.Field( + proto.STRING, + number=2, + ) + + class RouteAction(proto.Message): + r"""The specifications for routing traffic and applying + associated policies. + + Attributes: + destinations (MutableSequence[google.events.cloud.networkservices_v1.types.TcpRoute.RouteDestination]): + Optional. The destination services to which + traffic should be forwarded. At least one + destination service is required. Only one of + route destination or original destination can be + set. + original_destination (bool): + Optional. If true, Router will use the + destination IP and port of the original + connection as the destination of the request. + Default is false. Only one of route destinations + or original destination can be set. + """ + + destinations: MutableSequence['TcpRoute.RouteDestination'] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message='TcpRoute.RouteDestination', + ) + original_destination: bool = proto.Field( + proto.BOOL, + number=3, + ) + + class RouteDestination(proto.Message): + r"""Describe the destination for traffic to be routed to. + + Attributes: + service_name (str): + Required. The URL of a BackendService to + route traffic to. + weight (int): + Optional. Specifies the proportion of + requests forwarded to the backend referenced by + the serviceName field. This is computed as: + + weight/Sum(weights in this destination + list). For non-zero values, there may be some + epsilon from the exact proportion defined here + depending on the precision an implementation + supports. + + If only one serviceName is specified and it has + a weight greater than 0, 100% of the traffic is + forwarded to that backend. + + If weights are specified for any one service + name, they need to be specified for all of them. + + If weights are unspecified for all services, + then, traffic is distributed in equal + proportions to all of them. + """ + + service_name: str = proto.Field( + proto.STRING, + number=1, + ) + weight: int = proto.Field( + proto.INT32, + number=2, + ) + + name: str = proto.Field( + proto.STRING, + number=1, + ) + self_link: str = proto.Field( + proto.STRING, + number=11, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + description: str = proto.Field( + proto.STRING, + number=4, + ) + rules: MutableSequence[RouteRule] = proto.RepeatedField( + proto.MESSAGE, + number=5, + message=RouteRule, + ) + meshes: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=8, + ) + gateways: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=9, + ) + labels: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=10, + ) + + +class TlsRoute(proto.Message): + r"""TlsRoute defines how traffic should be routed based on SNI + and other matching L3 attributes. + + Attributes: + name (str): + Required. Name of the TlsRoute resource. It matches pattern + ``projects/*/locations/global/tlsRoutes/tls_route_name>``. + self_link (str): + Output only. Server-defined URL of this + resource + create_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The timestamp when the resource + was created. + update_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The timestamp when the resource + was updated. + description (str): + Optional. A free-text description of the + resource. Max length 1024 characters. + rules (MutableSequence[google.events.cloud.networkservices_v1.types.TlsRoute.RouteRule]): + Required. Rules that define how traffic is + routed and handled. At least one RouteRule must + be supplied. If there are multiple rules then + the action taken will be the first rule to + match. + meshes (MutableSequence[str]): + Optional. Meshes defines a list of meshes this TlsRoute is + attached to, as one of the routing rules to route the + requests served by the mesh. + + Each mesh reference should match the pattern: + ``projects/*/locations/global/meshes/`` + + The attached Mesh should be of a type SIDECAR + gateways (MutableSequence[str]): + Optional. Gateways defines a list of gateways this TlsRoute + is attached to, as one of the routing rules to route the + requests served by the gateway. + + Each gateway reference should match the pattern: + ``projects/*/locations/global/gateways/`` + """ + + class RouteRule(proto.Message): + r"""Specifies how to match traffic and how to route traffic when + traffic is matched. + + Attributes: + matches (MutableSequence[google.events.cloud.networkservices_v1.types.TlsRoute.RouteMatch]): + Required. RouteMatch defines the predicate + used to match requests to a given action. + Multiple match types are "OR"ed for evaluation. + action (google.events.cloud.networkservices_v1.types.TlsRoute.RouteAction): + Required. The detailed rule defining how to + route matched traffic. + """ + + matches: MutableSequence['TlsRoute.RouteMatch'] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message='TlsRoute.RouteMatch', + ) + action: 'TlsRoute.RouteAction' = proto.Field( + proto.MESSAGE, + number=2, + message='TlsRoute.RouteAction', + ) + + class RouteMatch(proto.Message): + r"""RouteMatch defines the predicate used to match requests to a + given action. Multiple match types are "AND"ed for evaluation. + If no routeMatch field is specified, this rule will + unconditionally match traffic. + + Attributes: + sni_host (MutableSequence[str]): + Optional. SNI (server name indicator) to match against. SNI + will be matched against all wildcard domains, i.e. + ``www.example.com`` will be first matched against + ``www.example.com``, then ``*.example.com``, then ``*.com.`` + Partial wildcards are not supported, and values like + \*w.example.com are invalid. At least one of sni_host and + alpn is required. Up to 5 sni hosts across all matches can + be set. + alpn (MutableSequence[str]): + Optional. ALPN (Application-Layer Protocol Negotiation) to + match against. Examples: "http/1.1", "h2". At least one of + sni_host and alpn is required. Up to 5 alpns across all + matches can be set. + """ + + sni_host: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=1, + ) + alpn: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=2, + ) + + class RouteAction(proto.Message): + r"""The specifications for routing traffic and applying + associated policies. + + Attributes: + destinations (MutableSequence[google.events.cloud.networkservices_v1.types.TlsRoute.RouteDestination]): + Required. The destination services to which + traffic should be forwarded. At least one + destination service is required. + """ + + destinations: MutableSequence['TlsRoute.RouteDestination'] = proto.RepeatedField( + proto.MESSAGE, + number=1, + message='TlsRoute.RouteDestination', + ) + + class RouteDestination(proto.Message): + r"""Describe the destination for traffic to be routed to. + + Attributes: + service_name (str): + Required. The URL of a BackendService to + route traffic to. + weight (int): + Optional. Specifies the proportion of requests forwareded to + the backend referenced by the service_name field. This is + computed as: weight/Sum(weights in destinations) Weights in + all destinations does not need to sum up to 100. + """ + + service_name: str = proto.Field( + proto.STRING, + number=1, + ) + weight: int = proto.Field( + proto.INT32, + number=2, + ) + + name: str = proto.Field( + proto.STRING, + number=1, + ) + self_link: str = proto.Field( + proto.STRING, + number=8, + ) + create_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=2, + message=timestamp_pb2.Timestamp, + ) + update_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=3, + message=timestamp_pb2.Timestamp, + ) + description: str = proto.Field( + proto.STRING, + number=4, + ) + rules: MutableSequence[RouteRule] = proto.RepeatedField( + proto.MESSAGE, + number=5, + message=RouteRule, + ) + meshes: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=6, + ) + gateways: MutableSequence[str] = proto.RepeatedField( + proto.STRING, + number=7, + ) + + +class EndpointPolicyEventData(proto.Message): + r"""The data within all EndpointPolicy events. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + payload (google.events.cloud.networkservices_v1.types.EndpointPolicy): + Optional. The EndpointPolicy event payload. + Unset for deletion events. + + This field is a member of `oneof`_ ``_payload``. + """ + + payload: 'EndpointPolicy' = proto.Field( + proto.MESSAGE, + number=1, + optional=True, + message='EndpointPolicy', + ) + + +class HttpRouteEventData(proto.Message): + r"""The data within all HttpRoute events. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + payload (google.events.cloud.networkservices_v1.types.HttpRoute): + Optional. The HttpRoute event payload. Unset + for deletion events. + + This field is a member of `oneof`_ ``_payload``. + """ + + payload: 'HttpRoute' = proto.Field( + proto.MESSAGE, + number=1, + optional=True, + message='HttpRoute', + ) + + +class ServiceBindingEventData(proto.Message): + r"""The data within all ServiceBinding events. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + payload (google.events.cloud.networkservices_v1.types.ServiceBinding): + Optional. The ServiceBinding event payload. + Unset for deletion events. + + This field is a member of `oneof`_ ``_payload``. + """ + + payload: 'ServiceBinding' = proto.Field( + proto.MESSAGE, + number=1, + optional=True, + message='ServiceBinding', + ) + + +class GatewayEventData(proto.Message): + r"""The data within all Gateway events. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + payload (google.events.cloud.networkservices_v1.types.Gateway): + Optional. The Gateway event payload. Unset + for deletion events. + + This field is a member of `oneof`_ ``_payload``. + """ + + payload: 'Gateway' = proto.Field( + proto.MESSAGE, + number=1, + optional=True, + message='Gateway', + ) + + +class TlsRouteEventData(proto.Message): + r"""The data within all TlsRoute events. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + payload (google.events.cloud.networkservices_v1.types.TlsRoute): + Optional. The TlsRoute event payload. Unset + for deletion events. + + This field is a member of `oneof`_ ``_payload``. + """ + + payload: 'TlsRoute' = proto.Field( + proto.MESSAGE, + number=1, + optional=True, + message='TlsRoute', + ) + + +class GrpcRouteEventData(proto.Message): + r"""The data within all GrpcRoute events. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + payload (google.events.cloud.networkservices_v1.types.GrpcRoute): + Optional. The GrpcRoute event payload. Unset + for deletion events. + + This field is a member of `oneof`_ ``_payload``. + """ + + payload: 'GrpcRoute' = proto.Field( + proto.MESSAGE, + number=1, + optional=True, + message='GrpcRoute', + ) + + +class MeshEventData(proto.Message): + r"""The data within all Mesh events. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + payload (google.events.cloud.networkservices_v1.types.Mesh): + Optional. The Mesh event payload. Unset for + deletion events. + + This field is a member of `oneof`_ ``_payload``. + """ + + payload: 'Mesh' = proto.Field( + proto.MESSAGE, + number=1, + optional=True, + message='Mesh', + ) + + +class TcpRouteEventData(proto.Message): + r"""The data within all TcpRoute events. + + .. _oneof: https://proto-plus-python.readthedocs.io/en/stable/fields.html#oneofs-mutually-exclusive-fields + + Attributes: + payload (google.events.cloud.networkservices_v1.types.TcpRoute): + Optional. The TcpRoute event payload. Unset + for deletion events. + + This field is a member of `oneof`_ ``_payload``. + """ + + payload: 'TcpRoute' = proto.Field( + proto.MESSAGE, + number=1, + optional=True, + message='TcpRoute', + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/src/google/events/cloud/speech/__init__.py b/src/google/events/cloud/speech/__init__.py new file mode 100644 index 00000000..ad3a6af8 --- /dev/null +++ b/src/google/events/cloud/speech/__init__.py @@ -0,0 +1,31 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from google.events.cloud.speech import gapic_version as package_version + +__version__ = package_version.__version__ + + + +from google.events.cloud.speech_v1.types.data import CustomClass +from google.events.cloud.speech_v1.types.data import CustomClassEventData +from google.events.cloud.speech_v1.types.data import PhraseSet +from google.events.cloud.speech_v1.types.data import PhraseSetEventData + +__all__ = ('CustomClass', + 'CustomClassEventData', + 'PhraseSet', + 'PhraseSetEventData', +) diff --git a/src/google/events/cloud/speech/gapic_version.py b/src/google/events/cloud/speech/gapic_version.py new file mode 100644 index 00000000..360a0d13 --- /dev/null +++ b/src/google/events/cloud/speech/gapic_version.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +__version__ = "0.0.0" # {x-release-please-version} diff --git a/src/google/events/cloud/speech/py.typed b/src/google/events/cloud/speech/py.typed new file mode 100644 index 00000000..4c2fd572 --- /dev/null +++ b/src/google/events/cloud/speech/py.typed @@ -0,0 +1,2 @@ +# Marker file for PEP 561. +# The google-events-cloud-speech package uses inline types. diff --git a/src/google/events/cloud/speech_v1/__init__.py b/src/google/events/cloud/speech_v1/__init__.py new file mode 100644 index 00000000..6d253018 --- /dev/null +++ b/src/google/events/cloud/speech_v1/__init__.py @@ -0,0 +1,32 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from google.events.cloud.speech_v1 import gapic_version as package_version + +__version__ = package_version.__version__ + + + +from .types.data import CustomClass +from .types.data import CustomClassEventData +from .types.data import PhraseSet +from .types.data import PhraseSetEventData + +__all__ = ( +'CustomClass', +'CustomClassEventData', +'PhraseSet', +'PhraseSetEventData', +) diff --git a/src/google/events/cloud/speech_v1/gapic_version.py b/src/google/events/cloud/speech_v1/gapic_version.py new file mode 100644 index 00000000..360a0d13 --- /dev/null +++ b/src/google/events/cloud/speech_v1/gapic_version.py @@ -0,0 +1,16 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +__version__ = "0.0.0" # {x-release-please-version} diff --git a/src/google/events/cloud/speech_v1/py.typed b/src/google/events/cloud/speech_v1/py.typed new file mode 100644 index 00000000..4c2fd572 --- /dev/null +++ b/src/google/events/cloud/speech_v1/py.typed @@ -0,0 +1,2 @@ +# Marker file for PEP 561. +# The google-events-cloud-speech package uses inline types. diff --git a/src/google/events/cloud/speech_v1/services/__init__.py b/src/google/events/cloud/speech_v1/services/__init__.py new file mode 100644 index 00000000..89a37dc9 --- /dev/null +++ b/src/google/events/cloud/speech_v1/services/__init__.py @@ -0,0 +1,15 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# diff --git a/src/google/events/cloud/speech_v1/types/__init__.py b/src/google/events/cloud/speech_v1/types/__init__.py new file mode 100644 index 00000000..05ee0240 --- /dev/null +++ b/src/google/events/cloud/speech_v1/types/__init__.py @@ -0,0 +1,28 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from .data import ( + CustomClass, + CustomClassEventData, + PhraseSet, + PhraseSetEventData, +) + +__all__ = ( + 'CustomClass', + 'CustomClassEventData', + 'PhraseSet', + 'PhraseSetEventData', +) diff --git a/src/google/events/cloud/speech_v1/types/data.py b/src/google/events/cloud/speech_v1/types/data.py new file mode 100644 index 00000000..da85b373 --- /dev/null +++ b/src/google/events/cloud/speech_v1/types/data.py @@ -0,0 +1,417 @@ +# -*- coding: utf-8 -*- +# Copyright 2023 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +from __future__ import annotations + +from typing import MutableMapping, MutableSequence + +import proto # type: ignore + +from google.protobuf import timestamp_pb2 # type: ignore + + +__protobuf__ = proto.module( + package='google.events.cloud.speech.v1', + manifest={ + 'CustomClass', + 'PhraseSet', + 'PhraseSetEventData', + 'CustomClassEventData', + }, +) + + +class CustomClass(proto.Message): + r"""A set of words or phrases that represents a common concept + likely to appear in your audio, for example a list of passenger + ship names. CustomClass items can be substituted into + placeholders that you set in PhraseSet phrases. + + Attributes: + name (str): + The resource name of the custom class. + custom_class_id (str): + If this custom class is a resource, the custom_class_id is + the resource id of the CustomClass. Case sensitive. + items (MutableSequence[google.events.cloud.speech_v1.types.CustomClass.ClassItem]): + A collection of class items. + kms_key_name (str): + Output only. The `KMS key + name `__ + with which the content of the ClassItem is encrypted. The + expected format is + ``projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}``. + kms_key_version_name (str): + Output only. The `KMS key version + name `__ + with which content of the ClassItem is encrypted. The + expected format is + ``projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}``. + uid (str): + Output only. System-assigned unique + identifier for the CustomClass. This field is + not used. + display_name (str): + Output only. User-settable, human-readable + name for the CustomClass. Must be 63 characters + or less. This field is not used. + state (google.events.cloud.speech_v1.types.CustomClass.State): + Output only. The CustomClass lifecycle state. + This field is not used. + delete_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The time at which this resource + was requested for deletion. This field is not + used. + expire_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The time at which this resource + will be purged. This field is not used. + annotations (MutableMapping[str, str]): + Output only. Allows users to store small + amounts of arbitrary data. Both the key and the + value must be 63 characters or less each. At + most 100 annotations. + This field is not used. + etag (str): + Output only. This checksum is computed by the + server based on the value of other fields. This + may be sent on update, undelete, and delete + requests to ensure the client has an up-to-date + value before proceeding. This field is not used. + reconciling (bool): + Output only. Whether or not this CustomClass + is in the process of being updated. This field + is not used. + """ + class State(proto.Enum): + r"""Set of states that define the lifecycle of a CustomClass. + + Values: + STATE_UNSPECIFIED (0): + Unspecified state. This is only used/useful + for distinguishing unset values. + ACTIVE (2): + The normal and active state. + DELETED (4): + This CustomClass has been deleted. + """ + STATE_UNSPECIFIED = 0 + ACTIVE = 2 + DELETED = 4 + + class ClassItem(proto.Message): + r"""An item of the class. + + Attributes: + value (str): + The class item's value. + """ + + value: str = proto.Field( + proto.STRING, + number=1, + ) + + name: str = proto.Field( + proto.STRING, + number=1, + ) + custom_class_id: str = proto.Field( + proto.STRING, + number=2, + ) + items: MutableSequence[ClassItem] = proto.RepeatedField( + proto.MESSAGE, + number=3, + message=ClassItem, + ) + kms_key_name: str = proto.Field( + proto.STRING, + number=6, + ) + kms_key_version_name: str = proto.Field( + proto.STRING, + number=7, + ) + uid: str = proto.Field( + proto.STRING, + number=8, + ) + display_name: str = proto.Field( + proto.STRING, + number=9, + ) + state: State = proto.Field( + proto.ENUM, + number=10, + enum=State, + ) + delete_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=11, + message=timestamp_pb2.Timestamp, + ) + expire_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=12, + message=timestamp_pb2.Timestamp, + ) + annotations: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=13, + ) + etag: str = proto.Field( + proto.STRING, + number=14, + ) + reconciling: bool = proto.Field( + proto.BOOL, + number=15, + ) + + +class PhraseSet(proto.Message): + r"""Provides "hints" to the speech recognizer to favor specific + words and phrases in the results. + + Attributes: + name (str): + The resource name of the phrase set. + phrases (MutableSequence[google.events.cloud.speech_v1.types.PhraseSet.Phrase]): + A list of word and phrases. + boost (float): + Hint Boost. Positive value will increase the probability + that a specific phrase will be recognized over other similar + sounding phrases. The higher the boost, the higher the + chance of false positive recognition as well. Negative boost + values would correspond to anti-biasing. Anti-biasing is not + enabled, so negative boost will simply be ignored. Though + ``boost`` can accept a wide range of positive values, most + use cases are best served with values between 0 (exclusive) + and 20. We recommend using a binary search approach to + finding the optimal value for your use case as well as + adding phrases both with and without boost to your requests. + kms_key_name (str): + Output only. The `KMS key + name `__ + with which the content of the PhraseSet is encrypted. The + expected format is + ``projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}``. + kms_key_version_name (str): + Output only. The `KMS key version + name `__ + with which content of the PhraseSet is encrypted. The + expected format is + ``projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}``. + uid (str): + Output only. System-assigned unique + identifier for the PhraseSet. This field is not + used. + display_name (str): + Output only. User-settable, human-readable + name for the PhraseSet. Must be 63 characters or + less. This field is not used. + state (google.events.cloud.speech_v1.types.PhraseSet.State): + Output only. The CustomClass lifecycle state. + This field is not used. + delete_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The time at which this resource + was requested for deletion. This field is not + used. + expire_time (google.protobuf.timestamp_pb2.Timestamp): + Output only. The time at which this resource + will be purged. This field is not used. + annotations (MutableMapping[str, str]): + Output only. Allows users to store small + amounts of arbitrary data. Both the key and the + value must be 63 characters or less each. At + most 100 annotations. + This field is not used. + etag (str): + Output only. This checksum is computed by the + server based on the value of other fields. This + may be sent on update, undelete, and delete + requests to ensure the client has an up-to-date + value before proceeding. This field is not used. + reconciling (bool): + Output only. Whether or not this PhraseSet is + in the process of being updated. This field is + not used. + """ + class State(proto.Enum): + r"""Set of states that define the lifecycle of a CustomClass. + + Values: + STATE_UNSPECIFIED (0): + Unspecified state. This is only used/useful + for distinguishing unset values. + ACTIVE (2): + The normal and active state. + DELETED (4): + This CustomClass has been deleted. + """ + STATE_UNSPECIFIED = 0 + ACTIVE = 2 + DELETED = 4 + + class Phrase(proto.Message): + r"""A phrases containing words and phrase "hints" so that the speech + recognition is more likely to recognize them. This can be used to + improve the accuracy for specific words and phrases, for example, if + specific commands are typically spoken by the user. This can also be + used to add additional words to the vocabulary of the recognizer. + See `usage + limits `__. + + List items can also include pre-built or custom classes containing + groups of words that represent common concepts that occur in natural + language. For example, rather than providing a phrase hint for every + month of the year (e.g. "i was born in january", "i was born in + febuary", ...), use the pre-built ``$MONTH`` class improves the + likelihood of correctly transcribing audio that includes months + (e.g. "i was born in $month"). To refer to pre-built classes, use + the class' symbol prepended with ``$`` e.g. ``$MONTH``. To refer to + custom classes that were defined inline in the request, set the + class's ``custom_class_id`` to a string unique to all class + resources and inline classes. Then use the class' id wrapped in + $\ ``{...}`` e.g. "${my-months}". To refer to custom classes + resources, use the class' id wrapped in ``${}`` (e.g. + ``${my-months}``). + + Speech-to-Text supports three locations: ``global``, ``us`` (US + North America), and ``eu`` (Europe). If you are calling the + ``speech.googleapis.com`` endpoint, use the ``global`` location. To + specify a region, use a `regional + endpoint `__ + with matching ``us`` or ``eu`` location value. + + Attributes: + value (str): + The phrase itself. + boost (float): + Hint Boost. Overrides the boost set at the phrase set level. + Positive value will increase the probability that a specific + phrase will be recognized over other similar sounding + phrases. The higher the boost, the higher the chance of + false positive recognition as well. Negative boost will + simply be ignored. Though ``boost`` can accept a wide range + of positive values, most use cases are best served with + values between 0 and 20. We recommend using a binary search + approach to finding the optimal value for your use case as + well as adding phrases both with and without boost to your + requests. + """ + + value: str = proto.Field( + proto.STRING, + number=1, + ) + boost: float = proto.Field( + proto.FLOAT, + number=2, + ) + + name: str = proto.Field( + proto.STRING, + number=1, + ) + phrases: MutableSequence[Phrase] = proto.RepeatedField( + proto.MESSAGE, + number=2, + message=Phrase, + ) + boost: float = proto.Field( + proto.FLOAT, + number=4, + ) + kms_key_name: str = proto.Field( + proto.STRING, + number=7, + ) + kms_key_version_name: str = proto.Field( + proto.STRING, + number=8, + ) + uid: str = proto.Field( + proto.STRING, + number=9, + ) + display_name: str = proto.Field( + proto.STRING, + number=10, + ) + state: State = proto.Field( + proto.ENUM, + number=11, + enum=State, + ) + delete_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=12, + message=timestamp_pb2.Timestamp, + ) + expire_time: timestamp_pb2.Timestamp = proto.Field( + proto.MESSAGE, + number=13, + message=timestamp_pb2.Timestamp, + ) + annotations: MutableMapping[str, str] = proto.MapField( + proto.STRING, + proto.STRING, + number=14, + ) + etag: str = proto.Field( + proto.STRING, + number=15, + ) + reconciling: bool = proto.Field( + proto.BOOL, + number=16, + ) + + +class PhraseSetEventData(proto.Message): + r"""The data within all PhraseSet events. + + Attributes: + payload (google.events.cloud.speech_v1.types.PhraseSet): + Optional. The PhraseSet event payload. Unset + for deletion events. + """ + + payload: 'PhraseSet' = proto.Field( + proto.MESSAGE, + number=1, + message='PhraseSet', + ) + + +class CustomClassEventData(proto.Message): + r"""The data within all CustomClass events. + + Attributes: + payload (google.events.cloud.speech_v1.types.CustomClass): + Optional. The CustomClass event payload. + Unset for deletion events. + """ + + payload: 'CustomClass' = proto.Field( + proto.MESSAGE, + number=1, + message='CustomClass', + ) + + +__all__ = tuple(sorted(__protobuf__.manifest)) diff --git a/tests/requirements.txt b/tests/requirements.txt index 2a929edc..2f6c9d20 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1 +1 @@ -pytest==7.4.2 +pytest==8.1.1