Skip to content

Commit

Permalink
Add 'COLLECTION_GROUP' to 'Index.QueryScope' enum; update docstrings …
Browse files Browse the repository at this point in the history
…(via synth). (#9253)
  • Loading branch information
yoshi-automation authored and tseaver committed Sep 19, 2019
1 parent baa84e2 commit fd7b55e
Show file tree
Hide file tree
Showing 27 changed files with 400 additions and 398 deletions.
4 changes: 4 additions & 0 deletions google/cloud/firestore_admin_v1/gapic/enums.py
Expand Up @@ -74,10 +74,14 @@ class QueryScope(enum.IntEnum):
COLLECTION (int): Indexes with a collection query scope specified allow queries
against a collection that is the child of a specific document, specified
at query time, and that has the collection id specified by the index.
COLLECTION_GROUP (int): Indexes with a collection group query scope specified allow queries
against all collections that has the collection id specified by the
index.
"""

QUERY_SCOPE_UNSPECIFIED = 0
COLLECTION = 1
COLLECTION_GROUP = 2

class State(enum.IntEnum):
"""
Expand Down
7 changes: 2 additions & 5 deletions google/cloud/firestore_admin_v1/proto/field.proto
Expand Up @@ -28,7 +28,6 @@ option java_package = "com.google.firestore.admin.v1";
option objc_class_prefix = "GCFS";
option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1";


// Represents a single field in the database.
//
// Fields are grouped by their "Collection Group", which represent all
Expand All @@ -39,14 +38,12 @@ message Field {
// The indexes supported for this field.
repeated Index indexes = 1;

// Output only.
// When true, the `Field`'s index configuration is set from the
// Output only. When true, the `Field`'s index configuration is set from the
// configuration specified by the `ancestor_field`.
// When false, the `Field`'s index configuration is defined explicitly.
bool uses_ancestor_config = 2;

// Output only.
// Specifies the resource name of the `Field` from which this field's
// Output only. Specifies the resource name of the `Field` from which this field's
// index configuration is set (when `uses_ancestor_config` is true),
// or from which it *would* be set if this field had no index configuration
// (when `uses_ancestor_config` is false).
Expand Down
7 changes: 6 additions & 1 deletion google/cloud/firestore_admin_v1/proto/firestore_admin.proto
Expand Up @@ -23,6 +23,7 @@ import "google/firestore/admin/v1/index.proto";
import "google/longrunning/operations.proto";
import "google/protobuf/empty.proto";
import "google/protobuf/field_mask.proto";
import "google/api/client.proto";

option csharp_namespace = "Google.Cloud.Firestore.Admin.V1";
option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin";
Expand All @@ -32,10 +33,14 @@ option java_package = "com.google.firestore.admin.v1";
option objc_class_prefix = "GCFS";
option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1";


// Operations are created by service `FirestoreAdmin`, but are accessed via
// service `google.longrunning.Operations`.
service FirestoreAdmin {
option (google.api.default_host) = "firestore.googleapis.com";
option (google.api.oauth_scopes) =
"https://www.googleapis.com/auth/cloud-platform,"
"https://www.googleapis.com/auth/datastore";

// Creates a composite index. This returns a [google.longrunning.Operation][google.longrunning.Operation]
// which may be used to track the status of the creation. The metadata for
// the operation will be the type [IndexOperationMetadata][google.firestore.admin.v1.IndexOperationMetadata].
Expand Down
56 changes: 30 additions & 26 deletions google/cloud/firestore_admin_v1/proto/firestore_admin_pb2.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions google/cloud/firestore_admin_v1/proto/index.proto
Expand Up @@ -27,7 +27,6 @@ option java_package = "com.google.firestore.admin.v1";
option objc_class_prefix = "GCFS";
option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1";


// Cloud Firestore indexes enable simple and complex queries against
// documents in a database.
message Index {
Expand Down Expand Up @@ -82,6 +81,11 @@ message Index {
// against a collection that is the child of a specific document, specified
// at query time, and that has the collection id specified by the index.
COLLECTION = 1;

// Indexes with a collection group query scope specified allow queries
// against all collections that has the collection id specified by the
// index.
COLLECTION_GROUP = 2;
}

// The state of an index. During index creation, an index will be in the
Expand Down Expand Up @@ -114,8 +118,7 @@ message Index {
NEEDS_REPAIR = 3;
}

// Output only.
// A server defined name for this index.
// Output only. A server defined name for this index.
// The form of this name for composite indexes will be:
// `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{composite_index_id}`
// For single field indexes, this field will be empty.
Expand Down Expand Up @@ -143,7 +146,6 @@ message Index {
// field path equal to the field path of the associated field.
repeated IndexField fields = 3;

// Output only.
// The serving state of the index.
// Output only. The serving state of the index.
State state = 4;
}

0 comments on commit fd7b55e

Please sign in to comment.