Skip to content

Commit

Permalink
chore: Update gapic-generator-python to v1.17.1
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 629071173

Source-Link: googleapis/googleapis@4afa392

Source-Link: googleapis/googleapis-gen@16dbbb4
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTZkYmJiNGQwNDU3ZGI1ZTYxYWM5Zjk5YjBkNTJhNDYxNTQ0NTVhYyJ9
  • Loading branch information
gcf-owl-bot[bot] committed Apr 29, 2024
1 parent 17ce31d commit c9e50aa
Show file tree
Hide file tree
Showing 18 changed files with 7,478 additions and 1,131 deletions.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ def _prep_wrapped_messages(self, client_info):
self.create_session: gapic_v1.method.wrap_method(
self.create_session,
default_retry=retries.Retry(
initial=0.25,maximum=32.0,multiplier=1.3, predicate=retries.if_exception_type(
initial=0.25,
maximum=32.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ResourceExhausted,
core_exceptions.ServiceUnavailable,
),
Expand All @@ -137,7 +140,10 @@ def _prep_wrapped_messages(self, client_info):
self.batch_create_sessions: gapic_v1.method.wrap_method(
self.batch_create_sessions,
default_retry=retries.Retry(
initial=0.25,maximum=32.0,multiplier=1.3, predicate=retries.if_exception_type(
initial=0.25,
maximum=32.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ResourceExhausted,
core_exceptions.ServiceUnavailable,
),
Expand All @@ -149,7 +155,10 @@ def _prep_wrapped_messages(self, client_info):
self.get_session: gapic_v1.method.wrap_method(
self.get_session,
default_retry=retries.Retry(
initial=0.25,maximum=32.0,multiplier=1.3, predicate=retries.if_exception_type(
initial=0.25,
maximum=32.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ResourceExhausted,
core_exceptions.ServiceUnavailable,
),
Expand All @@ -161,7 +170,10 @@ def _prep_wrapped_messages(self, client_info):
self.list_sessions: gapic_v1.method.wrap_method(
self.list_sessions,
default_retry=retries.Retry(
initial=0.25,maximum=32.0,multiplier=1.3, predicate=retries.if_exception_type(
initial=0.25,
maximum=32.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ResourceExhausted,
core_exceptions.ServiceUnavailable,
),
Expand All @@ -173,7 +185,10 @@ def _prep_wrapped_messages(self, client_info):
self.delete_session: gapic_v1.method.wrap_method(
self.delete_session,
default_retry=retries.Retry(
initial=0.25,maximum=32.0,multiplier=1.3, predicate=retries.if_exception_type(
initial=0.25,
maximum=32.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ResourceExhausted,
core_exceptions.ServiceUnavailable,
),
Expand All @@ -185,7 +200,10 @@ def _prep_wrapped_messages(self, client_info):
self.execute_sql: gapic_v1.method.wrap_method(
self.execute_sql,
default_retry=retries.Retry(
initial=0.25,maximum=32.0,multiplier=1.3, predicate=retries.if_exception_type(
initial=0.25,
maximum=32.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ResourceExhausted,
core_exceptions.ServiceUnavailable,
),
Expand All @@ -202,7 +220,10 @@ def _prep_wrapped_messages(self, client_info):
self.execute_batch_dml: gapic_v1.method.wrap_method(
self.execute_batch_dml,
default_retry=retries.Retry(
initial=0.25,maximum=32.0,multiplier=1.3, predicate=retries.if_exception_type(
initial=0.25,
maximum=32.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ResourceExhausted,
core_exceptions.ServiceUnavailable,
),
Expand All @@ -214,7 +235,10 @@ def _prep_wrapped_messages(self, client_info):
self.read: gapic_v1.method.wrap_method(
self.read,
default_retry=retries.Retry(
initial=0.25,maximum=32.0,multiplier=1.3, predicate=retries.if_exception_type(
initial=0.25,
maximum=32.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ResourceExhausted,
core_exceptions.ServiceUnavailable,
),
Expand All @@ -231,7 +255,10 @@ def _prep_wrapped_messages(self, client_info):
self.begin_transaction: gapic_v1.method.wrap_method(
self.begin_transaction,
default_retry=retries.Retry(
initial=0.25,maximum=32.0,multiplier=1.3, predicate=retries.if_exception_type(
initial=0.25,
maximum=32.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ResourceExhausted,
core_exceptions.ServiceUnavailable,
),
Expand All @@ -243,7 +270,10 @@ def _prep_wrapped_messages(self, client_info):
self.commit: gapic_v1.method.wrap_method(
self.commit,
default_retry=retries.Retry(
initial=0.25,maximum=32.0,multiplier=1.3, predicate=retries.if_exception_type(
initial=0.25,
maximum=32.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ResourceExhausted,
core_exceptions.ServiceUnavailable,
),
Expand All @@ -255,7 +285,10 @@ def _prep_wrapped_messages(self, client_info):
self.rollback: gapic_v1.method.wrap_method(
self.rollback,
default_retry=retries.Retry(
initial=0.25,maximum=32.0,multiplier=1.3, predicate=retries.if_exception_type(
initial=0.25,
maximum=32.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ResourceExhausted,
core_exceptions.ServiceUnavailable,
),
Expand All @@ -267,7 +300,10 @@ def _prep_wrapped_messages(self, client_info):
self.partition_query: gapic_v1.method.wrap_method(
self.partition_query,
default_retry=retries.Retry(
initial=0.25,maximum=32.0,multiplier=1.3, predicate=retries.if_exception_type(
initial=0.25,
maximum=32.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ResourceExhausted,
core_exceptions.ServiceUnavailable,
),
Expand All @@ -279,7 +315,10 @@ def _prep_wrapped_messages(self, client_info):
self.partition_read: gapic_v1.method.wrap_method(
self.partition_read,
default_retry=retries.Retry(
initial=0.25,maximum=32.0,multiplier=1.3, predicate=retries.if_exception_type(
initial=0.25,
maximum=32.0,
multiplier=1.3,
predicate=retries.if_exception_type(
core_exceptions.ResourceExhausted,
core_exceptions.ServiceUnavailable,
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(self, *,
credentials: Optional[ga_credentials.Credentials] = None,
credentials_file: Optional[str] = None,
scopes: Optional[Sequence[str]] = None,
channel: Optional[grpc.Channel] = None,
channel: Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]] = None,
api_mtls_endpoint: Optional[str] = None,
client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
Expand All @@ -74,14 +74,17 @@ def __init__(self, *,
credentials identify the application to the service; if none
are specified, the client will attempt to ascertain the
credentials from the environment.
This argument is ignored if ``channel`` is provided.
This argument is ignored if a ``channel`` instance is provided.
credentials_file (Optional[str]): A file with credentials that can
be loaded with :func:`google.auth.load_credentials_from_file`.
This argument is ignored if ``channel`` is provided.
This argument is ignored if a ``channel`` instance is provided.
scopes (Optional(Sequence[str])): A list of scopes. This argument is
ignored if ``channel`` is provided.
channel (Optional[grpc.Channel]): A ``Channel`` instance through
which to make calls.
ignored if a ``channel`` instance is provided.
channel (Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]]):
A ``Channel`` instance through which to make calls, or a Callable
that constructs and returns one. If set to None, ``self.create_channel``
is used to create the channel. If a Callable is given, it will be called
with the same arguments as used in ``self.create_channel``.
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
If provided, it overrides the ``host`` argument and tries to create
a mutual TLS channel with client SSL credentials from
Expand All @@ -91,11 +94,11 @@ def __init__(self, *,
private key bytes, both in PEM format. It is ignored if
``api_mtls_endpoint`` is None.
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
for the grpc channel. It is ignored if ``channel`` is provided.
for the grpc channel. It is ignored if a ``channel`` instance is provided.
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
A callback to provide client certificate bytes and private key bytes,
both in PEM format. It is used to configure a mutual TLS channel. It is
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
ignored if a ``channel`` instance or ``ssl_channel_credentials`` is provided.
quota_project_id (Optional[str]): An optional project to use for billing
and quota.
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
Expand All @@ -121,7 +124,7 @@ def __init__(self, *,
if client_cert_source:
warnings.warn("client_cert_source is deprecated", DeprecationWarning)

if channel:
if isinstance(channel, grpc.Channel):
# Ignore credentials if a channel was passed.
credentials = False
# If a channel was explicitly provided, set it.
Expand Down Expand Up @@ -162,7 +165,9 @@ def __init__(self, *,
)

if not self._grpc_channel:
self._grpc_channel = type(self).create_channel(
# initialize with the provided callable or the default channel
channel_init = channel or type(self).create_channel
self._grpc_channel = channel_init(
self._host,
# use the credentials which are saved
credentials=self._credentials,
Expand Down

0 comments on commit c9e50aa

Please sign in to comment.