/
operation.proto
203 lines (156 loc) · 6.56 KB
/
operation.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
// Copyright 2019 Google LLC.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
syntax = "proto3";
package google.firestore.admin.v1;
import "google/firestore/admin/v1/index.proto";
import "google/protobuf/timestamp.proto";
import "google/api/annotations.proto";
option csharp_namespace = "Google.Cloud.Firestore.Admin.V1";
option go_package = "google.golang.org/genproto/googleapis/firestore/admin/v1;admin";
option java_multiple_files = true;
option java_outer_classname = "OperationProto";
option java_package = "com.google.firestore.admin.v1";
option objc_class_prefix = "GCFS";
option php_namespace = "Google\\Cloud\\Firestore\\Admin\\V1";
// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
// [FirestoreAdmin.CreateIndex][google.firestore.admin.v1.FirestoreAdmin.CreateIndex].
message IndexOperationMetadata {
// The time this operation started.
google.protobuf.Timestamp start_time = 1;
// The time this operation completed. Will be unset if operation still in
// progress.
google.protobuf.Timestamp end_time = 2;
// The index resource that this operation is acting on. For example:
// `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/indexes/{index_id}`
string index = 3;
// The state of the operation.
OperationState state = 4;
// The progress, in documents, of this operation.
Progress progress_documents = 5;
// The progress, in bytes, of this operation.
Progress progress_bytes = 6;
}
// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
// [FirestoreAdmin.UpdateField][google.firestore.admin.v1.FirestoreAdmin.UpdateField].
message FieldOperationMetadata {
// Information about an index configuration change.
message IndexConfigDelta {
// Specifies how the index is changing.
enum ChangeType {
// The type of change is not specified or known.
CHANGE_TYPE_UNSPECIFIED = 0;
// The single field index is being added.
ADD = 1;
// The single field index is being removed.
REMOVE = 2;
}
// Specifies how the index is changing.
ChangeType change_type = 1;
// The index being changed.
Index index = 2;
}
// The time this operation started.
google.protobuf.Timestamp start_time = 1;
// The time this operation completed. Will be unset if operation still in
// progress.
google.protobuf.Timestamp end_time = 2;
// The field resource that this operation is acting on. For example:
// `projects/{project_id}/databases/{database_id}/collectionGroups/{collection_id}/fields/{field_path}`
string field = 3;
// A list of [IndexConfigDelta][google.firestore.admin.v1.FieldOperationMetadata.IndexConfigDelta], which describe the intent of this
// operation.
repeated IndexConfigDelta index_config_deltas = 4;
// The state of the operation.
OperationState state = 5;
// The progress, in documents, of this operation.
Progress progress_documents = 6;
// The progress, in bytes, of this operation.
Progress progress_bytes = 7;
}
// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
// [FirestoreAdmin.ExportDocuments][google.firestore.admin.v1.FirestoreAdmin.ExportDocuments].
message ExportDocumentsMetadata {
// The time this operation started.
google.protobuf.Timestamp start_time = 1;
// The time this operation completed. Will be unset if operation still in
// progress.
google.protobuf.Timestamp end_time = 2;
// The state of the export operation.
OperationState operation_state = 3;
// The progress, in documents, of this operation.
Progress progress_documents = 4;
// The progress, in bytes, of this operation.
Progress progress_bytes = 5;
// Which collection ids are being exported.
repeated string collection_ids = 6;
// Where the entities are being exported to.
string output_uri_prefix = 7;
}
// Metadata for [google.longrunning.Operation][google.longrunning.Operation] results from
// [FirestoreAdmin.ImportDocuments][google.firestore.admin.v1.FirestoreAdmin.ImportDocuments].
message ImportDocumentsMetadata {
// The time this operation started.
google.protobuf.Timestamp start_time = 1;
// The time this operation completed. Will be unset if operation still in
// progress.
google.protobuf.Timestamp end_time = 2;
// The state of the import operation.
OperationState operation_state = 3;
// The progress, in documents, of this operation.
Progress progress_documents = 4;
// The progress, in bytes, of this operation.
Progress progress_bytes = 5;
// Which collection ids are being imported.
repeated string collection_ids = 6;
// The location of the documents being imported.
string input_uri_prefix = 7;
}
// Returned in the [google.longrunning.Operation][google.longrunning.Operation] response field.
message ExportDocumentsResponse {
// Location of the output files. This can be used to begin an import
// into Cloud Firestore (this project or another project) after the operation
// completes successfully.
string output_uri_prefix = 1;
}
// Describes the state of the operation.
enum OperationState {
// Unspecified.
OPERATION_STATE_UNSPECIFIED = 0;
// Request is being prepared for processing.
INITIALIZING = 1;
// Request is actively being processed.
PROCESSING = 2;
// Request is in the process of being cancelled after user called
// google.longrunning.Operations.CancelOperation on the operation.
CANCELLING = 3;
// Request has been processed and is in its finalization stage.
FINALIZING = 4;
// Request has completed successfully.
SUCCESSFUL = 5;
// Request has finished being processed, but encountered an error.
FAILED = 6;
// Request has finished being cancelled after user called
// google.longrunning.Operations.CancelOperation.
CANCELLED = 7;
}
// Describes the progress of the operation.
// Unit of work is generic and must be interpreted based on where [Progress][google.firestore.admin.v1.Progress]
// is used.
message Progress {
// The amount of work estimated.
int64 estimated_work = 1;
// The amount of work completed.
int64 completed_work = 2;
}