diff --git a/google/cloud/api_keys_v2/services/api_keys/transports/rest.py b/google/cloud/api_keys_v2/services/api_keys/transports/rest.py index 4ef0d99..2b82626 100644 --- a/google/cloud/api_keys_v2/services/api_keys/transports/rest.py +++ b/google/cloud/api_keys_v2/services/api_keys/transports/rest.py @@ -17,7 +17,7 @@ import dataclasses import json # type: ignore import re -from typing import Callable, Dict, List, Optional, Sequence, Tuple, Union +from typing import Any, Callable, Dict, List, Optional, Sequence, Tuple, Union import warnings from google.api_core import ( @@ -312,7 +312,7 @@ def pre_get_operation( self, request: operations_pb2.GetOperationRequest, metadata: Sequence[Tuple[str, str]], - ) -> operations_pb2.Operation: + ) -> Tuple[operations_pb2.GetOperationRequest, Sequence[Tuple[str, str]]]: """Pre-rpc interceptor for get_operation Override in a subclass to manipulate the request or metadata @@ -321,7 +321,7 @@ def pre_get_operation( return request, metadata def post_get_operation( - self, response: operations_pb2.GetOperationRequest + self, response: operations_pb2.Operation ) -> operations_pb2.Operation: """Post-rpc interceptor for get_operation @@ -467,7 +467,7 @@ class _CreateKey(ApiKeysRestStub): def __hash__(self): return hash("CreateKey") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} @classmethod def _get_unset_required_fields(cls, message_dict): @@ -563,7 +563,7 @@ class _DeleteKey(ApiKeysRestStub): def __hash__(self): return hash("DeleteKey") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} @classmethod def _get_unset_required_fields(cls, message_dict): @@ -650,7 +650,7 @@ class _GetKey(ApiKeysRestStub): def __hash__(self): return hash("GetKey") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} @classmethod def _get_unset_required_fields(cls, message_dict): @@ -738,7 +738,7 @@ class _GetKeyString(ApiKeysRestStub): def __hash__(self): return hash("GetKeyString") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} @classmethod def _get_unset_required_fields(cls, message_dict): @@ -824,7 +824,7 @@ class _ListKeys(ApiKeysRestStub): def __hash__(self): return hash("ListKeys") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} @classmethod def _get_unset_required_fields(cls, message_dict): @@ -910,7 +910,7 @@ class _LookupKey(ApiKeysRestStub): def __hash__(self): return hash("LookupKey") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = { + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = { "keyString": "", } @@ -998,7 +998,7 @@ class _UndeleteKey(ApiKeysRestStub): def __hash__(self): return hash("UndeleteKey") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} @classmethod def _get_unset_required_fields(cls, message_dict): @@ -1094,7 +1094,7 @@ class _UpdateKey(ApiKeysRestStub): def __hash__(self): return hash("UpdateKey") - __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, str] = {} + __REQUIRED_FIELDS_DEFAULT_VALUES: Dict[str, Any] = {} @classmethod def _get_unset_required_fields(cls, message_dict): diff --git a/google/cloud/api_keys_v2/types/apikeys.py b/google/cloud/api_keys_v2/types/apikeys.py index 142b8fd..235c81b 100644 --- a/google/cloud/api_keys_v2/types/apikeys.py +++ b/google/cloud/api_keys_v2/types/apikeys.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from __future__ import annotations + from typing import MutableMapping, MutableSequence from google.protobuf import field_mask_pb2 # type: ignore diff --git a/google/cloud/api_keys_v2/types/resources.py b/google/cloud/api_keys_v2/types/resources.py index e76e6c6..a75ff4c 100644 --- a/google/cloud/api_keys_v2/types/resources.py +++ b/google/cloud/api_keys_v2/types/resources.py @@ -13,6 +13,8 @@ # See the License for the specific language governing permissions and # limitations under the License. # +from __future__ import annotations + from typing import MutableMapping, MutableSequence from google.protobuf import timestamp_pb2 # type: ignore