aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Protos/objc/google/firestore/v1beta1/Firestore.pbobjc.h
blob: 11f55a9c0043d35b781f6a47407258347e06268e (plain)
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
/*
 * Copyright 2017 Google
 *
 * 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.
 */

// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/firestore/v1beta1/firestore.proto

// This CPP symbol can be defined to use imports that match up to the framework
// imports needed when using CocoaPods.
#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
 #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
#endif

#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
 #import <Protobuf/GPBProtocolBuffers.h>
#else
 #import "GPBProtocolBuffers.h"
#endif

#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
#endif
#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
#endif

// @@protoc_insertion_point(imports)

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"

CF_EXTERN_C_BEGIN

@class GCFSDocument;
@class GCFSDocumentChange;
@class GCFSDocumentDelete;
@class GCFSDocumentMask;
@class GCFSDocumentRemove;
@class GCFSExistenceFilter;
@class GCFSPrecondition;
@class GCFSStructuredQuery;
@class GCFSTarget;
@class GCFSTargetChange;
@class GCFSTarget_DocumentsTarget;
@class GCFSTarget_QueryTarget;
@class GCFSTransactionOptions;
@class GCFSWrite;
@class GCFSWriteResult;
@class GPBTimestamp;
@class RPCStatus;

NS_ASSUME_NONNULL_BEGIN

#pragma mark - Enum GCFSTargetChange_TargetChangeType

/** The type of change. */
typedef GPB_ENUM(GCFSTargetChange_TargetChangeType) {
  /**
   * Value used if any message's field encounters a value that is not defined
   * by this enum. The message will also have C functions to get/set the rawValue
   * of the field.
   **/
  GCFSTargetChange_TargetChangeType_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
  /** No change has occurred. Used only to send an updated `resume_token`. */
  GCFSTargetChange_TargetChangeType_NoChange = 0,

  /** The targets have been added. */
  GCFSTargetChange_TargetChangeType_Add = 1,

  /** The targets have been removed. */
  GCFSTargetChange_TargetChangeType_Remove = 2,

  /**
   * The targets reflect all changes committed before the targets were added
   * to the stream.
   *
   * This will be sent after or with a `read_time` that is greater than or
   * equal to the time at which the targets were added.
   *
   * Listeners can wait for this change if read-after-write semantics
   * are desired.
   **/
  GCFSTargetChange_TargetChangeType_Current = 3,

  /**
   * The targets have been reset, and a new initial state for the targets
   * will be returned in subsequent changes.
   *
   * After the initial state is complete, `CURRENT` will be returned even
   * if the target was previously indicated to be `CURRENT`.
   **/
  GCFSTargetChange_TargetChangeType_Reset = 4,
};

GPBEnumDescriptor *GCFSTargetChange_TargetChangeType_EnumDescriptor(void);

/**
 * Checks to see if the given value is defined by the enum or was not known at
 * the time this source was generated.
 **/
BOOL GCFSTargetChange_TargetChangeType_IsValidValue(int32_t value);

#pragma mark - GCFSFirestoreRoot

/**
 * Exposes the extension registry for this file.
 *
 * The base class provides:
 * @code
 *   + (GPBExtensionRegistry *)extensionRegistry;
 * @endcode
 * which is a @c GPBExtensionRegistry that includes all the extensions defined by
 * this file and all files that it depends on.
 **/
@interface GCFSFirestoreRoot : GPBRootObject
@end

#pragma mark - GCFSGetDocumentRequest

typedef GPB_ENUM(GCFSGetDocumentRequest_FieldNumber) {
  GCFSGetDocumentRequest_FieldNumber_Name = 1,
  GCFSGetDocumentRequest_FieldNumber_Mask = 2,
  GCFSGetDocumentRequest_FieldNumber_Transaction = 3,
  GCFSGetDocumentRequest_FieldNumber_ReadTime = 5,
};

typedef GPB_ENUM(GCFSGetDocumentRequest_ConsistencySelector_OneOfCase) {
  GCFSGetDocumentRequest_ConsistencySelector_OneOfCase_GPBUnsetOneOfCase = 0,
  GCFSGetDocumentRequest_ConsistencySelector_OneOfCase_Transaction = 3,
  GCFSGetDocumentRequest_ConsistencySelector_OneOfCase_ReadTime = 5,
};

/**
 * The request for [Firestore.GetDocument][google.firestore.v1beta1.Firestore.GetDocument].
 **/
@interface GCFSGetDocumentRequest : GPBMessage

/**
 * The resource name of the Document to get. In the format:
 * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *name;

/**
 * The fields to return. If not set, returns all fields.
 *
 * If the document has a field that is not present in this mask, that field
 * will not be returned in the response.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentMask *mask;
/** Test to see if @c mask has been set. */
@property(nonatomic, readwrite) BOOL hasMask;

/**
 * The consistency mode for this transaction.
 * If not set, defaults to strong consistency.
 **/
@property(nonatomic, readonly) GCFSGetDocumentRequest_ConsistencySelector_OneOfCase consistencySelectorOneOfCase;

/** Reads the document in a transaction. */
@property(nonatomic, readwrite, copy, null_resettable) NSData *transaction;

/**
 * Reads the version of the document at the given time.
 * This may not be older than 60 seconds.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;

@end

/**
 * Clears whatever value was set for the oneof 'consistencySelector'.
 **/
void GCFSGetDocumentRequest_ClearConsistencySelectorOneOfCase(GCFSGetDocumentRequest *message);

#pragma mark - GCFSListDocumentsRequest

typedef GPB_ENUM(GCFSListDocumentsRequest_FieldNumber) {
  GCFSListDocumentsRequest_FieldNumber_Parent = 1,
  GCFSListDocumentsRequest_FieldNumber_CollectionId = 2,
  GCFSListDocumentsRequest_FieldNumber_PageSize = 3,
  GCFSListDocumentsRequest_FieldNumber_PageToken = 4,
  GCFSListDocumentsRequest_FieldNumber_OrderBy = 6,
  GCFSListDocumentsRequest_FieldNumber_Mask = 7,
  GCFSListDocumentsRequest_FieldNumber_Transaction = 8,
  GCFSListDocumentsRequest_FieldNumber_ReadTime = 10,
  GCFSListDocumentsRequest_FieldNumber_ShowMissing = 12,
};

typedef GPB_ENUM(GCFSListDocumentsRequest_ConsistencySelector_OneOfCase) {
  GCFSListDocumentsRequest_ConsistencySelector_OneOfCase_GPBUnsetOneOfCase = 0,
  GCFSListDocumentsRequest_ConsistencySelector_OneOfCase_Transaction = 8,
  GCFSListDocumentsRequest_ConsistencySelector_OneOfCase_ReadTime = 10,
};

/**
 * The request for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments].
 **/
@interface GCFSListDocumentsRequest : GPBMessage

/**
 * The parent resource name. In the format:
 * `projects/{project_id}/databases/{database_id}/documents` or
 * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
 * For example:
 * `projects/my-project/databases/my-database/documents` or
 * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *parent;

/**
 * The collection ID, relative to `parent`, to list. For example: `chatrooms`
 * or `messages`.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *collectionId;

/** The maximum number of documents to return. */
@property(nonatomic, readwrite) int32_t pageSize;

/** The `next_page_token` value returned from a previous List request, if any. */
@property(nonatomic, readwrite, copy, null_resettable) NSString *pageToken;

/** The order to sort results by. For example: `priority desc, name`. */
@property(nonatomic, readwrite, copy, null_resettable) NSString *orderBy;

/**
 * The fields to return. If not set, returns all fields.
 *
 * If a document has a field that is not present in this mask, that field
 * will not be returned in the response.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentMask *mask;
/** Test to see if @c mask has been set. */
@property(nonatomic, readwrite) BOOL hasMask;

/**
 * The consistency mode for this transaction.
 * If not set, defaults to strong consistency.
 **/
@property(nonatomic, readonly) GCFSListDocumentsRequest_ConsistencySelector_OneOfCase consistencySelectorOneOfCase;

/** Reads documents in a transaction. */
@property(nonatomic, readwrite, copy, null_resettable) NSData *transaction;

/**
 * Reads documents as they were at the given time.
 * This may not be older than 60 seconds.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;

/**
 * If the list should show missing documents. A missing document is a
 * document that does not exist but has sub-documents. These documents will
 * be returned with a key but will not have fields, [Document.create_time][google.firestore.v1beta1.Document.create_time],
 * or [Document.update_time][google.firestore.v1beta1.Document.update_time] set.
 *
 * Requests with `show_missing` may not specify `where` or
 * `order_by`.
 **/
@property(nonatomic, readwrite) BOOL showMissing;

@end

/**
 * Clears whatever value was set for the oneof 'consistencySelector'.
 **/
void GCFSListDocumentsRequest_ClearConsistencySelectorOneOfCase(GCFSListDocumentsRequest *message);

#pragma mark - GCFSListDocumentsResponse

typedef GPB_ENUM(GCFSListDocumentsResponse_FieldNumber) {
  GCFSListDocumentsResponse_FieldNumber_DocumentsArray = 1,
  GCFSListDocumentsResponse_FieldNumber_NextPageToken = 2,
};

/**
 * The response for [Firestore.ListDocuments][google.firestore.v1beta1.Firestore.ListDocuments].
 **/
@interface GCFSListDocumentsResponse : GPBMessage

/** The Documents found. */
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSDocument*> *documentsArray;
/** The number of items in @c documentsArray without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger documentsArray_Count;

/** The next page token. */
@property(nonatomic, readwrite, copy, null_resettable) NSString *nextPageToken;

@end

#pragma mark - GCFSCreateDocumentRequest

typedef GPB_ENUM(GCFSCreateDocumentRequest_FieldNumber) {
  GCFSCreateDocumentRequest_FieldNumber_Parent = 1,
  GCFSCreateDocumentRequest_FieldNumber_CollectionId = 2,
  GCFSCreateDocumentRequest_FieldNumber_DocumentId = 3,
  GCFSCreateDocumentRequest_FieldNumber_Document = 4,
  GCFSCreateDocumentRequest_FieldNumber_Mask = 5,
};

/**
 * The request for [Firestore.CreateDocument][google.firestore.v1beta1.Firestore.CreateDocument].
 **/
@interface GCFSCreateDocumentRequest : GPBMessage

/**
 * The parent resource. For example:
 * `projects/{project_id}/databases/{database_id}/documents` or
 * `projects/{project_id}/databases/{database_id}/documents/chatrooms/{chatroom_id}`
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *parent;

/** The collection ID, relative to `parent`, to list. For example: `chatrooms`. */
@property(nonatomic, readwrite, copy, null_resettable) NSString *collectionId;

/**
 * The client-assigned document ID to use for this document.
 *
 * Optional. If not specified, an ID will be assigned by the service.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *documentId;

/** The document to create. `name` must not be set. */
@property(nonatomic, readwrite, strong, null_resettable) GCFSDocument *document;
/** Test to see if @c document has been set. */
@property(nonatomic, readwrite) BOOL hasDocument;

/**
 * The fields to return. If not set, returns all fields.
 *
 * If the document has a field that is not present in this mask, that field
 * will not be returned in the response.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentMask *mask;
/** Test to see if @c mask has been set. */
@property(nonatomic, readwrite) BOOL hasMask;

@end

#pragma mark - GCFSUpdateDocumentRequest

typedef GPB_ENUM(GCFSUpdateDocumentRequest_FieldNumber) {
  GCFSUpdateDocumentRequest_FieldNumber_Document = 1,
  GCFSUpdateDocumentRequest_FieldNumber_UpdateMask = 2,
  GCFSUpdateDocumentRequest_FieldNumber_Mask = 3,
  GCFSUpdateDocumentRequest_FieldNumber_CurrentDocument = 4,
};

/**
 * The request for [Firestore.UpdateDocument][google.firestore.v1beta1.Firestore.UpdateDocument].
 **/
@interface GCFSUpdateDocumentRequest : GPBMessage

/**
 * The updated document.
 * Creates the document if it does not already exist.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSDocument *document;
/** Test to see if @c document has been set. */
@property(nonatomic, readwrite) BOOL hasDocument;

/**
 * The fields to update.
 * None of the field paths in the mask may contain a reserved name.
 *
 * If the document exists on the server and has fields not referenced in the
 * mask, they are left unchanged.
 * Fields referenced in the mask, but not present in the input document, are
 * deleted from the document on the server.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentMask *updateMask;
/** Test to see if @c updateMask has been set. */
@property(nonatomic, readwrite) BOOL hasUpdateMask;

/**
 * The fields to return. If not set, returns all fields.
 *
 * If the document has a field that is not present in this mask, that field
 * will not be returned in the response.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentMask *mask;
/** Test to see if @c mask has been set. */
@property(nonatomic, readwrite) BOOL hasMask;

/**
 * An optional precondition on the document.
 * The request will fail if this is set and not met by the target document.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSPrecondition *currentDocument;
/** Test to see if @c currentDocument has been set. */
@property(nonatomic, readwrite) BOOL hasCurrentDocument;

@end

#pragma mark - GCFSDeleteDocumentRequest

typedef GPB_ENUM(GCFSDeleteDocumentRequest_FieldNumber) {
  GCFSDeleteDocumentRequest_FieldNumber_Name = 1,
  GCFSDeleteDocumentRequest_FieldNumber_CurrentDocument = 2,
};

/**
 * The request for [Firestore.DeleteDocument][google.firestore.v1beta1.Firestore.DeleteDocument].
 **/
@interface GCFSDeleteDocumentRequest : GPBMessage

/**
 * The resource name of the Document to delete. In the format:
 * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *name;

/**
 * An optional precondition on the document.
 * The request will fail if this is set and not met by the target document.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSPrecondition *currentDocument;
/** Test to see if @c currentDocument has been set. */
@property(nonatomic, readwrite) BOOL hasCurrentDocument;

@end

#pragma mark - GCFSBatchGetDocumentsRequest

typedef GPB_ENUM(GCFSBatchGetDocumentsRequest_FieldNumber) {
  GCFSBatchGetDocumentsRequest_FieldNumber_Database = 1,
  GCFSBatchGetDocumentsRequest_FieldNumber_DocumentsArray = 2,
  GCFSBatchGetDocumentsRequest_FieldNumber_Mask = 3,
  GCFSBatchGetDocumentsRequest_FieldNumber_Transaction = 4,
  GCFSBatchGetDocumentsRequest_FieldNumber_NewTransaction = 5,
  GCFSBatchGetDocumentsRequest_FieldNumber_ReadTime = 7,
};

typedef GPB_ENUM(GCFSBatchGetDocumentsRequest_ConsistencySelector_OneOfCase) {
  GCFSBatchGetDocumentsRequest_ConsistencySelector_OneOfCase_GPBUnsetOneOfCase = 0,
  GCFSBatchGetDocumentsRequest_ConsistencySelector_OneOfCase_Transaction = 4,
  GCFSBatchGetDocumentsRequest_ConsistencySelector_OneOfCase_NewTransaction = 5,
  GCFSBatchGetDocumentsRequest_ConsistencySelector_OneOfCase_ReadTime = 7,
};

/**
 * The request for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments].
 **/
@interface GCFSBatchGetDocumentsRequest : GPBMessage

/**
 * The database name. In the format:
 * `projects/{project_id}/databases/{database_id}`.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *database;

/**
 * The names of the documents to retrieve. In the format:
 * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
 * The request will fail if any of the document is not a child resource of the
 * given `database`. Duplicate names will be elided.
 **/
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *documentsArray;
/** The number of items in @c documentsArray without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger documentsArray_Count;

/**
 * The fields to return. If not set, returns all fields.
 *
 * If a document has a field that is not present in this mask, that field will
 * not be returned in the response.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentMask *mask;
/** Test to see if @c mask has been set. */
@property(nonatomic, readwrite) BOOL hasMask;

/**
 * The consistency mode for this transaction.
 * If not set, defaults to strong consistency.
 **/
@property(nonatomic, readonly) GCFSBatchGetDocumentsRequest_ConsistencySelector_OneOfCase consistencySelectorOneOfCase;

/** Reads documents in a transaction. */
@property(nonatomic, readwrite, copy, null_resettable) NSData *transaction;

/**
 * Starts a new transaction and reads the documents.
 * Defaults to a read-only transaction.
 * The new transaction ID will be returned as the first response in the
 * stream.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSTransactionOptions *newTransaction NS_RETURNS_NOT_RETAINED;

/**
 * Reads documents as they were at the given time.
 * This may not be older than 60 seconds.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;

@end

/**
 * Clears whatever value was set for the oneof 'consistencySelector'.
 **/
void GCFSBatchGetDocumentsRequest_ClearConsistencySelectorOneOfCase(GCFSBatchGetDocumentsRequest *message);

#pragma mark - GCFSBatchGetDocumentsResponse

typedef GPB_ENUM(GCFSBatchGetDocumentsResponse_FieldNumber) {
  GCFSBatchGetDocumentsResponse_FieldNumber_Found = 1,
  GCFSBatchGetDocumentsResponse_FieldNumber_Missing = 2,
  GCFSBatchGetDocumentsResponse_FieldNumber_Transaction = 3,
  GCFSBatchGetDocumentsResponse_FieldNumber_ReadTime = 4,
};

typedef GPB_ENUM(GCFSBatchGetDocumentsResponse_Result_OneOfCase) {
  GCFSBatchGetDocumentsResponse_Result_OneOfCase_GPBUnsetOneOfCase = 0,
  GCFSBatchGetDocumentsResponse_Result_OneOfCase_Found = 1,
  GCFSBatchGetDocumentsResponse_Result_OneOfCase_Missing = 2,
};

/**
 * The streamed response for [Firestore.BatchGetDocuments][google.firestore.v1beta1.Firestore.BatchGetDocuments].
 **/
@interface GCFSBatchGetDocumentsResponse : GPBMessage

/**
 * A single result.
 * This can be empty if the server is just returning a transaction.
 **/
@property(nonatomic, readonly) GCFSBatchGetDocumentsResponse_Result_OneOfCase resultOneOfCase;

/** A document that was requested. */
@property(nonatomic, readwrite, strong, null_resettable) GCFSDocument *found;

/**
 * A document name that was requested but does not exist. In the format:
 * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *missing;

/**
 * The transaction that was started as part of this request.
 * Will only be set in the first response, and only if
 * [BatchGetDocumentsRequest.new_transaction][google.firestore.v1beta1.BatchGetDocumentsRequest.new_transaction] was set in the request.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSData *transaction;

/**
 * The time at which the document was read.
 * This may be monotically increasing, in this case the previous documents in
 * the result stream are guaranteed not to have changed between their
 * read_time and this one.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;
/** Test to see if @c readTime has been set. */
@property(nonatomic, readwrite) BOOL hasReadTime;

@end

/**
 * Clears whatever value was set for the oneof 'result'.
 **/
void GCFSBatchGetDocumentsResponse_ClearResultOneOfCase(GCFSBatchGetDocumentsResponse *message);

#pragma mark - GCFSBeginTransactionRequest

typedef GPB_ENUM(GCFSBeginTransactionRequest_FieldNumber) {
  GCFSBeginTransactionRequest_FieldNumber_Database = 1,
  GCFSBeginTransactionRequest_FieldNumber_Options = 2,
};

/**
 * The request for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction].
 **/
@interface GCFSBeginTransactionRequest : GPBMessage

/**
 * The database name. In the format:
 * `projects/{project_id}/databases/{database_id}`.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *database;

/**
 * The options for the transaction.
 * Defaults to a read-write transaction.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSTransactionOptions *options;
/** Test to see if @c options has been set. */
@property(nonatomic, readwrite) BOOL hasOptions;

@end

#pragma mark - GCFSBeginTransactionResponse

typedef GPB_ENUM(GCFSBeginTransactionResponse_FieldNumber) {
  GCFSBeginTransactionResponse_FieldNumber_Transaction = 1,
};

/**
 * The response for [Firestore.BeginTransaction][google.firestore.v1beta1.Firestore.BeginTransaction].
 **/
@interface GCFSBeginTransactionResponse : GPBMessage

/** The transaction that was started. */
@property(nonatomic, readwrite, copy, null_resettable) NSData *transaction;

@end

#pragma mark - GCFSCommitRequest

typedef GPB_ENUM(GCFSCommitRequest_FieldNumber) {
  GCFSCommitRequest_FieldNumber_Database = 1,
  GCFSCommitRequest_FieldNumber_WritesArray = 2,
  GCFSCommitRequest_FieldNumber_Transaction = 3,
};

/**
 * The request for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit].
 **/
@interface GCFSCommitRequest : GPBMessage

/**
 * The database name. In the format:
 * `projects/{project_id}/databases/{database_id}`.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *database;

/**
 * The writes to apply.
 *
 * Always executed atomically and in order.
 **/
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSWrite*> *writesArray;
/** The number of items in @c writesArray without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger writesArray_Count;

/** If set, applies all writes in this transaction, and commits it. */
@property(nonatomic, readwrite, copy, null_resettable) NSData *transaction;

@end

#pragma mark - GCFSCommitResponse

typedef GPB_ENUM(GCFSCommitResponse_FieldNumber) {
  GCFSCommitResponse_FieldNumber_WriteResultsArray = 1,
  GCFSCommitResponse_FieldNumber_CommitTime = 2,
};

/**
 * The response for [Firestore.Commit][google.firestore.v1beta1.Firestore.Commit].
 **/
@interface GCFSCommitResponse : GPBMessage

/**
 * The result of applying the writes.
 *
 * This i-th write result corresponds to the i-th write in the
 * request.
 **/
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSWriteResult*> *writeResultsArray;
/** The number of items in @c writeResultsArray without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger writeResultsArray_Count;

/** The time at which the commit occurred. */
@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *commitTime;
/** Test to see if @c commitTime has been set. */
@property(nonatomic, readwrite) BOOL hasCommitTime;

@end

#pragma mark - GCFSRollbackRequest

typedef GPB_ENUM(GCFSRollbackRequest_FieldNumber) {
  GCFSRollbackRequest_FieldNumber_Database = 1,
  GCFSRollbackRequest_FieldNumber_Transaction = 2,
};

/**
 * The request for [Firestore.Rollback][google.firestore.v1beta1.Firestore.Rollback].
 **/
@interface GCFSRollbackRequest : GPBMessage

/**
 * The database name. In the format:
 * `projects/{project_id}/databases/{database_id}`.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *database;

/** The transaction to roll back. */
@property(nonatomic, readwrite, copy, null_resettable) NSData *transaction;

@end

#pragma mark - GCFSRunQueryRequest

typedef GPB_ENUM(GCFSRunQueryRequest_FieldNumber) {
  GCFSRunQueryRequest_FieldNumber_Parent = 1,
  GCFSRunQueryRequest_FieldNumber_StructuredQuery = 2,
  GCFSRunQueryRequest_FieldNumber_Transaction = 5,
  GCFSRunQueryRequest_FieldNumber_NewTransaction = 6,
  GCFSRunQueryRequest_FieldNumber_ReadTime = 7,
};

typedef GPB_ENUM(GCFSRunQueryRequest_QueryType_OneOfCase) {
  GCFSRunQueryRequest_QueryType_OneOfCase_GPBUnsetOneOfCase = 0,
  GCFSRunQueryRequest_QueryType_OneOfCase_StructuredQuery = 2,
};

typedef GPB_ENUM(GCFSRunQueryRequest_ConsistencySelector_OneOfCase) {
  GCFSRunQueryRequest_ConsistencySelector_OneOfCase_GPBUnsetOneOfCase = 0,
  GCFSRunQueryRequest_ConsistencySelector_OneOfCase_Transaction = 5,
  GCFSRunQueryRequest_ConsistencySelector_OneOfCase_NewTransaction = 6,
  GCFSRunQueryRequest_ConsistencySelector_OneOfCase_ReadTime = 7,
};

/**
 * The request for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery].
 **/
@interface GCFSRunQueryRequest : GPBMessage

/**
 * The parent resource name. In the format:
 * `projects/{project_id}/databases/{database_id}/documents` or
 * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
 * For example:
 * `projects/my-project/databases/my-database/documents` or
 * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *parent;

/** The query to run. */
@property(nonatomic, readonly) GCFSRunQueryRequest_QueryType_OneOfCase queryTypeOneOfCase;

/** A structured query. */
@property(nonatomic, readwrite, strong, null_resettable) GCFSStructuredQuery *structuredQuery;

/**
 * The consistency mode for this transaction.
 * If not set, defaults to strong consistency.
 **/
@property(nonatomic, readonly) GCFSRunQueryRequest_ConsistencySelector_OneOfCase consistencySelectorOneOfCase;

/** Reads documents in a transaction. */
@property(nonatomic, readwrite, copy, null_resettable) NSData *transaction;

/**
 * Starts a new transaction and reads the documents.
 * Defaults to a read-only transaction.
 * The new transaction ID will be returned as the first response in the
 * stream.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSTransactionOptions *newTransaction NS_RETURNS_NOT_RETAINED;

/**
 * Reads documents as they were at the given time.
 * This may not be older than 60 seconds.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;

@end

/**
 * Clears whatever value was set for the oneof 'queryType'.
 **/
void GCFSRunQueryRequest_ClearQueryTypeOneOfCase(GCFSRunQueryRequest *message);
/**
 * Clears whatever value was set for the oneof 'consistencySelector'.
 **/
void GCFSRunQueryRequest_ClearConsistencySelectorOneOfCase(GCFSRunQueryRequest *message);

#pragma mark - GCFSRunQueryResponse

typedef GPB_ENUM(GCFSRunQueryResponse_FieldNumber) {
  GCFSRunQueryResponse_FieldNumber_Document = 1,
  GCFSRunQueryResponse_FieldNumber_Transaction = 2,
  GCFSRunQueryResponse_FieldNumber_ReadTime = 3,
  GCFSRunQueryResponse_FieldNumber_SkippedResults = 4,
};

/**
 * The response for [Firestore.RunQuery][google.firestore.v1beta1.Firestore.RunQuery].
 **/
@interface GCFSRunQueryResponse : GPBMessage

/**
 * The transaction that was started as part of this request.
 * Can only be set in the first response, and only if
 * [RunQueryRequest.new_transaction][google.firestore.v1beta1.RunQueryRequest.new_transaction] was set in the request.
 * If set, no other fields will be set in this response.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSData *transaction;

/**
 * A query result.
 * Not set when reporting partial progress.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSDocument *document;
/** Test to see if @c document has been set. */
@property(nonatomic, readwrite) BOOL hasDocument;

/**
 * The time at which the document was read. This may be monotonically
 * increasing; in this case, the previous documents in the result stream are
 * guaranteed not to have changed between their `read_time` and this one.
 *
 * If the query returns no results, a response with `read_time` and no
 * `document` will be sent, and this represents the time at which the query
 * was run.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;
/** Test to see if @c readTime has been set. */
@property(nonatomic, readwrite) BOOL hasReadTime;

/**
 * The number of results that have been skipped due to an offset between
 * the last response and the current response.
 **/
@property(nonatomic, readwrite) int32_t skippedResults;

@end

#pragma mark - GCFSWriteRequest

typedef GPB_ENUM(GCFSWriteRequest_FieldNumber) {
  GCFSWriteRequest_FieldNumber_Database = 1,
  GCFSWriteRequest_FieldNumber_StreamId = 2,
  GCFSWriteRequest_FieldNumber_WritesArray = 3,
  GCFSWriteRequest_FieldNumber_StreamToken = 4,
  GCFSWriteRequest_FieldNumber_Labels = 5,
};

/**
 * The request for [Firestore.Write][google.firestore.v1beta1.Firestore.Write].
 *
 * The first request creates a stream, or resumes an existing one from a token.
 *
 * When creating a new stream, the server replies with a response containing
 * only an ID and a token, to use in the next request.
 *
 * When resuming a stream, the server first streams any responses later than the
 * given token, then a response containing only an up-to-date token, to use in
 * the next request.
 **/
@interface GCFSWriteRequest : GPBMessage

/**
 * The database name. In the format:
 * `projects/{project_id}/databases/{database_id}`.
 * This is only required in the first message.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *database;

/**
 * The ID of the write stream to resume.
 * This may only be set in the first message. When left empty, a new write
 * stream will be created.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *streamId;

/**
 * The writes to apply.
 *
 * Always executed atomically and in order.
 * This must be empty on the first request.
 * This may be empty on the last request.
 * This must not be empty on all other requests.
 **/
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSWrite*> *writesArray;
/** The number of items in @c writesArray without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger writesArray_Count;

/**
 * A stream token that was previously sent by the server.
 *
 * The client should set this field to the token from the most recent
 * [WriteResponse][google.firestore.v1beta1.WriteResponse] it has received. This acknowledges that the client has
 * received responses up to this token. After sending this token, earlier
 * tokens may not be used anymore.
 *
 * The server may close the stream if there are too many unacknowledged
 * responses.
 *
 * Leave this field unset when creating a new stream. To resume a stream at
 * a specific point, set this field and the `stream_id` field.
 *
 * Leave this field unset when creating a new stream.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSData *streamToken;

/** Labels associated with this write request. */
@property(nonatomic, readwrite, strong, null_resettable) NSMutableDictionary<NSString*, NSString*> *labels;
/** The number of items in @c labels without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger labels_Count;

@end

#pragma mark - GCFSWriteResponse

typedef GPB_ENUM(GCFSWriteResponse_FieldNumber) {
  GCFSWriteResponse_FieldNumber_StreamId = 1,
  GCFSWriteResponse_FieldNumber_StreamToken = 2,
  GCFSWriteResponse_FieldNumber_WriteResultsArray = 3,
  GCFSWriteResponse_FieldNumber_CommitTime = 4,
};

/**
 * The response for [Firestore.Write][google.firestore.v1beta1.Firestore.Write].
 **/
@interface GCFSWriteResponse : GPBMessage

/**
 * The ID of the stream.
 * Only set on the first message, when a new stream was created.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *streamId;

/**
 * A token that represents the position of this response in the stream.
 * This can be used by a client to resume the stream at this point.
 *
 * This field is always set.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSData *streamToken;

/**
 * The result of applying the writes.
 *
 * This i-th write result corresponds to the i-th write in the
 * request.
 **/
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSWriteResult*> *writeResultsArray;
/** The number of items in @c writeResultsArray without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger writeResultsArray_Count;

/** The time at which the commit occurred. */
@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *commitTime;
/** Test to see if @c commitTime has been set. */
@property(nonatomic, readwrite) BOOL hasCommitTime;

@end

#pragma mark - GCFSListenRequest

typedef GPB_ENUM(GCFSListenRequest_FieldNumber) {
  GCFSListenRequest_FieldNumber_Database = 1,
  GCFSListenRequest_FieldNumber_AddTarget = 2,
  GCFSListenRequest_FieldNumber_RemoveTarget = 3,
  GCFSListenRequest_FieldNumber_Labels = 4,
};

typedef GPB_ENUM(GCFSListenRequest_TargetChange_OneOfCase) {
  GCFSListenRequest_TargetChange_OneOfCase_GPBUnsetOneOfCase = 0,
  GCFSListenRequest_TargetChange_OneOfCase_AddTarget = 2,
  GCFSListenRequest_TargetChange_OneOfCase_RemoveTarget = 3,
};

/**
 * A request for [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen]
 **/
@interface GCFSListenRequest : GPBMessage

/**
 * The database name. In the format:
 * `projects/{project_id}/databases/{database_id}`.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *database;

/** The supported target changes. */
@property(nonatomic, readonly) GCFSListenRequest_TargetChange_OneOfCase targetChangeOneOfCase;

/** A target to add to this stream. */
@property(nonatomic, readwrite, strong, null_resettable) GCFSTarget *addTarget;

/** The ID of a target to remove from this stream. */
@property(nonatomic, readwrite) int32_t removeTarget;

/** Labels associated with this target change. */
@property(nonatomic, readwrite, strong, null_resettable) NSMutableDictionary<NSString*, NSString*> *labels;
/** The number of items in @c labels without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger labels_Count;

@end

/**
 * Clears whatever value was set for the oneof 'targetChange'.
 **/
void GCFSListenRequest_ClearTargetChangeOneOfCase(GCFSListenRequest *message);

#pragma mark - GCFSListenResponse

typedef GPB_ENUM(GCFSListenResponse_FieldNumber) {
  GCFSListenResponse_FieldNumber_TargetChange = 2,
  GCFSListenResponse_FieldNumber_DocumentChange = 3,
  GCFSListenResponse_FieldNumber_DocumentDelete = 4,
  GCFSListenResponse_FieldNumber_Filter = 5,
  GCFSListenResponse_FieldNumber_DocumentRemove = 6,
};

typedef GPB_ENUM(GCFSListenResponse_ResponseType_OneOfCase) {
  GCFSListenResponse_ResponseType_OneOfCase_GPBUnsetOneOfCase = 0,
  GCFSListenResponse_ResponseType_OneOfCase_TargetChange = 2,
  GCFSListenResponse_ResponseType_OneOfCase_DocumentChange = 3,
  GCFSListenResponse_ResponseType_OneOfCase_DocumentDelete = 4,
  GCFSListenResponse_ResponseType_OneOfCase_DocumentRemove = 6,
  GCFSListenResponse_ResponseType_OneOfCase_Filter = 5,
};

/**
 * The response for [Firestore.Listen][google.firestore.v1beta1.Firestore.Listen].
 **/
@interface GCFSListenResponse : GPBMessage

/** The supported responses. */
@property(nonatomic, readonly) GCFSListenResponse_ResponseType_OneOfCase responseTypeOneOfCase;

/** Targets have changed. */
@property(nonatomic, readwrite, strong, null_resettable) GCFSTargetChange *targetChange;

/** A [Document][google.firestore.v1beta1.Document] has changed. */
@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentChange *documentChange;

/** A [Document][google.firestore.v1beta1.Document] has been deleted. */
@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentDelete *documentDelete;

/**
 * A [Document][google.firestore.v1beta1.Document] has been removed from a target (because it is no longer
 * relevant to that target).
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentRemove *documentRemove;

/**
 * A filter to apply to the set of documents previously returned for the
 * given target.
 *
 * Returned when documents may have been removed from the given target, but
 * the exact documents are unknown.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSExistenceFilter *filter;

@end

/**
 * Clears whatever value was set for the oneof 'responseType'.
 **/
void GCFSListenResponse_ClearResponseTypeOneOfCase(GCFSListenResponse *message);

#pragma mark - GCFSTarget

typedef GPB_ENUM(GCFSTarget_FieldNumber) {
  GCFSTarget_FieldNumber_Query = 2,
  GCFSTarget_FieldNumber_Documents = 3,
  GCFSTarget_FieldNumber_ResumeToken = 4,
  GCFSTarget_FieldNumber_TargetId = 5,
  GCFSTarget_FieldNumber_Once = 6,
  GCFSTarget_FieldNumber_ReadTime = 11,
};

typedef GPB_ENUM(GCFSTarget_TargetType_OneOfCase) {
  GCFSTarget_TargetType_OneOfCase_GPBUnsetOneOfCase = 0,
  GCFSTarget_TargetType_OneOfCase_Query = 2,
  GCFSTarget_TargetType_OneOfCase_Documents = 3,
};

typedef GPB_ENUM(GCFSTarget_ResumeType_OneOfCase) {
  GCFSTarget_ResumeType_OneOfCase_GPBUnsetOneOfCase = 0,
  GCFSTarget_ResumeType_OneOfCase_ResumeToken = 4,
  GCFSTarget_ResumeType_OneOfCase_ReadTime = 11,
};

/**
 * A specification of a set of documents to listen to.
 **/
@interface GCFSTarget : GPBMessage

/** The type of target to listen to. */
@property(nonatomic, readonly) GCFSTarget_TargetType_OneOfCase targetTypeOneOfCase;

/** A target specified by a query. */
@property(nonatomic, readwrite, strong, null_resettable) GCFSTarget_QueryTarget *query;

/** A target specified by a set of document names. */
@property(nonatomic, readwrite, strong, null_resettable) GCFSTarget_DocumentsTarget *documents;

/**
 * When to start listening.
 *
 * If not specified, all matching Documents are returned before any
 * subsequent changes.
 **/
@property(nonatomic, readonly) GCFSTarget_ResumeType_OneOfCase resumeTypeOneOfCase;

/**
 * A resume token from a prior [TargetChange][google.firestore.v1beta1.TargetChange] for an identical target.
 *
 * Using a resume token with a different target is unsupported and may fail.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSData *resumeToken;

/**
 * Start listening after a specific `read_time`.
 *
 * The client must know the state of matching documents at this time.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;

/**
 * A client provided target ID.
 *
 * If not set, the server will assign an ID for the target.
 *
 * Used for resuming a target without changing IDs. The IDs can either be
 * client-assigned or be server-assigned in a previous stream. All targets
 * with client provided IDs must be added before adding a target that needs
 * a server-assigned id.
 **/
@property(nonatomic, readwrite) int32_t targetId;

/** If the target should be removed once it is current and consistent. */
@property(nonatomic, readwrite) BOOL once;

@end

/**
 * Clears whatever value was set for the oneof 'targetType'.
 **/
void GCFSTarget_ClearTargetTypeOneOfCase(GCFSTarget *message);
/**
 * Clears whatever value was set for the oneof 'resumeType'.
 **/
void GCFSTarget_ClearResumeTypeOneOfCase(GCFSTarget *message);

#pragma mark - GCFSTarget_DocumentsTarget

typedef GPB_ENUM(GCFSTarget_DocumentsTarget_FieldNumber) {
  GCFSTarget_DocumentsTarget_FieldNumber_DocumentsArray = 2,
};

/**
 * A target specified by a set of documents names.
 **/
@interface GCFSTarget_DocumentsTarget : GPBMessage

/**
 * The names of the documents to retrieve. In the format:
 * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
 * The request will fail if any of the document is not a child resource of
 * the given `database`. Duplicate names will be elided.
 **/
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *documentsArray;
/** The number of items in @c documentsArray without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger documentsArray_Count;

@end

#pragma mark - GCFSTarget_QueryTarget

typedef GPB_ENUM(GCFSTarget_QueryTarget_FieldNumber) {
  GCFSTarget_QueryTarget_FieldNumber_Parent = 1,
  GCFSTarget_QueryTarget_FieldNumber_StructuredQuery = 2,
};

typedef GPB_ENUM(GCFSTarget_QueryTarget_QueryType_OneOfCase) {
  GCFSTarget_QueryTarget_QueryType_OneOfCase_GPBUnsetOneOfCase = 0,
  GCFSTarget_QueryTarget_QueryType_OneOfCase_StructuredQuery = 2,
};

/**
 * A target specified by a query.
 **/
@interface GCFSTarget_QueryTarget : GPBMessage

/**
 * The parent resource name. In the format:
 * `projects/{project_id}/databases/{database_id}/documents` or
 * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
 * For example:
 * `projects/my-project/databases/my-database/documents` or
 * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *parent;

/** The query to run. */
@property(nonatomic, readonly) GCFSTarget_QueryTarget_QueryType_OneOfCase queryTypeOneOfCase;

/** A structured query. */
@property(nonatomic, readwrite, strong, null_resettable) GCFSStructuredQuery *structuredQuery;

@end

/**
 * Clears whatever value was set for the oneof 'queryType'.
 **/
void GCFSTarget_QueryTarget_ClearQueryTypeOneOfCase(GCFSTarget_QueryTarget *message);

#pragma mark - GCFSTargetChange

typedef GPB_ENUM(GCFSTargetChange_FieldNumber) {
  GCFSTargetChange_FieldNumber_TargetChangeType = 1,
  GCFSTargetChange_FieldNumber_TargetIdsArray = 2,
  GCFSTargetChange_FieldNumber_Cause = 3,
  GCFSTargetChange_FieldNumber_ResumeToken = 4,
  GCFSTargetChange_FieldNumber_ReadTime = 6,
};

/**
 * Targets being watched have changed.
 **/
@interface GCFSTargetChange : GPBMessage

/** The type of change that occurred. */
@property(nonatomic, readwrite) GCFSTargetChange_TargetChangeType targetChangeType;

/**
 * The target IDs of targets that have changed.
 *
 * If empty, the change applies to all targets.
 *
 * For `target_change_type=ADD`, the order of the target IDs matches the order
 * of the requests to add the targets. This allows clients to unambiguously
 * associate server-assigned target IDs with added targets.
 *
 * For other states, the order of the target IDs is not defined.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *targetIdsArray;
/** The number of items in @c targetIdsArray without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger targetIdsArray_Count;

/** The error that resulted in this change, if applicable. */
@property(nonatomic, readwrite, strong, null_resettable) RPCStatus *cause;
/** Test to see if @c cause has been set. */
@property(nonatomic, readwrite) BOOL hasCause;

/**
 * A token that can be used to resume the stream for the given `target_ids`,
 * or all targets if `target_ids` is empty.
 *
 * Not set on every target change.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSData *resumeToken;

/**
 * The consistent `read_time` for the given `target_ids` (omitted when the
 * target_ids are not at a consistent snapshot).
 *
 * The stream is guaranteed to send a `read_time` with `target_ids` empty
 * whenever the entire stream reaches a new consistent snapshot. ADD,
 * CURRENT, and RESET messages are guaranteed to (eventually) result in a
 * new consistent snapshot (while NO_CHANGE and REMOVE messages are not).
 *
 * For a given stream, `read_time` is guaranteed to be monotonically
 * increasing.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;
/** Test to see if @c readTime has been set. */
@property(nonatomic, readwrite) BOOL hasReadTime;

@end

/**
 * Fetches the raw value of a @c GCFSTargetChange's @c targetChangeType property, even
 * if the value was not defined by the enum at the time the code was generated.
 **/
int32_t GCFSTargetChange_TargetChangeType_RawValue(GCFSTargetChange *message);
/**
 * Sets the raw value of an @c GCFSTargetChange's @c targetChangeType property, allowing
 * it to be set to a value that was not defined by the enum at the time the code
 * was generated.
 **/
void SetGCFSTargetChange_TargetChangeType_RawValue(GCFSTargetChange *message, int32_t value);

#pragma mark - GCFSListCollectionIdsRequest

typedef GPB_ENUM(GCFSListCollectionIdsRequest_FieldNumber) {
  GCFSListCollectionIdsRequest_FieldNumber_Parent = 1,
  GCFSListCollectionIdsRequest_FieldNumber_PageSize = 2,
  GCFSListCollectionIdsRequest_FieldNumber_PageToken = 3,
};

/**
 * The request for [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds].
 **/
@interface GCFSListCollectionIdsRequest : GPBMessage

/**
 * The parent document. In the format:
 * `projects/{project_id}/databases/{database_id}/documents/{document_path}`.
 * For example:
 * `projects/my-project/databases/my-database/documents/chatrooms/my-chatroom`
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *parent;

/** The maximum number of results to return. */
@property(nonatomic, readwrite) int32_t pageSize;

/**
 * A page token. Must be a value from
 * [ListCollectionIdsResponse][google.firestore.v1beta1.ListCollectionIdsResponse].
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *pageToken;

@end

#pragma mark - GCFSListCollectionIdsResponse

typedef GPB_ENUM(GCFSListCollectionIdsResponse_FieldNumber) {
  GCFSListCollectionIdsResponse_FieldNumber_CollectionIdsArray = 1,
  GCFSListCollectionIdsResponse_FieldNumber_NextPageToken = 2,
};

/**
 * The response from [Firestore.ListCollectionIds][google.firestore.v1beta1.Firestore.ListCollectionIds].
 **/
@interface GCFSListCollectionIdsResponse : GPBMessage

/** The collection ids. */
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<NSString*> *collectionIdsArray;
/** The number of items in @c collectionIdsArray without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger collectionIdsArray_Count;

/** A page token that may be used to continue the list. */
@property(nonatomic, readwrite, copy, null_resettable) NSString *nextPageToken;

@end

NS_ASSUME_NONNULL_END

CF_EXTERN_C_END

#pragma clang diagnostic pop

// @@protoc_insertion_point(global_scope)