Skip to content

Commit

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

PiperOrigin-RevId: 657207628

Source-Link:
googleapis/googleapis@33fe71e

Source-Link:
googleapis/googleapis-gen@e02739d
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1hbmFnZWQtaWRlbnRpdGllcy8uT3dsQm90LnlhbWwiLCJoIjoiZTAyNzM5ZDEyMmVkMTViZDVlZjU3NzFjNTdmMTJhODNkNDdhMWRkYSJ9
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1hbmFnZWRrYWZrYS8uT3dsQm90LnlhbWwiLCJoIjoiZTAyNzM5ZDEyMmVkMTViZDVlZjU3NzFjNTdmMTJhODNkNDdhMWRkYSJ9
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1lZGlhLXRyYW5zbGF0aW9uLy5Pd2xCb3QueWFtbCIsImgiOiJlMDI3MzlkMTIyZWQxNWJkNWVmNTc3MWM1N2YxMmE4M2Q0N2ExZGRhIn0=
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1lbWNhY2hlLy5Pd2xCb3QueWFtbCIsImgiOiJlMDI3MzlkMTIyZWQxNWJkNWVmNTc3MWM1N2YxMmE4M2Q0N2ExZGRhIn0=
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1pZ3JhdGlvbmNlbnRlci8uT3dsQm90LnlhbWwiLCJoIjoiZTAyNzM5ZDEyMmVkMTViZDVlZjU3NzFjNTdmMTJhODNkNDdhMWRkYSJ9
Copy-Tag:
eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLW1vbml0b3JpbmctZGFzaGJvYXJkcy8uT3dsQm90LnlhbWwiLCJoIjoiZTAyNzM5ZDEyMmVkMTViZDVlZjU3NzFjNTdmMTJhODN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WY1NzcxYzU3ZjEyYTgzZDQ3YTFkZGEifQ==

---------

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] authored Jul 30, 2024
1 parent 189922a commit d95af77
Show file tree
Hide file tree
Showing 218 changed files with 4,089 additions and 367 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.9.4" # {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.9.4" # {x-release-please-version}
__version__ = "0.0.0" # {x-release-please-version}
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,8 @@ async def sample_list_domains():
method=rpc,
request=request,
response=response,
retry=retry,
timeout=timeout,
metadata=metadata,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1107,6 +1107,8 @@ def sample_list_domains():
method=rpc,
request=request,
response=response,
retry=retry,
timeout=timeout,
metadata=metadata,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,22 @@
Optional,
Sequence,
Tuple,
Union,
)

from google.api_core import gapic_v1
from google.api_core import retry as retries
from google.api_core import retry_async as retries_async

try:
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault, None]
OptionalAsyncRetry = Union[
retries_async.AsyncRetry, gapic_v1.method._MethodDefault, None
]
except AttributeError: # pragma: NO COVER
OptionalRetry = Union[retries.Retry, object, None] # type: ignore
OptionalAsyncRetry = Union[retries_async.AsyncRetry, object, None] # type: ignore

from google.cloud.managedidentities_v1.types import managed_identities_service, resource


Expand Down Expand Up @@ -51,6 +65,8 @@ def __init__(
request: managed_identities_service.ListDomainsRequest,
response: managed_identities_service.ListDomainsResponse,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = ()
):
"""Instantiate the pager.
Expand All @@ -62,12 +78,17 @@ def __init__(
The initial request object.
response (google.cloud.managedidentities_v1.types.ListDomainsResponse):
The initial response object.
retry (google.api_core.retry.Retry): Designation of what errors,
if any, should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
sent along with the request as metadata.
"""
self._method = method
self._request = managed_identities_service.ListDomainsRequest(request)
self._response = response
self._retry = retry
self._timeout = timeout
self._metadata = metadata

def __getattr__(self, name: str) -> Any:
Expand All @@ -78,7 +99,12 @@ def pages(self) -> Iterator[managed_identities_service.ListDomainsResponse]:
yield self._response
while self._response.next_page_token:
self._request.page_token = self._response.next_page_token
self._response = self._method(self._request, metadata=self._metadata)
self._response = self._method(
self._request,
retry=self._retry,
timeout=self._timeout,
metadata=self._metadata,
)
yield self._response

def __iter__(self) -> Iterator[resource.Domain]:
Expand Down Expand Up @@ -115,6 +141,8 @@ def __init__(
request: managed_identities_service.ListDomainsRequest,
response: managed_identities_service.ListDomainsResponse,
*,
retry: OptionalAsyncRetry = gapic_v1.method.DEFAULT,
timeout: Union[float, object] = gapic_v1.method.DEFAULT,
metadata: Sequence[Tuple[str, str]] = ()
):
"""Instantiates the pager.
Expand All @@ -126,12 +154,17 @@ def __init__(
The initial request object.
response (google.cloud.managedidentities_v1.types.ListDomainsResponse):
The initial response object.
retry (google.api_core.retry.AsyncRetry): Designation of what errors,
if any, should be retried.
timeout (float): The timeout for this request.
metadata (Sequence[Tuple[str, str]]): Strings which should be
sent along with the request as metadata.
"""
self._method = method
self._request = managed_identities_service.ListDomainsRequest(request)
self._response = response
self._retry = retry
self._timeout = timeout
self._metadata = metadata

def __getattr__(self, name: str) -> Any:
Expand All @@ -144,7 +177,12 @@ async def pages(
yield self._response
while self._response.next_page_token:
self._request.page_token = self._response.next_page_token
self._response = await self._method(self._request, metadata=self._metadata)
self._response = await self._method(
self._request,
retry=self._retry,
timeout=self._timeout,
metadata=self._metadata,
)
yield self._response

def __aiter__(self) -> AsyncIterator[resource.Domain]:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
],
"language": "PYTHON",
"name": "google-cloud-managed-identities",
"version": "1.9.4"
"version": "0.1.0"
},
"snippets": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
from google.api_core import api_core_version, client_options
from google.api_core import exceptions as core_exceptions
from google.api_core import operation_async # type: ignore
from google.api_core import retry as retries
import google.auth
from google.auth import credentials as ga_credentials
from google.auth.exceptions import MutualTLSChannelError
Expand Down Expand Up @@ -2368,12 +2369,16 @@ def test_list_domains_pager(transport_name: str = "grpc"):
)

expected_metadata = ()
retry = retries.Retry()
timeout = 5
expected_metadata = tuple(expected_metadata) + (
gapic_v1.routing_header.to_grpc_metadata((("parent", ""),)),
)
pager = client.list_domains(request={})
pager = client.list_domains(request={}, retry=retry, timeout=timeout)

assert pager._metadata == expected_metadata
assert pager._retry == retry
assert pager._timeout == timeout

results = list(pager)
assert len(results) == 6
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,8 @@ async def sample_list_clusters():
method=rpc,
request=request,
response=response,
retry=retry,
timeout=timeout,
metadata=metadata,
)

Expand Down Expand Up @@ -1030,6 +1032,8 @@ async def sample_list_topics():
method=rpc,
request=request,
response=response,
retry=retry,
timeout=timeout,
metadata=metadata,
)

Expand Down Expand Up @@ -1603,6 +1607,8 @@ async def sample_list_consumer_groups():
method=rpc,
request=request,
response=response,
retry=retry,
timeout=timeout,
metadata=metadata,
)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -864,6 +864,8 @@ def sample_list_clusters():
method=rpc,
request=request,
response=response,
retry=retry,
timeout=timeout,
metadata=metadata,
)

Expand Down Expand Up @@ -1495,6 +1497,8 @@ def sample_list_topics():
method=rpc,
request=request,
response=response,
retry=retry,
timeout=timeout,
metadata=metadata,
)

Expand Down Expand Up @@ -2053,6 +2057,8 @@ def sample_list_consumer_groups():
method=rpc,
request=request,
response=response,
retry=retry,
timeout=timeout,
metadata=metadata,
)

Expand Down
Loading

0 comments on commit d95af77

Please sign in to comment.