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.v1beta2;
20 import "google/api/annotations.proto";
21 import "google/firestore/admin/v1beta2/index.proto";
22 import "google/protobuf/timestamp.proto";
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";
31 // Metadata for [google.longrunning.Operation][google.longrunning.Operation]
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;
38 // The time this operation completed. Will be unset if operation still in
40 google.protobuf.Timestamp end_time = 2;
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}`
46 // The state of the operation.
47 OperationState state = 4;
49 // The progress, in documents, of this operation.
50 Progress progress_documents = 5;
52 // The progress, in bytes, of this operation.
53 Progress progress_bytes = 6;
56 // Metadata for [google.longrunning.Operation][google.longrunning.Operation]
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.
64 // The type of change is not specified or known.
65 CHANGE_TYPE_UNSPECIFIED = 0;
67 // The single field index is being added.
70 // The single field index is being removed.
74 // Specifies how the index is changing.
75 ChangeType change_type = 1;
77 // The index being changed.
81 // The time this operation started.
82 google.protobuf.Timestamp start_time = 1;
84 // The time this operation completed. Will be unset if operation still in
86 google.protobuf.Timestamp end_time = 2;
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}`
93 // [IndexConfigDelta][google.firestore.admin.v1beta2.FieldOperationMetadata.IndexConfigDelta],
94 // which describe the intent of this operation.
95 repeated IndexConfigDelta index_config_deltas = 4;
97 // The state of the operation.
98 OperationState state = 5;
100 // The progress, in documents, of this operation.
101 Progress document_progress = 6;
103 // The progress, in bytes, of this operation.
104 Progress bytes_progress = 7;
107 // Metadata for [google.longrunning.Operation][google.longrunning.Operation]
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;
114 // The time this operation completed. Will be unset if operation still in
116 google.protobuf.Timestamp end_time = 2;
118 // The state of the export operation.
119 OperationState operation_state = 3;
121 // The progress, in documents, of this operation.
122 Progress progress_documents = 4;
124 // The progress, in bytes, of this operation.
125 Progress progress_bytes = 5;
127 // Which collection ids are being exported.
128 repeated string collection_ids = 6;
130 // Where the entities are being exported to.
131 string output_uri_prefix = 7;
134 // Metadata for [google.longrunning.Operation][google.longrunning.Operation]
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;
141 // The time this operation completed. Will be unset if operation still in
143 google.protobuf.Timestamp end_time = 2;
145 // The state of the import operation.
146 OperationState operation_state = 3;
148 // The progress, in documents, of this operation.
149 Progress progress_documents = 4;
151 // The progress, in bytes, of this operation.
152 Progress progress_bytes = 5;
154 // Which collection ids are being imported.
155 repeated string collection_ids = 6;
157 // The location of the documents being imported.
158 string input_uri_prefix = 7;
161 // Returned in the [google.longrunning.Operation][google.longrunning.Operation]
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;
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.
174 // The amount of work estimated.
175 int64 estimated_work = 1;
177 // The amount of work completed.
178 int64 completed_work = 2;
181 // Describes the state of the operation.
182 enum OperationState {
184 OPERATION_STATE_UNSPECIFIED = 0;
186 // Request is being prepared for processing.
189 // Request is actively being processed.
192 // Request is in the process of being cancelled after user called
193 // google.longrunning.Operations.CancelOperation on the operation.
196 // Request has been processed and is in its finalization stage.
199 // Request has completed successfully.
202 // Request has finished being processed, but encountered an error.
205 // Request has finished being cancelled after user called
206 // google.longrunning.Operations.CancelOperation.