Skip to content

Commit dbe7988

Browse files
gcf-owl-bot[bot]partheaohmayr
authored
docs: [google-cloud-deploy] small corrections to Cloud Deploy API documentation (#12654)
BEGIN_COMMIT_OVERRIDE docs: small corrections to Cloud Deploy API documentation END_COMMIT_OVERRIDE - [ ] Regenerate this pull request now. PiperOrigin-RevId: 629796364 Source-Link: googleapis/googleapis@62bc625 Source-Link: googleapis/googleapis-gen@1d568e3 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRlcGxveS8uT3dsQm90LnlhbWwiLCJoIjoiMWQ1NjhlMzU3YTMyMGZiZDgxZDVjM2E1MmM5NjFhMTgzMzExMjg3ZiJ9 --------- Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com> Co-authored-by: ohmayr <omairnaveed@ymail.com>
1 parent 40d47d2 commit dbe7988

9 files changed

Lines changed: 6217 additions & 788 deletions

File tree

packages/google-cloud-deploy/google/cloud/deploy/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.18.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-deploy/google/cloud/deploy_v1/gapic_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16-
__version__ = "1.18.0" # {x-release-please-version}
16+
__version__ = "0.0.0" # {x-release-please-version}

packages/google-cloud-deploy/google/cloud/deploy_v1/services/cloud_deploy/async_client.py

Lines changed: 369 additions & 477 deletions
Large diffs are not rendered by default.

packages/google-cloud-deploy/google/cloud/deploy_v1/services/cloud_deploy/client.py

Lines changed: 178 additions & 246 deletions
Large diffs are not rendered by default.

packages/google-cloud-deploy/google/cloud/deploy_v1/services/cloud_deploy/transports/grpc.py

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def __init__(
5555
credentials: Optional[ga_credentials.Credentials] = None,
5656
credentials_file: Optional[str] = None,
5757
scopes: Optional[Sequence[str]] = None,
58-
channel: Optional[grpc.Channel] = None,
58+
channel: Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]] = None,
5959
api_mtls_endpoint: Optional[str] = None,
6060
client_cert_source: Optional[Callable[[], Tuple[bytes, bytes]]] = None,
6161
ssl_channel_credentials: Optional[grpc.ChannelCredentials] = None,
@@ -75,14 +75,17 @@ def __init__(
7575
credentials identify the application to the service; if none
7676
are specified, the client will attempt to ascertain the
7777
credentials from the environment.
78-
This argument is ignored if ``channel`` is provided.
78+
This argument is ignored if a ``channel`` instance is provided.
7979
credentials_file (Optional[str]): A file with credentials that can
8080
be loaded with :func:`google.auth.load_credentials_from_file`.
81-
This argument is ignored if ``channel`` is provided.
81+
This argument is ignored if a ``channel`` instance is provided.
8282
scopes (Optional(Sequence[str])): A list of scopes. This argument is
83-
ignored if ``channel`` is provided.
84-
channel (Optional[grpc.Channel]): A ``Channel`` instance through
85-
which to make calls.
83+
ignored if a ``channel`` instance is provided.
84+
channel (Optional[Union[grpc.Channel, Callable[..., grpc.Channel]]]):
85+
A ``Channel`` instance through which to make calls, or a Callable
86+
that constructs and returns one. If set to None, ``self.create_channel``
87+
is used to create the channel. If a Callable is given, it will be called
88+
with the same arguments as used in ``self.create_channel``.
8689
api_mtls_endpoint (Optional[str]): Deprecated. The mutual TLS endpoint.
8790
If provided, it overrides the ``host`` argument and tries to create
8891
a mutual TLS channel with client SSL credentials from
@@ -92,11 +95,11 @@ def __init__(
9295
private key bytes, both in PEM format. It is ignored if
9396
``api_mtls_endpoint`` is None.
9497
ssl_channel_credentials (grpc.ChannelCredentials): SSL credentials
95-
for the grpc channel. It is ignored if ``channel`` is provided.
98+
for the grpc channel. It is ignored if a ``channel`` instance is provided.
9699
client_cert_source_for_mtls (Optional[Callable[[], Tuple[bytes, bytes]]]):
97100
A callback to provide client certificate bytes and private key bytes,
98101
both in PEM format. It is used to configure a mutual TLS channel. It is
99-
ignored if ``channel`` or ``ssl_channel_credentials`` is provided.
102+
ignored if a ``channel`` instance or ``ssl_channel_credentials`` is provided.
100103
quota_project_id (Optional[str]): An optional project to use for billing
101104
and quota.
102105
client_info (google.api_core.gapic_v1.client_info.ClientInfo):
@@ -123,7 +126,7 @@ def __init__(
123126
if client_cert_source:
124127
warnings.warn("client_cert_source is deprecated", DeprecationWarning)
125128

126-
if channel:
129+
if isinstance(channel, grpc.Channel):
127130
# Ignore credentials if a channel was passed.
128131
credentials = False
129132
# If a channel was explicitly provided, set it.
@@ -164,7 +167,9 @@ def __init__(
164167
)
165168

166169
if not self._grpc_channel:
167-
self._grpc_channel = type(self).create_channel(
170+
# initialize with the provided callable or the default channel
171+
channel_init = channel or type(self).create_channel
172+
self._grpc_channel = channel_init(
168173
self._host,
169174
# use the credentials which are saved
170175
credentials=self._credentials,

0 commit comments

Comments
 (0)