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

Commit 058966c

Browse files
chore: Update gapic-generator-python to v1.6.1 (#247)
* chore: update to gapic-generator-python 1.5.0 feat: add support for `google.cloud.<api>.__version__` PiperOrigin-RevId: 484665853 Source-Link: googleapis/googleapis@8eb249a Source-Link: https://github.com/googleapis/googleapis-gen/commit/c8aa327b5f478865fc3fd91e3c2768e54e26ad44 Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhhYTMyN2I1ZjQ3ODg2NWZjM2ZkOTFlM2MyNzY4ZTU0ZTI2YWQ0NCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update version in gapic_version.py * add .release-please-manifest.json with correct version * add owlbot.py to exclude generated gapic_version.py * set manifest to true in .github/release-please.yml * add release-please-config.json * chore: Update to gapic-generator-python 1.6.0 feat(python): Add typing to proto.Message based class attributes feat(python): Snippetgen handling of repeated enum field PiperOrigin-RevId: 487326846 Source-Link: googleapis/googleapis@da380c7 Source-Link: https://github.com/googleapis/googleapis-gen/commit/61ef5762ee6731a0cbbfea22fd0eecee51ab1c8e Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNjFlZjU3NjJlZTY3MzFhMGNiYmZlYTIyZmQwZWVjZWU1MWFiMWM4ZSJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * feat: new APIs added to reflect updates to the filestore service - Add ENTERPRISE Tier - Add snapshot APIs: RevertInstance, ListSnapshots, CreateSnapshot, DeleteSnapshot, UpdateSnapshot - Add multi-share APIs: ListShares, GetShare, CreateShare, DeleteShare, UpdateShare - Add ConnectMode to NetworkConfig (for Private Service Access support) - New status codes (SUSPENDED/SUSPENDING, REVERTING/RESUMING) - Add SuspensionReason (for KMS related suspension) - Add new fields to Instance information: max_capacity_gb, capacity_step_size_gb, max_share_count, capacity_gb, multi_share_enabled PiperOrigin-RevId: 487492758 Source-Link: googleapis/googleapis@5be5981 Source-Link: https://github.com/googleapis/googleapis-gen/commit/ab0e217f560cc2c1afc11441c2eab6b6950efd2b Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWIwZTIxN2Y1NjBjYzJjMWFmYzExNDQxYzJlYWI2YjY5NTBlZmQyYiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * update path to snippet metadata json * chore: Update gapic-generator-python to v1.6.1 PiperOrigin-RevId: 488036204 Source-Link: googleapis/googleapis@08f275f Source-Link: https://github.com/googleapis/googleapis-gen/commit/555c0945e60649e38739ae64bc45719cdf72178f Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiNTU1YzA5NDVlNjA2NDllMzg3MzlhZTY0YmM0NTcxOWNkZjcyMTc4ZiJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * fix url in setup.py Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <[email protected]>
1 parent 5f6721c commit 058966c

32 files changed

+438
-231
lines changed

.github/release-please.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
releaseType: python
22
handleGHRelease: true
3+
manifest: true
34
# NOTE: this section is generated by synthtool.languages.python
45
# See https://github.com/googleapis/synthtool/blob/master/synthtool/languages/python.py
56
branches:

.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "1.7.3"
3+
}

docs/budgets_v1/types.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Types for Google Cloud Billing Budgets v1 API
33

44
.. automodule:: google.cloud.billing.budgets_v1.types
55
:members:
6-
:undoc-members:
76
:show-inheritance:

docs/budgets_v1beta1/types.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ Types for Google Cloud Billing Budgets v1beta1 API
33

44
.. automodule:: google.cloud.billing.budgets_v1beta1.types
55
:members:
6-
:undoc-members:
76
:show-inheritance:

google/cloud/billing/budgets/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
from google.cloud.billing.budgets import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from google.cloud.billing.budgets_v1.services.budget_service.async_client import (
1822
BudgetServiceAsyncClient,
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# -*- coding: utf-8 -*-
2+
# Copyright 2022 Google LLC
3+
#
4+
# Licensed under the Apache License, Version 2.0 (the "License");
5+
# you may not use this file except in compliance with the License.
6+
# You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
#
16+
__version__ = "1.7.3" # {x-release-please-version}

google/cloud/billing/budgets_v1/__init__.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515
#
16+
from google.cloud.billing.budgets import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from .services.budget_service import BudgetServiceAsyncClient, BudgetServiceClient
1822
from .types.budget_model import (

google/cloud/billing/budgets_v1/services/budget_service/async_client.py

Lines changed: 35 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,17 @@
1616
from collections import OrderedDict
1717
import functools
1818
import re
19-
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
19+
from typing import (
20+
Dict,
21+
Mapping,
22+
MutableMapping,
23+
MutableSequence,
24+
Optional,
25+
Sequence,
26+
Tuple,
27+
Type,
28+
Union,
29+
)
2030

2131
from google.api_core import exceptions as core_exceptions
2232
from google.api_core import gapic_v1
@@ -164,9 +174,9 @@ def transport(self) -> BudgetServiceTransport:
164174
def __init__(
165175
self,
166176
*,
167-
credentials: ga_credentials.Credentials = None,
177+
credentials: Optional[ga_credentials.Credentials] = None,
168178
transport: Union[str, BudgetServiceTransport] = "grpc_asyncio",
169-
client_options: ClientOptions = None,
179+
client_options: Optional[ClientOptions] = None,
170180
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
171181
) -> None:
172182
"""Instantiates the budget service client.
@@ -210,12 +220,12 @@ def __init__(
210220

211221
async def create_budget(
212222
self,
213-
request: Union[budget_service.CreateBudgetRequest, dict] = None,
223+
request: Optional[Union[budget_service.CreateBudgetRequest, dict]] = None,
214224
*,
215-
parent: str = None,
216-
budget: budget_model.Budget = None,
225+
parent: Optional[str] = None,
226+
budget: Optional[budget_model.Budget] = None,
217227
retry: OptionalRetry = gapic_v1.method.DEFAULT,
218-
timeout: float = None,
228+
timeout: Optional[float] = None,
219229
metadata: Sequence[Tuple[str, str]] = (),
220230
) -> budget_model.Budget:
221231
r"""Creates a new budget. See `Quotas and
@@ -250,7 +260,7 @@ async def sample_create_budget():
250260
print(response)
251261
252262
Args:
253-
request (Union[google.cloud.billing.budgets_v1.types.CreateBudgetRequest, dict]):
263+
request (Optional[Union[google.cloud.billing.budgets_v1.types.CreateBudgetRequest, dict]]):
254264
The request object. Request for CreateBudget
255265
parent (:class:`str`):
256266
Required. The name of the billing account to create the
@@ -330,12 +340,12 @@ async def sample_create_budget():
330340

331341
async def update_budget(
332342
self,
333-
request: Union[budget_service.UpdateBudgetRequest, dict] = None,
343+
request: Optional[Union[budget_service.UpdateBudgetRequest, dict]] = None,
334344
*,
335-
budget: budget_model.Budget = None,
336-
update_mask: field_mask_pb2.FieldMask = None,
345+
budget: Optional[budget_model.Budget] = None,
346+
update_mask: Optional[field_mask_pb2.FieldMask] = None,
337347
retry: OptionalRetry = gapic_v1.method.DEFAULT,
338-
timeout: float = None,
348+
timeout: Optional[float] = None,
339349
metadata: Sequence[Tuple[str, str]] = (),
340350
) -> budget_model.Budget:
341351
r"""Updates a budget and returns the updated budget.
@@ -370,7 +380,7 @@ async def sample_update_budget():
370380
print(response)
371381
372382
Args:
373-
request (Union[google.cloud.billing.budgets_v1.types.UpdateBudgetRequest, dict]):
383+
request (Optional[Union[google.cloud.billing.budgets_v1.types.UpdateBudgetRequest, dict]]):
374384
The request object. Request for UpdateBudget
375385
budget (:class:`google.cloud.billing.budgets_v1.types.Budget`):
376386
Required. The updated budget object.
@@ -468,11 +478,11 @@ async def sample_update_budget():
468478

469479
async def get_budget(
470480
self,
471-
request: Union[budget_service.GetBudgetRequest, dict] = None,
481+
request: Optional[Union[budget_service.GetBudgetRequest, dict]] = None,
472482
*,
473-
name: str = None,
483+
name: Optional[str] = None,
474484
retry: OptionalRetry = gapic_v1.method.DEFAULT,
475-
timeout: float = None,
485+
timeout: Optional[float] = None,
476486
metadata: Sequence[Tuple[str, str]] = (),
477487
) -> budget_model.Budget:
478488
r"""Returns a budget.
@@ -509,7 +519,7 @@ async def sample_get_budget():
509519
print(response)
510520
511521
Args:
512-
request (Union[google.cloud.billing.budgets_v1.types.GetBudgetRequest, dict]):
522+
request (Optional[Union[google.cloud.billing.budgets_v1.types.GetBudgetRequest, dict]]):
513523
The request object. Request for GetBudget
514524
name (:class:`str`):
515525
Required. Name of budget to get. Values are of the form
@@ -591,11 +601,11 @@ async def sample_get_budget():
591601

592602
async def list_budgets(
593603
self,
594-
request: Union[budget_service.ListBudgetsRequest, dict] = None,
604+
request: Optional[Union[budget_service.ListBudgetsRequest, dict]] = None,
595605
*,
596-
parent: str = None,
606+
parent: Optional[str] = None,
597607
retry: OptionalRetry = gapic_v1.method.DEFAULT,
598-
timeout: float = None,
608+
timeout: Optional[float] = None,
599609
metadata: Sequence[Tuple[str, str]] = (),
600610
) -> pagers.ListBudgetsAsyncPager:
601611
r"""Returns a list of budgets for a billing account.
@@ -633,7 +643,7 @@ async def sample_list_budgets():
633643
print(response)
634644
635645
Args:
636-
request (Union[google.cloud.billing.budgets_v1.types.ListBudgetsRequest, dict]):
646+
request (Optional[Union[google.cloud.billing.budgets_v1.types.ListBudgetsRequest, dict]]):
637647
The request object. Request for ListBudgets
638648
parent (:class:`str`):
639649
Required. Name of billing account to list budgets under.
@@ -720,11 +730,11 @@ async def sample_list_budgets():
720730

721731
async def delete_budget(
722732
self,
723-
request: Union[budget_service.DeleteBudgetRequest, dict] = None,
733+
request: Optional[Union[budget_service.DeleteBudgetRequest, dict]] = None,
724734
*,
725-
name: str = None,
735+
name: Optional[str] = None,
726736
retry: OptionalRetry = gapic_v1.method.DEFAULT,
727-
timeout: float = None,
737+
timeout: Optional[float] = None,
728738
metadata: Sequence[Tuple[str, str]] = (),
729739
) -> None:
730740
r"""Deletes a budget. Returns successfully if already
@@ -754,7 +764,7 @@ async def sample_delete_budget():
754764
await client.delete_budget(request=request)
755765
756766
Args:
757-
request (Union[google.cloud.billing.budgets_v1.types.DeleteBudgetRequest, dict]):
767+
request (Optional[Union[google.cloud.billing.budgets_v1.types.DeleteBudgetRequest, dict]]):
758768
The request object. Request for DeleteBudget
759769
name (:class:`str`):
760770
Required. Name of the budget to delete. Values are of

google/cloud/billing/budgets_v1/services/budget_service/client.py

Lines changed: 34 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,18 @@
1616
from collections import OrderedDict
1717
import os
1818
import re
19-
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
19+
from typing import (
20+
Dict,
21+
Mapping,
22+
MutableMapping,
23+
MutableSequence,
24+
Optional,
25+
Sequence,
26+
Tuple,
27+
Type,
28+
Union,
29+
cast,
30+
)
2031

2132
from google.api_core import client_options as client_options_lib
2233
from google.api_core import exceptions as core_exceptions
@@ -58,7 +69,7 @@ class BudgetServiceClientMeta(type):
5869

5970
def get_transport_class(
6071
cls,
61-
label: str = None,
72+
label: Optional[str] = None,
6273
) -> Type[BudgetServiceTransport]:
6374
"""Returns an appropriate transport class.
6475
@@ -333,8 +344,8 @@ def __init__(
333344
self,
334345
*,
335346
credentials: Optional[ga_credentials.Credentials] = None,
336-
transport: Union[str, BudgetServiceTransport, None] = None,
337-
client_options: Optional[client_options_lib.ClientOptions] = None,
347+
transport: Optional[Union[str, BudgetServiceTransport]] = None,
348+
client_options: Optional[Union[client_options_lib.ClientOptions, dict]] = None,
338349
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
339350
) -> None:
340351
"""Instantiates the budget service client.
@@ -348,7 +359,7 @@ def __init__(
348359
transport (Union[str, BudgetServiceTransport]): The
349360
transport to use. If set to None, a transport is chosen
350361
automatically.
351-
client_options (google.api_core.client_options.ClientOptions): Custom options for the
362+
client_options (Optional[Union[google.api_core.client_options.ClientOptions, dict]]): Custom options for the
352363
client. It won't take effect if a ``transport`` instance is provided.
353364
(1) The ``api_endpoint`` property can be used to override the
354365
default endpoint provided by the client. GOOGLE_API_USE_MTLS_ENDPOINT
@@ -378,6 +389,7 @@ def __init__(
378389
client_options = client_options_lib.from_dict(client_options)
379390
if client_options is None:
380391
client_options = client_options_lib.ClientOptions()
392+
client_options = cast(client_options_lib.ClientOptions, client_options)
381393

382394
api_endpoint, client_cert_source_func = self.get_mtls_endpoint_and_cert_source(
383395
client_options
@@ -430,12 +442,12 @@ def __init__(
430442

431443
def create_budget(
432444
self,
433-
request: Union[budget_service.CreateBudgetRequest, dict] = None,
445+
request: Optional[Union[budget_service.CreateBudgetRequest, dict]] = None,
434446
*,
435-
parent: str = None,
436-
budget: budget_model.Budget = None,
447+
parent: Optional[str] = None,
448+
budget: Optional[budget_model.Budget] = None,
437449
retry: OptionalRetry = gapic_v1.method.DEFAULT,
438-
timeout: float = None,
450+
timeout: Optional[float] = None,
439451
metadata: Sequence[Tuple[str, str]] = (),
440452
) -> budget_model.Budget:
441453
r"""Creates a new budget. See `Quotas and
@@ -550,12 +562,12 @@ def sample_create_budget():
550562

551563
def update_budget(
552564
self,
553-
request: Union[budget_service.UpdateBudgetRequest, dict] = None,
565+
request: Optional[Union[budget_service.UpdateBudgetRequest, dict]] = None,
554566
*,
555-
budget: budget_model.Budget = None,
556-
update_mask: field_mask_pb2.FieldMask = None,
567+
budget: Optional[budget_model.Budget] = None,
568+
update_mask: Optional[field_mask_pb2.FieldMask] = None,
557569
retry: OptionalRetry = gapic_v1.method.DEFAULT,
558-
timeout: float = None,
570+
timeout: Optional[float] = None,
559571
metadata: Sequence[Tuple[str, str]] = (),
560572
) -> budget_model.Budget:
561573
r"""Updates a budget and returns the updated budget.
@@ -678,11 +690,11 @@ def sample_update_budget():
678690

679691
def get_budget(
680692
self,
681-
request: Union[budget_service.GetBudgetRequest, dict] = None,
693+
request: Optional[Union[budget_service.GetBudgetRequest, dict]] = None,
682694
*,
683-
name: str = None,
695+
name: Optional[str] = None,
684696
retry: OptionalRetry = gapic_v1.method.DEFAULT,
685-
timeout: float = None,
697+
timeout: Optional[float] = None,
686698
metadata: Sequence[Tuple[str, str]] = (),
687699
) -> budget_model.Budget:
688700
r"""Returns a budget.
@@ -791,11 +803,11 @@ def sample_get_budget():
791803

792804
def list_budgets(
793805
self,
794-
request: Union[budget_service.ListBudgetsRequest, dict] = None,
806+
request: Optional[Union[budget_service.ListBudgetsRequest, dict]] = None,
795807
*,
796-
parent: str = None,
808+
parent: Optional[str] = None,
797809
retry: OptionalRetry = gapic_v1.method.DEFAULT,
798-
timeout: float = None,
810+
timeout: Optional[float] = None,
799811
metadata: Sequence[Tuple[str, str]] = (),
800812
) -> pagers.ListBudgetsPager:
801813
r"""Returns a list of budgets for a billing account.
@@ -910,11 +922,11 @@ def sample_list_budgets():
910922

911923
def delete_budget(
912924
self,
913-
request: Union[budget_service.DeleteBudgetRequest, dict] = None,
925+
request: Optional[Union[budget_service.DeleteBudgetRequest, dict]] = None,
914926
*,
915-
name: str = None,
927+
name: Optional[str] = None,
916928
retry: OptionalRetry = gapic_v1.method.DEFAULT,
917-
timeout: float = None,
929+
timeout: Optional[float] = None,
918930
metadata: Sequence[Tuple[str, str]] = (),
919931
) -> None:
920932
r"""Deletes a budget. Returns successfully if already

google/cloud/billing/budgets_v1/services/budget_service/transports/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ def __init__(
5252
self,
5353
*,
5454
host: str = DEFAULT_HOST,
55-
credentials: ga_credentials.Credentials = None,
55+
credentials: Optional[ga_credentials.Credentials] = None,
5656
credentials_file: Optional[str] = None,
5757
scopes: Optional[Sequence[str]] = None,
5858
quota_project_id: Optional[str] = None,

0 commit comments

Comments
 (0)