blob: 3924b4b75859d23e9e6817e13d64f48169db85b3 [file] [log] [blame]
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -04001// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: google/protobuf/struct.proto
3
4#import "GPBProtocolBuffers.h"
5
Thomas Van Lenten79a23c42016-03-17 10:04:21 -04006#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30001
Thomas Van Lenten536059e2015-12-02 14:43:05 -05007#error This file was generated by a different version of protoc which is incompatible with your Protocol Buffer library sources.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -04008#endif
9
10// @@protoc_insertion_point(imports)
11
Thomas Van Lentene664aa62016-04-19 13:13:04 -040012#pragma clang diagnostic push
13#pragma clang diagnostic ignored "-Wdeprecated-declarations"
14
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040015CF_EXTERN_C_BEGIN
16
17@class GPBListValue;
18@class GPBStruct;
Thomas Van Lenten2480acb2015-11-30 14:38:04 -050019@class GPBValue;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040020
Thomas Van Lenten8c889572015-06-16 16:45:14 -040021NS_ASSUME_NONNULL_BEGIN
22
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040023#pragma mark - Enum GPBNullValue
24
Thomas Van Lenten36650a02016-03-07 12:07:03 -050025/// `NullValue` is a singleton enumeration to represent the null value for the
26/// `Value` type union.
27///
28/// The JSON representation for `NullValue` is JSON `null`.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040029typedef GPB_ENUM(GPBNullValue) {
Thomas Van Lenten36650a02016-03-07 12:07:03 -050030 /// Value used if any message's field encounters a value that is not defined
31 /// by this enum. The message will also have C functions to get/set the rawValue
32 /// of the field.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040033 GPBNullValue_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
Thomas Van Lenten36650a02016-03-07 12:07:03 -050034 /// Null value.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040035 GPBNullValue_NullValue = 0,
36};
37
38GPBEnumDescriptor *GPBNullValue_EnumDescriptor(void);
39
Thomas Van Lenten36650a02016-03-07 12:07:03 -050040/// Checks to see if the given value is defined by the enum or was not known at
41/// the time this source was generated.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040042BOOL GPBNullValue_IsValidValue(int32_t value);
43
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040044#pragma mark - GPBStructRoot
45
Thomas Van Lenten36650a02016-03-07 12:07:03 -050046/// Exposes the extension registry for this file.
47///
48/// The base class provides:
49/// @code
50/// + (GPBExtensionRegistry *)extensionRegistry;
51/// @endcode
52/// which is a @c GPBExtensionRegistry that includes all the extensions defined by
53/// this file and all files that it depends on.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040054@interface GPBStructRoot : GPBRootObject
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040055@end
56
57#pragma mark - GPBStruct
58
59typedef GPB_ENUM(GPBStruct_FieldNumber) {
60 GPBStruct_FieldNumber_Fields = 1,
61};
62
Thomas Van Lenten36650a02016-03-07 12:07:03 -050063/// `Struct` represents a structured data value, consisting of fields
64/// which map to dynamically typed values. In some languages, `Struct`
65/// might be supported by a native representation. For example, in
66/// scripting languages like JS a struct is represented as an
67/// object. The details of that representation are described together
68/// with the proto support for the language.
69///
70/// The JSON representation for `Struct` is JSON object.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040071@interface GPBStruct : GPBMessage
72
Thomas Van Lentene664aa62016-04-19 13:13:04 -040073/// Unordered map of dynamically typed values.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -050074@property(nonatomic, readwrite, strong, null_resettable) NSMutableDictionary<NSString*, GPBValue*> *fields;
Thomas Van Lenten36650a02016-03-07 12:07:03 -050075/// The number of items in @c fields without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -040076@property(nonatomic, readonly) NSUInteger fields_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040077
78@end
79
80#pragma mark - GPBValue
81
82typedef GPB_ENUM(GPBValue_FieldNumber) {
83 GPBValue_FieldNumber_NullValue = 1,
84 GPBValue_FieldNumber_NumberValue = 2,
85 GPBValue_FieldNumber_StringValue = 3,
86 GPBValue_FieldNumber_BoolValue = 4,
87 GPBValue_FieldNumber_StructValue = 5,
88 GPBValue_FieldNumber_ListValue = 6,
89};
90
91typedef GPB_ENUM(GPBValue_Kind_OneOfCase) {
92 GPBValue_Kind_OneOfCase_GPBUnsetOneOfCase = 0,
93 GPBValue_Kind_OneOfCase_NullValue = 1,
94 GPBValue_Kind_OneOfCase_NumberValue = 2,
95 GPBValue_Kind_OneOfCase_StringValue = 3,
96 GPBValue_Kind_OneOfCase_BoolValue = 4,
97 GPBValue_Kind_OneOfCase_StructValue = 5,
98 GPBValue_Kind_OneOfCase_ListValue = 6,
99};
100
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500101/// `Value` represents a dynamically typed value which can be either
102/// null, a number, a string, a boolean, a recursive struct value, or a
103/// list of values. A producer of value is expected to set one of that
104/// variants, absence of any variant indicates an error.
105///
106/// The JSON representation for `Value` is JSON value.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400107@interface GPBValue : GPBMessage
108
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500109/// The kind of value.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400110@property(nonatomic, readonly) GPBValue_Kind_OneOfCase kindOneOfCase;
111
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500112/// Represents a null value.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400113@property(nonatomic, readwrite) GPBNullValue nullValue;
114
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500115/// Represents a double value.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400116@property(nonatomic, readwrite) double numberValue;
117
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500118/// Represents a string value.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400119@property(nonatomic, readwrite, copy, null_resettable) NSString *stringValue;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400120
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500121/// Represents a boolean value.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400122@property(nonatomic, readwrite) BOOL boolValue;
123
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500124/// Represents a structured value.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400125@property(nonatomic, readwrite, strong, null_resettable) GPBStruct *structValue;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400126
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500127/// Represents a repeated `Value`.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400128@property(nonatomic, readwrite, strong, null_resettable) GPBListValue *listValue;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400129
130@end
131
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500132/// Fetches the raw value of a @c GPBValue's @c nullValue property, even
133/// if the value was not defined by the enum at the time the code was generated.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400134int32_t GPBValue_NullValue_RawValue(GPBValue *message);
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500135/// Sets the raw value of an @c GPBValue's @c nullValue property, allowing
136/// it to be set to a value that was not defined by the enum at the time the code
137/// was generated.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400138void SetGPBValue_NullValue_RawValue(GPBValue *message, int32_t value);
139
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500140/// Clears whatever value was set for the oneof 'kind'.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400141void GPBValue_ClearKindOneOfCase(GPBValue *message);
142
143#pragma mark - GPBListValue
144
145typedef GPB_ENUM(GPBListValue_FieldNumber) {
146 GPBListValue_FieldNumber_ValuesArray = 1,
147};
148
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500149/// `ListValue` is a wrapper around a repeated field of values.
150///
151/// The JSON representation for `ListValue` is JSON array.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400152@interface GPBListValue : GPBMessage
153
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500154/// Repeated field of dynamically typed values.
Thomas Van Lenten2480acb2015-11-30 14:38:04 -0500155@property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBValue*> *valuesArray;
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500156/// The number of items in @c valuesArray without causing the array to be created.
Thomas Van Lentend846b0b2015-06-08 16:24:57 -0400157@property(nonatomic, readonly) NSUInteger valuesArray_Count;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400158
159@end
160
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400161NS_ASSUME_NONNULL_END
162
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400163CF_EXTERN_C_END
164
Thomas Van Lentene664aa62016-04-19 13:13:04 -0400165#pragma clang diagnostic pop
166
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400167// @@protoc_insertion_point(global_scope)