Skip to content

Commit

Permalink
chore: [Many APIs] Update gapic-generator-python to v1.18.5 (#12998)
Browse files Browse the repository at this point in the history
- [x] Regenerate this pull request now.

PiperOrigin-RevId: 661268868

Source-Link:
googleapis/googleapis@f7d214c

Source-Link:
googleapis/googleapis-gen@79a8411
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGEtZnVzaW9uLy5Pd2xCb3QueWFtbCIsImgiOiI3OWE4NDExYmJkYjI1YTk4M2ZhM2FhZThjMGUxNDMyN2RmMTI5Zjk0In0=
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGEtcW5hLy5Pd2xCb3QueWFtbCIsImgiOiI3OWE4NDExYmJkYjI1YTk4M2ZhM2FhZThjMGUxNDMyN2RmMTI5Zjk0In0=
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFjYXRhbG9nLWxpbmVhZ2UvLk93bEJvdC55YW1sIiwiaCI6Ijc5YTg0MTFiYmRiMjVhOTgzZmEzYWFlOGMwZTE0MzI3ZGYxMjlmOTQifQ==
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFjYXRhbG9nLy5Pd2xCb3QueWFtbCIsImgiOiI3OWE4NDExYmJkYjI1YTk4M2ZhM2FhZThjMGUxNDMyN2RmMTI5Zjk0In0=
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFmbG93LWNsaWVudC8uT3dsQm90LnlhbWwiLCJoIjoiNzlhODQxMWJiZGIyNWE5ODNmYTNhYWU4YzBlMTQzMjdkZjEyOWY5NCJ9
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRhdGFmb3JtLy5Pd2xCb3QueWFtbCIsImgiOiI3OWE4NDExYmJkYjI1YTk4M2ZhM2FhZThjMGUxNDMyN2RmMTI5Zjk0In0=
Copy-Tag:
e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@google.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
4 people authored Aug 19, 2024
1 parent ffcc359 commit 38b9dec
Show file tree
Hide file tree
Showing 505 changed files with 8,257 additions and 6,865 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.10.5" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "1.10.5" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# limitations under the License.
#
from collections import OrderedDict
import functools
import re
from typing import (
Callable,
Expand Down Expand Up @@ -192,9 +191,7 @@ def universe_domain(self) -> str:
"""
return self._client._universe_domain

get_transport_class = functools.partial(
type(DataFusionClient).get_transport_class, type(DataFusionClient)
)
get_transport_class = DataFusionClient.get_transport_class

def __init__(
self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -688,7 +688,7 @@ def __init__(
transport_init: Union[
Type[DataFusionTransport], Callable[..., DataFusionTransport]
] = (
type(self).get_transport_class(transport)
DataFusionClient.get_transport_class(transport)
if isinstance(transport, str) or transport is None
else cast(Callable[..., DataFusionTransport], transport)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-data-fusion",
"version": "1.10.5"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1268,22 +1268,23 @@ async def test_list_available_versions_async_use_cached_wrapped_rpc(
)

# Replace cached wrapped function with mock
mock_object = mock.AsyncMock()
mock_rpc = mock.AsyncMock()
mock_rpc.return_value = mock.Mock()
client._client._transport._wrapped_methods[
client._client._transport.list_available_versions
] = mock_object
] = mock_rpc

request = {}
await client.list_available_versions(request)

# Establish that the underlying gRPC stub method was called.
assert mock_object.call_count == 1
assert mock_rpc.call_count == 1

await client.list_available_versions(request)

# Establish that a new wrapper was not created for this call
assert wrapper_fn.call_count == 0
assert mock_object.call_count == 2
assert mock_rpc.call_count == 2


@pytest.mark.asyncio
Expand Down Expand Up @@ -1854,22 +1855,23 @@ async def test_list_instances_async_use_cached_wrapped_rpc(
)

# Replace cached wrapped function with mock
mock_object = mock.AsyncMock()
mock_rpc = mock.AsyncMock()
mock_rpc.return_value = mock.Mock()
client._client._transport._wrapped_methods[
client._client._transport.list_instances
] = mock_object
] = mock_rpc

request = {}
await client.list_instances(request)

# Establish that the underlying gRPC stub method was called.
assert mock_object.call_count == 1
assert mock_rpc.call_count == 1

await client.list_instances(request)

# Establish that a new wrapper was not created for this call
assert wrapper_fn.call_count == 0
assert mock_object.call_count == 2
assert mock_rpc.call_count == 2


@pytest.mark.asyncio
Expand Down Expand Up @@ -2391,22 +2393,23 @@ async def test_get_instance_async_use_cached_wrapped_rpc(
)

# Replace cached wrapped function with mock
mock_object = mock.AsyncMock()
mock_rpc = mock.AsyncMock()
mock_rpc.return_value = mock.Mock()
client._client._transport._wrapped_methods[
client._client._transport.get_instance
] = mock_object
] = mock_rpc

request = {}
await client.get_instance(request)

# Establish that the underlying gRPC stub method was called.
assert mock_object.call_count == 1
assert mock_rpc.call_count == 1

await client.get_instance(request)

# Establish that a new wrapper was not created for this call
assert wrapper_fn.call_count == 0
assert mock_object.call_count == 2
assert mock_rpc.call_count == 2


@pytest.mark.asyncio
Expand Down Expand Up @@ -2657,8 +2660,9 @@ def test_create_instance_use_cached_wrapped_rpc():
# Establish that the underlying gRPC stub method was called.
assert mock_rpc.call_count == 1

# Operation methods build a cached wrapper on first rpc call
# subsequent calls should use the cached wrapper
# Operation methods call wrapper_fn to build a cached
# client._transport.operations_client instance on first rpc call.
# Subsequent calls should use the cached wrapper
wrapper_fn.reset_mock()

client.create_instance(request)
Expand Down Expand Up @@ -2712,26 +2716,28 @@ async def test_create_instance_async_use_cached_wrapped_rpc(
)

# Replace cached wrapped function with mock
mock_object = mock.AsyncMock()
mock_rpc = mock.AsyncMock()
mock_rpc.return_value = mock.Mock()
client._client._transport._wrapped_methods[
client._client._transport.create_instance
] = mock_object
] = mock_rpc

request = {}
await client.create_instance(request)

# Establish that the underlying gRPC stub method was called.
assert mock_object.call_count == 1
assert mock_rpc.call_count == 1

# Operation methods build a cached wrapper on first rpc call
# subsequent calls should use the cached wrapper
# Operation methods call wrapper_fn to build a cached
# client._transport.operations_client instance on first rpc call.
# Subsequent calls should use the cached wrapper
wrapper_fn.reset_mock()

await client.create_instance(request)

# Establish that a new wrapper was not created for this call
assert wrapper_fn.call_count == 0
assert mock_object.call_count == 2
assert mock_rpc.call_count == 2


@pytest.mark.asyncio
Expand Down Expand Up @@ -3041,8 +3047,9 @@ def test_delete_instance_use_cached_wrapped_rpc():
# Establish that the underlying gRPC stub method was called.
assert mock_rpc.call_count == 1

# Operation methods build a cached wrapper on first rpc call
# subsequent calls should use the cached wrapper
# Operation methods call wrapper_fn to build a cached
# client._transport.operations_client instance on first rpc call.
# Subsequent calls should use the cached wrapper
wrapper_fn.reset_mock()

client.delete_instance(request)
Expand Down Expand Up @@ -3096,26 +3103,28 @@ async def test_delete_instance_async_use_cached_wrapped_rpc(
)

# Replace cached wrapped function with mock
mock_object = mock.AsyncMock()
mock_rpc = mock.AsyncMock()
mock_rpc.return_value = mock.Mock()
client._client._transport._wrapped_methods[
client._client._transport.delete_instance
] = mock_object
] = mock_rpc

request = {}
await client.delete_instance(request)

# Establish that the underlying gRPC stub method was called.
assert mock_object.call_count == 1
assert mock_rpc.call_count == 1

# Operation methods build a cached wrapper on first rpc call
# subsequent calls should use the cached wrapper
# Operation methods call wrapper_fn to build a cached
# client._transport.operations_client instance on first rpc call.
# Subsequent calls should use the cached wrapper
wrapper_fn.reset_mock()

await client.delete_instance(request)

# Establish that a new wrapper was not created for this call
assert wrapper_fn.call_count == 0
assert mock_object.call_count == 2
assert mock_rpc.call_count == 2


@pytest.mark.asyncio
Expand Down Expand Up @@ -3401,8 +3410,9 @@ def test_update_instance_use_cached_wrapped_rpc():
# Establish that the underlying gRPC stub method was called.
assert mock_rpc.call_count == 1

# Operation methods build a cached wrapper on first rpc call
# subsequent calls should use the cached wrapper
# Operation methods call wrapper_fn to build a cached
# client._transport.operations_client instance on first rpc call.
# Subsequent calls should use the cached wrapper
wrapper_fn.reset_mock()

client.update_instance(request)
Expand Down Expand Up @@ -3456,26 +3466,28 @@ async def test_update_instance_async_use_cached_wrapped_rpc(
)

# Replace cached wrapped function with mock
mock_object = mock.AsyncMock()
mock_rpc = mock.AsyncMock()
mock_rpc.return_value = mock.Mock()
client._client._transport._wrapped_methods[
client._client._transport.update_instance
] = mock_object
] = mock_rpc

request = {}
await client.update_instance(request)

# Establish that the underlying gRPC stub method was called.
assert mock_object.call_count == 1
assert mock_rpc.call_count == 1

# Operation methods build a cached wrapper on first rpc call
# subsequent calls should use the cached wrapper
# Operation methods call wrapper_fn to build a cached
# client._transport.operations_client instance on first rpc call.
# Subsequent calls should use the cached wrapper
wrapper_fn.reset_mock()

await client.update_instance(request)

# Establish that a new wrapper was not created for this call
assert wrapper_fn.call_count == 0
assert mock_object.call_count == 2
assert mock_rpc.call_count == 2


@pytest.mark.asyncio
Expand Down Expand Up @@ -3777,8 +3789,9 @@ def test_restart_instance_use_cached_wrapped_rpc():
# Establish that the underlying gRPC stub method was called.
assert mock_rpc.call_count == 1

# Operation methods build a cached wrapper on first rpc call
# subsequent calls should use the cached wrapper
# Operation methods call wrapper_fn to build a cached
# client._transport.operations_client instance on first rpc call.
# Subsequent calls should use the cached wrapper
wrapper_fn.reset_mock()

client.restart_instance(request)
Expand Down Expand Up @@ -3832,26 +3845,28 @@ async def test_restart_instance_async_use_cached_wrapped_rpc(
)

# Replace cached wrapped function with mock
mock_object = mock.AsyncMock()
mock_rpc = mock.AsyncMock()
mock_rpc.return_value = mock.Mock()
client._client._transport._wrapped_methods[
client._client._transport.restart_instance
] = mock_object
] = mock_rpc

request = {}
await client.restart_instance(request)

# Establish that the underlying gRPC stub method was called.
assert mock_object.call_count == 1
assert mock_rpc.call_count == 1

# Operation methods build a cached wrapper on first rpc call
# subsequent calls should use the cached wrapper
# Operation methods call wrapper_fn to build a cached
# client._transport.operations_client instance on first rpc call.
# Subsequent calls should use the cached wrapper
wrapper_fn.reset_mock()

await client.restart_instance(request)

# Establish that a new wrapper was not created for this call
assert wrapper_fn.call_count == 0
assert mock_object.call_count == 2
assert mock_rpc.call_count == 2


@pytest.mark.asyncio
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.10.11" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.10.11" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# limitations under the License.
#
from collections import OrderedDict
import functools
import re
from typing import (
Callable,
Expand Down Expand Up @@ -257,10 +256,7 @@ def universe_domain(self) -> str:
"""
return self._client._universe_domain

get_transport_class = functools.partial(
type(AutoSuggestionServiceClient).get_transport_class,
type(AutoSuggestionServiceClient),
)
get_transport_class = AutoSuggestionServiceClient.get_transport_class

def __init__(
self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,7 @@ def __init__(
Type[AutoSuggestionServiceTransport],
Callable[..., AutoSuggestionServiceTransport],
] = (
type(self).get_transport_class(transport)
AutoSuggestionServiceClient.get_transport_class(transport)
if isinstance(transport, str) or transport is None
else cast(Callable[..., AutoSuggestionServiceTransport], transport)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
# limitations under the License.
#
from collections import OrderedDict
import functools
import re
from typing import (
Callable,
Expand Down Expand Up @@ -215,9 +214,7 @@ def universe_domain(self) -> str:
"""
return self._client._universe_domain

get_transport_class = functools.partial(
type(QuestionServiceClient).get_transport_class, type(QuestionServiceClient)
)
get_transport_class = QuestionServiceClient.get_transport_class

def __init__(
self,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -711,7 +711,7 @@ def __init__(
transport_init: Union[
Type[QuestionServiceTransport], Callable[..., QuestionServiceTransport]
] = (
type(self).get_transport_class(transport)
QuestionServiceClient.get_transport_class(transport)
if isinstance(transport, str) or transport is None
else cast(Callable[..., QuestionServiceTransport], transport)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-data-qna",
"version": "0.10.11"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Loading

0 comments on commit 38b9dec

Please sign in to comment.