8000 fix: regenerate the client lib (#9) · googleapis/python-compute@b9def52 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Dec 31, 2023. It is now read-only.

Commit b9def52

Browse files
fix: regenerate the client lib (#9)
1 parent 54814f8 commit b9def52

File tree

147 files changed

+2957
-292
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

147 files changed

+2957
-292
lines changed

google/cloud/compute_v1/services/accelerator_types/transports/rest.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,12 @@ def aggregated_list(
126126
# TODO(yon-mg): handle nested fields corerctly rather than using only top level fields
127127
# not required for GCE
128128
query_params = {
129-
"returnPartialSuccess": request.return_partial_success,
130-
"maxResults": request.max_results,
131-
"orderBy": request.order_by,
132129
"filter": request.filter,
133130
"pageToken": request.page_token,
131+
"returnPartialSuccess": request.return_partial_success,
132+
"maxResults": request.max_results,
134133
"includeAllScopes": request.include_all_scopes,
134+
"orderBy": request.order_by,
135135
}
136136
# TODO(yon-mg): further discussion needed whether 'python truthiness' is appropriate here
137137
# discards default values
@@ -144,6 +144,9 @@ def aggregated_list(
144144
# Send the request
145145
response = self._session.get(url)
146146

147+
# Raise requests.exceptions.HTTPError if the status code is >= 400
148+
response.raise_for_status()
149+
147150
# Return the response
148151
return compute.AcceleratorTypeAggregatedList.from_json(response.content)
149152

@@ -201,6 +204,9 @@ def get(
201204
# Send the request
202205
response = self._session.get(url)
203206

207+
# Raise requests.exceptions.HTTPError if the status code is >= 400
208+
response.raise_for_status()
209+
204210
# Return the response
205211
return compute.AcceleratorType.from_json(response.content)
206212

@@ -236,11 +242,11 @@ def list(
236242
# TODO(yon-mg): handle nested fields corerctly rather than using only top level fields
237243
# not required for GCE
238244
query_params = {
245+
"filter": request.filter,
246+
"pageToken": request.page_token,
239247
"returnPartialSuccess": request.return_partial_success,
240248
"maxResults": request.max_results,
241249
"orderBy": request.order_by,
242-
"filter": request.filter,
243-
"pageToken": request.page_token,
244250
}
245251
# TODO(yon-mg): further discussion needed whether 'python truthiness' is appropriate here
246252
# discards default values
@@ -253,6 +259,9 @@ def list(
253259
# Send the request
254260
response = self._session.get(url)
255261

262+
# Raise requests.exceptions.HTTPError if the status code is >= 400
263+
response.raise_for_status()
264+
256265
# Return the response
257266
return compute.AcceleratorTypeList.from_json(response.content)
258267

google/cloud/compute_v1/services/addresses/transports/rest.py

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ def aggregated_list(
125125
# TODO(yon-mg): handle nested fields corerctly rather than using only top level fields
126126
# not required for GCE
127127
query_params = {
128-
"returnPartialSuccess": request.return_partial_success,
129-
"maxResults": request.max_results,
130-
"orderBy": request.order_by,
131128
"filter": request.filter,
132129
"pageToken": request.page_token,
130+
"returnPartialSuccess": request.return_partial_success,
131+
"maxResults": request.max_results,
133132
"includeAllScopes": request.include_all_scopes,
133+
"orderBy": request.order_by,
134134
}
135135
# TODO(yon-mg): further discussion needed whether 'python truthiness' is appropriate here
136136
# discards default values
@@ -143,6 +143,9 @@ def aggregated_list(
143143
# Send the request
144144
response = self._session.get(url)
145145

146+
# Raise requests.exceptions.HTTPError if the status code is >= 400
147+
response.raise_for_status()
148+
146149
# Return the response
147150
return compute.AddressAggregatedList.from_json(response.content)
148151

@@ -222,6 +225,9 @@ def delete(
222225
# Send the request
223226
response = self._session.delete(url)
224227

228+
# Raise requests.exceptions.HTTPError if the status code is >= 400
229+
response.raise_for_status()
230+
225231
# Return the response
226232
return compute.Operation.from_json(response.content)
227233

@@ -298,6 +304,9 @@ def get(
298304
# Send the request
299305
response = self._session.get(url)
300306

307+
# Raise requests.exceptions.HTTPError if the status code is >= 400
308+
response.raise_for_status()
309+
301310
# Return the response
302311
return compute.Address.from_json(response.content)
303312

@@ -379,6 +388,9 @@ def insert(
379388
# Send the request
380389
response = self._session.post(url, json=body,)
381390

391+
# Raise requests.exceptions.HTTPError if the status code is >= 400
392+
response.raise_for_status()
393+
382394
# Return the response
383395
return compute.Operation.from_json(response.content)
384396

@@ -413,11 +425,11 @@ def list(
413425
# TODO(yon-mg): handle nested fields corerctly rather than using only top level fields
414426
# not required for GCE
415427
query_params = {
428+
"filter": request.filter,
429+
"pageToken": request.page_token,
416430
"returnPartialSuccess": request.return_partial_success,
417431
"maxResults": request.max_results,
418432
"orderBy": request.order_by,
419-
"filter": request.filter,
420-
"pageToken": request.page_token,
421433
}
422434
# TODO(yon-mg): further discussion needed whether 'python truthiness' is appropriate here
423435
# discards default values
@@ -430,6 +442,9 @@ def list(
430442
# Send the request
431443
response = self._session.get(url)
432444

445+
# Raise requests.exceptions.HTTPError if the status code is >= 400
446+
response.raise_for_status()
447+
433448
# Return the response
434449
return compute.AddressList.from_json(response.content)
435450

google/cloud/compute_v1/services/autoscalers/transports/rest.py

Lines changed: 26 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,12 +125,12 @@ def aggregated_list(
125125
# TODO(yon-mg): handle nested fields corerctly rather than using only top level fields
126126
# not required for GCE
127127
query_params = {
128-
"returnPartialSuccess": request.return_partial_success,
129-
"maxResults": request.max_results,
130-
"orderBy": request.order_by,
131128
"filter": request.filter,
132129
"pageToken": request.page_token,
130+
"returnPartialSuccess": request.return_partial_success,
131+
"maxResults": request.max_results,
133132
"includeAllScopes": request.include_all_scopes,
133+
"orderBy": request.order_by,
134134
}
135135
# TODO(yon-mg): further discussion needed whether 'python truthiness' is appropriate here
136136
# discards default values
@@ -143,6 +143,9 @@ def aggregated_list(
143143
# Send the request
144144
response = self._session.get(url)
145145

146+
# Raise requests.exceptions.HTTPError if the status code is >= 400
147+
response.raise_for_status()
148+
146149
# Return the response
147150
return compute.AutoscalerAggregatedList.from_json(response.content)
148151

@@ -222,6 +225,9 @@ def delete(
222225
# Send the request
223226
response = self._session.delete(url)
224227

228+
# Raise requests.exceptions.HTTPError if the status code is >= 400
229+
response.raise_for_status()
230+
225231
# Return the response
226232
return compute.Operation.from_json(response.content)
227233

@@ -291,6 +297,9 @@ def get(
291297
# Send the request
292298
response = self._session.get(url)
293299

300+
# Raise requests.exceptions.HTTPError if the status code is >= 400
301+
response.raise_for_status()
302+
294303
# Return the response
295304
return compute.Autoscaler.from_json(response.content)
296305

@@ -372,6 +381,9 @@ def insert(
372381
# Send the request
373382
response = self._session.post(url, json=body,)
374383

384+
# Raise requests.exceptions.HTTPError if the status code is >= 400
385+
response.raise_for_status()
386+
375387
# Return the response
376388
return compute.Operation.from_json(response.content)
377389

@@ -409,11 +421,11 @@ def list(
409421
# TODO(yon-mg): handle nested fields corerctly rather than using only top level fields
410422
# not required for GCE
411423
query_params = {
424+
"filter": request.filter,
425+
"pageToken": request.page_token,
412426
"returnPartialSuccess": request.return_partial_success,
413427
"maxResults": request.max_results,
414428
"orderBy": request.order_by,
415-
"filter": request.filter,
416-
"pageToken": request.page_token,
417429
}
418430
# TODO(yon-mg): further discussion needed whether 'python truthiness' is appropriate here
419431
# discards default values
@@ -426,6 +438,9 @@ def list(
426438
# Send the request
427439
response = self._session.get(url)
428440

441+
# Raise requests.exceptions.HTTPError if the status code is >= 400
442+
response.raise_for_status()
443+
429444
# Return the response
430445
return compute.AutoscalerList.from_json(response.content)
431446

@@ -508,6 +523,9 @@ def patch(
508523
# Send the request
509524
response = self._session.patch(url, json=body,)
510525

526+
# Raise requests.exceptions.HTTPError if the status code is >= 400
527+
response.raise_for_status()
528+
511529
# Return the response
512530
return compute.Operation.from_json(response.content)
513531

@@ -590,6 +608,9 @@ def update(
590608
# Send the request
591609
response = self._session.put(url, json=body,)
592610

611+
# Raise requests.exceptions.HTTPError if the status code is >= 400
612+
response.raise_for_status()
613+
593614
# Return the response
594615
return compute.Operation.from_json(response.content)
595616

google/cloud/compute_v1/services/backend_buckets/transports/rest.py

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,9 @@ def add_signed_url_key(
173173
# Send the request
174174
response = self._session.post(url, json=body,)
175175

176+
# Raise requests.exceptions.HTTPError if the status code is >= 400
177+
response.raise_for_status()
178+
176179
# Return the response
177180
return compute.Operation.from_json(response.content)
178181

@@ -251,6 +254,9 @@ def delete(
251254
# Send the request
252255
response = self._session.delete(url)
253256

257+
# Raise requests.exceptions.HTTPError if the status code is >= 400
258+
response.raise_for_status()
259+
254260
# Return the response
255261
return compute.Operation.from_json(response.content)
256262

@@ -330,6 +336,9 @@ def delete_signed_url_key(
330336
# Send the request
331337
response = self._session.post(url)
332338

339+
# Raise requests.exceptions.HTTPError if the status code is >= 400
340+
response.raise_for_status()
341+
333342
# Return the response
334343
return compute.Operation.from_json(response.content)
335344

@@ -384,6 +393,9 @@ def get(
384393
# Send the request
385394
response = self._session.get(url)
386395

396+
# Raise requests.exceptions.HTTPError if the status code is >= 400
397+
response.raise_for_status()
398+
387399
# Return the response
388400
return compute.BackendBucket.from_json(response.content)
389401

@@ -465,6 +477,9 @@ def insert(
465477
# Send the request
466478
response = self._session.post(url, json=body,)
467479

480+
# Raise requests.exceptions.HTTPError if the status code is >= 400
481+
response.raise_for_status()
482+
468483
# Return the response
469484
return compute.Operation.from_json(response.content)
470485

@@ -502,11 +517,11 @@ def list(
502517
# TODO(yon-mg): handle nested fields corerctly rather than using only top level fields
503518
# not required for GCE
504519
query_params = {
520+
"filter": request.filter,
521+
"pageToken": request.page_token,
505522
"returnPartialSuccess": request.return_partial_success,
506523
"maxResults": request.max_results,
507524
"orderBy": request.order_by,
508-
"filter": request.filter,
509-
"pageToken": request.page_token,
510525
}
511526
# TODO(yon-mg): further discussion needed whether 'python truthiness' is appropriate here
512527
# discards default values
@@ -519,6 +534,9 @@ def list(
519534
# Send the request
520535
response = self._session.get(url)
521536

537+
# Raise requests.exceptions.HTTPError if the status code is >= 400
538+
response.raise_for_status()
539+
522540
# Return the response
523541
return compute.BackendBucketList.from_json(response.content)
524542

@@ -602,6 +620,9 @@ def patch(
602620
# Send the request
603621
response = self._session.patch(url, json=body,)
604622

623+
# Raise requests.exceptions.HTTPError if the status code is >= 400
624+
response.raise_for_status()
625+
605626
# Return the response
606627
return compute.Operation.from_json(response.content)
607628

@@ -685,6 +706,9 @@ def update(
685706
# Send the request
686707
response = self._session.put(url, json=body,)
687708

709+
# Raise requests.exceptions.HTTPError if the status code is >= 400
710+
response.raise_for_status()
711+
688712
# Return the response
689713
return compute.Operation.from_json(response.content)
690714

0 commit comments

Comments
 (0)
0