Skip to content

Commit c574db7

Browse files
chore: use gapic-generator-python 0.65.2 (#183)
* chore: use gapic-generator-python 0.65.2 PiperOrigin-RevId: 444333013 Source-Link: googleapis/googleapis@f91b6cf Source-Link: googleapis/googleapis-gen@16eb360 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiMTZlYjM2MDk1YzI5NGU3MTJjNzRhMWJmMjM1NTA4MTdiNDIxNzRlNSJ9 * 🦉 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 4f6786b commit c574db7

File tree

2 files changed

+42
-42
lines changed

2 files changed

+42
-42
lines changed

packages/google-cloud-os-login/google/cloud/oslogin_v1/services/os_login_service/async_client.py

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -228,17 +228,17 @@ async def delete_posix_account(
228228
229229
from google.cloud import oslogin_v1
230230
231-
def sample_delete_posix_account():
231+
async def sample_delete_posix_account():
232232
# Create a client
233-
client = oslogin_v1.OsLoginServiceClient()
233+
client = oslogin_v1.OsLoginServiceAsyncClient()
234234
235235
# Initialize request argument(s)
236236
request = oslogin_v1.DeletePosixAccountRequest(
237237
name="name_value",
238238
)
239239
240240
# Make the request
241-
client.delete_posix_account(request=request)
241+
await client.delete_posix_account(request=request)
242242
243243
Args:
244244
request (Union[google.cloud.oslogin_v1.types.DeletePosixAccountRequest, dict]):
@@ -323,17 +323,17 @@ async def delete_ssh_public_key(
323323
324324
from google.cloud import oslogin_v1
325325
326-
def sample_delete_ssh_public_key():
326+
async def sample_delete_ssh_public_key():
327327
# Create a client
328-
client = oslogin_v1.OsLoginServiceClient()
328+
client = oslogin_v1.OsLoginServiceAsyncClient()
329329
330330
# Initialize request argument(s)
331331
request = oslogin_v1.DeleteSshPublicKeyRequest(
332332
name="name_value",
333333
)
334334
335335
# Make the request
336-
client.delete_ssh_public_key(request=request)
336+
await client.delete_ssh_public_key(request=request)
337337
338338
Args:
339339
request (Union[google.cloud.oslogin_v1.types.DeleteSshPublicKeyRequest, dict]):
@@ -419,17 +419,17 @@ async def get_login_profile(
419419
420420
from google.cloud import oslogin_v1
421421
422-
def sample_get_login_profile():
422+
async def sample_get_login_profile():
423423
# Create a client
424-
client = oslogin_v1.OsLoginServiceClient()
424+
client = oslogin_v1.OsLoginServiceAsyncClient()
425425
426426
# Initialize request argument(s)
427427
request = oslogin_v1.GetLoginProfileRequest(
428428
name="name_value",
429429
)
430430
431431
# Make the request
432-
response = client.get_login_profile(request=request)
432+
response = await client.get_login_profile(request=request)
433433
434434
# Handle the response
435435
print(response)
@@ -525,17 +525,17 @@ async def get_ssh_public_key(
525525
526526
from google.cloud import oslogin_v1
527527
528-
def sample_get_ssh_public_key():
528+
async def sample_get_ssh_public_key():
529529
# Create a client
530-
client = oslogin_v1.OsLoginServiceClient()
530+
client = oslogin_v1.OsLoginServiceAsyncClient()
531531
532532
# Initialize request argument(s)
533533
request = oslogin_v1.GetSshPublicKeyRequest(
534534
name="name_value",
535535
)
536536
537537
# Make the request
538-
response = client.get_ssh_public_key(request=request)
538+
response = await client.get_ssh_public_key(request=request)
539539
540540
# Handle the response
541541
print(response)
@@ -637,17 +637,17 @@ async def import_ssh_public_key(
637637
638638
from google.cloud import oslogin_v1
639639
640-
def sample_import_ssh_public_key():
640+
async def sample_import_ssh_public_key():
641641
# Create a client
642-
client = oslogin_v1.OsLoginServiceClient()
642+
client = oslogin_v1.OsLoginServiceAsyncClient()
643643
644644
# Initialize request argument(s)
645645
request = oslogin_v1.ImportSshPublicKeyRequest(
646646
parent="parent_value",
647647
)
648648
649649
# Make the request
650-
response = client.import_ssh_public_key(request=request)
650+
response = await client.import_ssh_public_key(request=request)
651651
652652
# Handle the response
653653
print(response)
@@ -763,17 +763,17 @@ async def update_ssh_public_key(
763763
764764
from google.cloud import oslogin_v1
765765
766-
def sample_update_ssh_public_key():
766+
async def sample_update_ssh_public_key():
767767
# Create a client
768-
client = oslogin_v1.OsLoginServiceClient()
768+
client = oslogin_v1.OsLoginServiceAsyncClient()
769769
770770
# Initialize request argument(s)
771771
request = oslogin_v1.UpdateSshPublicKeyRequest(
772772
name="name_value",
773773
)
774774
775775
# Make the request
776-
response = client.update_ssh_public_key(request=request)
776+
response = await client.update_ssh_public_key(request=request)
777777
778778
# Handle the response
779779
print(response)

packages/google-cloud-os-login/tests/unit/gapic/oslogin_v1/test_os_login_service.py

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -749,7 +749,7 @@ def test_delete_posix_account_field_headers():
749749
# a field header. Set these to a non-empty value.
750750
request = oslogin.DeletePosixAccountRequest()
751751

752-
request.name = "name/value"
752+
request.name = "name_value"
753753

754754
# Mock the actual call within the gRPC stub, and fake the request.
755755
with mock.patch.object(
@@ -767,7 +767,7 @@ def test_delete_posix_account_field_headers():
767767
_, _, kw = call.mock_calls[0]
768768
assert (
769769
"x-goog-request-params",
770-
"name=name/value",
770+
"name=name_value",
771771
) in kw["metadata"]
772772

773773

@@ -781,7 +781,7 @@ async def test_delete_posix_account_field_headers_async():
781781
# a field header. Set these to a non-empty value.
782782
request = oslogin.DeletePosixAccountRequest()
783783

784-
request.name = "name/value"
784+
request.name = "name_value"
785785

786786
# Mock the actual call within the gRPC stub, and fake the request.
787787
with mock.patch.object(
@@ -799,7 +799,7 @@ async def test_delete_posix_account_field_headers_async():
799799
_, _, kw = call.mock_calls[0]
800800
assert (
801801
"x-goog-request-params",
802-
"name=name/value",
802+
"name=name_value",
803803
) in kw["metadata"]
804804

805805

@@ -983,7 +983,7 @@ def test_delete_ssh_public_key_field_headers():
983983
# a field header. Set these to a non-empty value.
984984
request = oslogin.DeleteSshPublicKeyRequest()
985985

986-
request.name = "name/value"
986+
request.name = "name_value"
987987

988988
# Mock the actual call within the gRPC stub, and fake the request.
989989
with mock.patch.object(
@@ -1001,7 +1001,7 @@ def test_delete_ssh_public_key_field_headers():
10011001
_, _, kw = call.mock_calls[0]
10021002
assert (
10031003
"x-goog-request-params",
1004-
"name=name/value",
1004+
"name=name_value",
10051005
) in kw["metadata"]
10061006

10071007

@@ -1015,7 +1015,7 @@ async def test_delete_ssh_public_key_field_headers_async():
10151015
# a field header. Set these to a non-empty value.
10161016
request = oslogin.DeleteSshPublicKeyRequest()
10171017

1018-
request.name = "name/value"
1018+
request.name = "name_value"
10191019

10201020
# Mock the actual call within the gRPC stub, and fake the request.
10211021
with mock.patch.object(
@@ -1033,7 +1033,7 @@ async def test_delete_ssh_public_key_field_headers_async():
10331033
_, _, kw = call.mock_calls[0]
10341034
assert (
10351035
"x-goog-request-params",
1036-
"name=name/value",
1036+
"name=name_value",
10371037
) in kw["metadata"]
10381038

10391039

@@ -1225,7 +1225,7 @@ def test_get_login_profile_field_headers():
12251225
# a field header. Set these to a non-empty value.
12261226
request = oslogin.GetLoginProfileRequest()
12271227

1228-
request.name = "name/value"
1228+
request.name = "name_value"
12291229

12301230
# Mock the actual call within the gRPC stub, and fake the request.
12311231
with mock.patch.object(
@@ -1243,7 +1243,7 @@ def test_get_login_profile_field_headers():
12431243
_, _, kw = call.mock_calls[0]
12441244
assert (
12451245
"x-goog-request-params",
1246-
"name=name/value",
1246+
"name=name_value",
12471247
) in kw["metadata"]
12481248

12491249

@@ -1257,7 +1257,7 @@ async def test_get_login_profile_field_headers_async():
12571257
# a field header. Set these to a non-empty value.
12581258
request = oslogin.GetLoginProfileRequest()
12591259

1260-
request.name = "name/value"
1260+
request.name = "name_value"
12611261

12621262
# Mock the actual call within the gRPC stub, and fake the request.
12631263
with mock.patch.object(
@@ -1277,7 +1277,7 @@ async def test_get_login_profile_field_headers_async():
12771277
_, _, kw = call.mock_calls[0]
12781278
assert (
12791279
"x-goog-request-params",
1280-
"name=name/value",
1280+
"name=name_value",
12811281
) in kw["metadata"]
12821282

12831283

@@ -1483,7 +1483,7 @@ def test_get_ssh_public_key_field_headers():
14831483
# a field header. Set these to a non-empty value.
14841484
request = oslogin.GetSshPublicKeyRequest()
14851485

1486-
request.name = "name/value"
1486+
request.name = "name_value"
14871487

14881488
# Mock the actual call within the gRPC stub, and fake the request.
14891489
with mock.patch.object(
@@ -1501,7 +1501,7 @@ def test_get_ssh_public_key_field_headers():
15011501
_, _, kw = call.mock_calls[0]
15021502
assert (
15031503
"x-goog-request-params",
1504-
"name=name/value",
1504+
"name=name_value",
15051505
) in kw["metadata"]
15061506

15071507

@@ -1515,7 +1515,7 @@ async def test_get_ssh_public_key_field_headers_async():
15151515
# a field header. Set these to a non-empty value.
15161516
request = oslogin.GetSshPublicKeyRequest()
15171517

1518-
request.name = "name/value"
1518+
request.name = "name_value"
15191519

15201520
# Mock the actual call within the gRPC stub, and fake the request.
15211521
with mock.patch.object(
@@ -1533,7 +1533,7 @@ async def test_get_ssh_public_key_field_headers_async():
15331533
_, _, kw = call.mock_calls[0]
15341534
assert (
15351535
"x-goog-request-params",
1536-
"name=name/value",
1536+
"name=name_value",
15371537
) in kw["metadata"]
15381538

15391539

@@ -1719,7 +1719,7 @@ def test_import_ssh_public_key_field_headers():
17191719
# a field header. Set these to a non-empty value.
17201720
request = oslogin.ImportSshPublicKeyRequest()
17211721

1722-
request.parent = "parent/value"
1722+
request.parent = "parent_value"
17231723

17241724
# Mock the actual call within the gRPC stub, and fake the request.
17251725
with mock.patch.object(
@@ -1737,7 +1737,7 @@ def test_import_ssh_public_key_field_headers():
17371737
_, _, kw = call.mock_calls[0]
17381738
assert (
17391739
"x-goog-request-params",
1740-
"parent=parent/value",
1740+
"parent=parent_value",
17411741
) in kw["metadata"]
17421742

17431743

@@ -1751,7 +1751,7 @@ async def test_import_ssh_public_key_field_headers_async():
17511751
# a field header. Set these to a non-empty value.
17521752
request = oslogin.ImportSshPublicKeyRequest()
17531753

1754-
request.parent = "parent/value"
1754+
request.parent = "parent_value"
17551755

17561756
# Mock the actual call within the gRPC stub, and fake the request.
17571757
with mock.patch.object(
@@ -1771,7 +1771,7 @@ async def test_import_ssh_public_key_field_headers_async():
17711771
_, _, kw = call.mock_calls[0]
17721772
assert (
17731773
"x-goog-request-params",
1774-
"parent=parent/value",
1774+
"parent=parent_value",
17751775
) in kw["metadata"]
17761776

17771777

@@ -1997,7 +1997,7 @@ def test_update_ssh_public_key_field_headers():
19971997
# a field header. Set these to a non-empty value.
19981998
request = oslogin.UpdateSshPublicKeyRequest()
19991999

2000-
request.name = "name/value"
2000+
request.name = "name_value"
20012001

20022002
# Mock the actual call within the gRPC stub, and fake the request.
20032003
with mock.patch.object(
@@ -2015,7 +2015,7 @@ def test_update_ssh_public_key_field_headers():
20152015
_, _, kw = call.mock_calls[0]
20162016
assert (
20172017
"x-goog-request-params",
2018-
"name=name/value",
2018+
"name=name_value",
20192019
) in kw["metadata"]
20202020

20212021

@@ -2029,7 +2029,7 @@ async def test_update_ssh_public_key_field_headers_async():
20292029
# a field header. Set these to a non-empty value.
20302030
request = oslogin.UpdateSshPublicKeyRequest()
20312031

2032-
request.name = "name/value"
2032+
request.name = "name_value"
20332033

20342034
# Mock the actual call within the gRPC stub, and fake the request.
20352035
with mock.patch.object(
@@ -2047,7 +2047,7 @@ async def test_update_ssh_public_key_field_headers_async():
20472047
_, _, kw = call.mock_calls[0]
20482048
assert (
20492049
"x-goog-request-params",
2050-
"name=name/value",
2050+
"name=name_value",
20512051
) in kw["metadata"]
20522052

20532053

0 commit comments

Comments
 (0)