• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// Generated by the protocol buffer compiler.  DO NOT EDIT!
2// NO CHECKED-IN PROTOBUF GENCODE
3// clang-format off
4// source: google/protobuf/timestamp.proto
5
6#import "GPBProtocolBuffers_RuntimeSupport.h"
7#import "GPBWellKnownTypes.h"
8#import "GPBTimestamp.pbobjc.h"
9
10#if GOOGLE_PROTOBUF_OBJC_VERSION < 30007
11#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
12#endif
13#if 30007 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
14#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
15#endif
16
17// @@protoc_insertion_point(imports)
18
19#pragma clang diagnostic push
20#pragma clang diagnostic ignored "-Wdeprecated-declarations"
21#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
22
23#pragma mark - Objective-C Class declarations
24// Forward declarations of Objective-C classes that we can use as
25// static values in struct initializers.
26// We don't use [Foo class] because it is not a static value.
27GPBObjCClassDeclaration(GPBTimestamp);
28
29#pragma mark - GPBTimestampRoot
30
31@implementation GPBTimestampRoot
32
33// No extensions in the file and no imports or none of the imports (direct or
34// indirect) defined extensions, so no need to generate +extensionRegistry.
35
36@end
37
38static GPBFileDescription GPBTimestampRoot_FileDescription = {
39  .package = "google.protobuf",
40  .prefix = "GPB",
41  .syntax = GPBFileSyntaxProto3
42};
43
44// This is to help make sure that the GPBWellKnownTypes.* categories get linked and
45// developers do not have to use the `-ObjC` linker flag. More information
46// here: https://medium.com/ios-os-x-development/categories-in-static-libraries-78e41f8ddb96
47__attribute__((used)) static NSString* timestamp_importCategories(void) {
48  return GPBWellKnownTypesErrorDomain;
49}
50
51#pragma mark - GPBTimestamp
52
53@implementation GPBTimestamp
54
55@dynamic seconds;
56@dynamic nanos;
57
58typedef struct GPBTimestamp__storage_ {
59  uint32_t _has_storage_[1];
60  int32_t nanos;
61  int64_t seconds;
62} GPBTimestamp__storage_;
63
64// This method is threadsafe because it is initially called
65// in +initialize for each subclass.
66+ (GPBDescriptor *)descriptor {
67  static GPBDescriptor *descriptor = nil;
68  if (!descriptor) {
69    GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
70    static GPBMessageFieldDescription fields[] = {
71      {
72        .name = "seconds",
73        .dataTypeSpecific.clazz = Nil,
74        .number = GPBTimestamp_FieldNumber_Seconds,
75        .hasIndex = 0,
76        .offset = (uint32_t)offsetof(GPBTimestamp__storage_, seconds),
77        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
78        .dataType = GPBDataTypeInt64,
79      },
80      {
81        .name = "nanos",
82        .dataTypeSpecific.clazz = Nil,
83        .number = GPBTimestamp_FieldNumber_Nanos,
84        .hasIndex = 1,
85        .offset = (uint32_t)offsetof(GPBTimestamp__storage_, nanos),
86        .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
87        .dataType = GPBDataTypeInt32,
88      },
89    };
90    GPBDescriptor *localDescriptor =
91        [GPBDescriptor allocDescriptorForClass:GPBObjCClass(GPBTimestamp)
92                                   messageName:@"Timestamp"
93                               fileDescription:&GPBTimestampRoot_FileDescription
94                                        fields:fields
95                                    fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
96                                   storageSize:sizeof(GPBTimestamp__storage_)
97                                         flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
98    #if defined(DEBUG) && DEBUG
99      NSAssert(descriptor == nil, @"Startup recursed!");
100    #endif  // DEBUG
101    descriptor = localDescriptor;
102  }
103  return descriptor;
104}
105
106@end
107
108
109#pragma clang diagnostic pop
110
111// @@protoc_insertion_point(global_scope)
112
113// clang-format on
114