Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Sep 5, 2023. It is now read-only.

Commit 004358a

Browse filesBrowse files
chore: use gapic-generator-python 0.65.2 (#178)
* chore: use gapic-generator-python 0.65.2 PiperOrigin-RevId: 444333013 Source-Link: googleapis/googleapis@f91b6cf Source-Link: https://github.com/googleapis/googleapis-gen/commit/16eb36095c294e712c74a1bf23550817b42174e5 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTZlYjM2MDk1YzI5NGU3MTJjNzRhMWJmMjM1NTA4MTdiNDIxNzRlNSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
1 parent 11eb873 commit 004358a
Copy full SHA for 004358a

File tree

Expand file treeCollapse file tree

2 files changed

+78
-78
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+78
-78
lines changed

‎google/cloud/functions_v1/services/cloud_functions_service/async_client.py

Copy file name to clipboardExpand all lines: google/cloud/functions_v1/services/cloud_functions_service/async_client.py
+33-33Lines changed: 33 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ async def list_functions(
241241
242242
from google.cloud import functions_v1
243243
244-
def sample_list_functions():
244+
async def sample_list_functions():
245245
# Create a client
246-
client = functions_v1.CloudFunctionsServiceClient()
246+
client = functions_v1.CloudFunctionsServiceAsyncClient()
247247
248248
# Initialize request argument(s)
249249
request = functions_v1.ListFunctionsRequest(
@@ -253,7 +253,7 @@ def sample_list_functions():
253253
page_result = client.list_functions(request=request)
254254
255255
# Handle the response
256-
for response in page_result:
256+
async for response in page_result:
257257
print(response)
258258
259259
Args:
@@ -337,17 +337,17 @@ async def get_function(
337337
338338
from google.cloud import functions_v1
339339
340-
def sample_get_function():
340+
async def sample_get_function():
341341
# Create a client
342-
client = functions_v1.CloudFunctionsServiceClient()
342+
client = functions_v1.CloudFunctionsServiceAsyncClient()
343343
344344
# Initialize request argument(s)
345345
request = functions_v1.GetFunctionRequest(
346346
name="name_value",
347347
)
348348
349349
# Make the request
350-
response = client.get_function(request=request)
350+
response = await client.get_function(request=request)
351351
352352
# Handle the response
353353
print(response)
@@ -448,9 +448,9 @@ async def create_function(
448448
449449
from google.cloud import functions_v1
450450
451-
def sample_create_function():
451+
async def sample_create_function():
452452
# Create a client
453-
client = functions_v1.CloudFunctionsServiceClient()
453+
client = functions_v1.CloudFunctionsServiceAsyncClient()
454454
455455
# Initialize request argument(s)
456456
function = functions_v1.CloudFunction()
@@ -466,7 +466,7 @@ def sample_create_function():
466466
467467
print("Waiting for operation to complete...")
468468
469-
response = operation.result()
469+
response = await operation.result()
470470
471471
# Handle the response
472472
print(response)
@@ -570,9 +570,9 @@ async def update_function(
570570
571571
from google.cloud import functions_v1
572572
573-
def sample_update_function():
573+
async def sample_update_function():
574574
# Create a client
575-
client = functions_v1.CloudFunctionsServiceClient()
575+
client = functions_v1.CloudFunctionsServiceAsyncClient()
576576
577577
# Initialize request argument(s)
578578
function = functions_v1.CloudFunction()
@@ -587,7 +587,7 @@ def sample_update_function():
587587
588588
print("Waiting for operation to complete...")
589589
590-
response = operation.result()
590+
response = await operation.result()
591591
592592
# Handle the response
593593
print(response)
@@ -698,9 +698,9 @@ async def delete_function(
698698
699699
from google.cloud import functions_v1
700700
701-
def sample_delete_function():
701+
async def sample_delete_function():
702702
# Create a client
703-
client = functions_v1.CloudFunctionsServiceClient()
703+
client = functions_v1.CloudFunctionsServiceAsyncClient()
704704
705705
# Initialize request argument(s)
706706
request = functions_v1.DeleteFunctionRequest(
@@ -712,7 +712,7 @@ def sample_delete_function():
712712
713713
print("Waiting for operation to complete...")
714714
715-
response = operation.result()
715+
response = await operation.result()
716716
717717
# Handle the response
718718
print(response)
@@ -832,9 +832,9 @@ async def call_function(
832832
833833
from google.cloud import functions_v1
834834
835-
def sample_call_function():
835+
async def sample_call_function():
836836
# Create a client
837-
client = functions_v1.CloudFunctionsServiceClient()
837+
client = functions_v1.CloudFunctionsServiceAsyncClient()
838838
839839
# Initialize request argument(s)
840840
request = functions_v1.CallFunctionRequest(
@@ -843,7 +843,7 @@ def sample_call_function():
843843
)
844844
845845
# Make the request
846-
response = client.call_function(request=request)
846+
response = await client.call_function(request=request)
847847
848848
# Handle the response
849849
print(response)
@@ -961,16 +961,16 @@ async def generate_upload_url(
961961
962962
from google.cloud import functions_v1
963963
964-
def sample_generate_upload_url():
964+
async def sample_generate_upload_url():
965965
# Create a client
966-
client = functions_v1.CloudFunctionsServiceClient()
966+
client = functions_v1.CloudFunctionsServiceAsyncClient()
967967
968968
# Initialize request argument(s)
969969
request = functions_v1.GenerateUploadUrlRequest(
970970
)
971971
972972
# Make the request
973-
response = client.generate_upload_url(request=request)
973+
response = await client.generate_upload_url(request=request)
974974
975975
# Handle the response
976976
print(response)
@@ -1036,16 +1036,16 @@ async def generate_download_url(
10361036
10371037
from google.cloud import functions_v1
10381038
1039-
def sample_generate_download_url():
1039+
async def sample_generate_download_url():
10401040
# Create a client
1041-
client = functions_v1.CloudFunctionsServiceClient()
1041+
client = functions_v1.CloudFunctionsServiceAsyncClient()
10421042
10431043
# Initialize request argument(s)
10441044
request = functions_v1.GenerateDownloadUrlRequest(
10451045
)
10461046
10471047
# Make the request
1048-
response = client.generate_download_url(request=request)
1048+
response = await client.generate_download_url(request=request)
10491049
10501050
# Handle the response
10511051
print(response)
@@ -1108,17 +1108,17 @@ async def set_iam_policy(
11081108
from google.cloud import functions_v1
11091109
from google.iam.v1 import iam_policy_pb2 # type: ignore
11101110
1111-
def sample_set_iam_policy():
1111+
async def sample_set_iam_policy():
11121112
# Create a client
1113-
client = functions_v1.CloudFunctionsServiceClient()
1113+
client = functions_v1.CloudFunctionsServiceAsyncClient()
11141114
11151115
# Initialize request argument(s)
11161116
request = iam_policy_pb2.SetIamPolicyRequest(
11171117
resource="resource_value",
11181118
)
11191119
11201120
# Make the request
1121-
response = client.set_iam_policy(request=request)
1121+
response = await client.set_iam_policy(request=request)
11221122
11231123
# Handle the response
11241124
print(response)
@@ -1246,17 +1246,17 @@ async def get_iam_policy(
12461246
from google.cloud import functions_v1
12471247
from google.iam.v1 import iam_policy_pb2 # type: ignore
12481248
1249-
def sample_get_iam_policy():
1249+
async def sample_get_iam_policy():
12501250
# Create a client
1251-
client = functions_v1.CloudFunctionsServiceClient()
1251+
client = functions_v1.CloudFunctionsServiceAsyncClient()
12521252
12531253
# Initialize request argument(s)
12541254
request = iam_policy_pb2.GetIamPolicyRequest(
12551255
resource="resource_value",
12561256
)
12571257
12581258
# Make the request
1259-
response = client.get_iam_policy(request=request)
1259+
response = await client.get_iam_policy(request=request)
12601260
12611261
# Handle the response
12621262
print(response)
@@ -1384,9 +1384,9 @@ async def test_iam_permissions(
13841384
from google.cloud import functions_v1
13851385
from google.iam.v1 import iam_policy_pb2 # type: ignore
13861386
1387-
def sample_test_iam_permissions():
1387+
async def sample_test_iam_permissions():
13881388
# Create a client
1389-
client = functions_v1.CloudFunctionsServiceClient()
1389+
client = functions_v1.CloudFunctionsServiceAsyncClient()
13901390
13911391
# Initialize request argument(s)
13921392
request = iam_policy_pb2.TestIamPermissionsRequest(
@@ -1395,7 +1395,7 @@ def sample_test_iam_permissions():
13951395
)
13961396
13971397
# Make the request
1398-
response = client.test_iam_permissions(request=request)
1398+
response = await client.test_iam_permissions(request=request)
13991399
14001400
# Handle the response
14011401
print(response)

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.