aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Protos/objc/google/firestore/v1beta1/Write.pbobjc.h
blob: 539bfa31f2d826970522a77523758dca7d7e2038 (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
/*
 * 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/write.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 GCFSArrayValue;
@class GCFSDocument;
@class GCFSDocumentMask;
@class GCFSDocumentTransform;
@class GCFSDocumentTransform_FieldTransform;
@class GCFSPrecondition;
@class GCFSValue;
@class GPBTimestamp;

NS_ASSUME_NONNULL_BEGIN

#pragma mark - Enum GCFSDocumentTransform_FieldTransform_ServerValue

/** A value that is calculated by the server. */
typedef GPB_ENUM(GCFSDocumentTransform_FieldTransform_ServerValue) {
  /**
   * 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.
   **/
  GCFSDocumentTransform_FieldTransform_ServerValue_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
  /** Unspecified. This value must not be used. */
  GCFSDocumentTransform_FieldTransform_ServerValue_ServerValueUnspecified = 0,

  /**
   * The time at which the server processed the request, with millisecond
   * precision.
   **/
  GCFSDocumentTransform_FieldTransform_ServerValue_RequestTime = 1,
};

GPBEnumDescriptor *GCFSDocumentTransform_FieldTransform_ServerValue_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 GCFSDocumentTransform_FieldTransform_ServerValue_IsValidValue(int32_t value);

#pragma mark - GCFSWriteRoot

/**
 * 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 GCFSWriteRoot : GPBRootObject
@end

#pragma mark - GCFSWrite

typedef GPB_ENUM(GCFSWrite_FieldNumber) {
  GCFSWrite_FieldNumber_Update = 1,
  GCFSWrite_FieldNumber_Delete_p = 2,
  GCFSWrite_FieldNumber_UpdateMask = 3,
  GCFSWrite_FieldNumber_CurrentDocument = 4,
  GCFSWrite_FieldNumber_Transform = 6,
};

typedef GPB_ENUM(GCFSWrite_Operation_OneOfCase) {
  GCFSWrite_Operation_OneOfCase_GPBUnsetOneOfCase = 0,
  GCFSWrite_Operation_OneOfCase_Update = 1,
  GCFSWrite_Operation_OneOfCase_Delete_p = 2,
  GCFSWrite_Operation_OneOfCase_Transform = 6,
};

/**
 * A write on a document.
 **/
@interface GCFSWrite : GPBMessage

/** The operation to execute. */
@property(nonatomic, readonly) GCFSWrite_Operation_OneOfCase operationOneOfCase;

/** A document to write. */
@property(nonatomic, readwrite, strong, null_resettable) GCFSDocument *update;

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

/**
 * Applies a tranformation to a document.
 * At most one `transform` per document is allowed in a given request.
 * An `update` cannot follow a `transform` on the same document in a given
 * request.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentTransform *transform;

/**
 * The fields to update in this write.
 *
 * This field can be set only when the operation is `update`.
 * If the mask is not set for an `update` and the document exists, any
 * existing data will be overwritten.
 * If the mask is set and the document on the server has fields not covered by
 * 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.
 * The field paths in this mask must not contain a reserved field name.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSDocumentMask *updateMask;
/** Test to see if @c updateMask has been set. */
@property(nonatomic, readwrite) BOOL hasUpdateMask;

/**
 * An optional precondition on the document.
 *
 * The write 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

/**
 * Clears whatever value was set for the oneof 'operation'.
 **/
void GCFSWrite_ClearOperationOneOfCase(GCFSWrite *message);

#pragma mark - GCFSDocumentTransform

typedef GPB_ENUM(GCFSDocumentTransform_FieldNumber) {
  GCFSDocumentTransform_FieldNumber_Document = 1,
  GCFSDocumentTransform_FieldNumber_FieldTransformsArray = 2,
};

/**
 * A transformation of a document.
 **/
@interface GCFSDocumentTransform : GPBMessage

/** The name of the document to transform. */
@property(nonatomic, readwrite, copy, null_resettable) NSString *document;

/**
 * The list of transformations to apply to the fields of the document, in
 * order.
 * This must not be empty.
 **/
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSDocumentTransform_FieldTransform*> *fieldTransformsArray;
/** The number of items in @c fieldTransformsArray without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger fieldTransformsArray_Count;

@end

#pragma mark - GCFSDocumentTransform_FieldTransform

typedef GPB_ENUM(GCFSDocumentTransform_FieldTransform_FieldNumber) {
  GCFSDocumentTransform_FieldTransform_FieldNumber_FieldPath = 1,
  GCFSDocumentTransform_FieldTransform_FieldNumber_SetToServerValue = 2,
  GCFSDocumentTransform_FieldTransform_FieldNumber_AppendMissingElements = 6,
  GCFSDocumentTransform_FieldTransform_FieldNumber_RemoveAllFromArray_p = 7,
};

typedef GPB_ENUM(GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase) {
  GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase_GPBUnsetOneOfCase = 0,
  GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase_SetToServerValue = 2,
  GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase_AppendMissingElements = 6,
  GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase_RemoveAllFromArray_p = 7,
};

/**
 * A transformation of a field of the document.
 **/
@interface GCFSDocumentTransform_FieldTransform : GPBMessage

/**
 * The path of the field. See [Document.fields][google.firestore.v1beta1.Document.fields] for the field path syntax
 * reference.
 **/
@property(nonatomic, readwrite, copy, null_resettable) NSString *fieldPath;

/** The transformation to apply on the field. */
@property(nonatomic, readonly) GCFSDocumentTransform_FieldTransform_TransformType_OneOfCase transformTypeOneOfCase;

/** Sets the field to the given server value. */
@property(nonatomic, readwrite) GCFSDocumentTransform_FieldTransform_ServerValue setToServerValue;

/**
 * Append the given elements in order if they are not already present in
 * the current field value.
 * If the field is not an array, or if the field does not yet exist, it is
 * first set to the empty array.
 *
 * Equivalent numbers of different types (e.g. 3L and 3.0) are
 * considered equal when checking if a value is missing.
 * NaN is equal to NaN, and Null is equal to Null.
 * If the input contains multiple equivalent values, only the first will
 * be considered.
 *
 * The corresponding transform_result will be the null value.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSArrayValue *appendMissingElements;

/**
 * Remove all of the given elements from the array in the field.
 * If the field is not an array, or if the field does not yet exist, it is
 * set to the empty array.
 *
 * Equivalent numbers of the different types (e.g. 3L and 3.0) are
 * considered equal when deciding whether an element should be removed.
 * NaN is equal to NaN, and Null is equal to Null.
 * This will remove all equivalent values if there are duplicates.
 *
 * The corresponding transform_result will be the null value.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSArrayValue *removeAllFromArray_p;

@end

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

/**
 * Clears whatever value was set for the oneof 'transformType'.
 **/
void GCFSDocumentTransform_FieldTransform_ClearTransformTypeOneOfCase(GCFSDocumentTransform_FieldTransform *message);

#pragma mark - GCFSWriteResult

typedef GPB_ENUM(GCFSWriteResult_FieldNumber) {
  GCFSWriteResult_FieldNumber_UpdateTime = 1,
  GCFSWriteResult_FieldNumber_TransformResultsArray = 2,
};

/**
 * The result of applying a write.
 **/
@interface GCFSWriteResult : GPBMessage

/**
 * The last update time of the document after applying the write. Not set
 * after a `delete`.
 *
 * If the write did not actually change the document, this will be the
 * previous update_time.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *updateTime;
/** Test to see if @c updateTime has been set. */
@property(nonatomic, readwrite) BOOL hasUpdateTime;

/**
 * The results of applying each [DocumentTransform.FieldTransform][google.firestore.v1beta1.DocumentTransform.FieldTransform], in the
 * same order.
 **/
@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GCFSValue*> *transformResultsArray;
/** The number of items in @c transformResultsArray without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger transformResultsArray_Count;

@end

#pragma mark - GCFSDocumentChange

typedef GPB_ENUM(GCFSDocumentChange_FieldNumber) {
  GCFSDocumentChange_FieldNumber_Document = 1,
  GCFSDocumentChange_FieldNumber_TargetIdsArray = 5,
  GCFSDocumentChange_FieldNumber_RemovedTargetIdsArray = 6,
};

/**
 * A [Document][google.firestore.v1beta1.Document] has changed.
 *
 * May be the result of multiple [writes][google.firestore.v1beta1.Write], including deletes, that
 * ultimately resulted in a new value for the [Document][google.firestore.v1beta1.Document].
 *
 * Multiple [DocumentChange][google.firestore.v1beta1.DocumentChange] messages may be returned for the same logical
 * change, if multiple targets are affected.
 **/
@interface GCFSDocumentChange : GPBMessage

/**
 * The new state of the [Document][google.firestore.v1beta1.Document].
 *
 * If `mask` is set, contains only fields that were updated or added.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GCFSDocument *document;
/** Test to see if @c document has been set. */
@property(nonatomic, readwrite) BOOL hasDocument;

/** A set of target IDs of targets that match this document. */
@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;

/** A set of target IDs for targets that no longer match this document. */
@property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *removedTargetIdsArray;
/** The number of items in @c removedTargetIdsArray without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger removedTargetIdsArray_Count;

@end

#pragma mark - GCFSDocumentDelete

typedef GPB_ENUM(GCFSDocumentDelete_FieldNumber) {
  GCFSDocumentDelete_FieldNumber_Document = 1,
  GCFSDocumentDelete_FieldNumber_ReadTime = 4,
  GCFSDocumentDelete_FieldNumber_RemovedTargetIdsArray = 6,
};

/**
 * A [Document][google.firestore.v1beta1.Document] has been deleted.
 *
 * May be the result of multiple [writes][google.firestore.v1beta1.Write], including updates, the
 * last of which deleted the [Document][google.firestore.v1beta1.Document].
 *
 * Multiple [DocumentDelete][google.firestore.v1beta1.DocumentDelete] messages may be returned for the same logical
 * delete, if multiple targets are affected.
 **/
@interface GCFSDocumentDelete : GPBMessage

/** The resource name of the [Document][google.firestore.v1beta1.Document] that was deleted. */
@property(nonatomic, readwrite, copy, null_resettable) NSString *document;

/** A set of target IDs for targets that previously matched this entity. */
@property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *removedTargetIdsArray;
/** The number of items in @c removedTargetIdsArray without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger removedTargetIdsArray_Count;

/**
 * The read timestamp at which the delete was observed.
 *
 * Greater or equal to the `commit_time` of the delete.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;
/** Test to see if @c readTime has been set. */
@property(nonatomic, readwrite) BOOL hasReadTime;

@end

#pragma mark - GCFSDocumentRemove

typedef GPB_ENUM(GCFSDocumentRemove_FieldNumber) {
  GCFSDocumentRemove_FieldNumber_Document = 1,
  GCFSDocumentRemove_FieldNumber_RemovedTargetIdsArray = 2,
  GCFSDocumentRemove_FieldNumber_ReadTime = 4,
};

/**
 * A [Document][google.firestore.v1beta1.Document] has been removed from the view of the targets.
 *
 * Sent if the document is no longer relevant to a target and is out of view.
 * Can be sent instead of a DocumentDelete or a DocumentChange if the server
 * can not send the new value of the document.
 *
 * Multiple [DocumentRemove][google.firestore.v1beta1.DocumentRemove] messages may be returned for the same logical
 * write or delete, if multiple targets are affected.
 **/
@interface GCFSDocumentRemove : GPBMessage

/** The resource name of the [Document][google.firestore.v1beta1.Document] that has gone out of view. */
@property(nonatomic, readwrite, copy, null_resettable) NSString *document;

/** A set of target IDs for targets that previously matched this document. */
@property(nonatomic, readwrite, strong, null_resettable) GPBInt32Array *removedTargetIdsArray;
/** The number of items in @c removedTargetIdsArray without causing the array to be created. */
@property(nonatomic, readonly) NSUInteger removedTargetIdsArray_Count;

/**
 * The read timestamp at which the remove was observed.
 *
 * Greater or equal to the `commit_time` of the change/delete/remove.
 **/
@property(nonatomic, readwrite, strong, null_resettable) GPBTimestamp *readTime;
/** Test to see if @c readTime has been set. */
@property(nonatomic, readwrite) BOOL hasReadTime;

@end

#pragma mark - GCFSExistenceFilter

typedef GPB_ENUM(GCFSExistenceFilter_FieldNumber) {
  GCFSExistenceFilter_FieldNumber_TargetId = 1,
  GCFSExistenceFilter_FieldNumber_Count = 2,
};

/**
 * A digest of all the documents that match a given target.
 **/
@interface GCFSExistenceFilter : GPBMessage

/** The target ID to which this filter applies. */
@property(nonatomic, readwrite) int32_t targetId;

/**
 * The total count of documents that match [target_id][google.firestore.v1beta1.ExistenceFilter.target_id].
 *
 * If different from the count of documents in the client that match, the
 * client must manually determine which documents no longer match the target.
 **/
@property(nonatomic, readwrite) int32_t count;

@end

NS_ASSUME_NONNULL_END

CF_EXTERN_C_END

#pragma clang diagnostic pop

// @@protoc_insertion_point(global_scope)