1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // NO CHECKED-IN PROTOBUF GENCODE
4 // source: google/protobuf/any.proto
6 #import "GPBProtocolBuffers_RuntimeSupport.h"
7 #import "GPBWellKnownTypes.h"
8 #import "GPBAny.pbobjc.h"
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.
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.
17 // @@protoc_insertion_point(imports)
19 #pragma clang diagnostic push
20 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
21 #pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
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.
27 GPBObjCClassDeclaration(GPBAny);
29 #pragma mark - GPBAnyRoot
31 @implementation GPBAnyRoot
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.
38 static GPBFileDescription GPBAnyRoot_FileDescription = {
39 .package = "google.protobuf",
41 .syntax = GPBFileSyntaxProto3
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* any_importCategories(void) {
48 return GPBWellKnownTypesErrorDomain;
53 @implementation GPBAny
58 typedef struct GPBAny__storage_ {
59 uint32_t _has_storage_[1];
64 // This method is threadsafe because it is initially called
65 // in +initialize for each subclass.
66 + (GPBDescriptor *)descriptor {
67 static GPBDescriptor *descriptor = nil;
69 GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
70 static GPBMessageFieldDescription fields[] = {
73 .dataTypeSpecific.clazz = Nil,
74 .number = GPBAny_FieldNumber_TypeURL,
76 .offset = (uint32_t)offsetof(GPBAny__storage_, typeURL),
77 .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldTextFormatNameCustom | GPBFieldClearHasIvarOnZero),
78 .dataType = GPBDataTypeString,
82 .dataTypeSpecific.clazz = Nil,
83 .number = GPBAny_FieldNumber_Value,
85 .offset = (uint32_t)offsetof(GPBAny__storage_, value),
86 .flags = (GPBFieldFlags)(GPBFieldOptional | GPBFieldClearHasIvarOnZero),
87 .dataType = GPBDataTypeBytes,
90 GPBDescriptor *localDescriptor =
91 [GPBDescriptor allocDescriptorForClass:GPBObjCClass(GPBAny)
93 fileDescription:&GPBAnyRoot_FileDescription
95 fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
96 storageSize:sizeof(GPBAny__storage_)
97 flags:(GPBDescriptorInitializationFlags)(GPBDescriptorInitializationFlag_UsesClassRefs | GPBDescriptorInitializationFlag_Proto3OptionalKnown | GPBDescriptorInitializationFlag_ClosedEnumSupportKnown)];
98 #if !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
99 static const char *extraTextFormatInfo =
100 "\001\001\004\241!!\000";
101 [localDescriptor setupExtraTextInfo:extraTextFormatInfo];
102 #endif // !GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS
103 #if defined(DEBUG) && DEBUG
104 NSAssert(descriptor == nil, @"Startup recursed!");
106 descriptor = localDescriptor;
114 #pragma clang diagnostic pop
116 // @@protoc_insertion_point(global_scope)