Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / firestore / admin / v1beta2 / field.proto
1 // Copyright 2018 Google LLC.
2 //
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
6 //
7 //     http://www.apache.org/licenses/LICENSE-2.0
8 //
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.
14 //
15
16 syntax = "proto3";
17
18 package google.firestore.admin.v1beta2;
19
20 import "google/api/annotations.proto";
21 import "google/firestore/admin/v1beta2/index.proto";
22
23 option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta2";
24 option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta2;admin";
25 option java_multiple_files = true;
26 option java_outer_classname = "FieldProto";
27 option java_package = "com.google.firestore.admin.v1beta2";
28 option objc_class_prefix = "GCFS";
29
30 // Represents a single field in the database.
31 //
32 // Fields are grouped by their "Collection Group", which represent all
33 // collections in the database with the same id.
34 message Field {
35   // The index configuration for this field.
36   message IndexConfig {
37     // The indexes supported for this field.
38     repeated Index indexes = 1;
39
40     // Output only.
41     // When true, the `Field`'s index configuration is set from the
42     // configuration specified by the `ancestor_field`.
43     // When false, the `Field`'s index configuration is defined explicitly.
44     bool uses_ancestor_config = 2;
45
46     // Output only.
47     // Specifies the resource name of the `Field` from which this field's
48     // index configuration is set (when `uses_ancestor_config` is true),
49     // or from which it *would* be set if this field had no index configuration
50     // (when `uses_ancestor_config` is false).
51     string ancestor_field = 3;
52
53     // Output only
54     // When true, the `Field`'s index configuration is in the process of being
55     // reverted. Once complete, the index config will transition to the same
56     // state as the field specified by `ancestor_field`, at which point
57     // `uses_ancestor_config` will be `true` and `reverting` will be `false`.
58     bool reverting = 4;
59   }
60
61   // A field name of the form
62   // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
63   //
64   // A field path may be a simple field name, e.g. `address` or a path to fields
65   // within map_value , e.g. `address.city`,
66   // or a special field path. The only valid special field is `*`, which
67   // represents any field.
68   //
69   // Field paths may be quoted using ` (backtick). The only character that needs
70   // to be escaped within a quoted field path is the backtick character itself,
71   // escaped using a backslash. Special characters in field paths that
72   // must be quoted include: `*`, `.`,
73   // ``` (backtick), `[`, `]`, as well as any ascii symbolic characters.
74   //
75   // Examples:
76   // (Note: Comments here are written in markdown syntax, so there is an
77   //  additional layer of backticks to represent a code block)
78   // `\`address.city\`` represents a field named `address.city`, not the map key
79   // `city` in the field `address`.
80   // `\`*\`` represents a field named `*`, not any field.
81   //
82   // A special `Field` contains the default indexing settings for all fields.
83   // This field's resource name is:
84   // `projects/{project_id}/databases/{database_id}/collectionGroups/__default__/fields/*`
85   // Indexes defined on this `Field` will be applied to all fields which do not
86   // have their own `Field` index configuration.
87   string name = 1;
88
89   // The index configuration for this field. If unset, field indexing will
90   // revert to the configuration defined by the `ancestor_field`. To
91   // explicitly remove all indexes for this field, specify an index config
92   // with an empty list of indexes.
93   IndexConfig index_config = 2;
94 }