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