Skip to content

Commit 280ef0b

Browse files
chore: use gapic-generator-python 0.56.2 (googleapis#158)
* chore: update Java and Python dependencies PiperOrigin-RevId: 408420890 Source-Link: googleapis/googleapis@2921f9f Source-Link: https://github.com/googleapis/googleapis-gen/commit/6598ca8cbbf5226733a099c4506518a5af6ff74c Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjU5OGNhOGNiYmY1MjI2NzMzYTA5OWM0NTA2NTE4YTVhZjZmZjc0YyJ9 * 🦉 Updates from OwlBot 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 f3f2558 commit 280ef0b

13 files changed

Lines changed: 116 additions & 56 deletions

File tree

‎packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1/services/budget_service/async_client.py‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@
1919
from typing import Dict, Sequence, Tuple, Type, Union
2020
import pkg_resources
2121

22-
from google.api_core.client_options import ClientOptions # type: ignore
23-
from google.api_core import exceptions as core_exceptions # type: ignore
24-
from google.api_core import gapic_v1 # type: ignore
25-
from google.api_core import retry as retries # type: ignore
22+
from google.api_core.client_options import ClientOptions
23+
from google.api_core import exceptions as core_exceptions
24+
from google.api_core import gapic_v1
25+
from google.api_core import retry as retries
2626
from google.auth import credentials as ga_credentials # type: ignore
2727
from google.oauth2 import service_account # type: ignore
2828

29-
OptionalRetry = Union[retries.Retry, object]
29+
try:
30+
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
31+
except AttributeError: # pragma: NO COVER
32+
OptionalRetry = Union[retries.Retry, object] # type: ignore
3033

3134
from google.cloud.billing.budgets_v1.services.budget_service import pagers
3235
from google.cloud.billing.budgets_v1.types import budget_model

‎packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1/services/budget_service/client.py‎

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,25 @@
1414
# limitations under the License.
1515
#
1616
from collections import OrderedDict
17-
from distutils import util
1817
import os
1918
import re
2019
from typing import Dict, Optional, Sequence, Tuple, Type, Union
2120
import pkg_resources
2221

23-
from google.api_core import client_options as client_options_lib # type: ignore
24-
from google.api_core import exceptions as core_exceptions # type: ignore
25-
from google.api_core import gapic_v1 # type: ignore
26-
from google.api_core import retry as retries # type: ignore
22+
from google.api_core import client_options as client_options_lib
23+
from google.api_core import exceptions as core_exceptions
24+
from google.api_core import gapic_v1
25+
from google.api_core import retry as retries
2726
from google.auth import credentials as ga_credentials # type: ignore
2827
from google.auth.transport import mtls # type: ignore
2928
from google.auth.transport.grpc import SslCredentials # type: ignore
3029
from google.auth.exceptions import MutualTLSChannelError # type: ignore
3130
from google.oauth2 import service_account # type: ignore
3231

33-
OptionalRetry = Union[retries.Retry, object]
32+
try:
33+
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
34+
except AttributeError: # pragma: NO COVER
35+
OptionalRetry = Union[retries.Retry, object] # type: ignore
3436

3537
from google.cloud.billing.budgets_v1.services.budget_service import pagers
3638
from google.cloud.billing.budgets_v1.types import budget_model
@@ -285,8 +287,15 @@ def __init__(
285287
client_options = client_options_lib.ClientOptions()
286288

287289
# Create SSL credentials for mutual TLS if needed.
288-
use_client_cert = bool(
289-
util.strtobool(os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false"))
290+
if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") not in (
291+
"true",
292+
"false",
293+
):
294+
raise ValueError(
295+
"Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`"
296+
)
297+
use_client_cert = (
298+
os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true"
290299
)
291300

292301
client_cert_source_func = None

‎packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1/services/budget_service/transports/base.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
import pkg_resources
1919

2020
import google.auth # type: ignore
21-
import google.api_core # type: ignore
22-
from google.api_core import exceptions as core_exceptions # type: ignore
23-
from google.api_core import gapic_v1 # type: ignore
24-
from google.api_core import retry as retries # type: ignore
21+
import google.api_core
22+
from google.api_core import exceptions as core_exceptions
23+
from google.api_core import gapic_v1
24+
from google.api_core import retry as retries
2525
from google.auth import credentials as ga_credentials # type: ignore
2626
from google.oauth2 import service_account # type: ignore
2727

‎packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1/services/budget_service/transports/grpc.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import warnings
1717
from typing import Callable, Dict, Optional, Sequence, Tuple, Union
1818

19-
from google.api_core import grpc_helpers # type: ignore
20-
from google.api_core import gapic_v1 # type: ignore
19+
from google.api_core import grpc_helpers
20+
from google.api_core import gapic_v1
2121
import google.auth # type: ignore
2222
from google.auth import credentials as ga_credentials # type: ignore
2323
from google.auth.transport.grpc import SslCredentials # type: ignore

‎packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1/services/budget_service/transports/grpc_asyncio.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import warnings
1717
from typing import Awaitable, Callable, Dict, Optional, Sequence, Tuple, Union
1818

19-
from google.api_core import gapic_v1 # type: ignore
20-
from google.api_core import grpc_helpers_async # type: ignore
19+
from google.api_core import gapic_v1
20+
from google.api_core import grpc_helpers_async
2121
from google.auth import credentials as ga_credentials # type: ignore
2222
from google.auth.transport.grpc import SslCredentials # type: ignore
2323

‎packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1/types/budget_model.py‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,7 @@ class BudgetAmount(proto.Message):
117117
updating a budget, it must match the currency_code of the
118118
existing budget. The ``currency_code`` is provided on
119119
output.
120+
120121
This field is a member of `oneof`_ ``budget_amount``.
121122
last_period_amount (google.cloud.billing.budgets_v1.types.LastPeriodAmount):
122123
Use the last period's actual spend as the budget for the
@@ -125,6 +126,7 @@ class BudgetAmount(proto.Message):
125126
[Filter.calendar_period][google.cloud.billing.budgets.v1.Filter.calendar_period].
126127
It cannot be set in combination with
127128
[Filter.custom_period][google.cloud.billing.budgets.v1.Filter.custom_period].
129+
128130
This field is a member of `oneof`_ ``budget_amount``.
129131
"""
130132

@@ -298,12 +300,14 @@ class Filter(proto.Message):
298300
After that, it will track usage from July 1 to
299301
September 30 when the current calendar month is
300302
July, August, September, so on.
303+
301304
This field is a member of `oneof`_ ``usage_period``.
302305
custom_period (google.cloud.billing.budgets_v1.types.CustomPeriod):
303306
Optional. Specifies to track usage from any
304307
start date (required) to any end date
305308
(optional). This time period is static, it does
306309
not recur.
310+
307311
This field is a member of `oneof`_ ``usage_period``.
308312
"""
309313

‎packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1beta1/services/budget_service/async_client.py‎

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,17 @@
1919
from typing import Dict, Sequence, Tuple, Type, Union
2020
import pkg_resources
2121

22-
from google.api_core.client_options import ClientOptions # type: ignore
23-
from google.api_core import exceptions as core_exceptions # type: ignore
24-
from google.api_core import gapic_v1 # type: ignore
25-
from google.api_core import retry as retries # type: ignore
22+
from google.api_core.client_options import ClientOptions
23+
from google.api_core import exceptions as core_exceptions
24+
from google.api_core import gapic_v1
25+
from google.api_core import retry as retries
2626
from google.auth import credentials as ga_credentials # type: ignore
2727
from google.oauth2 import service_account # type: ignore
2828

29-
OptionalRetry = Union[retries.Retry, object]
29+
try:
30+
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
31+
except AttributeError: # pragma: NO COVER
32+
OptionalRetry = Union[retries.Retry, object] # type: ignore
3033

3134
from google.cloud.billing.budgets_v1beta1.services.budget_service import pagers
3235
from google.cloud.billing.budgets_v1beta1.types import budget_model

‎packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1beta1/services/budget_service/client.py‎

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,25 @@
1414
# limitations under the License.
1515
#
1616
from collections import OrderedDict
17-
from distutils import util
1817
import os
1918
import re
2019
from typing import Dict, Optional, Sequence, Tuple, Type, Union
2120
import pkg_resources
2221

23-
from google.api_core import client_options as client_options_lib # type: ignore
24-
from google.api_core import exceptions as core_exceptions # type: ignore
25-
from google.api_core import gapic_v1 # type: ignore
26-
from google.api_core import retry as retries # type: ignore
22+
from google.api_core import client_options as client_options_lib
23+
from google.api_core import exceptions as core_exceptions
24+
from google.api_core import gapic_v1
25+
from google.api_core import retry as retries
2726
from google.auth import credentials as ga_credentials # type: ignore
2827
from google.auth.transport import mtls # type: ignore
2928
from google.auth.transport.grpc import SslCredentials # type: ignore
3029
from google.auth.exceptions import MutualTLSChannelError # type: ignore
3130
from google.oauth2 import service_account # type: ignore
3231

33-
OptionalRetry = Union[retries.Retry, object]
32+
try:
33+
OptionalRetry = Union[retries.Retry, gapic_v1.method._MethodDefault]
34+
except AttributeError: # pragma: NO COVER
35+
OptionalRetry = Union[retries.Retry, object] # type: ignore
3436

3537
from google.cloud.billing.budgets_v1beta1.services.budget_service import pagers
3638
from google.cloud.billing.budgets_v1beta1.types import budget_model
@@ -284,8 +286,15 @@ def __init__(
284286
client_options = client_options_lib.ClientOptions()
285287

286288
# Create SSL credentials for mutual TLS if needed.
287-
use_client_cert = bool(
288-
util.strtobool(os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false"))
289+
if os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") not in (
290+
"true",
291+
"false",
292+
):
293+
raise ValueError(
294+
"Environment variable `GOOGLE_API_USE_CLIENT_CERTIFICATE` must be either `true` or `false`"
295+
)
296+
use_client_cert = (
297+
os.getenv("GOOGLE_API_USE_CLIENT_CERTIFICATE", "false") == "true"
289298
)
290299

291300
client_cert_source_func = None

‎packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/base.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@
1818
import pkg_resources
1919

2020
import google.auth # type: ignore
21-
import google.api_core # type: ignore
22-
from google.api_core import exceptions as core_exceptions # type: ignore
23-
from google.api_core import gapic_v1 # type: ignore
24-
from google.api_core import retry as retries # type: ignore
21+
import google.api_core
22+
from google.api_core import exceptions as core_exceptions
23+
from google.api_core import gapic_v1
24+
from google.api_core import retry as retries
2525
from google.auth import credentials as ga_credentials # type: ignore
2626
from google.oauth2 import service_account # type: ignore
2727

‎packages/google-cloud-billing-budgets/google/cloud/billing/budgets_v1beta1/services/budget_service/transports/grpc.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
import warnings
1717
from typing import Callable, Dict, Optional, Sequence, Tuple, Union
1818

19-
from google.api_core import grpc_helpers # type: ignore
20-
from google.api_core import gapic_v1 # type: ignore
19+
from google.api_core import grpc_helpers
20+
from google.api_core import gapic_v1
2121
import google.auth # type: ignore
2222
from google.auth import credentials as ga_credentials # type: ignore
2323
from google.auth.transport.grpc import SslCredentials # type: ignore

0 commit comments

Comments
 (0)