diff --git a/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/_mixins.py.j2 b/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/_mixins.py.j2 index 3179d8bbd9..f264ce8886 100644 --- a/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/_mixins.py.j2 +++ b/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/_mixins.py.j2 @@ -6,7 +6,7 @@ request: Optional[operations_pb2.ListOperationsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.ListOperationsResponse: r"""Lists operations that match the specified filter in the request. @@ -60,7 +60,7 @@ request: Optional[operations_pb2.GetOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Gets the latest state of a long-running operation. @@ -113,7 +113,7 @@ request: Optional[operations_pb2.DeleteOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes a long-running operation. @@ -166,7 +166,7 @@ request: Optional[operations_pb2.CancelOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Starts asynchronous cancellation on a long-running operation. @@ -218,7 +218,7 @@ request: Optional[operations_pb2.WaitOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Waits until the specified long-running operation is done or reaches at most @@ -277,7 +277,7 @@ request: Optional[iam_policy_pb2.SetIamPolicyRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> policy_pb2.Policy: r"""Sets the IAM access control policy on the specified function. @@ -396,7 +396,7 @@ request: Optional[iam_policy_pb2.GetIamPolicyRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> policy_pb2.Policy: r"""Gets the IAM access control policy for a function. @@ -516,7 +516,7 @@ request: Optional[iam_policy_pb2.TestIamPermissionsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> iam_policy_pb2.TestIamPermissionsResponse: r"""Tests the specified IAM permissions against the IAM access control @@ -578,7 +578,7 @@ request: Optional[locations_pb2.GetLocationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.Location: r"""Gets information about a location. @@ -631,7 +631,7 @@ request: Optional[locations_pb2.ListLocationsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.ListLocationsResponse: r"""Lists information about the supported locations for this service. diff --git a/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/client.py.j2 b/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/client.py.j2 index d0066988cb..ea09cad6a7 100644 --- a/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/client.py.j2 +++ b/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/client.py.j2 @@ -350,7 +350,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): *, {% endif %} retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), {% if not method.server_streaming %} ) -> {{ method.client_output.ident }}: @@ -519,7 +519,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): request: Optional[iam_policy_pb2.SetIamPolicyRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> policy_pb2.Policy: r"""Sets the IAM access control policy on the specified function. @@ -636,7 +636,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): request: Optional[iam_policy_pb2.GetIamPolicyRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> policy_pb2.Policy: r"""Gets the IAM access control policy for a function. @@ -753,7 +753,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): request: Optional[iam_policy_pb2.TestIamPermissionsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> iam_policy_pb2.TestIamPermissionsResponse: r"""Tests the specified IAM permissions against the IAM access control diff --git a/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/rest.py.j2 b/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/rest.py.j2 index ef32dbd4ae..98ba58df17 100644 --- a/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/rest.py.j2 +++ b/gapic/ads-templates/%namespace/%name/%version/%sub/services/%service/transports/rest.py.j2 @@ -251,7 +251,8 @@ class {{service.name}}RestTransport({{service.name}}Transport): # use the credentials which are saved credentials=self._credentials, scopes=self._scopes, - http_options=http_options) + http_options=http_options, + path_prefix="{{ service.client_package_version }}") self._operations_client = operations_v1.AbstractOperationsClient(transport=rest_transport) @@ -282,9 +283,9 @@ class {{service.name}}RestTransport({{service.name}}Transport): def __call__(self, request: {{method.input.ident}}, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ){% if not method.void %} -> {% if not method.server_streaming %}{{method.output.ident}}{% else %}rest_streaming.ResponseIterator{% endif %}{% endif %}: {% if method.http_options and not method.client_streaming %} r"""Call the {{- ' ' -}} diff --git a/gapic/schema/wrappers.py b/gapic/schema/wrappers.py index 4d9830d5c6..b32af50b94 100644 --- a/gapic/schema/wrappers.py +++ b/gapic/schema/wrappers.py @@ -1637,6 +1637,10 @@ def client_name(self) -> str: """Returns the name of the generated client class""" return self.name + "Client" + @property + def client_package_version(self) -> str: + return self.meta.address.package[-1] if self.meta.address.package else "" + @property def async_client_name(self) -> str: """Returns the name of the generated AsyncIO client class""" diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/_async_mixins.py.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/_async_mixins.py.j2 index 0f1727f0de..9fc240a34c 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/_async_mixins.py.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/_async_mixins.py.j2 @@ -8,7 +8,7 @@ request: Optional[operations_pb2.ListOperationsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.ListOperationsResponse: r"""Lists operations that match the specified filter in the request. @@ -62,7 +62,7 @@ request: Optional[operations_pb2.GetOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Gets the latest state of a long-running operation. @@ -115,7 +115,7 @@ request: Optional[operations_pb2.DeleteOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes a long-running operation. @@ -168,7 +168,7 @@ request: Optional[operations_pb2.CancelOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Starts asynchronous cancellation on a long-running operation. @@ -220,7 +220,7 @@ request: Optional[operations_pb2.WaitOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Waits until the specified long-running operation is done or reaches at most @@ -284,7 +284,7 @@ request: Optional[iam_policy_pb2.SetIamPolicyRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> policy_pb2.Policy: r"""Sets the IAM access control policy on the specified function. @@ -403,7 +403,7 @@ request: Optional[iam_policy_pb2.GetIamPolicyRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> policy_pb2.Policy: r"""Gets the IAM access control policy for a function. @@ -523,7 +523,7 @@ request: Optional[iam_policy_pb2.TestIamPermissionsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> iam_policy_pb2.TestIamPermissionsResponse: r"""Tests the specified IAM permissions against the IAM access control @@ -585,7 +585,7 @@ request: Optional[locations_pb2.GetLocationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.Location: r"""Gets information about a location. @@ -638,7 +638,7 @@ request: Optional[locations_pb2.ListLocationsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.ListLocationsResponse: r"""Lists information about the supported locations for this service. diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/_client_macros.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/_client_macros.j2 index 440d162b14..1502f8fcc3 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/_client_macros.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/_client_macros.j2 @@ -27,7 +27,7 @@ *, {% endif %} retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), {% if method.extended_lro and not full_extended_lro %}{# This is a hack to preserve backwards compatibility with the "unary" surfaces #} ) -> {{ method.extended_lro.operation_type.ident }}: diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/_mixins.py.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/_mixins.py.j2 index ec1387acdd..8287ecf059 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/_mixins.py.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/_mixins.py.j2 @@ -6,7 +6,7 @@ request: Optional[operations_pb2.ListOperationsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.ListOperationsResponse: r"""Lists operations that match the specified filter in the request. @@ -60,7 +60,7 @@ request: Optional[operations_pb2.GetOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Gets the latest state of a long-running operation. @@ -113,7 +113,7 @@ request: Optional[operations_pb2.DeleteOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes a long-running operation. @@ -166,7 +166,7 @@ request: Optional[operations_pb2.CancelOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Starts asynchronous cancellation on a long-running operation. @@ -218,7 +218,7 @@ request: Optional[operations_pb2.WaitOperationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operations_pb2.Operation: r"""Waits until the specified long-running operation is done or reaches at most @@ -282,7 +282,7 @@ request: Optional[iam_policy_pb2.SetIamPolicyRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> policy_pb2.Policy: r"""Sets the IAM access control policy on the specified function. @@ -401,7 +401,7 @@ request: Optional[iam_policy_pb2.GetIamPolicyRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> policy_pb2.Policy: r"""Gets the IAM access control policy for a function. @@ -521,7 +521,7 @@ request: Optional[iam_policy_pb2.TestIamPermissionsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> iam_policy_pb2.TestIamPermissionsResponse: r"""Tests the specified IAM permissions against the IAM access control @@ -583,7 +583,7 @@ request: Optional[locations_pb2.GetLocationRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.Location: r"""Gets information about a location. @@ -636,7 +636,7 @@ request: Optional[locations_pb2.ListLocationsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> locations_pb2.ListLocationsResponse: r"""Lists information about the supported locations for this service. diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 index 88b142dd60..7bb2e8a9fe 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/async_client.py.j2 @@ -205,7 +205,7 @@ class {{ service.async_client_name }}: *, {% endif %} retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), {% if not method.server_streaming %} ) -> {{ method.client_output_async.ident }}: @@ -390,7 +390,7 @@ class {{ service.async_client_name }}: request: Optional[iam_policy_pb2.SetIamPolicyRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> policy_pb2.Policy: r"""Sets the IAM access control policy on the specified function. @@ -504,7 +504,7 @@ class {{ service.async_client_name }}: request: Optional[iam_policy_pb2.GetIamPolicyRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> policy_pb2.Policy: r"""Gets the IAM access control policy for a function. @@ -620,7 +620,7 @@ class {{ service.async_client_name }}: request: Optional[iam_policy_pb2.TestIamPermissionsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> iam_policy_pb2.TestIamPermissionsResponse: r"""Tests the specified permissions against the IAM access control diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 index d7667abd1f..92f65e78fd 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/client.py.j2 @@ -399,7 +399,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): request: Optional[iam_policy_pb2.SetIamPolicyRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> policy_pb2.Policy: r"""Sets the IAM access control policy on the specified function. @@ -516,7 +516,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): request: Optional[iam_policy_pb2.GetIamPolicyRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> policy_pb2.Policy: r"""Gets the IAM access control policy for a function. @@ -634,7 +634,7 @@ class {{ service.client_name }}(metaclass={{ service.client_name }}Meta): request: Optional[iam_policy_pb2.TestIamPermissionsRequest] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> iam_policy_pb2.TestIamPermissionsResponse: r"""Tests the specified IAM permissions against the IAM access control diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/_rest_mixins.py.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/_rest_mixins.py.j2 index 4dee95ceca..4a3726b1d8 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/_rest_mixins.py.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/_rest_mixins.py.j2 @@ -8,9 +8,9 @@ class _{{ name }}({{service.name}}RestStub): def __call__(self, request: {{ sig.request_type }}, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> {{ sig.response_type }}: r"""Call the {{- ' ' -}} diff --git a/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/rest.py.j2 b/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/rest.py.j2 index 126d6e00a6..5cb1667063 100644 --- a/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/rest.py.j2 +++ b/gapic/templates/%namespace/%name_%version/%sub/services/%service/transports/rest.py.j2 @@ -287,7 +287,8 @@ class {{service.name}}RestTransport({{service.name}}Transport): # use the credentials which are saved credentials=self._credentials, scopes=self._scopes, - http_options=http_options) + http_options=http_options, + path_prefix="{{ service.client_package_version }}") self._operations_client = operations_v1.AbstractOperationsClient(transport=rest_transport) @@ -318,9 +319,9 @@ class {{service.name}}RestTransport({{service.name}}Transport): def __call__(self, request: {{method.input.ident}}, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ){% if not method.void %} -> {% if not method.server_streaming %}{{method.output.ident}}{% else %}rest_streaming.ResponseIterator{% endif %}{% endif %}: {% if method.http_options and not method.client_streaming %} r"""Call the {{- ' ' -}} diff --git a/gapic/templates/noxfile.py.j2 b/gapic/templates/noxfile.py.j2 index d66e18cb23..9cfb353e84 100644 --- a/gapic/templates/noxfile.py.j2 +++ b/gapic/templates/noxfile.py.j2 @@ -73,7 +73,12 @@ def cover(session): @nox.session(python=ALL_PYTHON) def mypy(session): """Run the type checker.""" - session.install('mypy', 'types-pkg_resources') + session.install( + 'mypy', + 'types-pkg_resources', + 'types-requests', + 'types-protobuf' + ) session.install('.') session.run( 'mypy', diff --git a/gapic/templates/setup.py.j2 b/gapic/templates/setup.py.j2 index 6449154259..1c01e8f748 100644 --- a/gapic/templates/setup.py.j2 +++ b/gapic/templates/setup.py.j2 @@ -27,7 +27,7 @@ else: release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 1.33.2, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", + "google-api-core[grpc] >= 1.34.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*", "proto-plus >= 1.22.0, <2.0.0dev", "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", {# TODO: Remove after https://github.com/googleapis/gapic-generator-python/pull/1240 is merged. #} diff --git a/gapic/templates/testing/constraints-3.7.txt.j2 b/gapic/templates/testing/constraints-3.7.txt.j2 index a747f71dbb..73c04e56c3 100644 --- a/gapic/templates/testing/constraints-3.7.txt.j2 +++ b/gapic/templates/testing/constraints-3.7.txt.j2 @@ -4,7 +4,7 @@ # Pin the version to the lower bound. # e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", # Then this file should have google-cloud-foo==1.14.0 -google-api-core==1.33.2 +google-api-core==1.34.0 proto-plus==1.22.0 protobuf==3.19.5 {% if api.requires_package(('google', 'iam', 'v1')) or opts.add_iam_methods or api.has_iam_mixin %} diff --git a/tests/integration/BUILD.bazel b/tests/integration/BUILD.bazel index 5f1f0dd762..4e151c3146 100644 --- a/tests/integration/BUILD.bazel +++ b/tests/integration/BUILD.bazel @@ -119,18 +119,17 @@ py_gapic_library( transport = "grpc+rest", ) -# Uncomment once https://github.com/googleapis/gapic-generator-python/issues/1359 is fixed -#py_test( -# name = "logging_py_gapic_test", -# srcs = [ -# "logging_py_gapic_pytest.py", -# "logging_py_gapic_test.py", -# ], -# legacy_create_init = False, -# deps = [ -# ":logging_py_gapic", -# ], -#) +py_test( + name = "logging_py_gapic_test", + srcs = [ + "logging_py_gapic_pytest.py", + "logging_py_gapic_test.py", + ], + legacy_create_init = False, + deps = [ + ":logging_py_gapic", + ], +) py_gapic_library( name = "redis_py_gapic", diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py index 53e7e2f127..7373ac54cc 100755 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/async_client.py @@ -193,7 +193,7 @@ async def export_assets(self, request: Optional[Union[asset_service.ExportAssetsRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Exports assets with time and resource types to a given Cloud @@ -307,7 +307,7 @@ async def list_assets(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListAssetsAsyncPager: r"""Lists assets with time and resource types and returns @@ -422,7 +422,7 @@ async def batch_get_assets_history(self, request: Optional[Union[asset_service.BatchGetAssetsHistoryRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> asset_service.BatchGetAssetsHistoryResponse: r"""Batch gets the update history of assets that overlap a time @@ -514,7 +514,7 @@ async def create_feed(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> asset_service.Feed: r"""Creates a feed in a parent @@ -633,7 +633,7 @@ async def get_feed(self, *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> asset_service.Feed: r"""Gets details about an asset feed. @@ -747,7 +747,7 @@ async def list_feeds(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> asset_service.ListFeedsResponse: r"""Lists all asset feeds in a parent @@ -857,7 +857,7 @@ async def update_feed(self, *, feed: Optional[asset_service.Feed] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> asset_service.Feed: r"""Updates an asset feed configuration. @@ -968,7 +968,7 @@ async def delete_feed(self, *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes an asset feed. @@ -1067,7 +1067,7 @@ async def search_all_resources(self, query: Optional[str] = None, asset_types: Optional[MutableSequence[str]] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.SearchAllResourcesAsyncPager: r"""Searches all Cloud resources within the specified scope, such as @@ -1280,7 +1280,7 @@ async def search_all_iam_policies(self, scope: Optional[str] = None, query: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.SearchAllIamPoliciesAsyncPager: r"""Searches all IAM policies within the specified scope, such as a @@ -1471,7 +1471,7 @@ async def analyze_iam_policy(self, request: Optional[Union[asset_service.AnalyzeIamPolicyRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> asset_service.AnalyzeIamPolicyResponse: r"""Analyzes IAM policies to answer which identities have @@ -1562,7 +1562,7 @@ async def analyze_iam_policy_longrunning(self, request: Optional[Union[asset_service.AnalyzeIamPolicyLongrunningRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Analyzes IAM policies asynchronously to answer which identities diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py index 315906adf8..771fc25d40 100644 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/client.py @@ -396,7 +396,7 @@ def export_assets(self, request: Optional[Union[asset_service.ExportAssetsRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Exports assets with time and resource types to a given Cloud @@ -511,7 +511,7 @@ def list_assets(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListAssetsPager: r"""Lists assets with time and resource types and returns @@ -626,7 +626,7 @@ def batch_get_assets_history(self, request: Optional[Union[asset_service.BatchGetAssetsHistoryRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> asset_service.BatchGetAssetsHistoryResponse: r"""Batch gets the update history of assets that overlap a time @@ -712,7 +712,7 @@ def create_feed(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> asset_service.Feed: r"""Creates a feed in a parent @@ -831,7 +831,7 @@ def get_feed(self, *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> asset_service.Feed: r"""Gets details about an asset feed. @@ -938,7 +938,7 @@ def list_feeds(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> asset_service.ListFeedsResponse: r"""Lists all asset feeds in a parent @@ -1041,7 +1041,7 @@ def update_feed(self, *, feed: Optional[asset_service.Feed] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> asset_service.Feed: r"""Updates an asset feed configuration. @@ -1152,7 +1152,7 @@ def delete_feed(self, *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes an asset feed. @@ -1244,7 +1244,7 @@ def search_all_resources(self, query: Optional[str] = None, asset_types: Optional[MutableSequence[str]] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.SearchAllResourcesPager: r"""Searches all Cloud resources within the specified scope, such as @@ -1450,7 +1450,7 @@ def search_all_iam_policies(self, scope: Optional[str] = None, query: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.SearchAllIamPoliciesPager: r"""Searches all IAM policies within the specified scope, such as a @@ -1634,7 +1634,7 @@ def analyze_iam_policy(self, request: Optional[Union[asset_service.AnalyzeIamPolicyRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> asset_service.AnalyzeIamPolicyResponse: r"""Analyzes IAM policies to answer which identities have @@ -1720,7 +1720,7 @@ def analyze_iam_policy_longrunning(self, request: Optional[Union[asset_service.AnalyzeIamPolicyLongrunningRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Analyzes IAM policies asynchronously to answer which identities diff --git a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/rest.py b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/rest.py index eab4b8c229..b46a0a4ce0 100755 --- a/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/rest.py +++ b/tests/integration/goldens/asset/google/cloud/asset_v1/services/asset_service/transports/rest.py @@ -458,7 +458,8 @@ def operations_client(self) -> operations_v1.AbstractOperationsClient: # use the credentials which are saved credentials=self._credentials, scopes=self._scopes, - http_options=http_options) + http_options=http_options, + path_prefix="v1") self._operations_client = operations_v1.AbstractOperationsClient(transport=rest_transport) @@ -478,9 +479,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: asset_service.AnalyzeIamPolicyRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> asset_service.AnalyzeIamPolicyResponse: r"""Call the analyze iam policy method over HTTP. @@ -558,9 +559,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: asset_service.AnalyzeIamPolicyLongrunningRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> operations_pb2.Operation: r"""Call the analyze iam policy longrunning method over HTTP. @@ -647,9 +648,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: asset_service.BatchGetAssetsHistoryRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> asset_service.BatchGetAssetsHistoryResponse: r"""Call the batch get assets history method over HTTP. @@ -723,9 +724,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: asset_service.CreateFeedRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> asset_service.Feed: r"""Call the create feed method over HTTP. @@ -815,9 +816,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: asset_service.DeleteFeedRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ): r"""Call the delete feed method over HTTP. @@ -879,9 +880,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: asset_service.ExportAssetsRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> operations_pb2.Operation: r"""Call the export assets method over HTTP. @@ -965,9 +966,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: asset_service.GetFeedRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> asset_service.Feed: r"""Call the get feed method over HTTP. @@ -1048,9 +1049,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: asset_service.ListAssetsRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> asset_service.ListAssetsResponse: r"""Call the list assets method over HTTP. @@ -1124,9 +1125,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: asset_service.ListFeedsRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> asset_service.ListFeedsResponse: r"""Call the list feeds method over HTTP. @@ -1200,9 +1201,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: asset_service.SearchAllIamPoliciesRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> asset_service.SearchAllIamPoliciesResponse: r"""Call the search all iam policies method over HTTP. @@ -1276,9 +1277,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: asset_service.SearchAllResourcesRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> asset_service.SearchAllResourcesResponse: r"""Call the search all resources method over HTTP. @@ -1352,9 +1353,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: asset_service.UpdateFeedRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> asset_service.Feed: r"""Call the update feed method over HTTP. diff --git a/tests/integration/goldens/asset/noxfile.py b/tests/integration/goldens/asset/noxfile.py index 2a7c0060f6..46247d5dc8 100644 --- a/tests/integration/goldens/asset/noxfile.py +++ b/tests/integration/goldens/asset/noxfile.py @@ -84,7 +84,12 @@ def cover(session): @nox.session(python=ALL_PYTHON) def mypy(session): """Run the type checker.""" - session.install('mypy', 'types-pkg_resources') + session.install( + 'mypy', + 'types-pkg_resources', + 'types-requests', + 'types-protobuf' + ) session.install('.') session.run( 'mypy', diff --git a/tests/integration/goldens/asset/setup.py b/tests/integration/goldens/asset/setup.py index 1609b700c6..1bff80e4a9 100644 --- a/tests/integration/goldens/asset/setup.py +++ b/tests/integration/goldens/asset/setup.py @@ -36,7 +36,7 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 1.33.2, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", + "google-api-core[grpc] >= 1.34.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*", "proto-plus >= 1.22.0, <2.0.0dev", "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", 'grpc-google-iam-v1 >= 0.12.4, < 1.0.0dev', diff --git a/tests/integration/goldens/asset/testing/constraints-3.7.txt b/tests/integration/goldens/asset/testing/constraints-3.7.txt index 883a87aefd..2beecf99e0 100644 --- a/tests/integration/goldens/asset/testing/constraints-3.7.txt +++ b/tests/integration/goldens/asset/testing/constraints-3.7.txt @@ -4,7 +4,7 @@ # Pin the version to the lower bound. # e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", # Then this file should have google-cloud-foo==1.14.0 -google-api-core==1.33.2 +google-api-core==1.34.0 proto-plus==1.22.0 protobuf==3.19.5 grpc-google-iam-v1==0.12.4 diff --git a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py index 05f61eb269..4f0c9d6ef5 100755 --- a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py +++ b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/async_client.py @@ -202,7 +202,7 @@ async def generate_access_token(self, scope: Optional[MutableSequence[str]] = None, lifetime: Optional[duration_pb2.Duration] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> common.GenerateAccessTokenResponse: r"""Generates an OAuth 2.0 access token for a service @@ -362,7 +362,7 @@ async def generate_id_token(self, audience: Optional[str] = None, include_email: Optional[bool] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> common.GenerateIdTokenResponse: r"""Generates an OpenID Connect ID token for a service @@ -515,7 +515,7 @@ async def sign_blob(self, delegates: Optional[MutableSequence[str]] = None, payload: Optional[bytes] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> common.SignBlobResponse: r"""Signs a blob using a service account's system-managed @@ -655,7 +655,7 @@ async def sign_jwt(self, delegates: Optional[MutableSequence[str]] = None, payload: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> common.SignJwtResponse: r"""Signs a JWT using a service account's system-managed diff --git a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py index bcf6585a0e..1395c18494 100644 --- a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py +++ b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/client.py @@ -396,7 +396,7 @@ def generate_access_token(self, scope: Optional[MutableSequence[str]] = None, lifetime: Optional[duration_pb2.Duration] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> common.GenerateAccessTokenResponse: r"""Generates an OAuth 2.0 access token for a service @@ -549,7 +549,7 @@ def generate_id_token(self, audience: Optional[str] = None, include_email: Optional[bool] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> common.GenerateIdTokenResponse: r"""Generates an OpenID Connect ID token for a service @@ -695,7 +695,7 @@ def sign_blob(self, delegates: Optional[MutableSequence[str]] = None, payload: Optional[bytes] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> common.SignBlobResponse: r"""Signs a blob using a service account's system-managed @@ -828,7 +828,7 @@ def sign_jwt(self, delegates: Optional[MutableSequence[str]] = None, payload: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> common.SignJwtResponse: r"""Signs a JWT using a service account's system-managed diff --git a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/transports/rest.py b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/transports/rest.py index 7bc75d5d65..f805bbff13 100755 --- a/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/transports/rest.py +++ b/tests/integration/goldens/credentials/google/iam/credentials_v1/services/iam_credentials/transports/rest.py @@ -286,9 +286,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: common.GenerateAccessTokenRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> common.GenerateAccessTokenResponse: r"""Call the generate access token method over HTTP. @@ -371,9 +371,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: common.GenerateIdTokenRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> common.GenerateIdTokenResponse: r"""Call the generate id token method over HTTP. @@ -456,9 +456,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: common.SignBlobRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> common.SignBlobResponse: r"""Call the sign blob method over HTTP. @@ -541,9 +541,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: common.SignJwtRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> common.SignJwtResponse: r"""Call the sign jwt method over HTTP. diff --git a/tests/integration/goldens/credentials/noxfile.py b/tests/integration/goldens/credentials/noxfile.py index 9a3857b8a7..f2c2998450 100644 --- a/tests/integration/goldens/credentials/noxfile.py +++ b/tests/integration/goldens/credentials/noxfile.py @@ -84,7 +84,12 @@ def cover(session): @nox.session(python=ALL_PYTHON) def mypy(session): """Run the type checker.""" - session.install('mypy', 'types-pkg_resources') + session.install( + 'mypy', + 'types-pkg_resources', + 'types-requests', + 'types-protobuf' + ) session.install('.') session.run( 'mypy', diff --git a/tests/integration/goldens/credentials/setup.py b/tests/integration/goldens/credentials/setup.py index 57ac52c86d..c28f750303 100644 --- a/tests/integration/goldens/credentials/setup.py +++ b/tests/integration/goldens/credentials/setup.py @@ -36,7 +36,7 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 1.33.2, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", + "google-api-core[grpc] >= 1.34.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*", "proto-plus >= 1.22.0, <2.0.0dev", "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", ] diff --git a/tests/integration/goldens/credentials/testing/constraints-3.7.txt b/tests/integration/goldens/credentials/testing/constraints-3.7.txt index 6f3158cc20..6c44adfea7 100644 --- a/tests/integration/goldens/credentials/testing/constraints-3.7.txt +++ b/tests/integration/goldens/credentials/testing/constraints-3.7.txt @@ -4,6 +4,6 @@ # Pin the version to the lower bound. # e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", # Then this file should have google-cloud-foo==1.14.0 -google-api-core==1.33.2 +google-api-core==1.34.0 proto-plus==1.22.0 protobuf==3.19.5 diff --git a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py index 0b4e1988fd..8876547362 100755 --- a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py +++ b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/async_client.py @@ -201,7 +201,7 @@ async def get_trigger(self, *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> trigger.Trigger: r"""Get a single trigger. @@ -302,7 +302,7 @@ async def list_triggers(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListTriggersAsyncPager: r"""List triggers. @@ -418,7 +418,7 @@ async def create_trigger(self, trigger: Optional[gce_trigger.Trigger] = None, trigger_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Create a new trigger in a particular project and @@ -563,7 +563,7 @@ async def update_trigger(self, update_mask: Optional[field_mask_pb2.FieldMask] = None, allow_missing: Optional[bool] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Update a single trigger. @@ -699,7 +699,7 @@ async def delete_trigger(self, name: Optional[str] = None, allow_missing: Optional[bool] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Delete a single trigger. diff --git a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/client.py b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/client.py index b6659bbfce..550433432a 100644 --- a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/client.py +++ b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/client.py @@ -413,7 +413,7 @@ def get_trigger(self, *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> trigger.Trigger: r"""Get a single trigger. @@ -514,7 +514,7 @@ def list_triggers(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListTriggersPager: r"""List triggers. @@ -630,7 +630,7 @@ def create_trigger(self, trigger: Optional[gce_trigger.Trigger] = None, trigger_id: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Create a new trigger in a particular project and @@ -775,7 +775,7 @@ def update_trigger(self, update_mask: Optional[field_mask_pb2.FieldMask] = None, allow_missing: Optional[bool] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Update a single trigger. @@ -911,7 +911,7 @@ def delete_trigger(self, name: Optional[str] = None, allow_missing: Optional[bool] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Delete a single trigger. diff --git a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/transports/rest.py b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/transports/rest.py index 96bd6f82df..c212e44aff 100755 --- a/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/transports/rest.py +++ b/tests/integration/goldens/eventarc/google/cloud/eventarc_v1/services/eventarc/transports/rest.py @@ -310,7 +310,8 @@ def operations_client(self) -> operations_v1.AbstractOperationsClient: # use the credentials which are saved credentials=self._credentials, scopes=self._scopes, - http_options=http_options) + http_options=http_options, + path_prefix="v1") self._operations_client = operations_v1.AbstractOperationsClient(transport=rest_transport) @@ -330,9 +331,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: eventarc.CreateTriggerRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> operations_pb2.Operation: r"""Call the create trigger method over HTTP. @@ -418,9 +419,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: eventarc.DeleteTriggerRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> operations_pb2.Operation: r"""Call the delete trigger method over HTTP. @@ -497,9 +498,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: eventarc.GetTriggerRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> trigger.Trigger: r"""Call the get trigger method over HTTP. @@ -577,9 +578,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: eventarc.ListTriggersRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> eventarc.ListTriggersResponse: r"""Call the list triggers method over HTTP. @@ -657,9 +658,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: eventarc.UpdateTriggerRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> operations_pb2.Operation: r"""Call the update trigger method over HTTP. diff --git a/tests/integration/goldens/eventarc/noxfile.py b/tests/integration/goldens/eventarc/noxfile.py index 3e8ab34def..a7502780a6 100644 --- a/tests/integration/goldens/eventarc/noxfile.py +++ b/tests/integration/goldens/eventarc/noxfile.py @@ -84,7 +84,12 @@ def cover(session): @nox.session(python=ALL_PYTHON) def mypy(session): """Run the type checker.""" - session.install('mypy', 'types-pkg_resources') + session.install( + 'mypy', + 'types-pkg_resources', + 'types-requests', + 'types-protobuf' + ) session.install('.') session.run( 'mypy', diff --git a/tests/integration/goldens/eventarc/setup.py b/tests/integration/goldens/eventarc/setup.py index ad9c944334..3be22cba3e 100644 --- a/tests/integration/goldens/eventarc/setup.py +++ b/tests/integration/goldens/eventarc/setup.py @@ -36,7 +36,7 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 1.33.2, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", + "google-api-core[grpc] >= 1.34.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*", "proto-plus >= 1.22.0, <2.0.0dev", "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", ] diff --git a/tests/integration/goldens/eventarc/testing/constraints-3.7.txt b/tests/integration/goldens/eventarc/testing/constraints-3.7.txt index 6f3158cc20..6c44adfea7 100644 --- a/tests/integration/goldens/eventarc/testing/constraints-3.7.txt +++ b/tests/integration/goldens/eventarc/testing/constraints-3.7.txt @@ -4,6 +4,6 @@ # Pin the version to the lower bound. # e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", # Then this file should have google-cloud-foo==1.14.0 -google-api-core==1.33.2 +google-api-core==1.34.0 proto-plus==1.22.0 protobuf==3.19.5 diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py index f2e13824a0..7168f0fa30 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/async_client.py @@ -198,7 +198,7 @@ async def list_buckets(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListBucketsAsyncPager: r"""Lists buckets. @@ -320,7 +320,7 @@ async def get_bucket(self, request: Optional[Union[logging_config.GetBucketRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogBucket: r"""Gets a bucket. @@ -398,7 +398,7 @@ async def create_bucket(self, request: Optional[Union[logging_config.CreateBucketRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogBucket: r"""Creates a bucket that can be used to store log @@ -479,7 +479,7 @@ async def update_bucket(self, request: Optional[Union[logging_config.UpdateBucketRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogBucket: r"""Updates a bucket. This method replaces the following fields in @@ -567,7 +567,7 @@ async def delete_bucket(self, request: Optional[Union[logging_config.DeleteBucketRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes a bucket. Moves the bucket to the DELETE_REQUESTED @@ -637,7 +637,7 @@ async def undelete_bucket(self, request: Optional[Union[logging_config.UndeleteBucketRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Undeletes a bucket. A bucket that has been deleted @@ -707,7 +707,7 @@ async def list_views(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListViewsAsyncPager: r"""Lists views on a bucket. @@ -821,7 +821,7 @@ async def get_view(self, request: Optional[Union[logging_config.GetViewRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogView: r"""Gets a view. @@ -901,7 +901,7 @@ async def create_view(self, request: Optional[Union[logging_config.CreateViewRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogView: r"""Creates a view over logs in a bucket. A bucket may @@ -983,7 +983,7 @@ async def update_view(self, request: Optional[Union[logging_config.UpdateViewRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogView: r"""Updates a view. This method replaces the following fields in the @@ -1064,7 +1064,7 @@ async def delete_view(self, request: Optional[Union[logging_config.DeleteViewRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes a view from a bucket. @@ -1133,7 +1133,7 @@ async def list_sinks(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListSinksAsyncPager: r"""Lists sinks. @@ -1260,7 +1260,7 @@ async def get_sink(self, *, sink_name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogSink: r"""Gets a sink. @@ -1384,7 +1384,7 @@ async def create_sink(self, parent: Optional[str] = None, sink: Optional[logging_config.LogSink] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogSink: r"""Creates a sink that exports specified log entries to a @@ -1520,7 +1520,7 @@ async def update_sink(self, sink: Optional[logging_config.LogSink] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogSink: r"""Updates a sink. This method replaces the following fields in the @@ -1685,7 +1685,7 @@ async def delete_sink(self, *, sink_name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes a sink. If the sink has a unique ``writer_identity``, @@ -1791,7 +1791,7 @@ async def list_exclusions(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListExclusionsAsyncPager: r"""Lists all the exclusions in a parent resource. @@ -1918,7 +1918,7 @@ async def get_exclusion(self, *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogExclusion: r"""Gets the description of an exclusion. @@ -2045,7 +2045,7 @@ async def create_exclusion(self, parent: Optional[str] = None, exclusion: Optional[logging_config.LogExclusion] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogExclusion: r"""Creates a new exclusion in a specified parent @@ -2184,7 +2184,7 @@ async def update_exclusion(self, exclusion: Optional[logging_config.LogExclusion] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogExclusion: r"""Changes one or more properties of an existing @@ -2334,7 +2334,7 @@ async def delete_exclusion(self, *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes an exclusion. @@ -2439,7 +2439,7 @@ async def get_cmek_settings(self, request: Optional[Union[logging_config.GetCmekSettingsRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.CmekSettings: r"""Gets the Logs Router CMEK settings for the given resource. @@ -2541,7 +2541,7 @@ async def update_cmek_settings(self, request: Optional[Union[logging_config.UpdateCmekSettingsRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.CmekSettings: r"""Updates the Logs Router CMEK settings for the given resource. diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py old mode 100644 new mode 100755 index 92de685b1a..8bd53387ce --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/client.py @@ -428,7 +428,7 @@ def list_buckets(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListBucketsPager: r"""Lists buckets. @@ -550,7 +550,7 @@ def get_bucket(self, request: Optional[Union[logging_config.GetBucketRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogBucket: r"""Gets a bucket. @@ -629,7 +629,7 @@ def create_bucket(self, request: Optional[Union[logging_config.CreateBucketRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogBucket: r"""Creates a bucket that can be used to store log @@ -711,7 +711,7 @@ def update_bucket(self, request: Optional[Union[logging_config.UpdateBucketRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogBucket: r"""Updates a bucket. This method replaces the following fields in @@ -800,7 +800,7 @@ def delete_bucket(self, request: Optional[Union[logging_config.DeleteBucketRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes a bucket. Moves the bucket to the DELETE_REQUESTED @@ -871,7 +871,7 @@ def undelete_bucket(self, request: Optional[Union[logging_config.UndeleteBucketRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Undeletes a bucket. A bucket that has been deleted @@ -942,7 +942,7 @@ def list_views(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListViewsPager: r"""Lists views on a bucket. @@ -1056,7 +1056,7 @@ def get_view(self, request: Optional[Union[logging_config.GetViewRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogView: r"""Gets a view. @@ -1137,7 +1137,7 @@ def create_view(self, request: Optional[Union[logging_config.CreateViewRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogView: r"""Creates a view over logs in a bucket. A bucket may @@ -1220,7 +1220,7 @@ def update_view(self, request: Optional[Union[logging_config.UpdateViewRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogView: r"""Updates a view. This method replaces the following fields in the @@ -1302,7 +1302,7 @@ def delete_view(self, request: Optional[Union[logging_config.DeleteViewRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes a view from a bucket. @@ -1372,7 +1372,7 @@ def list_sinks(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListSinksPager: r"""Lists sinks. @@ -1491,7 +1491,7 @@ def get_sink(self, *, sink_name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogSink: r"""Gets a sink. @@ -1607,7 +1607,7 @@ def create_sink(self, parent: Optional[str] = None, sink: Optional[logging_config.LogSink] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogSink: r"""Creates a sink that exports specified log entries to a @@ -1743,7 +1743,7 @@ def update_sink(self, sink: Optional[logging_config.LogSink] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogSink: r"""Updates a sink. This method replaces the following fields in the @@ -1900,7 +1900,7 @@ def delete_sink(self, *, sink_name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes a sink. If the sink has a unique ``writer_identity``, @@ -1998,7 +1998,7 @@ def list_exclusions(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListExclusionsPager: r"""Lists all the exclusions in a parent resource. @@ -2117,7 +2117,7 @@ def get_exclusion(self, *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogExclusion: r"""Gets the description of an exclusion. @@ -2236,7 +2236,7 @@ def create_exclusion(self, parent: Optional[str] = None, exclusion: Optional[logging_config.LogExclusion] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogExclusion: r"""Creates a new exclusion in a specified parent @@ -2375,7 +2375,7 @@ def update_exclusion(self, exclusion: Optional[logging_config.LogExclusion] = None, update_mask: Optional[field_mask_pb2.FieldMask] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.LogExclusion: r"""Changes one or more properties of an existing @@ -2525,7 +2525,7 @@ def delete_exclusion(self, *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes an exclusion. @@ -2622,7 +2622,7 @@ def get_cmek_settings(self, request: Optional[Union[logging_config.GetCmekSettingsRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.CmekSettings: r"""Gets the Logs Router CMEK settings for the given resource. @@ -2725,7 +2725,7 @@ def update_cmek_settings(self, request: Optional[Union[logging_config.UpdateCmekSettingsRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_config.CmekSettings: r"""Updates the Logs Router CMEK settings for the given resource. diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/rest.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/rest.py index fe03b8b2b9..2a4a22284c 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/rest.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/config_service_v2/transports/rest.py @@ -660,9 +660,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.CreateBucketRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_config.LogBucket: r"""Call the create bucket method over HTTP. @@ -765,9 +765,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.CreateExclusionRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_config.LogExclusion: r"""Call the create exclusion method over HTTP. @@ -881,9 +881,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.CreateSinkRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_config.LogSink: r"""Call the create sink method over HTTP. @@ -995,9 +995,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.CreateViewRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_config.LogView: r"""Call the create view method over HTTP. @@ -1102,9 +1102,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.DeleteBucketRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ): r"""Call the delete bucket method over HTTP. @@ -1182,9 +1182,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.DeleteExclusionRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ): r"""Call the delete exclusion method over HTTP. @@ -1262,9 +1262,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.DeleteSinkRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ): r"""Call the delete sink method over HTTP. @@ -1342,9 +1342,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.DeleteViewRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ): r"""Call the delete view method over HTTP. @@ -1422,9 +1422,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.GetBucketRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_config.LogBucket: r"""Call the get bucket method over HTTP. @@ -1514,9 +1514,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.GetCmekSettingsRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_config.CmekSettings: r"""Call the get cmek settings method over HTTP. @@ -1612,9 +1612,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.GetExclusionRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_config.LogExclusion: r"""Call the get exclusion method over HTTP. @@ -1715,9 +1715,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.GetSinkRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_config.LogSink: r"""Call the get sink method over HTTP. @@ -1816,9 +1816,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.GetViewRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_config.LogView: r"""Call the get view method over HTTP. @@ -1910,9 +1910,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.ListBucketsRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_config.ListBucketsResponse: r"""Call the list buckets method over HTTP. @@ -2002,9 +2002,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.ListExclusionsRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_config.ListExclusionsResponse: r"""Call the list exclusions method over HTTP. @@ -2094,9 +2094,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.ListSinksRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_config.ListSinksResponse: r"""Call the list sinks method over HTTP. @@ -2186,9 +2186,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.ListViewsRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_config.ListViewsResponse: r"""Call the list views method over HTTP. @@ -2278,9 +2278,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.UndeleteBucketRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ): r"""Call the undelete bucket method over HTTP. @@ -2371,9 +2371,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.UpdateBucketRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_config.LogBucket: r"""Call the update bucket method over HTTP. @@ -2476,9 +2476,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.UpdateCmekSettingsRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_config.CmekSettings: r"""Call the update cmek settings method over HTTP. @@ -2584,9 +2584,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.UpdateExclusionRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_config.LogExclusion: r"""Call the update exclusion method over HTTP. @@ -2700,9 +2700,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.UpdateSinkRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_config.LogSink: r"""Call the update sink method over HTTP. @@ -2834,9 +2834,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_config.UpdateViewRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_config.LogView: r"""Call the update view method over HTTP. diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py index 1927be3cca..5c9df58783 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/async_client.py @@ -190,7 +190,7 @@ async def delete_log(self, *, log_name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes all the log entries in a log. The log @@ -305,7 +305,7 @@ async def write_log_entries(self, labels: Optional[MutableMapping[str, str]] = None, entries: Optional[MutableSequence[log_entry.LogEntry]] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging.WriteLogEntriesResponse: r"""Writes log entries to Logging. This API method is the @@ -502,7 +502,7 @@ async def list_log_entries(self, filter: Optional[str] = None, order_by: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListLogEntriesAsyncPager: r"""Lists log entries. Use this method to retrieve log entries that @@ -663,7 +663,7 @@ async def list_monitored_resource_descriptors(self, request: Optional[Union[logging.ListMonitoredResourceDescriptorsRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListMonitoredResourceDescriptorsAsyncPager: r"""Lists the descriptors for monitored resource types @@ -758,7 +758,7 @@ async def list_logs(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListLogsAsyncPager: r"""Lists the logs in projects, organizations, folders, @@ -885,7 +885,7 @@ def tail_log_entries(self, requests: Optional[AsyncIterator[logging.TailLogEntriesRequest]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> Awaitable[AsyncIterable[logging.TailLogEntriesResponse]]: r"""Streaming read of log entries as they are ingested. diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py old mode 100644 new mode 100755 index a3db9d9813..90d0950c4e --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/client.py @@ -384,7 +384,7 @@ def delete_log(self, *, log_name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes all the log entries in a log. The log @@ -491,7 +491,7 @@ def write_log_entries(self, labels: Optional[MutableMapping[str, str]] = None, entries: Optional[MutableSequence[log_entry.LogEntry]] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging.WriteLogEntriesResponse: r"""Writes log entries to Logging. This API method is the @@ -679,7 +679,7 @@ def list_log_entries(self, filter: Optional[str] = None, order_by: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListLogEntriesPager: r"""Lists log entries. Use this method to retrieve log entries that @@ -832,7 +832,7 @@ def list_monitored_resource_descriptors(self, request: Optional[Union[logging.ListMonitoredResourceDescriptorsRequest, dict]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListMonitoredResourceDescriptorsPager: r"""Lists the descriptors for monitored resource types @@ -920,7 +920,7 @@ def list_logs(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListLogsPager: r"""Lists the logs in projects, organizations, folders, @@ -1039,7 +1039,7 @@ def tail_log_entries(self, requests: Optional[Iterator[logging.TailLogEntriesRequest]] = None, *, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> Iterable[logging.TailLogEntriesResponse]: r"""Streaming read of log entries as they are ingested. diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/rest.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/rest.py index a735292d92..7f52c18e9d 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/rest.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/logging_service_v2/transports/rest.py @@ -290,9 +290,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging.DeleteLogRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ): r"""Call the delete log method over HTTP. @@ -370,9 +370,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging.ListLogEntriesRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging.ListLogEntriesResponse: r"""Call the list log entries method over HTTP. @@ -455,9 +455,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging.ListLogsRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging.ListLogsResponse: r"""Call the list logs method over HTTP. @@ -540,9 +540,9 @@ def __hash__(self): def __call__(self, request: logging.ListMonitoredResourceDescriptorsRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging.ListMonitoredResourceDescriptorsResponse: r"""Call the list monitored resource descriptors method over HTTP. @@ -613,9 +613,9 @@ def __hash__(self): def __call__(self, request: logging.TailLogEntriesRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> rest_streaming.ResponseIterator: raise NotImplementedError( "Client streaming over REST is not yet defined for python client") @@ -633,9 +633,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging.WriteLogEntriesRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging.WriteLogEntriesResponse: r"""Call the write log entries method over HTTP. diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py index 54bc33ba5c..6f50739082 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/async_client.py @@ -191,7 +191,7 @@ async def list_log_metrics(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListLogMetricsAsyncPager: r"""Lists logs-based metrics. @@ -315,7 +315,7 @@ async def get_log_metric(self, *, metric_name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_metrics.LogMetric: r"""Gets a logs-based metric. @@ -436,7 +436,7 @@ async def create_log_metric(self, parent: Optional[str] = None, metric: Optional[logging_metrics.LogMetric] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_metrics.LogMetric: r"""Creates a logs-based metric. @@ -567,7 +567,7 @@ async def update_log_metric(self, metric_name: Optional[str] = None, metric: Optional[logging_metrics.LogMetric] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_metrics.LogMetric: r"""Creates or updates a logs-based metric. @@ -704,7 +704,7 @@ async def delete_log_metric(self, *, metric_name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes a logs-based metric. diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py old mode 100644 new mode 100755 index fc7b586d79..8dabfc38a7 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/client.py @@ -385,7 +385,7 @@ def list_log_metrics(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListLogMetricsPager: r"""Lists logs-based metrics. @@ -501,7 +501,7 @@ def get_log_metric(self, *, metric_name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_metrics.LogMetric: r"""Gets a logs-based metric. @@ -614,7 +614,7 @@ def create_log_metric(self, parent: Optional[str] = None, metric: Optional[logging_metrics.LogMetric] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_metrics.LogMetric: r"""Creates a logs-based metric. @@ -745,7 +745,7 @@ def update_log_metric(self, metric_name: Optional[str] = None, metric: Optional[logging_metrics.LogMetric] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> logging_metrics.LogMetric: r"""Creates or updates a logs-based metric. @@ -874,7 +874,7 @@ def delete_log_metric(self, *, metric_name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> None: r"""Deletes a logs-based metric. diff --git a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/transports/rest.py b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/transports/rest.py index d892b5d297..6bdc187c81 100755 --- a/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/transports/rest.py +++ b/tests/integration/goldens/logging/google/cloud/logging_v2/services/metrics_service_v2/transports/rest.py @@ -290,9 +290,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_metrics.CreateLogMetricRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_metrics.LogMetric: r"""Call the create log metric method over HTTP. @@ -386,9 +386,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_metrics.DeleteLogMetricRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ): r"""Call the delete log metric method over HTTP. @@ -450,9 +450,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_metrics.GetLogMetricRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_metrics.LogMetric: r"""Call the get log metric method over HTTP. @@ -537,9 +537,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_metrics.ListLogMetricsRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_metrics.ListLogMetricsResponse: r"""Call the list log metrics method over HTTP. @@ -613,9 +613,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: logging_metrics.UpdateLogMetricRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> logging_metrics.LogMetric: r"""Call the update log metric method over HTTP. diff --git a/tests/integration/goldens/logging/noxfile.py b/tests/integration/goldens/logging/noxfile.py index 0d59e8201b..fbe05683f9 100644 --- a/tests/integration/goldens/logging/noxfile.py +++ b/tests/integration/goldens/logging/noxfile.py @@ -84,7 +84,12 @@ def cover(session): @nox.session(python=ALL_PYTHON) def mypy(session): """Run the type checker.""" - session.install('mypy', 'types-pkg_resources') + session.install( + 'mypy', + 'types-pkg_resources', + 'types-requests', + 'types-protobuf' + ) session.install('.') session.run( 'mypy', diff --git a/tests/integration/goldens/logging/setup.py b/tests/integration/goldens/logging/setup.py index a9b84915ee..370f18029b 100644 --- a/tests/integration/goldens/logging/setup.py +++ b/tests/integration/goldens/logging/setup.py @@ -36,7 +36,7 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 1.33.2, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", + "google-api-core[grpc] >= 1.34.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*", "proto-plus >= 1.22.0, <2.0.0dev", "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", ] diff --git a/tests/integration/goldens/logging/testing/constraints-3.7.txt b/tests/integration/goldens/logging/testing/constraints-3.7.txt index 6f3158cc20..6c44adfea7 100644 --- a/tests/integration/goldens/logging/testing/constraints-3.7.txt +++ b/tests/integration/goldens/logging/testing/constraints-3.7.txt @@ -4,6 +4,6 @@ # Pin the version to the lower bound. # e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", # Then this file should have google-cloud-foo==1.14.0 -google-api-core==1.33.2 +google-api-core==1.34.0 proto-plus==1.22.0 protobuf==3.19.5 diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/py.typed b/tests/integration/goldens/redis/google/cloud/redis_v1/py.typed old mode 100644 new mode 100755 diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py index 0cdf3da95d..12a8790280 100755 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/async_client.py @@ -214,7 +214,7 @@ async def list_instances(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListInstancesAsyncPager: r"""Lists all Redis instances owned by a project in either the @@ -339,7 +339,7 @@ async def get_instance(self, *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> cloud_redis.Instance: r"""Gets the details of a specific Redis instance. @@ -441,7 +441,7 @@ async def create_instance(self, instance_id: Optional[str] = None, instance: Optional[cloud_redis.Instance] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Creates a Redis instance based on the specified tier and memory @@ -603,7 +603,7 @@ async def update_instance(self, update_mask: Optional[field_mask_pb2.FieldMask] = None, instance: Optional[cloud_redis.Instance] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Updates the metadata and configuration of a specific @@ -746,7 +746,7 @@ async def upgrade_instance(self, name: Optional[str] = None, redis_version: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Upgrades Redis instance to the newer Redis version @@ -875,7 +875,7 @@ async def import_instance(self, name: Optional[str] = None, input_config: Optional[cloud_redis.InputConfig] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Import a Redis RDB snapshot file from Cloud Storage @@ -1014,7 +1014,7 @@ async def export_instance(self, name: Optional[str] = None, output_config: Optional[cloud_redis.OutputConfig] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Export Redis instance data into a Redis RDB format @@ -1149,7 +1149,7 @@ async def failover_instance(self, name: Optional[str] = None, data_protection_mode: Optional[cloud_redis.FailoverInstanceRequest.DataProtectionMode] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Initiates a failover of the master node to current @@ -1278,7 +1278,7 @@ async def delete_instance(self, *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation_async.AsyncOperation: r"""Deletes a specific Redis instance. Instance stops diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py old mode 100644 new mode 100755 index 1ddfce8650..3deba04cd2 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/client.py @@ -408,7 +408,7 @@ def list_instances(self, *, parent: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> pagers.ListInstancesPager: r"""Lists all Redis instances owned by a project in either the @@ -533,7 +533,7 @@ def get_instance(self, *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> cloud_redis.Instance: r"""Gets the details of a specific Redis instance. @@ -635,7 +635,7 @@ def create_instance(self, instance_id: Optional[str] = None, instance: Optional[cloud_redis.Instance] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Creates a Redis instance based on the specified tier and memory @@ -797,7 +797,7 @@ def update_instance(self, update_mask: Optional[field_mask_pb2.FieldMask] = None, instance: Optional[cloud_redis.Instance] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Updates the metadata and configuration of a specific @@ -940,7 +940,7 @@ def upgrade_instance(self, name: Optional[str] = None, redis_version: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Upgrades Redis instance to the newer Redis version @@ -1069,7 +1069,7 @@ def import_instance(self, name: Optional[str] = None, input_config: Optional[cloud_redis.InputConfig] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Import a Redis RDB snapshot file from Cloud Storage @@ -1208,7 +1208,7 @@ def export_instance(self, name: Optional[str] = None, output_config: Optional[cloud_redis.OutputConfig] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Export Redis instance data into a Redis RDB format @@ -1343,7 +1343,7 @@ def failover_instance(self, name: Optional[str] = None, data_protection_mode: Optional[cloud_redis.FailoverInstanceRequest.DataProtectionMode] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Initiates a failover of the master node to current @@ -1472,7 +1472,7 @@ def delete_instance(self, *, name: Optional[str] = None, retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, + timeout: Union[float, object] = gapic_v1.method.DEFAULT, metadata: Sequence[Tuple[str, str]] = (), ) -> operation.Operation: r"""Deletes a specific Redis instance. Instance stops diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/base.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/base.py old mode 100644 new mode 100755 diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/grpc.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/grpc.py old mode 100644 new mode 100755 diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/grpc_asyncio.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/grpc_asyncio.py old mode 100644 new mode 100755 diff --git a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/rest.py b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/rest.py index 33f9241386..38e7567054 100755 --- a/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/rest.py +++ b/tests/integration/goldens/redis/google/cloud/redis_v1/services/cloud_redis/transports/rest.py @@ -419,7 +419,8 @@ def operations_client(self) -> operations_v1.AbstractOperationsClient: # use the credentials which are saved credentials=self._credentials, scopes=self._scopes, - http_options=http_options) + http_options=http_options, + path_prefix="v1") self._operations_client = operations_v1.AbstractOperationsClient(transport=rest_transport) @@ -439,9 +440,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: cloud_redis.CreateInstanceRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> operations_pb2.Operation: r"""Call the create instance method over HTTP. @@ -527,9 +528,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: cloud_redis.DeleteInstanceRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> operations_pb2.Operation: r"""Call the delete instance method over HTTP. @@ -606,9 +607,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: cloud_redis.ExportInstanceRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> operations_pb2.Operation: r"""Call the export instance method over HTTP. @@ -694,9 +695,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: cloud_redis.FailoverInstanceRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> operations_pb2.Operation: r"""Call the failover instance method over HTTP. @@ -782,9 +783,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: cloud_redis.GetInstanceRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> cloud_redis.Instance: r"""Call the get instance method over HTTP. @@ -860,9 +861,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: cloud_redis.ImportInstanceRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> operations_pb2.Operation: r"""Call the import instance method over HTTP. @@ -948,9 +949,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: cloud_redis.ListInstancesRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> cloud_redis.ListInstancesResponse: r"""Call the list instances method over HTTP. @@ -1028,9 +1029,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: cloud_redis.UpdateInstanceRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> operations_pb2.Operation: r"""Call the update instance method over HTTP. @@ -1116,9 +1117,9 @@ def _get_unset_required_fields(cls, message_dict): def __call__(self, request: cloud_redis.UpgradeInstanceRequest, *, - retry: OptionalRetry = gapic_v1.method.DEFAULT, - timeout: Optional[float] = None, - metadata: Sequence[Tuple[str, str]] = (), + retry: OptionalRetry=gapic_v1.method.DEFAULT, + timeout: Optional[float]=None, + metadata: Sequence[Tuple[str, str]]=(), ) -> operations_pb2.Operation: r"""Call the upgrade instance method over HTTP. diff --git a/tests/integration/goldens/redis/noxfile.py b/tests/integration/goldens/redis/noxfile.py index 611bd142e6..2d9776b927 100644 --- a/tests/integration/goldens/redis/noxfile.py +++ b/tests/integration/goldens/redis/noxfile.py @@ -84,7 +84,12 @@ def cover(session): @nox.session(python=ALL_PYTHON) def mypy(session): """Run the type checker.""" - session.install('mypy', 'types-pkg_resources') + session.install( + 'mypy', + 'types-pkg_resources', + 'types-requests', + 'types-protobuf' + ) session.install('.') session.run( 'mypy', diff --git a/tests/integration/goldens/redis/setup.py b/tests/integration/goldens/redis/setup.py index ceb7c8d019..b9ba0c5094 100644 --- a/tests/integration/goldens/redis/setup.py +++ b/tests/integration/goldens/redis/setup.py @@ -36,7 +36,7 @@ release_status = "Development Status :: 5 - Production/Stable" dependencies = [ - "google-api-core[grpc] >= 1.33.2, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*", + "google-api-core[grpc] >= 1.34.0, <3.0.0dev,!=2.0.*,!=2.1.*,!=2.2.*,!=2.3.*,!=2.4.*,!=2.5.*,!=2.6.*,!=2.7.*,!=2.8.*,!=2.9.*,!=2.10.*", "proto-plus >= 1.22.0, <2.0.0dev", "protobuf>=3.19.5,<5.0.0dev,!=3.20.0,!=3.20.1,!=4.21.0,!=4.21.1,!=4.21.2,!=4.21.3,!=4.21.4,!=4.21.5", ] diff --git a/tests/integration/goldens/redis/testing/constraints-3.7.txt b/tests/integration/goldens/redis/testing/constraints-3.7.txt index 6f3158cc20..6c44adfea7 100644 --- a/tests/integration/goldens/redis/testing/constraints-3.7.txt +++ b/tests/integration/goldens/redis/testing/constraints-3.7.txt @@ -4,6 +4,6 @@ # Pin the version to the lower bound. # e.g., if setup.py has "google-cloud-foo >= 1.14.0, < 2.0.0dev", # Then this file should have google-cloud-foo==1.14.0 -google-api-core==1.33.2 +google-api-core==1.34.0 proto-plus==1.22.0 protobuf==3.19.5 diff --git a/tests/unit/schema/wrappers/test_service.py b/tests/unit/schema/wrappers/test_service.py index 0ee88f921c..2664167c72 100644 --- a/tests/unit/schema/wrappers/test_service.py +++ b/tests/unit/schema/wrappers/test_service.py @@ -58,6 +58,7 @@ def test_service_properties(): service = make_service(name='ThingDoer') assert service.name == 'ThingDoer' assert service.client_name == 'ThingDoerClient' + assert service.client_package_version == '' assert service.async_client_name == 'ThingDoerAsyncClient' assert service.transport_name == 'ThingDoerTransport' assert service.grpc_transport_name == 'ThingDoerGrpcTransport'