Skip to content
This repository was archived by the owner on Jul 6, 2023. It is now read-only.

Commit 0c352bc

Browse files
chore: Update gapic-generator-python to v1.8.5 (#217)
* chore: Update gapic-generator-python to v1.8.5 PiperOrigin-RevId: 511892190 Source-Link: googleapis/googleapis@a45d9c0 Source-Link: https://github.com/googleapis/googleapis-gen/commit/1907294b1d8365ea24f8c5f2e059a64124c4ed3b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTkwNzI5NGIxZDgzNjVlYTI0ZjhjNWYyZTA1OWE2NDEyNGM0ZWQzYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * revert --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent dafa8ac commit 0c352bc

File tree

7 files changed

+35
-33
lines changed

7 files changed

+35
-33
lines changed

google/cloud/tpu_v1/types/cloud_tpu.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
from __future__ import annotations
17+
1618
from typing import MutableMapping, MutableSequence
1719

1820
from google.protobuf import timestamp_pb2 # type: ignore

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

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
import dataclasses
1818
import json # type: ignore
1919
import re
20-
from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union
20+
from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union
2121
import warnings
2222

2323
from google.api_core import (
@@ -470,7 +470,7 @@ def pre_get_location(
470470
self,
471471
request: locations_pb2.GetLocationRequest,
472472
metadata: Sequence[Tuple[str, str]],
473-
) -> locations_pb2.Location:
473+
) -> Tuple[locations_pb2.GetLocationRequest, Sequence[Tuple[str, str]]]:
474474
"""Pre-rpc interceptor for get_location
475475
476476
Override in a subclass to manipulate the request or metadata
@@ -479,7 +479,7 @@ def pre_get_location(
479479
return request, metadata
480480

481481
def post_get_location(
482-
self, response: locations_pb2.GetLocationRequest
482+
self, response: locations_pb2.Location
483483
) -> locations_pb2.Location:
484484
"""Post-rpc interceptor for get_location
485485
@@ -493,7 +493,7 @@ def pre_list_locations(
493493
self,
494494
request: locations_pb2.ListLocationsRequest,
495495
metadata: Sequence[Tuple[str, str]],
496-
) -> locations_pb2.ListLocationsResponse:
496+
) -> Tuple[locations_pb2.ListLocationsRequest, Sequence[Tuple[str, str]]]:
497497
"""Pre-rpc interceptor for list_locations
498498
499499
Override in a subclass to manipulate the request or metadata
@@ -502,7 +502,7 @@ def pre_list_locations(
502502
return request, metadata
503503

504504
def post_list_locations(
505-
self, response: locations_pb2.ListLocationsRequest
505+
self, response: locations_pb2.ListLocationsResponse
506506
) -> locations_pb2.ListLocationsResponse:
507507
"""Post-rpc interceptor for list_locations
508508
@@ -516,17 +516,15 @@ def pre_cancel_operation(
516516
self,
517517
request: operations_pb2.CancelOperationRequest,
518518
metadata: Sequence[Tuple[str, str]],
519-
) -> None:
519+
) -> Tuple[operations_pb2.CancelOperationRequest, Sequence[Tuple[str, str]]]:
520520
"""Pre-rpc interceptor for cancel_operation
521521
522522
Override in a subclass to manipulate the request or metadata
523523
before they are sent to the Tpu server.
524524
"""
525525
return request, metadata
526526

527-
def post_cancel_operation(
528-
self, response: operations_pb2.CancelOperationRequest
529-
) -> None:
527+
def post_cancel_operation(self, response: None) -> None:
530528
"""Post-rpc interceptor for cancel_operation
531529
532530
Override in a subclass to manipulate the response
@@ -539,17 +537,15 @@ def pre_delete_operation(
539537
self,
540538
request: operations_pb2.DeleteOperationRequest,
541539
metadata: Sequence[Tuple[str, str]],
542-
) -> None:
540+
) -> Tuple[operations_pb2.DeleteOperationRequest, Sequence[Tuple[str, str]]]:
543541
"""Pre-rpc interceptor for delete_operation
544542
545543
Override in a subclass to manipulate the request or metadata
546544
before they are sent to the Tpu server.
547545
"""
548546
return request, metadata
549547

550-
def post_delete_operation(
551-
self, response: operations_pb2.DeleteOperationRequest
552-
) -> None:
548+
def post_delete_operation(self, response: None) -> None:
553549
"""Post-rpc interceptor for delete_operation
554550
555551
Override in a subclass to manipulate the response
@@ -562,7 +558,7 @@ def pre_get_operation(
562558
self,
563559
request: operations_pb2.GetOperationRequest,
564560
metadata: Sequence[Tuple[str, str]],
565-
) -> operations_pb2.Operation:
561+
) -> Tuple[operations_pb2.GetOperationRequest, Sequence[Tuple[str, str]]]:
566562
"""Pre-rpc interceptor for get_operation
567563
568564
Override in a subclass to manipulate the request or metadata
@@ -571,7 +567,7 @@ def pre_get_operation(
571567
return request, metadata
572568

573569
def post_get_operation(
574-
self, response: operations_pb2.GetOperationRequest
570+
self, response: operations_pb2.Operation
575571
) -> operations_pb2.Operation:
576572
"""Post-rpc interceptor for get_operation
577573
@@ -585,7 +581,7 @@ def pre_list_operations(
585581
self,
586582
request: operations_pb2.ListOperationsRequest,
587583
metadata: Sequence[Tuple[str, str]],
588-
) -> operations_pb2.ListOperationsResponse:
584+
) -> Tuple[operations_pb2.ListOperationsRequest, Sequence[Tuple[str, str]]]:
589585
"""Pre-rpc interceptor for list_operations
590586
591587
Override in a subclass to manipulate the request or metadata
@@ -594,7 +590,7 @@ def pre_list_operations(
594590
return request, metadata
595591

596592
def post_list_operations(
597-
self, response: operations_pb2.ListOperationsRequest
593+
self, response: operations_pb2.ListOperationsResponse
598594
) -> operations_pb2.ListOperationsResponse:
599595
"""Post-rpc interceptor for list_operations
600596
@@ -759,7 +755,7 @@ class _CreateNode(TpuRestStub):
759755
def __hash__(self):
760756
return hash("CreateNode")
761757

762-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
758+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
763759

764760
@classmethod
765761
def _get_unset_required_fields(cls, message_dict):
@@ -857,7 +853,7 @@ class _DeleteNode(TpuRestStub):
857853
def __hash__(self):
858854
return hash("DeleteNode")
859855

860-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
856+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
861857

862858
@classmethod
863859
def _get_unset_required_fields(cls, message_dict):
@@ -946,7 +942,7 @@ class _GenerateServiceIdentity(TpuRestStub):
946942
def __hash__(self):
947943
return hash("GenerateServiceIdentity")
948944

949-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
945+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
950946

951947
@classmethod
952948
def _get_unset_required_fields(cls, message_dict):
@@ -1047,7 +1043,7 @@ class _GetAcceleratorType(TpuRestStub):
10471043
def __hash__(self):
10481044
return hash("GetAcceleratorType")
10491045

1050-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
1046+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
10511047

10521048
@classmethod
10531049
def _get_unset_required_fields(cls, message_dict):
@@ -1139,7 +1135,7 @@ class _GetGuestAttributes(TpuRestStub):
11391135
def __hash__(self):
11401136
return hash("GetGuestAttributes")
11411137

1142-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
1138+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
11431139

11441140
@classmethod
11451141
def _get_unset_required_fields(cls, message_dict):
@@ -1240,7 +1236,7 @@ class _GetNode(TpuRestStub):
12401236
def __hash__(self):
12411237
return hash("GetNode")
12421238

1243-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
1239+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
12441240

12451241
@classmethod
12461242
def _get_unset_required_fields(cls, message_dict):
@@ -1326,7 +1322,7 @@ class _GetRuntimeVersion(TpuRestStub):
13261322
def __hash__(self):
13271323
return hash("GetRuntimeVersion")
13281324

1329-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
1325+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
13301326

13311327
@classmethod
13321328
def _get_unset_required_fields(cls, message_dict):
@@ -1418,7 +1414,7 @@ class _ListAcceleratorTypes(TpuRestStub):
14181414
def __hash__(self):
14191415
return hash("ListAcceleratorTypes")
14201416

1421-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
1417+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
14221418

14231419
@classmethod
14241420
def _get_unset_required_fields(cls, message_dict):
@@ -1510,7 +1506,7 @@ class _ListNodes(TpuRestStub):
15101506
def __hash__(self):
15111507
return hash("ListNodes")
15121508

1513-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
1509+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
15141510

15151511
@classmethod
15161512
def _get_unset_required_fields(cls, message_dict):
@@ -1600,7 +1596,7 @@ class _ListRuntimeVersions(TpuRestStub):
16001596
def __hash__(self):
16011597
return hash("ListRuntimeVersions")
16021598

1603-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
1599+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
16041600

16051601
@classmethod
16061602
def _get_unset_required_fields(cls, message_dict):
@@ -1692,7 +1688,7 @@ class _StartNode(TpuRestStub):
16921688
def __hash__(self):
16931689
return hash("StartNode")
16941690

1695-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
1691+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
16961692

16971693
@classmethod
16981694
def _get_unset_required_fields(cls, message_dict):
@@ -1790,7 +1786,7 @@ class _StopNode(TpuRestStub):
17901786
def __hash__(self):
17911787
return hash("StopNode")
17921788

1793-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
1789+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
17941790

17951791
@classmethod
17961792
def _get_unset_required_fields(cls, message_dict):
@@ -1888,7 +1884,7 @@ class _UpdateNode(TpuRestStub):
18881884
def __hash__(self):
18891885
return hash("UpdateNode")
18901886

1891-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {
1887+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
18921888
"updateMask": {},
18931889
}
18941890

google/cloud/tpu_v2/types/cloud_tpu.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
from __future__ import annotations
17+
1618
from typing import MutableMapping, MutableSequence
1719

1820
from google.protobuf import field_mask_pb2 # type: ignore

google/cloud/tpu_v2alpha1/types/cloud_tpu.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
from __future__ import annotations
17+
1618
from typing import MutableMapping, MutableSequence
1719

1820
from google.protobuf import duration_pb2 # type: ignore

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.8.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

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.8.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

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.8.0"
11+
"version": "0.1.0"
1212
},
1313
"snippets": [
1414
{

0 commit comments

Comments
 (0)