1 // Copyright 2018 Google LLC.
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
7 // http://www.apache.org/licenses/LICENSE-2.0
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
18 package google.firestore.admin.v1;
20 import "google/api/annotations.proto";
21 import "google/firestore/admin/v1/index.proto";
23 option csharp_namespace = "Google.Cloud.Firestore.Admin.V1";
24 option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin";
25 option java_multiple_files = true;
26 option java_outer_classname = "FieldProto";
27 option java_package = "com.google.firestore.admin.v1";
28 option objc_class_prefix = "GCFS";
29 option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1";
31 // Represents a single field in the database.
33 // Fields are grouped by their "Collection Group", which represent all
34 // collections in the database with the same id.
36 // The index configuration for this field.
38 // The indexes supported for this field.
39 repeated Index indexes = 1;
42 // When true, the `Field`'s index configuration is set from the
43 // configuration specified by the `ancestor_field`.
44 // When false, the `Field`'s index configuration is defined explicitly.
45 bool uses_ancestor_config = 2;
48 // Specifies the resource name of the `Field` from which this field's
49 // index configuration is set (when `uses_ancestor_config` is true),
50 // or from which it *would* be set if this field had no index configuration
51 // (when `uses_ancestor_config` is false).
52 string ancestor_field = 3;
55 // When true, the `Field`'s index configuration is in the process of being
56 // reverted. Once complete, the index config will transition to the same
57 // state as the field specified by `ancestor_field`, at which point
58 // `uses_ancestor_config` will be `true` and `reverting` will be `false`.
62 // A field name of the form
63 // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
65 // A field path may be a simple field name, e.g. `address` or a path to fields
66 // within map_value , e.g. `address.city`,
67 // or a special field path. The only valid special field is `*`, which
68 // represents any field.
70 // Field paths may be quoted using ` (backtick). The only character that needs
71 // to be escaped within a quoted field path is the backtick character itself,
72 // escaped using a backslash. Special characters in field paths that
73 // must be quoted include: `*`, `.`,
74 // ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
77 // (Note: Comments here are written in markdown syntax, so there is an
78 // additional layer of backticks to represent a code block)
79 // `\`address.city\`` represents a field named `address.city`, not the map key
80 // `city` in the field `address`.
81 // `\`*\`` represents a field named `*`, not any field.
83 // A special `Field` contains the default indexing settings for all fields.
84 // This field's resource name is:
85 // `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`
86 // Indexes defined on this `Field` will be applied to all fields which do not
87 // have their own `Field` index configuration.
90 // The index configuration for this field. If unset, field indexing will
91 // revert to the configuration defined by the `ancestor_field`. To
92 // explicitly remove all indexes for this field, specify an index config
93 // with an empty list of indexes.
94 IndexConfig index_config = 2;