Skip to content

Commit dfa8b0a

Browse files
fix: proper http bindings for v2 API (#209)
* chore: Update gapic-generator-python to v1.8.2 PiperOrigin-RevId: 504289125 Source-Link: googleapis/googleapis@38a48a4 Source-Link: googleapis/googleapis-gen@b2dc226 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYjJkYzIyNjYzZGJlNDdhOTcyYzhkOGMyZjhhNGRmMDEzZGFmZGNiYyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * chore: reformat protos PiperOrigin-RevId: 504359717 Source-Link: googleapis/googleapis@1266905 Source-Link: googleapis/googleapis-gen@881ee78 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiODgxZWU3ODAzODljYTU3MjM1NDAzZTMwODA2NTY5MGI4NDc4ZmUyNCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * docs: update comment fix: update http bindings for alpha API PiperOrigin-RevId: 504360226 Source-Link: googleapis/googleapis@44f176c Source-Link: googleapis/googleapis-gen@c2c886b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzJjODg2YjQ5ODliMzVhYjdhNTA4MjRjMmM2NzM1M2E5NWVkODlhNyJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix: proper http bindings for v2 API chore: reformat protos PiperOrigin-RevId: 504361887 Source-Link: googleapis/googleapis@1230a6b Source-Link: googleapis/googleapis-gen@51e8944 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTFlODk0NGZmNjUyNWI3ZGM1NjczMjM2MTdhOTEzMWM3ZGNiYzU0NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix docs build Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 6d9de23 commit dfa8b0a

File tree

8 files changed

+7
-126
lines changed

8 files changed

+7
-126
lines changed

packages/google-cloud-tpu/.coveragerc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ branch = True
55
show_missing = True
66
omit =
77
google/cloud/tpu/__init__.py
8+
google/cloud/tpu/gapic_version.py
89
exclude_lines =
910
# Re-enable the standard pragma
1011
pragma: NO COVER

packages/google-cloud-tpu/google/cloud/tpu_v1/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
from google.cloud.tpu import gapic_version as package_version
16+
from google.cloud.tpu_v1 import gapic_version as package_version
1717

1818
__version__ = package_version.__version__
1919

packages/google-cloud-tpu/google/cloud/tpu_v2/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
from google.cloud.tpu import gapic_version as package_version
16+
from google.cloud.tpu_v2 import gapic_version as package_version
1717

1818
__version__ = package_version.__version__
1919

packages/google-cloud-tpu/google/cloud/tpu_v2/services/tpu/transports/rest.py

Lines changed: 0 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -714,72 +714,24 @@ def operations_client(self) -> operations_v1.AbstractOperationsClient:
714714
if self._operations_client is None:
715715
http_options: Dict[str, List[Dict[str, str]]] = {
716716
"google.longrunning.Operations.CancelOperation": [
717-
{
718-
"method": "post",
719-
"uri": "/v1alpha1/{name=projects/*/locations/*/operations/*}:cancel",
720-
},
721-
{
722-
"method": "post",
723-
"uri": "/v1/{name=projects/*/locations/*/operations/*}:cancel",
724-
},
725-
{
726-
"method": "post",
727-
"uri": "/v2alpha1/{name=projects/*/locations/*/operations/*}:cancel",
728-
},
729717
{
730718
"method": "post",
731719
"uri": "/v2/{name=projects/*/locations/*/operations/*}:cancel",
732720
},
733721
],
734722
"google.longrunning.Operations.DeleteOperation": [
735-
{
736-
"method": "delete",
737-
"uri": "/v1alpha1/{name=projects/*/locations/*/operations/*}",
738-
},
739-
{
740-
"method": "delete",
741-
"uri": "/v1/{name=projects/*/locations/*/operations/*}",
742-
},
743-
{
744-
"method": "delete",
745-
"uri": "/v2alpha1/{name=projects/*/locations/*/operations/*}",
746-
},
747723
{
748724
"method": "delete",
749725
"uri": "/v2/{name=projects/*/locations/*/operations/*}",
750726
},
751727
],
752728
"google.longrunning.Operations.GetOperation": [
753-
{
754-
"method": "get",
755-
"uri": "/v1alpha1/{name=projects/*/locations/*/operations/*}",
756-
},
757-
{
758-
"method": "get",
759-
"uri": "/v1/{name=projects/*/locations/*/operations/*}",
760-
},
761-
{
762-
"method": "get",
763-
"uri": "/v2alpha1/{name=projects/*/locations/*/operations/*}",
764-
},
765729
{
766730
"method": "get",
767731
"uri": "/v2/{name=projects/*/locations/*/operations/*}",
768732
},
769733
],
770734
"google.longrunning.Operations.ListOperations": [
771-
{
772-
"method": "get",
773-
"uri": "/v1alpha1/{name=projects/*/locations/*}/operations",
774-
},
775-
{
776-
"method": "get",
777-
"uri": "/v1/{name=projects/*/locations/*}/operations",
778-
},
779-
{
780-
"method": "get",
781-
"uri": "/v2alpha1/{name=projects/*/locations/*}/operations",
782-
},
783735
{
784736
"method": "get",
785737
"uri": "/v2/{name=projects/*/locations/*}/operations",
@@ -2173,18 +2125,6 @@ def __call__(
21732125
"""
21742126

21752127
http_options: List[Dict[str, str]] = [
2176-
{
2177-
"method": "get",
2178-
"uri": "/v1alpha1/{name=projects/*/locations/*}",
2179-
},
2180-
{
2181-
"method": "get",
2182-
"uri": "/v1/{name=projects/*/locations/*}",
2183-
},
2184-
{
2185-
"method": "get",
2186-
"uri": "/v2alpha1/{name=projects/*/locations/*}",
2187-
},
21882128
{
21892129
"method": "get",
21902130
"uri": "/v2/{name=projects/*/locations/*}",
@@ -2252,18 +2192,6 @@ def __call__(
22522192
"""
22532193

22542194
http_options: List[Dict[str, str]] = [
2255-
{
2256-
"method": "get",
2257-
"uri": "/v1alpha1/{name=projects/*}/locations",
2258-
},
2259-
{
2260-
"method": "get",
2261-
"uri": "/v1/{name=projects/*}/locations",
2262-
},
2263-
{
2264-
"method": "get",
2265-
"uri": "/v2alpha1/{name=projects/*}/locations",
2266-
},
22672195
{
22682196
"method": "get",
22692197
"uri": "/v2/{name=projects/*}/locations",
@@ -2328,18 +2256,6 @@ def __call__(
23282256
"""
23292257

23302258
http_options: List[Dict[str, str]] = [
2331-
{
2332-
"method": "post",
2333-
"uri": "/v1alpha1/{name=projects/*/locations/*/operations/*}:cancel",
2334-
},
2335-
{
2336-
"method": "post",
2337-
"uri": "/v1/{name=projects/*/locations/*/operations/*}:cancel",
2338-
},
2339-
{
2340-
"method": "post",
2341-
"uri": "/v2alpha1/{name=projects/*/locations/*/operations/*}:cancel",
2342-
},
23432259
{
23442260
"method": "post",
23452261
"uri": "/v2/{name=projects/*/locations/*/operations/*}:cancel",
@@ -2403,18 +2319,6 @@ def __call__(
24032319
"""
24042320

24052321
http_options: List[Dict[str, str]] = [
2406-
{
2407-
"method": "delete",
2408-
"uri": "/v1alpha1/{name=projects/*/locations/*/operations/*}",
2409-
},
2410-
{
2411-
"method": "delete",
2412-
"uri": "/v1/{name=projects/*/locations/*/operations/*}",
2413-
},
2414-
{
2415-
"method": "delete",
2416-
"uri": "/v2alpha1/{name=projects/*/locations/*/operations/*}",
2417-
},
24182322
{
24192323
"method": "delete",
24202324
"uri": "/v2/{name=projects/*/locations/*/operations/*}",
@@ -2481,18 +2385,6 @@ def __call__(
24812385
"""
24822386

24832387
http_options: List[Dict[str, str]] = [
2484-
{
2485-
"method": "get",
2486-
"uri": "/v1alpha1/{name=projects/*/locations/*/operations/*}",
2487-
},
2488-
{
2489-
"method": "get",
2490-
"uri": "/v1/{name=projects/*/locations/*/operations/*}",
2491-
},
2492-
{
2493-
"method": "get",
2494-
"uri": "/v2alpha1/{name=projects/*/locations/*/operations/*}",
2495-
},
24962388
{
24972389
"method": "get",
24982390
"uri": "/v2/{name=projects/*/locations/*/operations/*}",
@@ -2560,18 +2452,6 @@ def __call__(
25602452
"""
25612453

25622454
http_options: List[Dict[str, str]] = [
2563-
{
2564-
"method": "get",
2565-
"uri": "/v1alpha1/{name=projects/*/locations/*}/operations",
2566-
},
2567-
{
2568-
"method": "get",
2569-
"uri": "/v1/{name=projects/*/locations/*}/operations",
2570-
},
2571-
{
2572-
"method": "get",
2573-
"uri": "/v2alpha1/{name=projects/*/locations/*}/operations",
2574-
},
25752455
{
25762456
"method": "get",
25772457
"uri": "/v2/{name=projects/*/locations/*}/operations",

packages/google-cloud-tpu/google/cloud/tpu_v2alpha1/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
from google.cloud.tpu import gapic_version as package_version
16+
from google.cloud.tpu_v2alpha1 import gapic_version as package_version
1717

1818
__version__ = package_version.__version__
1919

packages/google-cloud-tpu/samples/generated_samples/snippet_metadata_google.cloud.tpu.v1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-tpu",
11-
"version": "1.7.1"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-tpu/samples/generated_samples/snippet_metadata_google.cloud.tpu.v2.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-tpu",
11-
"version": "1.7.1"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

packages/google-cloud-tpu/samples/generated_samples/snippet_metadata_google.cloud.tpu.v2alpha1.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
],
99
"language": "PYTHON",
1010
"name": "google-cloud-tpu",
11-
"version": "1.7.1"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)