1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/struct.proto
3
4 #import "GPBDescriptor.h"
5 #import "GPBMessage.h"
6 #import "GPBRootObject.h"
7
8 #if GOOGLE_PROTOBUF_OBJC_VERSION < 30004
9 #error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
10 #endif
11 #if 30004 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
12 #error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
13 #endif
14
15 // @@protoc_insertion_point(imports)
16
17 #pragma clang diagnostic push
18 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
19
20 CF_EXTERN_C_BEGIN
21
22 @class GPBListValue;
23 @class GPBStruct;
24 @class GPBValue;
25
26 NS_ASSUME_NONNULL_BEGIN
27
28 #pragma mark - Enum GPBNullValue
29
30 /**
31 * `NullValue` is a singleton enumeration to represent the null value for the
32 * `Value` type union.
33 *
34 * The JSON representation for `NullValue` is JSON `null`.
35 **/
36 typedef GPB_ENUM(GPBNullValue) {
37 /**
38 * Value used if any message's field encounters a value that is not defined
39 * by this enum. The message will also have C functions to get/set the rawValue
40 * of the field.
41 **/
42 GPBNullValue_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
43 /** Null value. */
44 GPBNullValue_NullValue = 0,
45 };
46
47 GPBEnumDescriptor *GPBNullValue_EnumDescriptor(void);
48
49 /**
50 * Checks to see if the given value is defined by the enum or was not known at
51 * the time this source was generated.
52 **/
53 BOOL GPBNullValue_IsValidValue(int32_t value);
54
55 #pragma mark - GPBStructRoot
56
57 /**
58 * Exposes the extension registry for this file.
59 *
60 * The base class provides:
61 * @code
62 * + (GPBExtensionRegistry *)extensionRegistry;
63 * @endcode
64 * which is a @c GPBExtensionRegistry that includes all the extensions defined by
65 * this file and all files that it depends on.
66 **/
67 GPB_FINAL @interface GPBStructRoot : GPBRootObject
68 @end
69
70 #pragma mark - GPBStruct
71
72 typedef GPB_ENUM(GPBStruct_FieldNumber) {
73 GPBStruct_FieldNumber_Fields = 1,
74 };
75
76 /**
77 * `Struct` represents a structured data value, consisting of fields
78 * which map to dynamically typed values. In some languages, `Struct`
79 * might be supported by a native representation. For example, in
80 * scripting languages like JS a struct is represented as an
81 * object. The details of that representation are described together
82 * with the proto support for the language.
83 *
84 * The JSON representation for `Struct` is JSON object.
85 **/
86 GPB_FINAL @interface GPBStruct : GPBMessage
87
88 /** Unordered map of dynamically typed values. */
89 @property(nonatomic, readwrite, strong, null_resettable) NSMutableDictionary<NSString*, GPBValue*> *fields;
90 /** The number of items in @c fields without causing the array to be created. */
property(nonatomic,readonly)91 @property(nonatomic, readonly) NSUInteger fields_Count;
92
93 @end
94
95 #pragma mark - GPBValue
96
97 typedef GPB_ENUM(GPBValue_FieldNumber) {
98 GPBValue_FieldNumber_NullValue = 1,
99 GPBValue_FieldNumber_NumberValue = 2,
100 GPBValue_FieldNumber_StringValue = 3,
101 GPBValue_FieldNumber_BoolValue = 4,
102 GPBValue_FieldNumber_StructValue = 5,
103 GPBValue_FieldNumber_ListValue = 6,
104 };
105
106 typedef GPB_ENUM(GPBValue_Kind_OneOfCase) {
107 GPBValue_Kind_OneOfCase_GPBUnsetOneOfCase = 0,
108 GPBValue_Kind_OneOfCase_NullValue = 1,
109 GPBValue_Kind_OneOfCase_NumberValue = 2,
110 GPBValue_Kind_OneOfCase_StringValue = 3,
111 GPBValue_Kind_OneOfCase_BoolValue = 4,
112 GPBValue_Kind_OneOfCase_StructValue = 5,
113 GPBValue_Kind_OneOfCase_ListValue = 6,
114 };
115
116 /**
117 * `Value` represents a dynamically typed value which can be either
118 * null, a number, a string, a boolean, a recursive struct value, or a
119 * list of values. A producer of value is expected to set one of these
120 * variants. Absence of any variant indicates an error.
121 *
122 * The JSON representation for `Value` is JSON value.
123 **/
124 GPB_FINAL @interface GPBValue : GPBMessage
125
126 /** The kind of value. */
127 @property(nonatomic, readonly) GPBValue_Kind_OneOfCase kindOneOfCase;
128
129 /** Represents a null value. */
130 @property(nonatomic, readwrite) GPBNullValue nullValue;
131
132 /** Represents a double value. */
133 @property(nonatomic, readwrite) double numberValue;
134
135 /** Represents a string value. */
136 @property(nonatomic, readwrite, copy, null_resettable) NSString *stringValue;
137
138 /** Represents a boolean value. */
139 @property(nonatomic, readwrite) BOOL boolValue;
140
141 /** Represents a structured value. */
142 @property(nonatomic, readwrite, strong, null_resettable) GPBStruct *structValue;
143
144 /** Represents a repeated `Value`. */
145 @property(nonatomic, readwrite, strong, null_resettable) GPBListValue *listValue;
146
147 @end
148
149 /**
150 * Fetches the raw value of a @c GPBValue's @c nullValue property, even
151 * if the value was not defined by the enum at the time the code was generated.
152 **/
153 int32_t GPBValue_NullValue_RawValue(GPBValue *message);
154 /**
155 * Sets the raw value of an @c GPBValue's @c nullValue property, allowing
156 * it to be set to a value that was not defined by the enum at the time the code
157 * was generated.
158 **/
159 void SetGPBValue_NullValue_RawValue(GPBValue *message, int32_t value);
160
161 /**
162 * Clears whatever value was set for the oneof 'kind'.
163 **/
164 void GPBValue_ClearKindOneOfCase(GPBValue *message);
165
166 #pragma mark - GPBListValue
167
168 typedef GPB_ENUM(GPBListValue_FieldNumber) {
169 GPBListValue_FieldNumber_ValuesArray = 1,
170 };
171
172 /**
173 * `ListValue` is a wrapper around a repeated field of values.
174 *
175 * The JSON representation for `ListValue` is JSON array.
176 **/
177 GPB_FINAL @interface GPBListValue : GPBMessage
178
179 /** Repeated field of dynamically typed values. */
180 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBValue*> *valuesArray;
181 /** The number of items in @c valuesArray without causing the array to be created. */
182 @property(nonatomic, readonly) NSUInteger valuesArray_Count;
183
184 @end
185
186 NS_ASSUME_NONNULL_END
187
188 CF_EXTERN_C_END
189
190 #pragma clang diagnostic pop
191
192 // @@protoc_insertion_point(global_scope)
193