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