GPBTimestamp.pbobjc.m 3.9 KB

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