Skip to content

Commit

Permalink
chore: manual synth (#302)
Browse files Browse the repository at this point in the history
* chore: manual synth

* Updated synth to preserve .make gitignore

Co-authored-by: Craig Labenz <craiglabenz@google.com>
  • Loading branch information
craiglabenz and craiglabenz-g committed Feb 4, 2021
1 parent 87fb132 commit 7243827
Show file tree
Hide file tree
Showing 24 changed files with 767 additions and 556 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -60,3 +60,4 @@ system_tests/local_test_setup
# Make sure a generated file isn't accidentally committed.
pylintrc
pylintrc.test
.make/**
12 changes: 6 additions & 6 deletions CONTRIBUTING.rst
Expand Up @@ -156,21 +156,21 @@ Running System Tests
`docs <https://cloud.google.com/storage/docs/authentication#generating-a-private-key>`__
for more details.

- Once you have downloaded your json keys, set the environment variable
- Once you have downloaded your json keys, set the environment variable
``GOOGLE_APPLICATION_CREDENTIALS`` to the absolute path of the json file::

$ export GOOGLE_APPLICATION_CREDENTIALS="/Users/<your_username>/path/to/app_credentials.json"


**************************
Updating Conformance Tests
**************************
Updating Conformance Tests
**************************

The firestore client libraries use a shared set of conformance tests, the source of which can be found at https://github.com/googleapis/conformance-tests.
The firestore client libraries use a shared set of conformance tests, the source of which can be found at https://github.com/googleapis/conformance-tests.

To update the copy of these conformance tests used by this repository, run the provided Makefile:
To update the copy of these conformance tests used by this repository, run the provided Makefile:

$ make -f Makefile_v1
$ make -f Makefile_v1

*************
Test Coverage
Expand Down
Expand Up @@ -94,6 +94,7 @@ class FirestoreAdminAsyncClient:
FirestoreAdminClient.parse_common_location_path
)

from_service_account_info = FirestoreAdminClient.from_service_account_info
from_service_account_file = FirestoreAdminClient.from_service_account_file
from_service_account_json = from_service_account_file

Expand Down Expand Up @@ -175,18 +176,20 @@ async def create_index(
[IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
Args:
request (:class:`~.firestore_admin.CreateIndexRequest`):
request (:class:`google.cloud.firestore_admin_v1.types.CreateIndexRequest`):
The request object. The request for
[FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex].
parent (:class:`str`):
Required. A parent name of the form
``projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}``
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
index (:class:`~.gfa_index.Index`):
index (:class:`google.cloud.firestore_admin_v1.types.Index`):
Required. The composite index to
create.
This corresponds to the ``index`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand All @@ -198,13 +201,11 @@ async def create_index(
sent along with the request as metadata.
Returns:
~.operation_async.AsyncOperation:
google.api_core.operation_async.AsyncOperation:
An object representing a long-running operation.
The result type for the operation will be
:class:``~.gfa_index.Index``: Cloud Firestore indexes
enable simple and complex queries against documents in a
database.
The result type for the operation will be :class:`google.cloud.firestore_admin_v1.types.Index` Cloud Firestore indexes enable simple and complex queries against
documents in a database.
"""
# Create or coerce a protobuf request object.
Expand Down Expand Up @@ -267,12 +268,13 @@ async def list_indexes(
r"""Lists composite indexes.
Args:
request (:class:`~.firestore_admin.ListIndexesRequest`):
request (:class:`google.cloud.firestore_admin_v1.types.ListIndexesRequest`):
The request object. The request for
[FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes].
parent (:class:`str`):
Required. A parent name of the form
``projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}``
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand All @@ -284,7 +286,7 @@ async def list_indexes(
sent along with the request as metadata.
Returns:
~.pagers.ListIndexesAsyncPager:
google.cloud.firestore_admin_v1.services.firestore_admin.pagers.ListIndexesAsyncPager:
The response for
[FirestoreAdmin.ListIndexes][google.firestore.admin.v1.FirestoreAdmin.ListIndexes].
Expand Down Expand Up @@ -358,12 +360,13 @@ async def get_index(
r"""Gets a composite index.
Args:
request (:class:`~.firestore_admin.GetIndexRequest`):
request (:class:`google.cloud.firestore_admin_v1.types.GetIndexRequest`):
The request object. The request for
[FirestoreAdmin.GetIndex][google.firestore.admin.v1.FirestoreAdmin.GetIndex].
name (:class:`str`):
Required. A name of the form
``projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}``
This corresponds to the ``name`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand All @@ -375,7 +378,7 @@ async def get_index(
sent along with the request as metadata.
Returns:
~.index.Index:
google.cloud.firestore_admin_v1.types.Index:
Cloud Firestore indexes enable simple
and complex queries against documents in
a database.
Expand Down Expand Up @@ -441,12 +444,13 @@ async def delete_index(
r"""Deletes a composite index.
Args:
request (:class:`~.firestore_admin.DeleteIndexRequest`):
request (:class:`google.cloud.firestore_admin_v1.types.DeleteIndexRequest`):
The request object. The request for
[FirestoreAdmin.DeleteIndex][google.firestore.admin.v1.FirestoreAdmin.DeleteIndex].
name (:class:`str`):
Required. A name of the form
``projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}``
This corresponds to the ``name`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand Down Expand Up @@ -516,12 +520,13 @@ async def get_field(
r"""Gets the metadata and configuration for a Field.
Args:
request (:class:`~.firestore_admin.GetFieldRequest`):
request (:class:`google.cloud.firestore_admin_v1.types.GetFieldRequest`):
The request object. The request for
[FirestoreAdmin.GetField][google.firestore.admin.v1.FirestoreAdmin.GetField].
name (:class:`str`):
Required. A name of the form
``projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_id}``
This corresponds to the ``name`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand All @@ -533,7 +538,7 @@ async def get_field(
sent along with the request as metadata.
Returns:
~.field.Field:
google.cloud.firestore_admin_v1.types.Field:
Represents a single field in the
database.
Fields are grouped by their "Collection
Expand Down Expand Up @@ -616,10 +621,10 @@ async def update_field(
``projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*``.
Args:
request (:class:`~.firestore_admin.UpdateFieldRequest`):
request (:class:`google.cloud.firestore_admin_v1.types.UpdateFieldRequest`):
The request object. The request for
[FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField].
field (:class:`~.gfa_field.Field`):
field (:class:`google.cloud.firestore_admin_v1.types.Field`):
Required. The field to be updated.
This corresponds to the ``field`` field
on the ``request`` instance; if ``request`` is provided, this
Expand All @@ -632,16 +637,16 @@ async def update_field(
sent along with the request as metadata.
Returns:
~.operation_async.AsyncOperation:
google.api_core.operation_async.AsyncOperation:
An object representing a long-running operation.
The result type for the operation will be
:class:``~.gfa_field.Field``: Represents a single field
in the database.
:class:`google.cloud.firestore_admin_v1.types.Field`
Represents a single field in the database.
Fields are grouped by their "Collection Group", which
represent all collections in the database with the same
id.
Fields are grouped by their "Collection Group", which
represent all collections in the database with the
same id.
"""
# Create or coerce a protobuf request object.
Expand Down Expand Up @@ -711,12 +716,13 @@ async def list_fields(
with the filter set to ``indexConfig.usesAncestorConfig:false``.
Args:
request (:class:`~.firestore_admin.ListFieldsRequest`):
request (:class:`google.cloud.firestore_admin_v1.types.ListFieldsRequest`):
The request object. The request for
[FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields].
parent (:class:`str`):
Required. A parent name of the form
``projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}``
This corresponds to the ``parent`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand All @@ -728,7 +734,7 @@ async def list_fields(
sent along with the request as metadata.
Returns:
~.pagers.ListFieldsAsyncPager:
google.cloud.firestore_admin_v1.services.firestore_admin.pagers.ListFieldsAsyncPager:
The response for
[FirestoreAdmin.ListFields][google.firestore.admin.v1.FirestoreAdmin.ListFields].
Expand Down Expand Up @@ -811,12 +817,13 @@ async def export_documents(
Google Cloud Storage.
Args:
request (:class:`~.firestore_admin.ExportDocumentsRequest`):
request (:class:`google.cloud.firestore_admin_v1.types.ExportDocumentsRequest`):
The request object. The request for
[FirestoreAdmin.ExportDocuments][google.firestore.admin.v1.FirestoreAdmin.ExportDocuments].
name (:class:`str`):
Required. Database to export. Should be of the form:
``projects/{project_id}/databases/{database_id}``.
This corresponds to the ``name`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand All @@ -828,11 +835,11 @@ async def export_documents(
sent along with the request as metadata.
Returns:
~.operation_async.AsyncOperation:
google.api_core.operation_async.AsyncOperation:
An object representing a long-running operation.
The result type for the operation will be
:class:``~.gfa_operation.ExportDocumentsResponse``:
:class:`google.cloud.firestore_admin_v1.types.ExportDocumentsResponse`
Returned in the
[google.longrunning.Operation][google.longrunning.Operation]
response field.
Expand Down Expand Up @@ -902,12 +909,13 @@ async def import_documents(
already been imported to Cloud Firestore.
Args:
request (:class:`~.firestore_admin.ImportDocumentsRequest`):
request (:class:`google.cloud.firestore_admin_v1.types.ImportDocumentsRequest`):
The request object. The request for
[FirestoreAdmin.ImportDocuments][google.firestore.admin.v1.FirestoreAdmin.ImportDocuments].
name (:class:`str`):
Required. Database to import into. Should be of the
form: ``projects/{project_id}/databases/{database_id}``.
This corresponds to the ``name`` field
on the ``request`` instance; if ``request`` is provided, this
should not be set.
Expand All @@ -919,24 +927,22 @@ async def import_documents(
sent along with the request as metadata.
Returns:
~.operation_async.AsyncOperation:
google.api_core.operation_async.AsyncOperation:
An object representing a long-running operation.
The result type for the operation will be
:class:``~.empty.Empty``: A generic empty message that
you can re-use to avoid defining duplicated empty
messages in your APIs. A typical example is to use it as
the request or the response type of an API method. For
instance:
The result type for the operation will be :class:`google.protobuf.empty_pb2.Empty` A generic empty message that you can re-use to avoid defining duplicated
empty messages in your APIs. A typical example is to
use it as the request or the response type of an API
method. For instance:
::
service Foo {
rpc Bar(google.protobuf.Empty) returns
(google.protobuf.Empty);
service Foo {
rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
}
}
The JSON representation for ``Empty`` is empty JSON
object ``{}``.
The JSON representation for Empty is empty JSON
object {}.
"""
# Create or coerce a protobuf request object.
Expand Down

0 comments on commit 7243827

Please sign in to comment.