Built motion from commit 6a09e18b.|2.6.11
[motion2.git] / legacy-libs / google-proto-files / google / firestore / admin / v1beta2 / operation.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 import "google/protobuf/timestamp.proto";
23
24 option csharp_namespace = "Google.Cloud.Firestore.Admin.V1Beta2";
25 option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1beta2;admin";
26 option java_multiple_files = true;
27 option java_outer_classname = "OperationProto";
28 option java_package = "com.google.firestore.admin.v1beta2";
29 option objc_class_prefix = "GCFS";
30
31 // Metadata for [google.longrunning.Operation][google.longrunning.Operation]
32 // results from
33 // [FirestoreAdmin.CreateIndex][google.firestore.admin.v1beta2.FirestoreAdmin.CreateIndex].
34 message IndexOperationMetadata {
35   // The time this operation started.
36   google.protobuf.Timestamp start_time = 1;
37
38   // The time this operation completed. Will be unset if operation still in
39   // progress.
40   google.protobuf.Timestamp end_time = 2;
41
42   // The index resource that this operation is acting on. For example:
43   // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
44   string index = 3;
45
46   // The state of the operation.
47   OperationState state = 4;
48
49   // The progress, in documents, of this operation.
50   Progress progress_documents = 5;
51
52   // The progress, in bytes, of this operation.
53   Progress progress_bytes = 6;
54 }
55
56 // Metadata for [google.longrunning.Operation][google.longrunning.Operation]
57 // results from
58 // [FirestoreAdmin.UpdateField][google.firestore.admin.v1beta2.FirestoreAdmin.UpdateField].
59 message FieldOperationMetadata {
60   // Information about an index configuration change.
61   message IndexConfigDelta {
62     // Specifies how the index is changing.
63     enum ChangeType {
64       // The type of change is not specified or known.
65       CHANGE_TYPE_UNSPECIFIED = 0;
66
67       // The single field index is being added.
68       ADD = 1;
69
70       // The single field index is being removed.
71       REMOVE = 2;
72     }
73
74     // Specifies how the index is changing.
75     ChangeType change_type = 1;
76
77     // The index being changed.
78     Index index = 2;
79   }
80
81   // The time this operation started.
82   google.protobuf.Timestamp start_time = 1;
83
84   // The time this operation completed. Will be unset if operation still in
85   // progress.
86   google.protobuf.Timestamp end_time = 2;
87
88   // The field resource that this operation is acting on. For example:
89   // `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
90   string field = 3;
91
92   // A list of
93   // [IndexConfigDelta][google.firestore.admin.v1beta2.FieldOperationMetadata.IndexConfigDelta],
94   // which describe the intent of this operation.
95   repeated IndexConfigDelta index_config_deltas = 4;
96
97   // The state of the operation.
98   OperationState state = 5;
99
100   // The progress, in documents, of this operation.
101   Progress document_progress = 6;
102
103   // The progress, in bytes, of this operation.
104   Progress bytes_progress = 7;
105 }
106
107 // Metadata for [google.longrunning.Operation][google.longrunning.Operation]
108 // results from
109 // [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1beta2.FirestoreAdmin.ExportDocuments].
110 message ExportDocumentsMetadata {
111   // The time this operation started.
112   google.protobuf.Timestamp start_time = 1;
113
114   // The time this operation completed. Will be unset if operation still in
115   // progress.
116   google.protobuf.Timestamp end_time = 2;
117
118   // The state of the export operation.
119   OperationState operation_state = 3;
120
121   // The progress, in documents, of this operation.
122   Progress progress_documents = 4;
123
124   // The progress, in bytes, of this operation.
125   Progress progress_bytes = 5;
126
127   // Which collection ids are being exported.
128   repeated string collection_ids = 6;
129
130   // Where the entities are being exported to.
131   string output_uri_prefix = 7;
132 }
133
134 // Metadata for [google.longrunning.Operation][google.longrunning.Operation]
135 // results from
136 // [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1beta2.FirestoreAdmin.ImportDocuments].
137 message ImportDocumentsMetadata {
138   // The time this operation started.
139   google.protobuf.Timestamp start_time = 1;
140
141   // The time this operation completed. Will be unset if operation still in
142   // progress.
143   google.protobuf.Timestamp end_time = 2;
144
145   // The state of the import operation.
146   OperationState operation_state = 3;
147
148   // The progress, in documents, of this operation.
149   Progress progress_documents = 4;
150
151   // The progress, in bytes, of this operation.
152   Progress progress_bytes = 5;
153
154   // Which collection ids are being imported.
155   repeated string collection_ids = 6;
156
157   // The location of the documents being imported.
158   string input_uri_prefix = 7;
159 }
160
161 // Returned in the [google.longrunning.Operation][google.longrunning.Operation]
162 // response field.
163 message ExportDocumentsResponse {
164   // Location of the output files. This can be used to begin an import
165   // into Cloud Firestore (this project or another project) after the operation
166   // completes successfully.
167   string output_uri_prefix = 1;
168 }
169
170 // Describes the progress of the operation.
171 // Unit of work is generic and must be interpreted based on where
172 // [Progress][google.firestore.admin.v1beta2.Progress] is used.
173 message Progress {
174   // The amount of work estimated.
175   int64 estimated_work = 1;
176
177   // The amount of work completed.
178   int64 completed_work = 2;
179 }
180
181 // Describes the state of the operation.
182 enum OperationState {
183   // Unspecified.
184   OPERATION_STATE_UNSPECIFIED = 0;
185
186   // Request is being prepared for processing.
187   INITIALIZING = 1;
188
189   // Request is actively being processed.
190   PROCESSING = 2;
191
192   // Request is in the process of being cancelled after user called
193   // google.longrunning.Operations.CancelOperation on the operation.
194   CANCELLING = 3;
195
196   // Request has been processed and is in its finalization stage.
197   FINALIZING = 4;
198
199   // Request has completed successfully.
200   SUCCESSFUL = 5;
201
202   // Request has finished being processed, but encountered an error.
203   FAILED = 6;
204
205   // Request has finished being cancelled after user called
206   // google.longrunning.Operations.CancelOperation.
207   CANCELLED = 7;
208 }