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

Commit 18e2a32

Browse files
chore: Update gapic-generator-python to v1.6.1 (#107)
* 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 * set manifest to true in .github/release-please.yml * add release-please-config.json * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 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 * use templated owlbot.py and setup.py Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com> Co-authored-by: Anthonios Partheniou <partheniou@google.com>
1 parent 2bc8fe6 commit 18e2a32

40 files changed

+1236
-1055
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:

.github/workflows/unittest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ jobs:
5454
- name: Report coverage results
5555
run: |
5656
coverage combine .coverage-results/.coverage*
57-
coverage report --show-missing --fail-under=99
57+
coverage report --show-missing --fail-under=100

.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.1.2"
3+
}

docs/dataplex_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 Dataplex v1 API
33

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

google/cloud/dataplex/__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.dataplex import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from google.cloud.dataplex_v1.services.content_service.async_client import (
1822
ContentServiceAsyncClient,
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.1.2" # {x-release-please-version}

google/cloud/dataplex_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.dataplex import gapic_version as package_version
17+
18+
__version__ = package_version.__version__
19+
1620

1721
from .services.content_service import ContentServiceAsyncClient, ContentServiceClient
1822
from .services.dataplex_service import DataplexServiceAsyncClient, DataplexServiceClient

google/cloud/dataplex_v1/services/content_service/async_client.py

Lines changed: 57 additions & 47 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
@@ -170,9 +180,9 @@ def transport(self) -> ContentServiceTransport:
170180
def __init__(
171181
self,
172182
*,
173-
credentials: ga_credentials.Credentials = None,
183+
credentials: Optional[ga_credentials.Credentials] = None,
174184
transport: Union[str, ContentServiceTransport] = "grpc_asyncio",
175-
client_options: ClientOptions = None,
185+
client_options: Optional[ClientOptions] = None,
176186
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
177187
) -> None:
178188
"""Instantiates the content service client.
@@ -216,12 +226,12 @@ def __init__(
216226

217227
async def create_content(
218228
self,
219-
request: Union[gcd_content.CreateContentRequest, dict] = None,
229+
request: Optional[Union[gcd_content.CreateContentRequest, dict]] = None,
220230
*,
221-
parent: str = None,
222-
content: analyze.Content = None,
231+
parent: Optional[str] = None,
232+
content: Optional[analyze.Content] = None,
223233
retry: OptionalRetry = gapic_v1.method.DEFAULT,
224-
timeout: float = None,
234+
timeout: Optional[float] = None,
225235
metadata: Sequence[Tuple[str, str]] = (),
226236
) -> analyze.Content:
227237
r"""Create a content.
@@ -259,7 +269,7 @@ async def sample_create_content():
259269
print(response)
260270
261271
Args:
262-
request (Union[google.cloud.dataplex_v1.types.CreateContentRequest, dict]):
272+
request (Optional[Union[google.cloud.dataplex_v1.types.CreateContentRequest, dict]]):
263273
The request object. Create content request.
264274
parent (:class:`str`):
265275
Required. The resource name of the parent lake:
@@ -331,12 +341,12 @@ async def sample_create_content():
331341

332342
async def update_content(
333343
self,
334-
request: Union[gcd_content.UpdateContentRequest, dict] = None,
344+
request: Optional[Union[gcd_content.UpdateContentRequest, dict]] = None,
335345
*,
336-
content: analyze.Content = None,
337-
update_mask: field_mask_pb2.FieldMask = None,
346+
content: Optional[analyze.Content] = None,
347+
update_mask: Optional[field_mask_pb2.FieldMask] = None,
338348
retry: OptionalRetry = gapic_v1.method.DEFAULT,
339-
timeout: float = None,
349+
timeout: Optional[float] = None,
340350
metadata: Sequence[Tuple[str, str]] = (),
341351
) -> analyze.Content:
342352
r"""Update a content. Only supports full resource update.
@@ -373,7 +383,7 @@ async def sample_update_content():
373383
print(response)
374384
375385
Args:
376-
request (Union[google.cloud.dataplex_v1.types.UpdateContentRequest, dict]):
386+
request (Optional[Union[google.cloud.dataplex_v1.types.UpdateContentRequest, dict]]):
377387
The request object. Update content request.
378388
content (:class:`google.cloud.dataplex_v1.types.Content`):
379389
Required. Update description. Only fields specified in
@@ -447,11 +457,11 @@ async def sample_update_content():
447457

448458
async def delete_content(
449459
self,
450-
request: Union[content.DeleteContentRequest, dict] = None,
460+
request: Optional[Union[content.DeleteContentRequest, dict]] = None,
451461
*,
452-
name: str = None,
462+
name: Optional[str] = None,
453463
retry: OptionalRetry = gapic_v1.method.DEFAULT,
454-
timeout: float = None,
464+
timeout: Optional[float] = None,
455465
metadata: Sequence[Tuple[str, str]] = (),
456466
) -> None:
457467
r"""Delete a content.
@@ -480,7 +490,7 @@ async def sample_delete_content():
480490
await client.delete_content(request=request)
481491
482492
Args:
483-
request (Union[google.cloud.dataplex_v1.types.DeleteContentRequest, dict]):
493+
request (Optional[Union[google.cloud.dataplex_v1.types.DeleteContentRequest, dict]]):
484494
The request object. Delete content request.
485495
name (:class:`str`):
486496
Required. The resource name of the content:
@@ -536,11 +546,11 @@ async def sample_delete_content():
536546

537547
async def get_content(
538548
self,
539-
request: Union[content.GetContentRequest, dict] = None,
549+
request: Optional[Union[content.GetContentRequest, dict]] = None,
540550
*,
541-
name: str = None,
551+
name: Optional[str] = None,
542552
retry: OptionalRetry = gapic_v1.method.DEFAULT,
543-
timeout: float = None,
553+
timeout: Optional[float] = None,
544554
metadata: Sequence[Tuple[str, str]] = (),
545555
) -> analyze.Content:
546556
r"""Get a content resource.
@@ -572,7 +582,7 @@ async def sample_get_content():
572582
print(response)
573583
574584
Args:
575-
request (Union[google.cloud.dataplex_v1.types.GetContentRequest, dict]):
585+
request (Optional[Union[google.cloud.dataplex_v1.types.GetContentRequest, dict]]):
576586
The request object. Get content request.
577587
name (:class:`str`):
578588
Required. The resource name of the content:
@@ -646,11 +656,11 @@ async def sample_get_content():
646656

647657
async def get_iam_policy(
648658
self,
649-
request: Union[iam_policy_pb2.GetIamPolicyRequest, dict] = None,
659+
request: Optional[Union[iam_policy_pb2.GetIamPolicyRequest, dict]] = None,
650660
*,
651-
resource: str = None,
661+
resource: Optional[str] = None,
652662
retry: OptionalRetry = gapic_v1.method.DEFAULT,
653-
timeout: float = None,
663+
timeout: Optional[float] = None,
654664
metadata: Sequence[Tuple[str, str]] = (),
655665
) -> policy_pb2.Policy:
656666
r"""Gets the access control policy for a contentitem resource. A
@@ -689,7 +699,7 @@ async def sample_get_iam_policy():
689699
print(response)
690700
691701
Args:
692-
request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]):
702+
request (Optional[Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]]):
693703
The request object. Request message for `GetIamPolicy`
694704
method.
695705
resource (:class:`str`):
@@ -827,10 +837,10 @@ async def sample_get_iam_policy():
827837

828838
async def set_iam_policy(
829839
self,
830-
request: Union[iam_policy_pb2.SetIamPolicyRequest, dict] = None,
840+
request: Optional[Union[iam_policy_pb2.SetIamPolicyRequest, dict]] = None,
831841
*,
832842
retry: OptionalRetry = gapic_v1.method.DEFAULT,
833-
timeout: float = None,
843+
timeout: Optional[float] = None,
834844
metadata: Sequence[Tuple[str, str]] = (),
835845
) -> policy_pb2.Policy:
836846
r"""Sets the access control policy on the specified contentitem
@@ -867,7 +877,7 @@ async def sample_set_iam_policy():
867877
print(response)
868878
869879
Args:
870-
request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]):
880+
request (Optional[Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]]):
871881
The request object. Request message for `SetIamPolicy`
872882
method.
873883
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -974,10 +984,10 @@ async def sample_set_iam_policy():
974984

975985
async def test_iam_permissions(
976986
self,
977-
request: Union[iam_policy_pb2.TestIamPermissionsRequest, dict] = None,
987+
request: Optional[Union[iam_policy_pb2.TestIamPermissionsRequest, dict]] = None,
978988
*,
979989
retry: OptionalRetry = gapic_v1.method.DEFAULT,
980-
timeout: float = None,
990+
timeout: Optional[float] = None,
981991
metadata: Sequence[Tuple[str, str]] = (),
982992
) -> iam_policy_pb2.TestIamPermissionsResponse:
983993
r"""Returns the caller's permissions on a resource. If the resource
@@ -1021,7 +1031,7 @@ async def sample_test_iam_permissions():
10211031
print(response)
10221032
10231033
Args:
1024-
request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]):
1034+
request (Optional[Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]]):
10251035
The request object. Request message for
10261036
`TestIamPermissions` method.
10271037
retry (google.api_core.retry.Retry): Designation of what errors, if any,
@@ -1076,11 +1086,11 @@ async def sample_test_iam_permissions():
10761086

10771087
async def list_content(
10781088
self,
1079-
request: Union[content.ListContentRequest, dict] = None,
1089+
request: Optional[Union[content.ListContentRequest, dict]] = None,
10801090
*,
1081-
parent: str = None,
1091+
parent: Optional[str] = None,
10821092
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1083-
timeout: float = None,
1093+
timeout: Optional[float] = None,
10841094
metadata: Sequence[Tuple[str, str]] = (),
10851095
) -> pagers.ListContentAsyncPager:
10861096
r"""List content.
@@ -1113,7 +1123,7 @@ async def sample_list_content():
11131123
print(response)
11141124
11151125
Args:
1116-
request (Union[google.cloud.dataplex_v1.types.ListContentRequest, dict]):
1126+
request (Optional[Union[google.cloud.dataplex_v1.types.ListContentRequest, dict]]):
11171127
The request object. List content request. Returns the
11181128
BASIC Content view.
11191129
parent (:class:`str`):
@@ -1199,10 +1209,10 @@ async def sample_list_content():
11991209

12001210
async def list_operations(
12011211
self,
1202-
request: operations_pb2.ListOperationsRequest = None,
1212+
request: Optional[operations_pb2.ListOperationsRequest] = None,
12031213
*,
12041214
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1205-
timeout: float = None,
1215+
timeout: Optional[float] = None,
12061216
metadata: Sequence[Tuple[str, str]] = (),
12071217
) -> operations_pb2.ListOperationsResponse:
12081218
r"""Lists operations that match the specified filter in the request.
@@ -1253,10 +1263,10 @@ async def list_operations(
12531263

12541264
async def get_operation(
12551265
self,
1256-
request: operations_pb2.GetOperationRequest = None,
1266+
request: Optional[operations_pb2.GetOperationRequest] = None,
12571267
*,
12581268
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1259-
timeout: float = None,
1269+
timeout: Optional[float] = None,
12601270
metadata: Sequence[Tuple[str, str]] = (),
12611271
) -> operations_pb2.Operation:
12621272
r"""Gets the latest state of a long-running operation.
@@ -1307,10 +1317,10 @@ async def get_operation(
13071317

13081318
async def delete_operation(
13091319
self,
1310-
request: operations_pb2.DeleteOperationRequest = None,
1320+
request: Optional[operations_pb2.DeleteOperationRequest] = None,
13111321
*,
13121322
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1313-
timeout: float = None,
1323+
timeout: Optional[float] = None,
13141324
metadata: Sequence[Tuple[str, str]] = (),
13151325
) -> None:
13161326
r"""Deletes a long-running operation.
@@ -1362,10 +1372,10 @@ async def delete_operation(
13621372

13631373
async def cancel_operation(
13641374
self,
1365-
request: operations_pb2.CancelOperationRequest = None,
1375+
request: Optional[operations_pb2.CancelOperationRequest] = None,
13661376
*,
13671377
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1368-
timeout: float = None,
1378+
timeout: Optional[float] = None,
13691379
metadata: Sequence[Tuple[str, str]] = (),
13701380
) -> None:
13711381
r"""Starts asynchronous cancellation on a long-running operation.
@@ -1416,10 +1426,10 @@ async def cancel_operation(
14161426

14171427
async def get_location(
14181428
self,
1419-
request: locations_pb2.GetLocationRequest = None,
1429+
request: Optional[locations_pb2.GetLocationRequest] = None,
14201430
*,
14211431
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1422-
timeout: float = None,
1432+
timeout: Optional[float] = None,
14231433
metadata: Sequence[Tuple[str, str]] = (),
14241434
) -> locations_pb2.Location:
14251435
r"""Gets information about a location.
@@ -1470,10 +1480,10 @@ async def get_location(
14701480

14711481
async def list_locations(
14721482
self,
1473-
request: locations_pb2.ListLocationsRequest = None,
1483+
request: Optional[locations_pb2.ListLocationsRequest] = None,
14741484
*,
14751485
retry: OptionalRetry = gapic_v1.method.DEFAULT,
1476-
timeout: float = None,
1486+
timeout: Optional[float] = None,
14771487
metadata: Sequence[Tuple[str, str]] = (),
14781488
) -> locations_pb2.ListLocationsResponse:
14791489
r"""Lists information about the supported locations for this service.

0 commit comments

Comments
 (0)