Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update gapic-generator-python to v1.6.1 #378

Merged
merged 11 commits into from Nov 25, 2022
1 change: 1 addition & 0 deletions .github/release-please.yml
@@ -1,5 +1,6 @@
releaseType: python
handleGHRelease: true
manifest: true
# NOTE: this section is generated by synthtool.languages.python
# See https://github.com/googleapis/synthtool/blob/master/synthtool/languages/python.py
branches:
Expand Down
3 changes: 3 additions & 0 deletions .release-please-manifest.json
@@ -0,0 +1,3 @@
{
".": "2.10.0"
}
15 changes: 15 additions & 0 deletions google/cloud/datastore/gapic_version.py
@@ -0,0 +1,15 @@
# Copyright 2020 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__ = "2.10.0" # {x-release-please-version}
76 changes: 76 additions & 0 deletions google/cloud/datastore_admin/__init__.py
@@ -0,0 +1,76 @@
# -*- 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.datastore_admin import gapic_version as package_version

__version__ = package_version.__version__


from google.cloud.datastore_admin_v1.services.datastore_admin.client import (
DatastoreAdminClient,
)
from google.cloud.datastore_admin_v1.services.datastore_admin.async_client import (
DatastoreAdminAsyncClient,
)

from google.cloud.datastore_admin_v1.types.datastore_admin import CommonMetadata
from google.cloud.datastore_admin_v1.types.datastore_admin import CreateIndexRequest
from google.cloud.datastore_admin_v1.types.datastore_admin import (
DatastoreFirestoreMigrationMetadata,
)
from google.cloud.datastore_admin_v1.types.datastore_admin import DeleteIndexRequest
from google.cloud.datastore_admin_v1.types.datastore_admin import EntityFilter
from google.cloud.datastore_admin_v1.types.datastore_admin import ExportEntitiesMetadata
from google.cloud.datastore_admin_v1.types.datastore_admin import ExportEntitiesRequest
from google.cloud.datastore_admin_v1.types.datastore_admin import ExportEntitiesResponse
from google.cloud.datastore_admin_v1.types.datastore_admin import GetIndexRequest
from google.cloud.datastore_admin_v1.types.datastore_admin import ImportEntitiesMetadata
from google.cloud.datastore_admin_v1.types.datastore_admin import ImportEntitiesRequest
from google.cloud.datastore_admin_v1.types.datastore_admin import IndexOperationMetadata
from google.cloud.datastore_admin_v1.types.datastore_admin import ListIndexesRequest
from google.cloud.datastore_admin_v1.types.datastore_admin import ListIndexesResponse
from google.cloud.datastore_admin_v1.types.datastore_admin import Progress
from google.cloud.datastore_admin_v1.types.datastore_admin import OperationType
from google.cloud.datastore_admin_v1.types.index import Index
from google.cloud.datastore_admin_v1.types.migration import MigrationProgressEvent
from google.cloud.datastore_admin_v1.types.migration import MigrationStateEvent
from google.cloud.datastore_admin_v1.types.migration import MigrationState
from google.cloud.datastore_admin_v1.types.migration import MigrationStep

__all__ = (
"DatastoreAdminClient",
"DatastoreAdminAsyncClient",
"CommonMetadata",
"CreateIndexRequest",
"DatastoreFirestoreMigrationMetadata",
"DeleteIndexRequest",
"EntityFilter",
"ExportEntitiesMetadata",
"ExportEntitiesRequest",
"ExportEntitiesResponse",
"GetIndexRequest",
"ImportEntitiesMetadata",
"ImportEntitiesRequest",
"IndexOperationMetadata",
"ListIndexesRequest",
"ListIndexesResponse",
"Progress",
"OperationType",
"Index",
"MigrationProgressEvent",
"MigrationStateEvent",
"MigrationState",
"MigrationStep",
)
16 changes: 16 additions & 0 deletions google/cloud/datastore_admin/gapic_version.py
@@ -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__ = "2.10.0" # {x-release-please-version}
2 changes: 2 additions & 0 deletions google/cloud/datastore_admin/py.typed
@@ -0,0 +1,2 @@
# Marker file for PEP 561.
# The google-cloud-datastore-admin package uses inline types.
4 changes: 4 additions & 0 deletions google/cloud/datastore_admin_v1/__init__.py
Expand Up @@ -13,6 +13,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
from google.cloud.datastore_admin import gapic_version as package_version

__version__ = package_version.__version__


from .services.datastore_admin import DatastoreAdminClient
from .services.datastore_admin import DatastoreAdminAsyncClient
Expand Down
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,
)
import pkg_resources

from google.api_core.client_options import ClientOptions
Expand Down Expand Up @@ -218,9 +228,9 @@ def transport(self) -> DatastoreAdminTransport:
def __init__(
self,
*,
credentials: ga_credentials.Credentials = None,
credentials: Optional[ga_credentials.Credentials] = None,
transport: Union[str, DatastoreAdminTransport] = "grpc_asyncio",
client_options: ClientOptions = None,
client_options: Optional[ClientOptions] = None,
client_info: gapic_v1.client_info.ClientInfo = DEFAULT_CLIENT_INFO,
) -> None:
"""Instantiates the datastore admin client.
Expand Down Expand Up @@ -264,14 +274,14 @@ def __init__(

async def export_entities(
self,
request: Union[datastore_admin.ExportEntitiesRequest, dict] = None,
request: Optional[Union[datastore_admin.ExportEntitiesRequest, dict]] = None,
*,
project_id: str = None,
labels: Mapping[str, str] = None,
entity_filter: datastore_admin.EntityFilter = None,
output_url_prefix: str = None,
project_id: Optional[str] = None,
labels: Optional[MutableMapping[str, str]] = None,
entity_filter: Optional[datastore_admin.EntityFilter] = None,
output_url_prefix: Optional[str] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Exports a copy of all or a subset of entities from
Expand Down Expand Up @@ -317,7 +327,7 @@ async def sample_export_entities():
print(response)

Args:
request (Union[google.cloud.datastore_admin_v1.types.ExportEntitiesRequest, dict]):
request (Optional[Union[google.cloud.datastore_admin_v1.types.ExportEntitiesRequest, dict]]):
The request object. The request for
[google.datastore.admin.v1.DatastoreAdmin.ExportEntities][google.datastore.admin.v1.DatastoreAdmin.ExportEntities].
project_id (:class:`str`):
Expand All @@ -327,7 +337,7 @@ async def sample_export_entities():
This corresponds to the ``project_id`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
labels (:class:`Mapping[str, str]`):
labels (:class:`MutableMapping[str, str]`):
Client-assigned labels.
This corresponds to the ``labels`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -445,14 +455,14 @@ async def sample_export_entities():

async def import_entities(
self,
request: Union[datastore_admin.ImportEntitiesRequest, dict] = None,
request: Optional[Union[datastore_admin.ImportEntitiesRequest, dict]] = None,
*,
project_id: str = None,
labels: Mapping[str, str] = None,
input_url: str = None,
entity_filter: datastore_admin.EntityFilter = None,
project_id: Optional[str] = None,
labels: Optional[MutableMapping[str, str]] = None,
input_url: Optional[str] = None,
entity_filter: Optional[datastore_admin.EntityFilter] = None,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Imports entities into Google Cloud Datastore.
Expand Down Expand Up @@ -495,7 +505,7 @@ async def sample_import_entities():
print(response)

Args:
request (Union[google.cloud.datastore_admin_v1.types.ImportEntitiesRequest, dict]):
request (Optional[Union[google.cloud.datastore_admin_v1.types.ImportEntitiesRequest, dict]]):
The request object. The request for
[google.datastore.admin.v1.DatastoreAdmin.ImportEntities][google.datastore.admin.v1.DatastoreAdmin.ImportEntities].
project_id (:class:`str`):
Expand All @@ -505,7 +515,7 @@ async def sample_import_entities():
This corresponds to the ``project_id`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
labels (:class:`Mapping[str, str]`):
labels (:class:`MutableMapping[str, str]`):
Client-assigned labels.
This corresponds to the ``labels`` field
on the ``request`` instance; if ``request`` is provided, this
Expand Down Expand Up @@ -624,10 +634,10 @@ async def sample_import_entities():

async def create_index(
self,
request: Union[datastore_admin.CreateIndexRequest, dict] = None,
request: Optional[Union[datastore_admin.CreateIndexRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Creates the specified index. A newly created index's initial
Expand Down Expand Up @@ -676,7 +686,7 @@ async def sample_create_index():
print(response)

Args:
request (Union[google.cloud.datastore_admin_v1.types.CreateIndexRequest, dict]):
request (Optional[Union[google.cloud.datastore_admin_v1.types.CreateIndexRequest, dict]]):
The request object. The request for
[google.datastore.admin.v1.DatastoreAdmin.CreateIndex][google.datastore.admin.v1.DatastoreAdmin.CreateIndex].
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -734,10 +744,10 @@ async def sample_create_index():

async def delete_index(
self,
request: Union[datastore_admin.DeleteIndexRequest, dict] = None,
request: Optional[Union[datastore_admin.DeleteIndexRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> operation_async.AsyncOperation:
r"""Deletes an existing index. An index can only be deleted if it is
Expand Down Expand Up @@ -785,7 +795,7 @@ async def sample_delete_index():
print(response)

Args:
request (Union[google.cloud.datastore_admin_v1.types.DeleteIndexRequest, dict]):
request (Optional[Union[google.cloud.datastore_admin_v1.types.DeleteIndexRequest, dict]]):
The request object. The request for
[google.datastore.admin.v1.DatastoreAdmin.DeleteIndex][google.datastore.admin.v1.DatastoreAdmin.DeleteIndex].
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -846,10 +856,10 @@ async def sample_delete_index():

async def get_index(
self,
request: Union[datastore_admin.GetIndexRequest, dict] = None,
request: Optional[Union[datastore_admin.GetIndexRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> index.Index:
r"""Gets an index.
Expand Down Expand Up @@ -880,7 +890,7 @@ async def sample_get_index():
print(response)

Args:
request (Union[google.cloud.datastore_admin_v1.types.GetIndexRequest, dict]):
request (Optional[Union[google.cloud.datastore_admin_v1.types.GetIndexRequest, dict]]):
The request object. The request for
[google.datastore.admin.v1.DatastoreAdmin.GetIndex][google.datastore.admin.v1.DatastoreAdmin.GetIndex].
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down Expand Up @@ -938,10 +948,10 @@ async def sample_get_index():

async def list_indexes(
self,
request: Union[datastore_admin.ListIndexesRequest, dict] = None,
request: Optional[Union[datastore_admin.ListIndexesRequest, dict]] = None,
*,
retry: OptionalRetry = gapic_v1.method.DEFAULT,
timeout: float = None,
timeout: Optional[float] = None,
metadata: Sequence[Tuple[str, str]] = (),
) -> pagers.ListIndexesAsyncPager:
r"""Lists the indexes that match the specified filters.
Expand Down Expand Up @@ -976,7 +986,7 @@ async def sample_list_indexes():
print(response)

Args:
request (Union[google.cloud.datastore_admin_v1.types.ListIndexesRequest, dict]):
request (Optional[Union[google.cloud.datastore_admin_v1.types.ListIndexesRequest, dict]]):
The request object. The request for
[google.datastore.admin.v1.DatastoreAdmin.ListIndexes][google.datastore.admin.v1.DatastoreAdmin.ListIndexes].
retry (google.api_core.retry.Retry): Designation of what errors, if any,
Expand Down