aboutsummaryrefslogtreecommitdiffhomepage
path: root/Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.m
blob: 86007f0c2cfe8f1e8e19ced5a49c17aedea92545 (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
/*
 * 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/document.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_RuntimeSupport.h>
#else
 #import "GPBProtocolBuffers_RuntimeSupport.h"
#endif

#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
 #import <Protobuf/Struct.pbobjc.h>
 #import <Protobuf/Timestamp.pbobjc.h>
#else
 #import "Firestore/Protos/objc/google/protobuf/Struct.pbobjc.h"
 #import "Firestore/Protos/objc/google/protobuf/Timestamp.pbobjc.h"
#endif

 #import "Firestore/Protos/objc/google/firestore/v1beta1/Document.pbobjc.h"
 #import "Firestore/Protos/objc/google/api/Annotations.pbobjc.h"
 #import "Firestore/Protos/objc/google/type/Latlng.pbobjc.h"
// @@protoc_insertion_point(imports)

#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#pragma clang diagnostic ignored "-Wdirect-ivar-access"

#pragma mark - GCFSDocumentRoot

@implementation GCFSDocumentRoot


@end

#pragma mark - GCFSDocumentRoot_FileDescriptor

static GPBFileDescriptor *GCFSDocumentRoot_FileDescriptor(void) {
  // This is called by +initialize so there is no need to worry
  // about thread safety of the singleton.
  static GPBFileDescriptor *descriptor = NULL;
  if (!descriptor) {
    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
    descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.firestore.v1beta1"
                                                 objcPrefix:@"GCFS"
                                                     syntax:GPBFileSyntaxProto3];
  }
  return descriptor;
}

#pragma mark - GCFSDocument

@implementation GCFSDocument

@dynamic name;
@dynamic fields, fields_Count;
@dynamic hasCreateTime, createTime;
@dynamic hasUpdateTime, updateTime;

typedef struct GCFSDocument__storage_ {
  uint32_t _has_storage_[1];
  NSString *name;
  NSMutableDictionary *fields;
  GPBTimestamp *createTime;
  GPBTimestamp *updateTime;
} GCFSDocument__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    static GPBMessageFieldDescription fields[] = {
      {
        .name = "name",
        .dataTypeSpecific.className = NULL,
        .number = GCFSDocument_FieldNumber_Name,
        .hasIndex = 0,
        .offset = (uint32_t)offsetof(GCFSDocument__storage_, name),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeString,
      },
      {
        .name = "fields",
        .dataTypeSpecific.className = GPBStringifySymbol(GCFSValue),
        .number = GCFSDocument_FieldNumber_Fields,
        .hasIndex = GPBNoHasBit,
        .offset = (uint32_t)offsetof(GCFSDocument__storage_, fields),
        .flags = GPBFieldMapKeyString,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "createTime",
        .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
        .number = GCFSDocument_FieldNumber_CreateTime,
        .hasIndex = 1,
        .offset = (uint32_t)offsetof(GCFSDocument__storage_, createTime),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "updateTime",
        .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
        .number = GCFSDocument_FieldNumber_UpdateTime,
        .hasIndex = 2,
        .offset = (uint32_t)offsetof(GCFSDocument__storage_, updateTime),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:[GCFSDocument class]
                                     rootClass:[GCFSDocumentRoot class]
                                          file:GCFSDocumentRoot_FileDescriptor()
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(GCFSDocument__storage_)
                                         flags:GPBDescriptorInitializationFlag_None];
    NSAssert(descriptor == nil, @"Startup recursed!");
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

#pragma mark - GCFSValue

@implementation GCFSValue

@dynamic valueTypeOneOfCase;
@dynamic nullValue;
@dynamic booleanValue;
@dynamic integerValue;
@dynamic doubleValue;
@dynamic timestampValue;
@dynamic stringValue;
@dynamic bytesValue;
@dynamic referenceValue;
@dynamic geoPointValue;
@dynamic arrayValue;
@dynamic mapValue;

typedef struct GCFSValue__storage_ {
  uint32_t _has_storage_[2];
  GPBNullValue nullValue;
  NSString *referenceValue;
  GCFSMapValue *mapValue;
  GTPLatLng *geoPointValue;
  GCFSArrayValue *arrayValue;
  GPBTimestamp *timestampValue;
  NSString *stringValue;
  NSData *bytesValue;
  int64_t integerValue;
  double doubleValue;
} GCFSValue__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    static GPBMessageFieldDescription fields[] = {
      {
        .name = "booleanValue",
        .dataTypeSpecific.className = NULL,
        .number = GCFSValue_FieldNumber_BooleanValue,
        .hasIndex = -1,
        .offset = 0,  // Stored in _has_storage_ to save space.
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeBool,
      },
      {
        .name = "integerValue",
        .dataTypeSpecific.className = NULL,
        .number = GCFSValue_FieldNumber_IntegerValue,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(GCFSValue__storage_, integerValue),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeInt64,
      },
      {
        .name = "doubleValue",
        .dataTypeSpecific.className = NULL,
        .number = GCFSValue_FieldNumber_DoubleValue,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(GCFSValue__storage_, doubleValue),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeDouble,
      },
      {
        .name = "referenceValue",
        .dataTypeSpecific.className = NULL,
        .number = GCFSValue_FieldNumber_ReferenceValue,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(GCFSValue__storage_, referenceValue),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeString,
      },
      {
        .name = "mapValue",
        .dataTypeSpecific.className = GPBStringifySymbol(GCFSMapValue),
        .number = GCFSValue_FieldNumber_MapValue,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(GCFSValue__storage_, mapValue),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "geoPointValue",
        .dataTypeSpecific.className = GPBStringifySymbol(GTPLatLng),
        .number = GCFSValue_FieldNumber_GeoPointValue,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(GCFSValue__storage_, geoPointValue),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "arrayValue",
        .dataTypeSpecific.className = GPBStringifySymbol(GCFSArrayValue),
        .number = GCFSValue_FieldNumber_ArrayValue,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(GCFSValue__storage_, arrayValue),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "timestampValue",
        .dataTypeSpecific.className = GPBStringifySymbol(GPBTimestamp),
        .number = GCFSValue_FieldNumber_TimestampValue,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(GCFSValue__storage_, timestampValue),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeMessage,
      },
      {
        .name = "nullValue",
        .dataTypeSpecific.enumDescFunc = GPBNullValue_EnumDescriptor,
        .number = GCFSValue_FieldNumber_NullValue,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(GCFSValue__storage_, nullValue),
        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldHasEnumDescriptor),
        .dataType = GPBDataTypeEnum,
      },
      {
        .name = "stringValue",
        .dataTypeSpecific.className = NULL,
        .number = GCFSValue_FieldNumber_StringValue,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(GCFSValue__storage_, stringValue),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeString,
      },
      {
        .name = "bytesValue",
        .dataTypeSpecific.className = NULL,
        .number = GCFSValue_FieldNumber_BytesValue,
        .hasIndex = -1,
        .offset = (uint32_t)offsetof(GCFSValue__storage_, bytesValue),
        .flags = GPBFieldOptional,
        .dataType = GPBDataTypeBytes,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:[GCFSValue class]
                                     rootClass:[GCFSDocumentRoot class]
                                          file:GCFSDocumentRoot_FileDescriptor()
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(GCFSValue__storage_)
                                         flags:GPBDescriptorInitializationFlag_None];
    static const char *oneofs[] = {
      "valueType",
    };
    [localDescriptor setupOneofs:oneofs
                           count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
                   firstHasIndex:-1];
    NSAssert(descriptor == nil, @"Startup recursed!");
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

int32_t GCFSValue_NullValue_RawValue(GCFSValue *message) {
  GPBDescriptor *descriptor = [GCFSValue descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:GCFSValue_FieldNumber_NullValue];
  return GPBGetMessageInt32Field(message, field);
}

void SetGCFSValue_NullValue_RawValue(GCFSValue *message, int32_t value) {
  GPBDescriptor *descriptor = [GCFSValue descriptor];
  GPBFieldDescriptor *field = [descriptor fieldWithNumber:GCFSValue_FieldNumber_NullValue];
  GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax);
}

void GCFSValue_ClearValueTypeOneOfCase(GCFSValue *message) {
  GPBDescriptor *descriptor = [message descriptor];
  GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
  GPBMaybeClearOneof(message, oneof, -1, 0);
}
#pragma mark - GCFSArrayValue

@implementation GCFSArrayValue

@dynamic valuesArray, valuesArray_Count;

typedef struct GCFSArrayValue__storage_ {
  uint32_t _has_storage_[1];
  NSMutableArray *valuesArray;
} GCFSArrayValue__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    static GPBMessageFieldDescription fields[] = {
      {
        .name = "valuesArray",
        .dataTypeSpecific.className = GPBStringifySymbol(GCFSValue),
        .number = GCFSArrayValue_FieldNumber_ValuesArray,
        .hasIndex = GPBNoHasBit,
        .offset = (uint32_t)offsetof(GCFSArrayValue__storage_, valuesArray),
        .flags = GPBFieldRepeated,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:[GCFSArrayValue class]
                                     rootClass:[GCFSDocumentRoot class]
                                          file:GCFSDocumentRoot_FileDescriptor()
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(GCFSArrayValue__storage_)
                                         flags:GPBDescriptorInitializationFlag_None];
    NSAssert(descriptor == nil, @"Startup recursed!");
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end

#pragma mark - GCFSMapValue

@implementation GCFSMapValue

@dynamic fields, fields_Count;

typedef struct GCFSMapValue__storage_ {
  uint32_t _has_storage_[1];
  NSMutableDictionary *fields;
} GCFSMapValue__storage_;

// This method is threadsafe because it is initially called
// in +initialize for each subclass.
+ (GPBDescriptor *)descriptor {
  static GPBDescriptor *descriptor = nil;
  if (!descriptor) {
    static GPBMessageFieldDescription fields[] = {
      {
        .name = "fields",
        .dataTypeSpecific.className = GPBStringifySymbol(GCFSValue),
        .number = GCFSMapValue_FieldNumber_Fields,
        .hasIndex = GPBNoHasBit,
        .offset = (uint32_t)offsetof(GCFSMapValue__storage_, fields),
        .flags = GPBFieldMapKeyString,
        .dataType = GPBDataTypeMessage,
      },
    };
    GPBDescriptor *localDescriptor =
        [GPBDescriptor allocDescriptorForClass:[GCFSMapValue class]
                                     rootClass:[GCFSDocumentRoot class]
                                          file:GCFSDocumentRoot_FileDescriptor()
                                        fields:fields
                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
                                   storageSize:sizeof(GCFSMapValue__storage_)
                                         flags:GPBDescriptorInitializationFlag_None];
    NSAssert(descriptor == nil, @"Startup recursed!");
    descriptor = localDescriptor;
  }
  return descriptor;
}

@end


#pragma clang diagnostic pop

// @@protoc_insertion_point(global_scope)