Skip to content

Commit

Permalink
chore: Update gapic-generator-python to v1.6.1 (#4)
Browse files Browse the repository at this point in the history
* 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: googleapis/googleapis-gen@c8aa327
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYzhhYTMyN2I1ZjQ3ODg2NWZjM2ZkOTFlM2MyNzY4ZTU0ZTI2YWQ0NCJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* add .release-please-manifest.json with correct version

* 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: googleapis/googleapis-gen@61ef576
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: googleapis/googleapis-gen@ab0e217
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiYWIwZTIxN2Y1NjBjYzJjMWFmYzExNDQxYzJlYWI2YjY5NTBlZmQyYiJ9

* 🦉 Updates from OwlBot post-processor

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

* chore: Update gapic-generator-python to v1.6.1

PiperOrigin-RevId: 488036204

Source-Link: googleapis/googleapis@08f275f

Source-Link: googleapis/googleapis-gen@555c094
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

* configure release-please to use manifest

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
Co-authored-by: Anthonios Partheniou <partheniou@google.com>
  • Loading branch information
3 people authored Nov 21, 2022
1 parent 13ac23d commit 07cba0e
Show file tree
Hide file tree
Showing 21 changed files with 288 additions and 116 deletions.
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
releaseType: python
handleGHRelease: true
manifest: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "0.1.1"
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,4 @@ Types for Google Cloud Bigquery Datapolicies v1beta1 API

.. automodule:: google.cloud.bigquery.datapolicies_v1beta1.types
:members:
:undoc-members:
:show-inheritance:
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.bigquery.datapolicies import gapic_version as package_version

__version__ = package_version.__version__


from google.cloud.bigquery.datapolicies_v1beta1.services.data_policy_service.async_client import (
DataPolicyServiceAsyncClient,
)
from google.cloud.bigquery.datapolicies_v1beta1.services.data_policy_service.client import (
DataPolicyServiceClient,
)
from google.cloud.bigquery.datapolicies_v1beta1.types.datapolicy import (
CreateDataPolicyRequest,
DataMaskingPolicy,
DataPolicy,
DeleteDataPolicyRequest,
GetDataPolicyRequest,
ListDataPoliciesRequest,
ListDataPoliciesResponse,
UpdateDataPolicyRequest,
)

__all__ = (
"DataPolicyServiceClient",
"DataPolicyServiceAsyncClient",
"CreateDataPolicyRequest",
"DataMaskingPolicy",
"DataPolicy",
"DeleteDataPolicyRequest",
"GetDataPolicyRequest",
"ListDataPoliciesRequest",
"ListDataPoliciesResponse",
"UpdateDataPolicyRequest",
)
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# -*- coding: utf-8 -*-
# Copyright 2022 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
__version__ = "0.1.1" # {x-release-please-version}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Marker file for PEP 561.
# The google-cloud-bigquery-datapolicies package uses inline types.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.bigquery.datapolicies import gapic_version as package_version

__version__ = package_version.__version__


from .services.data_policy_service import (
DataPolicyServiceAsyncClient,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,17 @@
from collections import OrderedDict
import functools
import re
from typing import Dict, Mapping, Optional, Sequence, Tuple, Type, Union
from typing import (
Dict,
Mapping,
MutableMapping,
MutableSequence,
Optional,
Sequence,
Tuple,
Type,
Union,
)

from google.api_core import exceptions as core_exceptions
from google.api_core import gapic_v1
Expand Down Expand Up @@ -169,9 +179,9 @@ def transport(self) -> DataPolicyServiceTransport:
def __init__(
self,
*,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, DataPolicyServiceTransport] = "grpc_asyncio",
client_options: ClientOptions = None,
client_options: Optional[ClientOptions] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the data policy service client.
Expand Down Expand Up @@ -215,12 +225,12 @@ def __init__(

async def create_data_policy(
self,
request: Union[datapolicy.CreateDataPolicyRequest, dict] = None,
request: Optional[Union[datapolicy.CreateDataPolicyRequest, dict]] = None,
*,
parent: str = None,
data_policy: datapolicy.DataPolicy = None,
parent: Optional[str] = None,
data_policy: Optional[datapolicy.DataPolicy] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> datapolicy.DataPolicy:
r"""Creates a new data policy under a project with the given
Expand Down Expand Up @@ -259,7 +269,7 @@ async def sample_create_data_policy():
print(response)
Args:
request (Union[google.cloud.bigquery.datapolicies_v1beta1.types.CreateDataPolicyRequest, dict]):
request (Optional[Union[google.cloud.bigquery.datapolicies_v1beta1.types.CreateDataPolicyRequest, dict]]):
The request object. Request message for the
CreateDataPolicy method.
parent (:class:`str`):
Expand Down Expand Up @@ -343,12 +353,12 @@ async def sample_create_data_policy():

async def update_data_policy(
self,
request: Union[datapolicy.UpdateDataPolicyRequest, dict] = None,
request: Optional[Union[datapolicy.UpdateDataPolicyRequest, dict]] = None,
*,
data_policy: datapolicy.DataPolicy = None,
update_mask: field_mask_pb2.FieldMask = None,
data_policy: Optional[datapolicy.DataPolicy] = None,
update_mask: Optional[field_mask_pb2.FieldMask] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> datapolicy.DataPolicy:
r"""Updates the metadata for an existing data policy. The
Expand Down Expand Up @@ -386,7 +396,7 @@ async def sample_update_data_policy():
print(response)
Args:
request (Union[google.cloud.bigquery.datapolicies_v1beta1.types.UpdateDataPolicyRequest, dict]):
request (Optional[Union[google.cloud.bigquery.datapolicies_v1beta1.types.UpdateDataPolicyRequest, dict]]):
The request object. Response message for the
UpdateDataPolicy method.
data_policy (:class:`google.cloud.bigquery.datapolicies_v1beta1.types.DataPolicy`):
Expand Down Expand Up @@ -479,11 +489,11 @@ async def sample_update_data_policy():

async def delete_data_policy(
self,
request: Union[datapolicy.DeleteDataPolicyRequest, dict] = None,
request: Optional[Union[datapolicy.DeleteDataPolicyRequest, dict]] = None,
*,
name: str = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> None:
r"""Deletes the data policy specified by its resource
Expand Down Expand Up @@ -513,7 +523,7 @@ async def sample_delete_data_policy():
await client.delete_data_policy(request=request)
Args:
request (Union[google.cloud.bigquery.datapolicies_v1beta1.types.DeleteDataPolicyRequest, dict]):
request (Optional[Union[google.cloud.bigquery.datapolicies_v1beta1.types.DeleteDataPolicyRequest, dict]]):
The request object. Request message for the
DeleteDataPolicy method.
name (:class:`str`):
Expand Down Expand Up @@ -580,11 +590,11 @@ async def sample_delete_data_policy():

async def get_data_policy(
self,
request: Union[datapolicy.GetDataPolicyRequest, dict] = None,
request: Optional[Union[datapolicy.GetDataPolicyRequest, dict]] = None,
*,
name: str = None,
name: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> datapolicy.DataPolicy:
r"""Gets the data policy specified by its resource name.
Expand Down Expand Up @@ -616,7 +626,7 @@ async def sample_get_data_policy():
print(response)
Args:
request (Union[google.cloud.bigquery.datapolicies_v1beta1.types.GetDataPolicyRequest, dict]):
request (Optional[Union[google.cloud.bigquery.datapolicies_v1beta1.types.GetDataPolicyRequest, dict]]):
The request object. Request message for the
GetDataPolicy method.
name (:class:`str`):
Expand Down Expand Up @@ -690,11 +700,11 @@ async def sample_get_data_policy():

async def list_data_policies(
self,
request: Union[datapolicy.ListDataPoliciesRequest, dict] = None,
request: Optional[Union[datapolicy.ListDataPoliciesRequest, dict]] = None,
*,
parent: str = None,
parent: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListDataPoliciesAsyncPager:
r"""List all of the data policies in the specified parent
Expand Down Expand Up @@ -728,7 +738,7 @@ async def sample_list_data_policies():
print(response)
Args:
request (Union[google.cloud.bigquery.datapolicies_v1beta1.types.ListDataPoliciesRequest, dict]):
request (Optional[Union[google.cloud.bigquery.datapolicies_v1beta1.types.ListDataPoliciesRequest, dict]]):
The request object. Request message for the
ListDataPolicies method.
parent (:class:`str`):
Expand Down Expand Up @@ -816,10 +826,10 @@ async def sample_list_data_policies():

async def get_iam_policy(
self,
request: Union[iam_policy_pb2.GetIamPolicyRequest, dict] = None,
request: Optional[Union[iam_policy_pb2.GetIamPolicyRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> policy_pb2.Policy:
r"""Gets the IAM policy for the specified data policy.
Expand Down Expand Up @@ -852,7 +862,7 @@ async def sample_get_iam_policy():
print(response)
Args:
request (Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]):
request (Optional[Union[google.iam.v1.iam_policy_pb2.GetIamPolicyRequest, dict]]):
The request object. Request message for `GetIamPolicy`
method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -968,10 +978,10 @@ async def sample_get_iam_policy():

async def set_iam_policy(
self,
request: Union[iam_policy_pb2.SetIamPolicyRequest, dict] = None,
request: Optional[Union[iam_policy_pb2.SetIamPolicyRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> policy_pb2.Policy:
r"""Sets the IAM policy for the specified data policy.
Expand Down Expand Up @@ -1004,7 +1014,7 @@ async def sample_set_iam_policy():
print(response)
Args:
request (Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]):
request (Optional[Union[google.iam.v1.iam_policy_pb2.SetIamPolicyRequest, dict]]):
The request object. Request message for `SetIamPolicy`
method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -1120,10 +1130,10 @@ async def sample_set_iam_policy():

async def test_iam_permissions(
self,
request: Union[iam_policy_pb2.TestIamPermissionsRequest, dict] = None,
request: Optional[Union[iam_policy_pb2.TestIamPermissionsRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> iam_policy_pb2.TestIamPermissionsResponse:
r"""Returns the caller's permission on the specified data
Expand Down Expand Up @@ -1158,7 +1168,7 @@ async def sample_test_iam_permissions():
print(response)
Args:
request (Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]):
request (Optional[Union[google.iam.v1.iam_policy_pb2.TestIamPermissionsRequest, dict]]):
The request object. Request message for
`TestIamPermissions` method.
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down
Loading

0 comments on commit 07cba0e

Please sign in to comment.