Skip to content

Commit 8d72bc1

Browse files
chore: use gapic-generator-python 0.65.2 (#234)
* 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 ac013e8 commit 8d72bc1

2 files changed

Lines changed: 49 additions & 49 deletions

File tree

packages/google-analytics-data/google/analytics/data_v1beta/services/beta_analytics_data/async_client.py

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -224,16 +224,16 @@ async def run_report(
224224
225225
from google.analytics import data_v1beta
226226
227-
def sample_run_report():
227+
async def sample_run_report():
228228
# Create a client
229-
client = data_v1beta.BetaAnalyticsDataClient()
229+
client = data_v1beta.BetaAnalyticsDataAsyncClient()
230230
231231
# Initialize request argument(s)
232232
request = data_v1beta.RunReportRequest(
233233
)
234234
235235
# Make the request
236-
response = client.run_report(request=request)
236+
response = await client.run_report(request=request)
237237
238238
# Handle the response
239239
print(response)
@@ -300,16 +300,16 @@ async def run_pivot_report(
300300
301301
from google.analytics import data_v1beta
302302
303-
def sample_run_pivot_report():
303+
async def sample_run_pivot_report():
304304
# Create a client
305-
client = data_v1beta.BetaAnalyticsDataClient()
305+
client = data_v1beta.BetaAnalyticsDataAsyncClient()
306306
307307
# Initialize request argument(s)
308308
request = data_v1beta.RunPivotReportRequest(
309309
)
310310
311311
# Make the request
312-
response = client.run_pivot_report(request=request)
312+
response = await client.run_pivot_report(request=request)
313313
314314
# Handle the response
315315
print(response)
@@ -373,16 +373,16 @@ async def batch_run_reports(
373373
374374
from google.analytics import data_v1beta
375375
376-
def sample_batch_run_reports():
376+
async def sample_batch_run_reports():
377377
# Create a client
378-
client = data_v1beta.BetaAnalyticsDataClient()
378+
client = data_v1beta.BetaAnalyticsDataAsyncClient()
379379
380380
# Initialize request argument(s)
381381
request = data_v1beta.BatchRunReportsRequest(
382382
)
383383
384384
# Make the request
385-
response = client.batch_run_reports(request=request)
385+
response = await client.batch_run_reports(request=request)
386386
387387
# Handle the response
388388
print(response)
@@ -446,16 +446,16 @@ async def batch_run_pivot_reports(
446446
447447
from google.analytics import data_v1beta
448448
449-
def sample_batch_run_pivot_reports():
449+
async def sample_batch_run_pivot_reports():
450450
# Create a client
451-
client = data_v1beta.BetaAnalyticsDataClient()
451+
client = data_v1beta.BetaAnalyticsDataAsyncClient()
452452
453453
# Initialize request argument(s)
454454
request = data_v1beta.BatchRunPivotReportsRequest(
455455
)
456456
457457
# Make the request
458-
response = client.batch_run_pivot_reports(request=request)
458+
response = await client.batch_run_pivot_reports(request=request)
459459
460460
# Handle the response
461461
print(response)
@@ -529,17 +529,17 @@ async def get_metadata(
529529
530530
from google.analytics import data_v1beta
531531
532-
def sample_get_metadata():
532+
async def sample_get_metadata():
533533
# Create a client
534-
client = data_v1beta.BetaAnalyticsDataClient()
534+
client = data_v1beta.BetaAnalyticsDataAsyncClient()
535535
536536
# Initialize request argument(s)
537537
request = data_v1beta.GetMetadataRequest(
538538
name="name_value",
539539
)
540540
541541
# Make the request
542-
response = client.get_metadata(request=request)
542+
response = await client.get_metadata(request=request)
543543
544544
# Handle the response
545545
print(response)
@@ -636,16 +636,16 @@ async def run_realtime_report(
636636
637637
from google.analytics import data_v1beta
638638
639-
def sample_run_realtime_report():
639+
async def sample_run_realtime_report():
640640
# Create a client
641-
client = data_v1beta.BetaAnalyticsDataClient()
641+
client = data_v1beta.BetaAnalyticsDataAsyncClient()
642642
643643
# Initialize request argument(s)
644644
request = data_v1beta.RunRealtimeReportRequest(
645645
)
646646
647647
# Make the request
648-
response = client.run_realtime_report(request=request)
648+
response = await client.run_realtime_report(request=request)
649649
650650
# Handle the response
651651
print(response)
@@ -718,16 +718,16 @@ async def check_compatibility(
718718
719719
from google.analytics import data_v1beta
720720
721-
def sample_check_compatibility():
721+
async def sample_check_compatibility():
722722
# Create a client
723-
client = data_v1beta.BetaAnalyticsDataClient()
723+
client = data_v1beta.BetaAnalyticsDataAsyncClient()
724724
725725
# Initialize request argument(s)
726726
request = data_v1beta.CheckCompatibilityRequest(
727727
)
728728
729729
# Make the request
730-
response = client.check_compatibility(request=request)
730+
response = await client.check_compatibility(request=request)
731731
732732
# Handle the response
733733
print(response)

packages/google-analytics-data/tests/unit/gapic/data_v1beta/test_beta_analytics_data.py

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -769,7 +769,7 @@ def test_run_report_field_headers():
769769
# a field header. Set these to a non-empty value.
770770
request = analytics_data_api.RunReportRequest()
771771

772-
request.property = "property/value"
772+
request.property = "property_value"
773773

774774
# Mock the actual call within the gRPC stub, and fake the request.
775775
with mock.patch.object(type(client.transport.run_report), "__call__") as call:
@@ -785,7 +785,7 @@ def test_run_report_field_headers():
785785
_, _, kw = call.mock_calls[0]
786786
assert (
787787
"x-goog-request-params",
788-
"property=property/value",
788+
"property=property_value",
789789
) in kw["metadata"]
790790

791791

@@ -799,7 +799,7 @@ async def test_run_report_field_headers_async():
799799
# a field header. Set these to a non-empty value.
800800
request = analytics_data_api.RunReportRequest()
801801

802-
request.property = "property/value"
802+
request.property = "property_value"
803803

804804
# Mock the actual call within the gRPC stub, and fake the request.
805805
with mock.patch.object(type(client.transport.run_report), "__call__") as call:
@@ -817,7 +817,7 @@ async def test_run_report_field_headers_async():
817817
_, _, kw = call.mock_calls[0]
818818
assert (
819819
"x-goog-request-params",
820-
"property=property/value",
820+
"property=property_value",
821821
) in kw["metadata"]
822822

823823

@@ -920,7 +920,7 @@ def test_run_pivot_report_field_headers():
920920
# a field header. Set these to a non-empty value.
921921
request = analytics_data_api.RunPivotReportRequest()
922922

923-
request.property = "property/value"
923+
request.property = "property_value"
924924

925925
# Mock the actual call within the gRPC stub, and fake the request.
926926
with mock.patch.object(type(client.transport.run_pivot_report), "__call__") as call:
@@ -936,7 +936,7 @@ def test_run_pivot_report_field_headers():
936936
_, _, kw = call.mock_calls[0]
937937
assert (
938938
"x-goog-request-params",
939-
"property=property/value",
939+
"property=property_value",
940940
) in kw["metadata"]
941941

942942

@@ -950,7 +950,7 @@ async def test_run_pivot_report_field_headers_async():
950950
# a field header. Set these to a non-empty value.
951951
request = analytics_data_api.RunPivotReportRequest()
952952

953-
request.property = "property/value"
953+
request.property = "property_value"
954954

955955
# Mock the actual call within the gRPC stub, and fake the request.
956956
with mock.patch.object(type(client.transport.run_pivot_report), "__call__") as call:
@@ -968,7 +968,7 @@ async def test_run_pivot_report_field_headers_async():
968968
_, _, kw = call.mock_calls[0]
969969
assert (
970970
"x-goog-request-params",
971-
"property=property/value",
971+
"property=property_value",
972972
) in kw["metadata"]
973973

974974

@@ -1077,7 +1077,7 @@ def test_batch_run_reports_field_headers():
10771077
# a field header. Set these to a non-empty value.
10781078
request = analytics_data_api.BatchRunReportsRequest()
10791079

1080-
request.property = "property/value"
1080+
request.property = "property_value"
10811081

10821082
# Mock the actual call within the gRPC stub, and fake the request.
10831083
with mock.patch.object(
@@ -1095,7 +1095,7 @@ def test_batch_run_reports_field_headers():
10951095
_, _, kw = call.mock_calls[0]
10961096
assert (
10971097
"x-goog-request-params",
1098-
"property=property/value",
1098+
"property=property_value",
10991099
) in kw["metadata"]
11001100

11011101

@@ -1109,7 +1109,7 @@ async def test_batch_run_reports_field_headers_async():
11091109
# a field header. Set these to a non-empty value.
11101110
request = analytics_data_api.BatchRunReportsRequest()
11111111

1112-
request.property = "property/value"
1112+
request.property = "property_value"
11131113

11141114
# Mock the actual call within the gRPC stub, and fake the request.
11151115
with mock.patch.object(
@@ -1129,7 +1129,7 @@ async def test_batch_run_reports_field_headers_async():
11291129
_, _, kw = call.mock_calls[0]
11301130
assert (
11311131
"x-goog-request-params",
1132-
"property=property/value",
1132+
"property=property_value",
11331133
) in kw["metadata"]
11341134

11351135

@@ -1238,7 +1238,7 @@ def test_batch_run_pivot_reports_field_headers():
12381238
# a field header. Set these to a non-empty value.
12391239
request = analytics_data_api.BatchRunPivotReportsRequest()
12401240

1241-
request.property = "property/value"
1241+
request.property = "property_value"
12421242

12431243
# Mock the actual call within the gRPC stub, and fake the request.
12441244
with mock.patch.object(
@@ -1256,7 +1256,7 @@ def test_batch_run_pivot_reports_field_headers():
12561256
_, _, kw = call.mock_calls[0]
12571257
assert (
12581258
"x-goog-request-params",
1259-
"property=property/value",
1259+
"property=property_value",
12601260
) in kw["metadata"]
12611261

12621262

@@ -1270,7 +1270,7 @@ async def test_batch_run_pivot_reports_field_headers_async():
12701270
# a field header. Set these to a non-empty value.
12711271
request = analytics_data_api.BatchRunPivotReportsRequest()
12721272

1273-
request.property = "property/value"
1273+
request.property = "property_value"
12741274

12751275
# Mock the actual call within the gRPC stub, and fake the request.
12761276
with mock.patch.object(
@@ -1290,7 +1290,7 @@ async def test_batch_run_pivot_reports_field_headers_async():
12901290
_, _, kw = call.mock_calls[0]
12911291
assert (
12921292
"x-goog-request-params",
1293-
"property=property/value",
1293+
"property=property_value",
12941294
) in kw["metadata"]
12951295

12961296

@@ -1392,7 +1392,7 @@ def test_get_metadata_field_headers():
13921392
# a field header. Set these to a non-empty value.
13931393
request = analytics_data_api.GetMetadataRequest()
13941394

1395-
request.name = "name/value"
1395+
request.name = "name_value"
13961396

13971397
# Mock the actual call within the gRPC stub, and fake the request.
13981398
with mock.patch.object(type(client.transport.get_metadata), "__call__") as call:
@@ -1408,7 +1408,7 @@ def test_get_metadata_field_headers():
14081408
_, _, kw = call.mock_calls[0]
14091409
assert (
14101410
"x-goog-request-params",
1411-
"name=name/value",
1411+
"name=name_value",
14121412
) in kw["metadata"]
14131413

14141414

@@ -1422,7 +1422,7 @@ async def test_get_metadata_field_headers_async():
14221422
# a field header. Set these to a non-empty value.
14231423
request = analytics_data_api.GetMetadataRequest()
14241424

1425-
request.name = "name/value"
1425+
request.name = "name_value"
14261426

14271427
# Mock the actual call within the gRPC stub, and fake the request.
14281428
with mock.patch.object(type(client.transport.get_metadata), "__call__") as call:
@@ -1440,7 +1440,7 @@ async def test_get_metadata_field_headers_async():
14401440
_, _, kw = call.mock_calls[0]
14411441
assert (
14421442
"x-goog-request-params",
1443-
"name=name/value",
1443+
"name=name_value",
14441444
) in kw["metadata"]
14451445

14461446

@@ -1635,7 +1635,7 @@ def test_run_realtime_report_field_headers():
16351635
# a field header. Set these to a non-empty value.
16361636
request = analytics_data_api.RunRealtimeReportRequest()
16371637

1638-
request.property = "property/value"
1638+
request.property = "property_value"
16391639

16401640
# Mock the actual call within the gRPC stub, and fake the request.
16411641
with mock.patch.object(
@@ -1653,7 +1653,7 @@ def test_run_realtime_report_field_headers():
16531653
_, _, kw = call.mock_calls[0]
16541654
assert (
16551655
"x-goog-request-params",
1656-
"property=property/value",
1656+
"property=property_value",
16571657
) in kw["metadata"]
16581658

16591659

@@ -1667,7 +1667,7 @@ async def test_run_realtime_report_field_headers_async():
16671667
# a field header. Set these to a non-empty value.
16681668
request = analytics_data_api.RunRealtimeReportRequest()
16691669

1670-
request.property = "property/value"
1670+
request.property = "property_value"
16711671

16721672
# Mock the actual call within the gRPC stub, and fake the request.
16731673
with mock.patch.object(
@@ -1687,7 +1687,7 @@ async def test_run_realtime_report_field_headers_async():
16871687
_, _, kw = call.mock_calls[0]
16881688
assert (
16891689
"x-goog-request-params",
1690-
"property=property/value",
1690+
"property=property_value",
16911691
) in kw["metadata"]
16921692

16931693

@@ -1790,7 +1790,7 @@ def test_check_compatibility_field_headers():
17901790
# a field header. Set these to a non-empty value.
17911791
request = analytics_data_api.CheckCompatibilityRequest()
17921792

1793-
request.property = "property/value"
1793+
request.property = "property_value"
17941794

17951795
# Mock the actual call within the gRPC stub, and fake the request.
17961796
with mock.patch.object(
@@ -1808,7 +1808,7 @@ def test_check_compatibility_field_headers():
18081808
_, _, kw = call.mock_calls[0]
18091809
assert (
18101810
"x-goog-request-params",
1811-
"property=property/value",
1811+
"property=property_value",
18121812
) in kw["metadata"]
18131813

18141814

@@ -1822,7 +1822,7 @@ async def test_check_compatibility_field_headers_async():
18221822
# a field header. Set these to a non-empty value.
18231823
request = analytics_data_api.CheckCompatibilityRequest()
18241824

1825-
request.property = "property/value"
1825+
request.property = "property_value"
18261826

18271827
# Mock the actual call within the gRPC stub, and fake the request.
18281828
with mock.patch.object(
@@ -1842,7 +1842,7 @@ async def test_check_compatibility_field_headers_async():
18421842
_, _, kw = call.mock_calls[0]
18431843
assert (
18441844
"x-goog-request-params",
1845-
"property=property/value",
1845+
"property=property_value",
18461846
) in kw["metadata"]
18471847

18481848

0 commit comments

Comments
 (0)