Skip to content

Commit

Permalink
chore: upgrade gapic-generator-python to 0.42.2 (#42)
Browse files Browse the repository at this point in the history
* chore: upgrade gapic-generator-python to 0.39.1

feat: add 'from_service_account_info' factory to clients
fix: fix sphinx identifiers
PiperOrigin-RevId: 350246057

Source-Author: Google APIs <noreply@google.com>
Source-Date: Tue Jan 5 16:44:11 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 520682435235d9c503983a360a2090025aa47cd1
Source-Link: googleapis/googleapis@5206824

* feat: added client library for Workflows V1 API

PiperOrigin-RevId: 351656488

Source-Author: Google APIs <noreply@google.com>
Source-Date: Wed Jan 13 13:42:15 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 5e5da388f773d3da15276452e934208a96a7a58e
Source-Link: googleapis/googleapis@5e5da38

* chore: update gapic-generator ruby to version 0.6.10

PiperOrigin-RevId: 351705536

Source-Author: Google APIs <noreply@google.com>
Source-Date: Wed Jan 13 18:12:00 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 89e3c509923819eb87bedc8331a823403d9dba55
Source-Link: googleapis/googleapis@89e3c50

* chore: update Go generator, rules_go, and protobuf

PiperOrigin-RevId: 352816749

Source-Author: Google APIs <noreply@google.com>
Source-Date: Wed Jan 20 10:06:23 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: ceaaf31b3d13badab7cf9d3b570f5639db5593d9
Source-Link: googleapis/googleapis@ceaaf31

* chore: upgrade gapic-generator-python to 0.40.5

PiperOrigin-RevId: 354996675

Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon Feb 1 12:11:49 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 20712b8fe95001b312f62c6c5f33e3e3ec92cfaf
Source-Link: googleapis/googleapis@20712b8

* chore: update gapic-generator-python

PiperOrigin-RevId: 355923884

Source-Author: Google APIs <noreply@google.com>
Source-Date: Fri Feb 5 14:04:52 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 5e3dacee19405529b841b53797df799c2383536c
Source-Link: googleapis/googleapis@5e3dace

* chore: update gapic-generator-python to 0.40.11

PiperOrigin-RevId: 359562873

Source-Author: Google APIs <noreply@google.com>
Source-Date: Thu Feb 25 10:52:32 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 07932bb995e7dc91b43620ea8402c6668c7d102c
Source-Link: googleapis/googleapis@07932bb

* chore: upgrade gapic-generator-python to 0.42.2

PiperOrigin-RevId: 361662015

Source-Author: Google APIs <noreply@google.com>
Source-Date: Mon Mar 8 14:47:18 2021 -0800
Source-Repo: googleapis/googleapis
Source-Sha: 28a591963253d52ce3a25a918cafbdd9928de8cf
Source-Link: googleapis/googleapis@28a5919
  • Loading branch information
yoshi-automation authored Mar 12, 2021
1 parent 09e6d35 commit d65c277
Show file tree
Hide file tree
Showing 14 changed files with 755 additions and 467 deletions.
2 changes: 1 addition & 1 deletion packages/google-cloud-bigquery-connection/.coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ branch = True
fail_under = 100
show_missing = True
omit =
google/cloud/bigquery/connection/__init__.py
google/cloud/bigquery_connection/__init__.py
exclude_lines =
# Re-enable the standard pragma
pragma: NO COVER
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
ConnectionService
-----------------------------------

.. automodule:: google.cloud.bigquery_connection_v1.services.connection_service
:members:
:inherited-members:


.. automodule:: google.cloud.bigquery_connection_v1.services.connection_service.pagers
:members:
:inherited-members:
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Services for Google Cloud Bigquery Connection v1 API
====================================================
.. toctree::
:maxdepth: 2

.. automodule:: google.cloud.bigquery_connection_v1.services.connection_service
:members:
:inherited-members:
connection_service
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ Types for Google Cloud Bigquery Connection v1 API

.. automodule:: google.cloud.bigquery_connection_v1.types
:members:
:undoc-members:
:show-inheritance:

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 @@ -15,7 +15,16 @@
# limitations under the License.
#

from typing import Any, AsyncIterable, Awaitable, Callable, Iterable, Sequence, Tuple
from typing import (
Any,
AsyncIterable,
Awaitable,
Callable,
Iterable,
Sequence,
Tuple,
Optional,
)

from google.cloud.bigquery_connection_v1.types import connection

Expand All @@ -24,7 +33,7 @@ class ListConnectionsPager:
"""A pager for iterating through ``list_connections`` requests.
This class thinly wraps an initial
:class:`~.connection.ListConnectionsResponse` object, and
:class:`google.cloud.bigquery_connection_v1.types.ListConnectionsResponse` object, and
provides an ``__iter__`` method to iterate through its
``connections`` field.
Expand All @@ -33,7 +42,7 @@ class ListConnectionsPager:
through the ``connections`` field on the
corresponding responses.
All the usual :class:`~.connection.ListConnectionsResponse`
All the usual :class:`google.cloud.bigquery_connection_v1.types.ListConnectionsResponse`
attributes are available on the pager. If multiple requests are made, only
the most recent response is retained, and thus used for attribute lookup.
"""
Expand All @@ -51,9 +60,9 @@ def __init__(
Args:
method (Callable): The method that was originally called, and
which instantiated this pager.
request (:class:`~.connection.ListConnectionsRequest`):
request (google.cloud.bigquery_connection_v1.types.ListConnectionsRequest):
The initial request object.
response (:class:`~.connection.ListConnectionsResponse`):
response (google.cloud.bigquery_connection_v1.types.ListConnectionsResponse):
The initial response object.
metadata (Sequence[Tuple[str, str]]): Strings which should be
sent along with the request as metadata.
Expand Down Expand Up @@ -86,7 +95,7 @@ class ListConnectionsAsyncPager:
"""A pager for iterating through ``list_connections`` requests.
This class thinly wraps an initial
:class:`~.connection.ListConnectionsResponse` object, and
:class:`google.cloud.bigquery_connection_v1.types.ListConnectionsResponse` object, and
provides an ``__aiter__`` method to iterate through its
``connections`` field.
Expand All @@ -95,7 +104,7 @@ class ListConnectionsAsyncPager:
through the ``connections`` field on the
corresponding responses.
All the usual :class:`~.connection.ListConnectionsResponse`
All the usual :class:`google.cloud.bigquery_connection_v1.types.ListConnectionsResponse`
attributes are available on the pager. If multiple requests are made, only
the most recent response is retained, and thus used for attribute lookup.
"""
Expand All @@ -113,9 +122,9 @@ def __init__(
Args:
method (Callable): The method that was originally called, and
which instantiated this pager.
request (:class:`~.connection.ListConnectionsRequest`):
request (google.cloud.bigquery_connection_v1.types.ListConnectionsRequest):
The initial request object.
response (:class:`~.connection.ListConnectionsResponse`):
response (google.cloud.bigquery_connection_v1.types.ListConnectionsResponse):
The initial response object.
metadata (Sequence[Tuple[str, str]]): Strings which should be
sent along with the request as metadata.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def __init__(
api_mtls_endpoint: str = None,
client_cert_source: Callable[[], Tuple[bytes, bytes]] = None,
ssl_channel_credentials: grpc.ChannelCredentials = None,
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
quota_project_id: Optional[str] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
Expand Down Expand Up @@ -91,6 +92,10 @@ def __init__(
``api_mtls_endpoint`` is None.
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
for grpc channel. It is ignored if ``channel`` 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 mutual TLS channel. It is
ignored if ``channel`` 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 @@ -107,6 +112,11 @@ def __init__(
"""
self._ssl_channel_credentials = ssl_channel_credentials

if api_mtls_endpoint:
warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning)
if client_cert_source:
warnings.warn("client_cert_source is deprecated", DeprecationWarning)

if channel:
# Sanity check: Ensure that channel and credentials are not both
# provided.
Expand All @@ -116,11 +126,6 @@ def __init__(
self._grpc_channel = channel
self._ssl_channel_credentials = None
elif api_mtls_endpoint:
warnings.warn(
"api_mtls_endpoint and client_cert_source are deprecated",
DeprecationWarning,
)

host = (
api_mtls_endpoint
if ":" in api_mtls_endpoint
Expand Down Expand Up @@ -164,12 +169,18 @@ def __init__(
scopes=self.AUTH_SCOPES, quota_project_id=quota_project_id
)

if client_cert_source_for_mtls and not ssl_channel_credentials:
cert, key = client_cert_source_for_mtls()
self._ssl_channel_credentials = grpc.ssl_channel_credentials(
certificate_chain=cert, private_key=key
)

# create a new channel. The provided one is ignored.
self._grpc_channel = type(self).create_channel(
host,
credentials=credentials,
credentials_file=credentials_file,
ssl_credentials=ssl_channel_credentials,
ssl_credentials=self._ssl_channel_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ def __init__(
api_mtls_endpoint: str = None,
client_cert_source: Callable[[], Tuple[bytes, bytes]] = None,
ssl_channel_credentials: grpc.ChannelCredentials = None,
client_cert_source_for_mtls: Callable[[], Tuple[bytes, bytes]] = None,
quota_project_id=None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
Expand Down Expand Up @@ -136,6 +137,10 @@ def __init__(
``api_mtls_endpoint`` is None.
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
for grpc channel. It is ignored if ``channel`` 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 mutual TLS channel. It is
ignored if ``channel`` 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 @@ -152,6 +157,11 @@ def __init__(
"""
self._ssl_channel_credentials = ssl_channel_credentials

if api_mtls_endpoint:
warnings.warn("api_mtls_endpoint is deprecated", DeprecationWarning)
if client_cert_source:
warnings.warn("client_cert_source is deprecated", DeprecationWarning)

if channel:
# Sanity check: Ensure that channel and credentials are not both
# provided.
Expand All @@ -161,11 +171,6 @@ def __init__(
self._grpc_channel = channel
self._ssl_channel_credentials = None
elif api_mtls_endpoint:
warnings.warn(
"api_mtls_endpoint and client_cert_source are deprecated",
DeprecationWarning,
)

host = (
api_mtls_endpoint
if ":" in api_mtls_endpoint
Expand Down Expand Up @@ -209,12 +214,18 @@ def __init__(
scopes=self.AUTH_SCOPES, quota_project_id=quota_project_id
)

if client_cert_source_for_mtls and not ssl_channel_credentials:
cert, key = client_cert_source_for_mtls()
self._ssl_channel_credentials = grpc.ssl_channel_credentials(
certificate_chain=cert, private_key=key
)

# create a new channel. The provided one is ignored.
self._grpc_channel = type(self).create_channel(
host,
credentials=credentials,
credentials_file=credentials_file,
ssl_credentials=ssl_channel_credentials,
ssl_credentials=self._ssl_channel_credentials,
scopes=scopes or self.AUTH_SCOPES,
quota_project_id=quota_project_id,
options=[
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,29 +16,29 @@
#

from .connection import (
AwsCrossAccountRole,
AwsProperties,
CloudSqlCredential,
CloudSqlProperties,
Connection,
CreateConnectionRequest,
DeleteConnectionRequest,
GetConnectionRequest,
ListConnectionsRequest,
ListConnectionsResponse,
UpdateConnectionRequest,
DeleteConnectionRequest,
Connection,
CloudSqlProperties,
CloudSqlCredential,
AwsProperties,
AwsCrossAccountRole,
)

__all__ = (
"AwsCrossAccountRole",
"AwsProperties",
"CloudSqlCredential",
"CloudSqlProperties",
"Connection",
"CreateConnectionRequest",
"DeleteConnectionRequest",
"GetConnectionRequest",
"ListConnectionsRequest",
"ListConnectionsResponse",
"UpdateConnectionRequest",
"DeleteConnectionRequest",
"Connection",
"CloudSqlProperties",
"CloudSqlCredential",
"AwsProperties",
"AwsCrossAccountRole",
)
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class CreateConnectionRequest(proto.Message):
connection_id (str):
Optional. Connection id that should be
assigned to the created connection.
connection (~.gcbc_connection.Connection):
connection (google.cloud.bigquery_connection_v1.types.Connection):
Required. Connection to create.
"""

Expand Down Expand Up @@ -102,7 +102,7 @@ class ListConnectionsResponse(proto.Message):
Attributes:
next_page_token (str):
Next page token.
connections (Sequence[~.gcbc_connection.Connection]):
connections (Sequence[google.cloud.bigquery_connection_v1.types.Connection]):
List of connections.
"""

Expand All @@ -123,10 +123,10 @@ class UpdateConnectionRequest(proto.Message):
name (str):
Required. Name of the connection to update, for example:
``projects/{project_id}/locations/{location_id}/connections/{connection_id}``
connection (~.gcbc_connection.Connection):
connection (google.cloud.bigquery_connection_v1.types.Connection):
Required. Connection containing the updated
fields.
update_mask (~.field_mask.FieldMask):
update_mask (google.protobuf.field_mask_pb2.FieldMask):
Required. Update mask for the connection
fields to be updated.
"""
Expand Down Expand Up @@ -163,9 +163,9 @@ class Connection(proto.Message):
connection.
description (str):
User provided description.
cloud_sql (~.gcbc_connection.CloudSqlProperties):
cloud_sql (google.cloud.bigquery_connection_v1.types.CloudSqlProperties):
Cloud SQL properties.
aws (~.gcbc_connection.AwsProperties):
aws (google.cloud.bigquery_connection_v1.types.AwsProperties):
Amazon Web Services (AWS) properties.
creation_time (int):
Output only. The creation timestamp of the
Expand Down Expand Up @@ -208,9 +208,9 @@ class CloudSqlProperties(proto.Message):
``project:location:instance``.
database (str):
Database name.
type_ (~.gcbc_connection.CloudSqlProperties.DatabaseType):
type_ (google.cloud.bigquery_connection_v1.types.CloudSqlProperties.DatabaseType):
Type of the Cloud SQL database.
credential (~.gcbc_connection.CloudSqlCredential):
credential (google.cloud.bigquery_connection_v1.types.CloudSqlCredential):
Input only. Cloud SQL credential.
"""

Expand Down Expand Up @@ -248,7 +248,7 @@ class AwsProperties(proto.Message):
r"""Connection properties specific to Amazon Web Services (AWS).
Attributes:
cross_account_role (~.gcbc_connection.AwsCrossAccountRole):
cross_account_role (google.cloud.bigquery_connection_v1.types.AwsCrossAccountRole):
Authentication using Google owned AWS IAM
user's access key to assume into customer's AWS
IAM Role.
Expand Down
8 changes: 5 additions & 3 deletions packages/google-cloud-bigquery-connection/synth.metadata
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@
"git": {
"name": ".",
"remote": "https://github.com/googleapis/python-bigquery-connection.git",
"sha": "414af1d702e7dc736c8996084a2e2e58d7819a99"
"sha": "7eeb516191cf2878788dd4f62d59a1c7f5c983b1"
}
},
{
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "dd372aa22ded7a8ba6f0e03a80e06358a3fa0907",
"internalRef": "347055288"
"sha": "28a591963253d52ce3a25a918cafbdd9928de8cf",
"internalRef": "361662015"
}
},
{
Expand Down Expand Up @@ -42,6 +42,7 @@
}
],
"generatedFiles": [
".coveragerc",
".flake8",
".github/CONTRIBUTING.md",
".github/ISSUE_TEMPLATE/bug_report.md",
Expand Down Expand Up @@ -94,6 +95,7 @@
"MANIFEST.in",
"docs/_static/custom.css",
"docs/_templates/layout.html",
"docs/bigquery_connection_v1/connection_service.rst",
"docs/bigquery_connection_v1/services.rst",
"docs/bigquery_connection_v1/types.rst",
"docs/conf.py",
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1,16 @@
# -*- coding: utf-8 -*-

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
Loading

0 comments on commit d65c277

Please sign in to comment.