2015-05-21 17:14:52 -04:00
|
|
|
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
2024-04-15 14:34:06 -07:00
|
|
|
// NO CHECKED-IN PROTOBUF GENCODE
|
2022-09-19 13:19:31 -04:00
|
|
|
// clang-format off
|
2022-10-06 16:16:07 -04:00
|
|
|
// source: google/protobuf/struct.proto
|
2022-09-19 13:19:31 -04:00
|
|
|
|
2022-03-01 14:16:50 -05:00
|
|
|
#import "GPBProtocolBuffers_RuntimeSupport.h"
|
|
|
|
|
#import "GPBStruct.pbobjc.h"
|
2016-05-09 13:53:20 -04:00
|
|
|
|
2025-03-26 15:29:16 +00:00
|
|
|
#if GOOGLE_PROTOBUF_OBJC_VERSION < 40311
|
2023-02-08 10:17:46 -08:00
|
|
|
#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
|
|
|
|
|
#endif
|
2025-03-26 15:29:16 +00:00
|
|
|
#if 40311 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
|
2023-02-08 10:17:46 -08:00
|
|
|
#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
|
|
|
|
|
#endif
|
|
|
|
|
|
2018-01-23 13:38:28 -05:00
|
|
|
#import <stdatomic.h>
|
|
|
|
|
|
2015-05-21 17:14:52 -04:00
|
|
|
// @@protoc_insertion_point(imports)
|
|
|
|
|
|
2016-04-19 13:13:04 -04:00
|
|
|
#pragma clang diagnostic push
|
|
|
|
|
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
|
2016-05-25 13:46:00 -04:00
|
|
|
#pragma clang diagnostic ignored "-Wdirect-ivar-access"
|
2019-12-17 17:32:09 -08:00
|
|
|
#pragma clang diagnostic ignored "-Wdollar-in-identifier-extension"
|
|
|
|
|
|
2023-02-09 07:43:26 -08:00
|
|
|
#pragma mark - Objective-C Class declarations
|
|
|
|
|
// Forward declarations of Objective-C classes that we can use as
|
2020-01-19 17:46:35 -08:00
|
|
|
// static values in struct initializers.
|
|
|
|
|
// We don't use [Foo class] because it is not a static value.
|
|
|
|
|
GPBObjCClassDeclaration(GPBListValue);
|
|
|
|
|
GPBObjCClassDeclaration(GPBStruct);
|
|
|
|
|
GPBObjCClassDeclaration(GPBValue);
|
2016-04-19 13:13:04 -04:00
|
|
|
|
2015-05-21 17:14:52 -04:00
|
|
|
#pragma mark - GPBStructRoot
|
|
|
|
|
|
|
|
|
|
@implementation GPBStructRoot
|
|
|
|
|
|
2023-08-14 10:04:53 -07:00
|
|
|
// No extensions in the file and no imports or none of the imports (direct or
|
|
|
|
|
// indirect) defined extensions, so no need to generate +extensionRegistry.
|
2016-09-01 11:45:50 -04:00
|
|
|
|
2015-05-21 17:14:52 -04:00
|
|
|
@end
|
|
|
|
|
|
2025-02-20 16:37:20 +00:00
|
|
|
static GPBFilePackageAndPrefix GPBStructRoot_FileDescription = {
|
2023-02-08 06:31:58 -08:00
|
|
|
.package = "google.protobuf",
|
2025-02-20 16:37:20 +00:00
|
|
|
.prefix = "GPB"
|
2023-02-08 06:31:58 -08:00
|
|
|
};
|
2015-05-21 17:14:52 -04:00
|
|
|
|
|
|
|
|
#pragma mark - Enum GPBNullValue
|
|
|
|
|
|
|
|
|
|
GPBEnumDescriptor *GPBNullValue_EnumDescriptor(void) {
|
2018-01-31 13:58:11 -05:00
|
|
|
static _Atomic(GPBEnumDescriptor*) descriptor = nil;
|
2015-05-21 17:14:52 -04:00
|
|
|
if (!descriptor) {
|
2016-03-17 10:04:21 -04:00
|
|
|
static const char *valueNames =
|
|
|
|
|
"NullValue\000";
|
|
|
|
|
static const int32_t values[] = {
|
|
|
|
|
GPBNullValue_NullValue,
|
2015-05-21 17:14:52 -04:00
|
|
|
};
|
2016-03-17 10:04:21 -04:00
|
|
|
GPBEnumDescriptor *worker =
|
|
|
|
|
[GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GPBNullValue)
|
2025-03-26 15:29:16 +00:00
|
|
|
runtimeSupport:&GOOGLE_PROTOBUF_OBJC_EXPECTED_GENCODE_VERSION_40311
|
2016-03-17 10:04:21 -04:00
|
|
|
valueNames:valueNames
|
|
|
|
|
values:values
|
|
|
|
|
count:(uint32_t)(sizeof(values) / sizeof(int32_t))
|
2022-11-15 11:22:51 -08:00
|
|
|
enumVerifier:GPBNullValue_IsValidValue
|
|
|
|
|
flags:GPBEnumDescriptorInitializationFlag_None];
|
2018-01-22 13:26:39 -08:00
|
|
|
GPBEnumDescriptor *expected = nil;
|
|
|
|
|
if (!atomic_compare_exchange_strong(&descriptor, &expected, worker)) {
|
2016-03-17 10:04:21 -04:00
|
|
|
[worker release];
|
|
|
|
|
}
|
2015-05-21 17:14:52 -04:00
|
|
|
}
|
|
|
|
|
return descriptor;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
BOOL GPBNullValue_IsValidValue(int32_t value__) {
|
|
|
|
|
switch (value__) {
|
|
|
|
|
case GPBNullValue_NullValue:
|
|
|
|
|
return YES;
|
|
|
|
|
default:
|
|
|
|
|
return NO;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
#pragma mark - GPBStruct
|
|
|
|
|
|
|
|
|
|
@implementation GPBStruct
|
|
|
|
|
|
2015-06-08 16:24:57 -04:00
|
|
|
@dynamic fields, fields_Count;
|
2015-05-21 17:14:52 -04:00
|
|
|
|
2015-06-08 16:24:57 -04:00
|
|
|
typedef struct GPBStruct__storage_ {
|
2015-05-21 17:14:52 -04:00
|
|
|
uint32_t _has_storage_[1];
|
|
|
|
|
NSMutableDictionary *fields;
|
2015-06-08 16:24:57 -04:00
|
|
|
} GPBStruct__storage_;
|
2015-05-21 17:14:52 -04:00
|
|
|
|
|
|
|
|
// This method is threadsafe because it is initially called
|
|
|
|
|
// in +initialize for each subclass.
|
|
|
|
|
+ (GPBDescriptor *)descriptor {
|
2015-06-08 16:24:57 -04:00
|
|
|
static GPBDescriptor *descriptor = nil;
|
2015-05-21 17:14:52 -04:00
|
|
|
if (!descriptor) {
|
|
|
|
|
static GPBMessageFieldDescription fields[] = {
|
|
|
|
|
{
|
|
|
|
|
.name = "fields",
|
2020-01-19 17:46:35 -08:00
|
|
|
.dataTypeSpecific.clazz = GPBObjCClass(GPBValue),
|
2015-05-21 17:14:52 -04:00
|
|
|
.number = GPBStruct_FieldNumber_Fields,
|
|
|
|
|
.hasIndex = GPBNoHasBit,
|
2016-03-17 10:04:21 -04:00
|
|
|
.offset = (uint32_t)offsetof(GPBStruct__storage_, fields),
|
2015-05-21 17:14:52 -04:00
|
|
|
.flags = GPBFieldMapKeyString,
|
2015-06-08 16:24:57 -04:00
|
|
|
.dataType = GPBDataTypeMessage,
|
2015-05-21 17:14:52 -04:00
|
|
|
},
|
|
|
|
|
};
|
2015-06-08 16:24:57 -04:00
|
|
|
GPBDescriptor *localDescriptor =
|
2023-02-02 11:29:54 -08:00
|
|
|
[GPBDescriptor allocDescriptorForClass:GPBObjCClass(GPBStruct)
|
2023-02-08 06:31:58 -08:00
|
|
|
messageName:@"Struct"
|
2025-03-26 15:29:16 +00:00
|
|
|
runtimeSupport:&GOOGLE_PROTOBUF_OBJC_EXPECTED_GENCODE_VERSION_40311
|
2023-02-08 06:31:58 -08:00
|
|
|
fileDescription:&GPBStructRoot_FileDescription
|
2015-06-08 16:24:57 -04:00
|
|
|
fields:fields
|
2016-03-17 10:04:21 -04:00
|
|
|
fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
|
2015-06-08 16:24:57 -04:00
|
|
|
storageSize:sizeof(GPBStruct__storage_)
|
2025-02-20 16:37:20 +00:00
|
|
|
flags:GPBDescriptorInitializationFlag_None];
|
2023-07-11 07:49:55 -07:00
|
|
|
#if defined(DEBUG) && DEBUG
|
2018-12-11 16:32:48 -08:00
|
|
|
NSAssert(descriptor == nil, @"Startup recursed!");
|
2023-07-11 07:49:55 -07:00
|
|
|
#endif // DEBUG
|
2015-06-08 16:24:57 -04:00
|
|
|
descriptor = localDescriptor;
|
2015-05-21 17:14:52 -04:00
|
|
|
}
|
|
|
|
|
return descriptor;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
#pragma mark - GPBValue
|
|
|
|
|
|
|
|
|
|
@implementation GPBValue
|
|
|
|
|
|
|
|
|
|
@dynamic kindOneOfCase;
|
2025-10-08 20:40:46 +00:00
|
|
|
@dynamic hasNullValue, nullValue;
|
|
|
|
|
@dynamic hasNumberValue, numberValue;
|
|
|
|
|
@dynamic hasStringValue, stringValue;
|
|
|
|
|
@dynamic hasBoolValue, boolValue;
|
|
|
|
|
@dynamic hasStructValue, structValue;
|
|
|
|
|
@dynamic hasListValue, listValue;
|
2015-05-21 17:14:52 -04:00
|
|
|
|
2015-06-08 16:24:57 -04:00
|
|
|
typedef struct GPBValue__storage_ {
|
2015-05-21 17:14:52 -04:00
|
|
|
uint32_t _has_storage_[2];
|
|
|
|
|
GPBNullValue nullValue;
|
|
|
|
|
NSString *stringValue;
|
|
|
|
|
GPBStruct *structValue;
|
|
|
|
|
GPBListValue *listValue;
|
|
|
|
|
double numberValue;
|
2015-06-08 16:24:57 -04:00
|
|
|
} GPBValue__storage_;
|
2015-05-21 17:14:52 -04:00
|
|
|
|
|
|
|
|
// This method is threadsafe because it is initially called
|
|
|
|
|
// in +initialize for each subclass.
|
|
|
|
|
+ (GPBDescriptor *)descriptor {
|
2015-06-08 16:24:57 -04:00
|
|
|
static GPBDescriptor *descriptor = nil;
|
2015-05-21 17:14:52 -04:00
|
|
|
if (!descriptor) {
|
|
|
|
|
static GPBMessageFieldDescription fields[] = {
|
|
|
|
|
{
|
|
|
|
|
.name = "nullValue",
|
2016-03-17 10:04:21 -04:00
|
|
|
.dataTypeSpecific.enumDescFunc = GPBNullValue_EnumDescriptor,
|
2015-05-21 17:14:52 -04:00
|
|
|
.number = GPBValue_FieldNumber_NullValue,
|
|
|
|
|
.hasIndex = -1,
|
2016-03-17 10:04:21 -04:00
|
|
|
.offset = (uint32_t)offsetof(GPBValue__storage_, nullValue),
|
2025-03-26 15:29:16 +00:00
|
|
|
.flags = GPBFieldNone,
|
2015-06-08 16:24:57 -04:00
|
|
|
.dataType = GPBDataTypeEnum,
|
2015-05-21 17:14:52 -04:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
.name = "numberValue",
|
2019-12-17 17:32:09 -08:00
|
|
|
.dataTypeSpecific.clazz = Nil,
|
2015-05-21 17:14:52 -04:00
|
|
|
.number = GPBValue_FieldNumber_NumberValue,
|
|
|
|
|
.hasIndex = -1,
|
2016-03-17 10:04:21 -04:00
|
|
|
.offset = (uint32_t)offsetof(GPBValue__storage_, numberValue),
|
2025-03-26 15:29:16 +00:00
|
|
|
.flags = GPBFieldNone,
|
2015-06-08 16:24:57 -04:00
|
|
|
.dataType = GPBDataTypeDouble,
|
2015-05-21 17:14:52 -04:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
.name = "stringValue",
|
2019-12-17 17:32:09 -08:00
|
|
|
.dataTypeSpecific.clazz = Nil,
|
2015-05-21 17:14:52 -04:00
|
|
|
.number = GPBValue_FieldNumber_StringValue,
|
|
|
|
|
.hasIndex = -1,
|
2016-03-17 10:04:21 -04:00
|
|
|
.offset = (uint32_t)offsetof(GPBValue__storage_, stringValue),
|
2025-03-26 15:29:16 +00:00
|
|
|
.flags = GPBFieldNone,
|
2015-06-08 16:24:57 -04:00
|
|
|
.dataType = GPBDataTypeString,
|
2015-05-21 17:14:52 -04:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
.name = "boolValue",
|
2019-12-17 17:32:09 -08:00
|
|
|
.dataTypeSpecific.clazz = Nil,
|
2015-05-21 17:14:52 -04:00
|
|
|
.number = GPBValue_FieldNumber_BoolValue,
|
|
|
|
|
.hasIndex = -1,
|
2016-03-17 10:04:21 -04:00
|
|
|
.offset = 0, // Stored in _has_storage_ to save space.
|
2025-03-26 15:29:16 +00:00
|
|
|
.flags = GPBFieldNone,
|
2015-06-08 16:24:57 -04:00
|
|
|
.dataType = GPBDataTypeBool,
|
2015-05-21 17:14:52 -04:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
.name = "structValue",
|
2020-01-19 17:46:35 -08:00
|
|
|
.dataTypeSpecific.clazz = GPBObjCClass(GPBStruct),
|
2015-05-21 17:14:52 -04:00
|
|
|
.number = GPBValue_FieldNumber_StructValue,
|
|
|
|
|
.hasIndex = -1,
|
2016-03-17 10:04:21 -04:00
|
|
|
.offset = (uint32_t)offsetof(GPBValue__storage_, structValue),
|
2025-03-26 15:29:16 +00:00
|
|
|
.flags = GPBFieldNone,
|
2015-06-08 16:24:57 -04:00
|
|
|
.dataType = GPBDataTypeMessage,
|
2015-05-21 17:14:52 -04:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
.name = "listValue",
|
2020-01-19 17:46:35 -08:00
|
|
|
.dataTypeSpecific.clazz = GPBObjCClass(GPBListValue),
|
2015-05-21 17:14:52 -04:00
|
|
|
.number = GPBValue_FieldNumber_ListValue,
|
|
|
|
|
.hasIndex = -1,
|
2016-03-17 10:04:21 -04:00
|
|
|
.offset = (uint32_t)offsetof(GPBValue__storage_, listValue),
|
2025-03-26 15:29:16 +00:00
|
|
|
.flags = GPBFieldNone,
|
2015-06-08 16:24:57 -04:00
|
|
|
.dataType = GPBDataTypeMessage,
|
2015-05-21 17:14:52 -04:00
|
|
|
},
|
|
|
|
|
};
|
2015-06-08 16:24:57 -04:00
|
|
|
GPBDescriptor *localDescriptor =
|
2023-02-02 11:29:54 -08:00
|
|
|
[GPBDescriptor allocDescriptorForClass:GPBObjCClass(GPBValue)
|
2023-02-08 06:31:58 -08:00
|
|
|
messageName:@"Value"
|
2025-03-26 15:29:16 +00:00
|
|
|
runtimeSupport:&GOOGLE_PROTOBUF_OBJC_EXPECTED_GENCODE_VERSION_40311
|
2023-02-08 06:31:58 -08:00
|
|
|
fileDescription:&GPBStructRoot_FileDescription
|
2015-06-08 16:24:57 -04:00
|
|
|
fields:fields
|
2016-03-17 10:04:21 -04:00
|
|
|
fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
|
2015-06-08 16:24:57 -04:00
|
|
|
storageSize:sizeof(GPBValue__storage_)
|
2025-02-20 16:37:20 +00:00
|
|
|
flags:GPBDescriptorInitializationFlag_None];
|
2016-03-17 10:04:21 -04:00
|
|
|
static const char *oneofs[] = {
|
|
|
|
|
"kind",
|
|
|
|
|
};
|
|
|
|
|
[localDescriptor setupOneofs:oneofs
|
|
|
|
|
count:(uint32_t)(sizeof(oneofs) / sizeof(char*))
|
|
|
|
|
firstHasIndex:-1];
|
2023-07-11 07:49:55 -07:00
|
|
|
#if defined(DEBUG) && DEBUG
|
2018-12-11 16:32:48 -08:00
|
|
|
NSAssert(descriptor == nil, @"Startup recursed!");
|
2023-07-11 07:49:55 -07:00
|
|
|
#endif // DEBUG
|
2015-06-08 16:24:57 -04:00
|
|
|
descriptor = localDescriptor;
|
2015-05-21 17:14:52 -04:00
|
|
|
}
|
|
|
|
|
return descriptor;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
int32_t GPBValue_NullValue_RawValue(GPBValue *message) {
|
|
|
|
|
GPBDescriptor *descriptor = [GPBValue descriptor];
|
|
|
|
|
GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBValue_FieldNumber_NullValue];
|
2020-04-13 13:36:56 -04:00
|
|
|
return GPBGetMessageRawEnumField(message, field);
|
2015-05-21 17:14:52 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void SetGPBValue_NullValue_RawValue(GPBValue *message, int32_t value) {
|
|
|
|
|
GPBDescriptor *descriptor = [GPBValue descriptor];
|
|
|
|
|
GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBValue_FieldNumber_NullValue];
|
2020-04-13 13:36:56 -04:00
|
|
|
GPBSetMessageRawEnumField(message, field, value);
|
2015-05-21 17:14:52 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
void GPBValue_ClearKindOneOfCase(GPBValue *message) {
|
2020-04-06 16:17:55 -04:00
|
|
|
GPBDescriptor *descriptor = [GPBValue descriptor];
|
2016-07-18 11:10:02 -04:00
|
|
|
GPBOneofDescriptor *oneof = [descriptor.oneofs objectAtIndex:0];
|
2020-04-13 13:36:56 -04:00
|
|
|
GPBClearOneof(message, oneof);
|
2015-05-21 17:14:52 -04:00
|
|
|
}
|
|
|
|
|
#pragma mark - GPBListValue
|
|
|
|
|
|
|
|
|
|
@implementation GPBListValue
|
|
|
|
|
|
2015-06-08 16:24:57 -04:00
|
|
|
@dynamic valuesArray, valuesArray_Count;
|
2015-05-21 17:14:52 -04:00
|
|
|
|
2015-06-08 16:24:57 -04:00
|
|
|
typedef struct GPBListValue__storage_ {
|
2015-05-21 17:14:52 -04:00
|
|
|
uint32_t _has_storage_[1];
|
|
|
|
|
NSMutableArray *valuesArray;
|
2015-06-08 16:24:57 -04:00
|
|
|
} GPBListValue__storage_;
|
2015-05-21 17:14:52 -04:00
|
|
|
|
|
|
|
|
// This method is threadsafe because it is initially called
|
|
|
|
|
// in +initialize for each subclass.
|
|
|
|
|
+ (GPBDescriptor *)descriptor {
|
2015-06-08 16:24:57 -04:00
|
|
|
static GPBDescriptor *descriptor = nil;
|
2015-05-21 17:14:52 -04:00
|
|
|
if (!descriptor) {
|
|
|
|
|
static GPBMessageFieldDescription fields[] = {
|
|
|
|
|
{
|
|
|
|
|
.name = "valuesArray",
|
2020-01-19 17:46:35 -08:00
|
|
|
.dataTypeSpecific.clazz = GPBObjCClass(GPBValue),
|
2015-05-21 17:14:52 -04:00
|
|
|
.number = GPBListValue_FieldNumber_ValuesArray,
|
|
|
|
|
.hasIndex = GPBNoHasBit,
|
2016-03-17 10:04:21 -04:00
|
|
|
.offset = (uint32_t)offsetof(GPBListValue__storage_, valuesArray),
|
2015-05-21 17:14:52 -04:00
|
|
|
.flags = GPBFieldRepeated,
|
2015-06-08 16:24:57 -04:00
|
|
|
.dataType = GPBDataTypeMessage,
|
2015-05-21 17:14:52 -04:00
|
|
|
},
|
|
|
|
|
};
|
2015-06-08 16:24:57 -04:00
|
|
|
GPBDescriptor *localDescriptor =
|
2023-02-02 11:29:54 -08:00
|
|
|
[GPBDescriptor allocDescriptorForClass:GPBObjCClass(GPBListValue)
|
2023-02-08 06:31:58 -08:00
|
|
|
messageName:@"ListValue"
|
2025-03-26 15:29:16 +00:00
|
|
|
runtimeSupport:&GOOGLE_PROTOBUF_OBJC_EXPECTED_GENCODE_VERSION_40311
|
2023-02-08 06:31:58 -08:00
|
|
|
fileDescription:&GPBStructRoot_FileDescription
|
2015-06-08 16:24:57 -04:00
|
|
|
fields:fields
|
2016-03-17 10:04:21 -04:00
|
|
|
fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
|
2015-06-08 16:24:57 -04:00
|
|
|
storageSize:sizeof(GPBListValue__storage_)
|
2025-02-20 16:37:20 +00:00
|
|
|
flags:GPBDescriptorInitializationFlag_None];
|
2023-07-11 07:49:55 -07:00
|
|
|
#if defined(DEBUG) && DEBUG
|
2018-12-11 16:32:48 -08:00
|
|
|
NSAssert(descriptor == nil, @"Startup recursed!");
|
2023-07-11 07:49:55 -07:00
|
|
|
#endif // DEBUG
|
2015-06-08 16:24:57 -04:00
|
|
|
descriptor = localDescriptor;
|
2015-05-21 17:14:52 -04:00
|
|
|
}
|
|
|
|
|
return descriptor;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@end
|
|
|
|
|
|
|
|
|
|
|
2016-04-19 13:13:04 -04:00
|
|
|
#pragma clang diagnostic pop
|
|
|
|
|
|
2015-05-21 17:14:52 -04:00
|
|
|
// @@protoc_insertion_point(global_scope)
|
2022-09-19 13:19:31 -04:00
|
|
|
|
2022-10-06 16:16:07 -04:00
|
|
|
// clang-format on
|