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

Commit d09735a

Browse files
chore: Update gapic-generator-python to v1.8.5 (#158)
* 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 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 9f6f83b commit d09735a

10 files changed

+58
-50
lines changed

google/cloud/deploy_v1/services/cloud_deploy/transports/rest.py

Lines changed: 41 additions & 49 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 (
@@ -755,7 +755,7 @@ def pre_get_location(
755755
self,
756756
request: locations_pb2.GetLocationRequest,
757757
metadata: Sequence[Tuple[str, str]],
758-
) -> locations_pb2.Location:
758+
) -> Tuple[locations_pb2.GetLocationRequest, Sequence[Tuple[str, str]]]:
759759
"""Pre-rpc interceptor for get_location
760760
761761
Override in a subclass to manipulate the request or metadata
@@ -764,7 +764,7 @@ def pre_get_location(
764764
return request, metadata
765765

766766
def post_get_location(
767-
self, response: locations_pb2.GetLocationRequest
767+
self, response: locations_pb2.Location
768768
) -> locations_pb2.Location:
769769
"""Post-rpc interceptor for get_location
770770
@@ -778,7 +778,7 @@ def pre_list_locations(
778778
self,
779779
request: locations_pb2.ListLocationsRequest,
780780
metadata: Sequence[Tuple[str, str]],
781-
) -> locations_pb2.ListLocationsResponse:
781+
) -> Tuple[locations_pb2.ListLocationsRequest, Sequence[Tuple[str, str]]]:
782782
"""Pre-rpc interceptor for list_locations
783783
784784
Override in a subclass to manipulate the request or metadata
@@ -787,7 +787,7 @@ def pre_list_locations(
787787
return request, metadata
788788

789789
def post_list_locations(
790-
self, response: locations_pb2.ListLocationsRequest
790+
self, response: locations_pb2.ListLocationsResponse
791791
) -> locations_pb2.ListLocationsResponse:
792792
"""Post-rpc interceptor for list_locations
793793
@@ -801,17 +801,15 @@ def pre_get_iam_policy(
801801
self,
802802
request: iam_policy_pb2.GetIamPolicyRequest,
803803
metadata: Sequence[Tuple[str, str]],
804-
) -> policy_pb2.Policy:
804+
) -> Tuple[iam_policy_pb2.GetIamPolicyRequest, Sequence[Tuple[str, str]]]:
805805
"""Pre-rpc interceptor for get_iam_policy
806806
807807
Override in a subclass to manipulate the request or metadata
808808
before they are sent to the CloudDeploy server.
809809
"""
810810
return request, metadata
811811

812-
def post_get_iam_policy(
813-
self, response: iam_policy_pb2.GetIamPolicyRequest
814-
) -> policy_pb2.Policy:
812+
def post_get_iam_policy(self, response: policy_pb2.Policy) -> policy_pb2.Policy:
815813
"""Post-rpc interceptor for get_iam_policy
816814
817815
Override in a subclass to manipulate the response
@@ -824,17 +822,15 @@ def pre_set_iam_policy(
824822
self,
825823
request: iam_policy_pb2.SetIamPolicyRequest,
826824
metadata: Sequence[Tuple[str, str]],
827-
) -> policy_pb2.Policy:
825+
) -> Tuple[iam_policy_pb2.SetIamPolicyRequest, Sequence[Tuple[str, str]]]:
828826
"""Pre-rpc interceptor for set_iam_policy
829827
830828
Override in a subclass to manipulate the request or metadata
831829
before they are sent to the CloudDeploy server.
832830
"""
833831
return request, metadata
834832

835-
def post_set_iam_policy(
836-
self, response: iam_policy_pb2.SetIamPolicyRequest
837-
) -> policy_pb2.Policy:
833+
def post_set_iam_policy(self, response: policy_pb2.Policy) -> policy_pb2.Policy:
838834
"""Post-rpc interceptor for set_iam_policy
839835
840836
Override in a subclass to manipulate the response
@@ -847,7 +843,7 @@ def pre_test_iam_permissions(
847843
self,
848844
request: iam_policy_pb2.TestIamPermissionsRequest,
849845
metadata: Sequence[Tuple[str, str]],
850-
) -> iam_policy_pb2.TestIamPermissionsResponse:
846+
) -> Tuple[iam_policy_pb2.TestIamPermissionsRequest, Sequence[Tuple[str, str]]]:
851847
"""Pre-rpc interceptor for test_iam_permissions
852848
853849
Override in a subclass to manipulate the request or metadata
@@ -856,7 +852,7 @@ def pre_test_iam_permissions(
856852
return request, metadata
857853

858854
def post_test_iam_permissions(
859-
self, response: iam_policy_pb2.TestIamPermissionsRequest
855+
self, response: iam_policy_pb2.TestIamPermissionsResponse
860856
) -> iam_policy_pb2.TestIamPermissionsResponse:
861857
"""Post-rpc interceptor for test_iam_permissions
862858
@@ -870,17 +866,15 @@ def pre_cancel_operation(
870866
self,
871867
request: operations_pb2.CancelOperationRequest,
872868
metadata: Sequence[Tuple[str, str]],
873-
) -> None:
869+
) -> Tuple[operations_pb2.CancelOperationRequest, Sequence[Tuple[str, str]]]:
874870
"""Pre-rpc interceptor for cancel_operation
875871
876872
Override in a subclass to manipulate the request or metadata
877873
before they are sent to the CloudDeploy server.
878874
"""
879875
return request, metadata
880876

881-
def post_cancel_operation(
882-
self, response: operations_pb2.CancelOperationRequest
883-
) -> None:
877+
def post_cancel_operation(self, response: None) -> None:
884878
"""Post-rpc interceptor for cancel_operation
885879
886880
Override in a subclass to manipulate the response
@@ -893,17 +887,15 @@ def pre_delete_operation(
893887
self,
894888
request: operations_pb2.DeleteOperationRequest,
895889
metadata: Sequence[Tuple[str, str]],
896-
) -> None:
890+
) -> Tuple[operations_pb2.DeleteOperationRequest, Sequence[Tuple[str, str]]]:
897891
"""Pre-rpc interceptor for delete_operation
898892
899893
Override in a subclass to manipulate the request or metadata
900894
before they are sent to the CloudDeploy server.
901895
"""
902896
return request, metadata
903897

904-
def post_delete_operation(
905-
self, response: operations_pb2.DeleteOperationRequest
906-
) -> None:
898+
def post_delete_operation(self, response: None) -> None:
907899
"""Post-rpc interceptor for delete_operation
908900
909901
Override in a subclass to manipulate the response
@@ -916,7 +908,7 @@ def pre_get_operation(
916908
self,
917909
request: operations_pb2.GetOperationRequest,
918910
metadata: Sequence[Tuple[str, str]],
919-
) -> operations_pb2.Operation:
911+
) -> Tuple[operations_pb2.GetOperationRequest, Sequence[Tuple[str, str]]]:
920912
"""Pre-rpc interceptor for get_operation
921913
922914
Override in a subclass to manipulate the request or metadata
@@ -925,7 +917,7 @@ def pre_get_operation(
925917
return request, metadata
926918

927919
def post_get_operation(
928-
self, response: operations_pb2.GetOperationRequest
920+
self, response: operations_pb2.Operation
929921
) -> operations_pb2.Operation:
930922
"""Post-rpc interceptor for get_operation
931923
@@ -939,7 +931,7 @@ def pre_list_operations(
939931
self,
940932
request: operations_pb2.ListOperationsRequest,
941933
metadata: Sequence[Tuple[str, str]],
942-
) -> operations_pb2.ListOperationsResponse:
934+
) -> Tuple[operations_pb2.ListOperationsRequest, Sequence[Tuple[str, str]]]:
943935
"""Pre-rpc interceptor for list_operations
944936
945937
Override in a subclass to manipulate the request or metadata
@@ -948,7 +940,7 @@ def pre_list_operations(
948940
return request, metadata
949941

950942
def post_list_operations(
951-
self, response: operations_pb2.ListOperationsRequest
943+
self, response: operations_pb2.ListOperationsResponse
952944
) -> operations_pb2.ListOperationsResponse:
953945
"""Post-rpc interceptor for list_operations
954946
@@ -1115,7 +1107,7 @@ class _AbandonRelease(CloudDeployRestStub):
11151107
def __hash__(self):
11161108
return hash("AbandonRelease")
11171109

1118-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
1110+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
11191111

11201112
@classmethod
11211113
def _get_unset_required_fields(cls, message_dict):
@@ -1210,7 +1202,7 @@ class _ApproveRollout(CloudDeployRestStub):
12101202
def __hash__(self):
12111203
return hash("ApproveRollout")
12121204

1213-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
1205+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
12141206

12151207
@classmethod
12161208
def _get_unset_required_fields(cls, message_dict):
@@ -1305,7 +1297,7 @@ class _CreateDeliveryPipeline(CloudDeployRestStub):
13051297
def __hash__(self):
13061298
return hash("CreateDeliveryPipeline")
13071299

1308-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {
1300+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
13091301
"deliveryPipelineId": "",
13101302
}
13111303

@@ -1405,7 +1397,7 @@ class _CreateRelease(CloudDeployRestStub):
14051397
def __hash__(self):
14061398
return hash("CreateRelease")
14071399

1408-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {
1400+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
14091401
"releaseId": "",
14101402
}
14111403

@@ -1503,7 +1495,7 @@ class _CreateRollout(CloudDeployRestStub):
15031495
def __hash__(self):
15041496
return hash("CreateRollout")
15051497

1506-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {
1498+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
15071499
"rolloutId": "",
15081500
}
15091501

@@ -1603,7 +1595,7 @@ class _CreateTarget(CloudDeployRestStub):
16031595
def __hash__(self):
16041596
return hash("CreateTarget")
16051597

1606-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {
1598+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
16071599
"targetId": "",
16081600
}
16091601

@@ -1701,7 +1693,7 @@ class _DeleteDeliveryPipeline(CloudDeployRestStub):
17011693
def __hash__(self):
17021694
return hash("DeleteDeliveryPipeline")
17031695

1704-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
1696+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
17051697

17061698
@classmethod
17071699
def _get_unset_required_fields(cls, message_dict):
@@ -1790,7 +1782,7 @@ class _DeleteTarget(CloudDeployRestStub):
17901782
def __hash__(self):
17911783
return hash("DeleteTarget")
17921784

1793-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
1785+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
17941786

17951787
@classmethod
17961788
def _get_unset_required_fields(cls, message_dict):
@@ -1877,7 +1869,7 @@ class _GetConfig(CloudDeployRestStub):
18771869
def __hash__(self):
18781870
return hash("GetConfig")
18791871

1880-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
1872+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
18811873

18821874
@classmethod
18831875
def _get_unset_required_fields(cls, message_dict):
@@ -1963,7 +1955,7 @@ class _GetDeliveryPipeline(CloudDeployRestStub):
19631955
def __hash__(self):
19641956
return hash("GetDeliveryPipeline")
19651957

1966-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
1958+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
19671959

19681960
@classmethod
19691961
def _get_unset_required_fields(cls, message_dict):
@@ -2056,7 +2048,7 @@ class _GetJobRun(CloudDeployRestStub):
20562048
def __hash__(self):
20572049
return hash("GetJobRun")
20582050

2059-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
2051+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
20602052

20612053
@classmethod
20622054
def _get_unset_required_fields(cls, message_dict):
@@ -2148,7 +2140,7 @@ class _GetRelease(CloudDeployRestStub):
21482140
def __hash__(self):
21492141
return hash("GetRelease")
21502142

2151-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
2143+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
21522144

21532145
@classmethod
21542146
def _get_unset_required_fields(cls, message_dict):
@@ -2238,7 +2230,7 @@ class _GetRollout(CloudDeployRestStub):
22382230
def __hash__(self):
22392231
return hash("GetRollout")
22402232

2241-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
2233+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
22422234

22432235
@classmethod
22442236
def _get_unset_required_fields(cls, message_dict):
@@ -2330,7 +2322,7 @@ class _GetTarget(CloudDeployRestStub):
23302322
def __hash__(self):
23312323
return hash("GetTarget")
23322324

2333-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
2325+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
23342326

23352327
@classmethod
23362328
def _get_unset_required_fields(cls, message_dict):
@@ -2420,7 +2412,7 @@ class _ListDeliveryPipelines(CloudDeployRestStub):
24202412
def __hash__(self):
24212413
return hash("ListDeliveryPipelines")
24222414

2423-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
2415+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
24242416

24252417
@classmethod
24262418
def _get_unset_required_fields(cls, message_dict):
@@ -2508,7 +2500,7 @@ class _ListJobRuns(CloudDeployRestStub):
25082500
def __hash__(self):
25092501
return hash("ListJobRuns")
25102502

2511-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
2503+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
25122504

25132505
@classmethod
25142506
def _get_unset_required_fields(cls, message_dict):
@@ -2598,7 +2590,7 @@ class _ListReleases(CloudDeployRestStub):
25982590
def __hash__(self):
25992591
return hash("ListReleases")
26002592

2601-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
2593+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
26022594

26032595
@classmethod
26042596
def _get_unset_required_fields(cls, message_dict):
@@ -2684,7 +2676,7 @@ class _ListRollouts(CloudDeployRestStub):
26842676
def __hash__(self):
26852677
return hash("ListRollouts")
26862678

2687-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
2679+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
26882680

26892681
@classmethod
26902682
def _get_unset_required_fields(cls, message_dict):
@@ -2774,7 +2766,7 @@ class _ListTargets(CloudDeployRestStub):
27742766
def __hash__(self):
27752767
return hash("ListTargets")
27762768

2777-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
2769+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
27782770

27792771
@classmethod
27802772
def _get_unset_required_fields(cls, message_dict):
@@ -2860,7 +2852,7 @@ class _RetryJob(CloudDeployRestStub):
28602852
def __hash__(self):
28612853
return hash("RetryJob")
28622854

2863-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {}
2855+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {}
28642856

28652857
@classmethod
28662858
def _get_unset_required_fields(cls, message_dict):
@@ -2957,7 +2949,7 @@ class _UpdateDeliveryPipeline(CloudDeployRestStub):
29572949
def __hash__(self):
29582950
return hash("UpdateDeliveryPipeline")
29592951

2960-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {
2952+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
29612953
"updateMask": {},
29622954
}
29632955

@@ -3057,7 +3049,7 @@ class _UpdateTarget(CloudDeployRestStub):
30573049
def __hash__(self):
30583050
return hash("UpdateTarget")
30593051

3060-
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {
3052+
__REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {
30613053
"updateMask": {},
30623054
}
30633055

google/cloud/deploy_v1/types/cloud_deploy.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

google/cloud/deploy_v1/types/deliverypipeline_notification_payload.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
import proto # type: ignore

0 commit comments

Comments
 (0)