Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
chore: update gapic-generator-python to 0.40.11
Browse files Browse the repository at this point in the history
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
  • Loading branch information
yoshi-automation committed Mar 2, 2021
1 parent eaea6be commit 53e5cd6
Show file tree
Hide file tree
Showing 7 changed files with 1,204 additions and 10 deletions.
32 changes: 30 additions & 2 deletions google/cloud/container_v1/services/cluster_manager/async_client.py
Expand Up @@ -73,8 +73,36 @@ class ClusterManagerAsyncClient:
ClusterManagerClient.parse_common_location_path
)

from_service_account_info = ClusterManagerClient.from_service_account_info
from_service_account_file = ClusterManagerClient.from_service_account_file
@classmethod
def from_service_account_info(cls, info: dict, *args, **kwargs):
"""Creates an instance of this client using the provided credentials info.
Args:
info (dict): The service account private key info.
args: Additional arguments to pass to the constructor.
kwargs: Additional arguments to pass to the constructor.
Returns:
ClusterManagerAsyncClient: The constructed client.
"""
return ClusterManagerClient.from_service_account_info.__func__(ClusterManagerAsyncClient, info, *args, **kwargs) # type: ignore

@classmethod
def from_service_account_file(cls, filename: str, *args, **kwargs):
"""Creates an instance of this client using the provided credentials
file.
Args:
filename (str): The path to the service account private key json
file.
args: Additional arguments to pass to the constructor.
kwargs: Additional arguments to pass to the constructor.
Returns:
ClusterManagerAsyncClient: The constructed client.
"""
return ClusterManagerClient.from_service_account_file.__func__(ClusterManagerAsyncClient, filename, *args, **kwargs) # type: ignore

from_service_account_json = from_service_account_file

@property
Expand Down
Expand Up @@ -77,8 +77,36 @@ class ClusterManagerAsyncClient:
ClusterManagerClient.parse_common_location_path
)

from_service_account_info = ClusterManagerClient.from_service_account_info
from_service_account_file = ClusterManagerClient.from_service_account_file
@classmethod
def from_service_account_info(cls, info: dict, *args, **kwargs):
"""Creates an instance of this client using the provided credentials info.
Args:
info (dict): The service account private key info.
args: Additional arguments to pass to the constructor.
kwargs: Additional arguments to pass to the constructor.
Returns:
ClusterManagerAsyncClient: The constructed client.
"""
return ClusterManagerClient.from_service_account_info.__func__(ClusterManagerAsyncClient, info, *args, **kwargs) # type: ignore

@classmethod
def from_service_account_file(cls, filename: str, *args, **kwargs):
"""Creates an instance of this client using the provided credentials
file.
Args:
filename (str): The path to the service account private key json
file.
args: Additional arguments to pass to the constructor.
kwargs: Additional arguments to pass to the constructor.
Returns:
ClusterManagerAsyncClient: The constructed client.
"""
return ClusterManagerClient.from_service_account_file.__func__(ClusterManagerAsyncClient, filename, *args, **kwargs) # type: ignore

from_service_account_json = from_service_account_file

@property
Expand Down
4 changes: 2 additions & 2 deletions synth.metadata
Expand Up @@ -11,8 +11,8 @@
"git": {
"name": "googleapis",
"remote": "https://github.com/googleapis/googleapis.git",
"sha": "5e3dacee19405529b841b53797df799c2383536c",
"internalRef": "355923884"
"sha": "07932bb995e7dc91b43620ea8402c6668c7d102c",
"internalRef": "359562873"
}
},
{
Expand Down
15 changes: 15 additions & 0 deletions tests/unit/gapic/container_v1/__init__.py
@@ -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.
#

0 comments on commit 53e5cd6

Please sign in to comment.