Skip to content

Commit

Permalink
feat: Added methods for creating and deleting composite indexes (#248)
Browse files Browse the repository at this point in the history
This PR fixes an issue with the `owlbot.py` file which prevented [google/cloud/datastore_v1](https://github.com/googleapis/python-datastore/commits/main/google/cloud/datastore_v1) from being updated. This PR also brings the client up to date with the generated client in googleapis-gen [here](https://github.com/googleapis/googleapis-gen/tree/master/google/datastore).

chore: update owlbot.py to properly copy folders from googleapis-gen
fix(deps): require google-api-core >= 1.28.0
docs: list oneofs in docstring
feat: add context manager support in client
fix: add 'dict' annotation type to 'request'
fix: add async client to %name_%version/init.py
feat: support self-signed JWT flow for service accounts 
feat: Added methods for creating and deleting composite indexes
  • Loading branch information
parthea committed Nov 8, 2021
1 parent 2658174 commit d6c8868
Show file tree
Hide file tree
Showing 40 changed files with 3,119 additions and 1,677 deletions.
13 changes: 9 additions & 4 deletions google/cloud/datastore_admin_v1/__init__.py
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -16,7 +15,11 @@
#

from .services.datastore_admin import DatastoreAdminClient
from .services.datastore_admin import DatastoreAdminAsyncClient

from .types.datastore_admin import CommonMetadata
from .types.datastore_admin import CreateIndexRequest
from .types.datastore_admin import DeleteIndexRequest
from .types.datastore_admin import EntityFilter
from .types.datastore_admin import ExportEntitiesMetadata
from .types.datastore_admin import ExportEntitiesRequest
Expand All @@ -27,13 +30,16 @@
from .types.datastore_admin import IndexOperationMetadata
from .types.datastore_admin import ListIndexesRequest
from .types.datastore_admin import ListIndexesResponse
from .types.datastore_admin import OperationType
from .types.datastore_admin import Progress
from .types.datastore_admin import OperationType
from .types.index import Index


__all__ = (
"DatastoreAdminAsyncClient",
"CommonMetadata",
"CreateIndexRequest",
"DatastoreAdminClient",
"DeleteIndexRequest",
"EntityFilter",
"ExportEntitiesMetadata",
"ExportEntitiesRequest",
Expand All @@ -47,5 +53,4 @@
"ListIndexesResponse",
"OperationType",
"Progress",
"DatastoreAdminClient",
)
83 changes: 83 additions & 0 deletions google/cloud/datastore_admin_v1/gapic_metadata.json
@@ -0,0 +1,83 @@
{
"comment": "This file maps proto services/RPCs to the corresponding library clients/methods",
"language": "python",
"libraryPackage": "google.cloud.datastore_admin_v1",
"protoPackage": "google.datastore.admin.v1",
"schema": "1.0",
"services": {
"DatastoreAdmin": {
"clients": {
"grpc": {
"libraryClient": "DatastoreAdminClient",
"rpcs": {
"CreateIndex": {
"methods": [
"create_index"
]
},
"DeleteIndex": {
"methods": [
"delete_index"
]
},
"ExportEntities": {
"methods": [
"export_entities"
]
},
"GetIndex": {
"methods": [
"get_index"
]
},
"ImportEntities": {
"methods": [
"import_entities"
]
},
"ListIndexes": {
"methods": [
"list_indexes"
]
}
}
},
"grpc-async": {
"libraryClient": "DatastoreAdminAsyncClient",
"rpcs": {
"CreateIndex": {
"methods": [
"create_index"
]
},
"DeleteIndex": {
"methods": [
"delete_index"
]
},
"ExportEntities": {
"methods": [
"export_entities"
]
},
"GetIndex": {
"methods": [
"get_index"
]
},
"ImportEntities": {
"methods": [
"import_entities"
]
},
"ListIndexes": {
"methods": [
"list_indexes"
]
}
}
}
}
}
}
}
1 change: 0 additions & 1 deletion google/cloud/datastore_admin_v1/services/__init__.py
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down
@@ -1,5 +1,4 @@
# -*- coding: utf-8 -*-

# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -14,7 +13,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#

from .client import DatastoreAdminClient
from .async_client import DatastoreAdminAsyncClient

Expand Down

0 comments on commit d6c8868

Please sign in to comment.