• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: google/protobuf/struct.proto
3 
4 #import "GPBProtocolBuffers.h"
5 
6 #if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30001
7 #error This file was generated by a different version of protoc which is incompatible with your Protocol Buffer library sources.
8 #endif
9 
10 // @@protoc_insertion_point(imports)
11 
12 #pragma clang diagnostic push
13 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
14 
15 CF_EXTERN_C_BEGIN
16 
17 @class GPBListValue;
18 @class GPBStruct;
19 @class GPBValue;
20 
21 NS_ASSUME_NONNULL_BEGIN
22 
23 #pragma mark - Enum GPBNullValue
24 
25 /// `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`.
29 typedef GPB_ENUM(GPBNullValue) {
30   /// 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.
33   GPBNullValue_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
34   /// Null value.
35   GPBNullValue_NullValue = 0,
36 };
37 
38 GPBEnumDescriptor *GPBNullValue_EnumDescriptor(void);
39 
40 /// Checks to see if the given value is defined by the enum or was not known at
41 /// the time this source was generated.
42 BOOL GPBNullValue_IsValidValue(int32_t value);
43 
44 #pragma mark - GPBStructRoot
45 
46 /// 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.
54 @interface GPBStructRoot : GPBRootObject
55 @end
56 
57 #pragma mark - GPBStruct
58 
59 typedef GPB_ENUM(GPBStruct_FieldNumber) {
60   GPBStruct_FieldNumber_Fields = 1,
61 };
62 
63 /// `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.
71 @interface GPBStruct : GPBMessage
72 
73 /// Unordered map of dynamically typed values.
74 @property(nonatomic, readwrite, strong, null_resettable) NSMutableDictionary<NSString*, GPBValue*> *fields;
75 /// The number of items in @c fields without causing the array to be created.
property(nonatomic,readonly)76 @property(nonatomic, readonly) NSUInteger fields_Count;
77 
78 @end
79 
80 #pragma mark - GPBValue
81 
82 typedef 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 
91 typedef 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 
101 /// `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.
107 @interface GPBValue : GPBMessage
108 
109 /// The kind of value.
110 @property(nonatomic, readonly) GPBValue_Kind_OneOfCase kindOneOfCase;
111 
112 /// Represents a null value.
113 @property(nonatomic, readwrite) GPBNullValue nullValue;
114 
115 /// Represents a double value.
116 @property(nonatomic, readwrite) double numberValue;
117 
118 /// Represents a string value.
119 @property(nonatomic, readwrite, copy, null_resettable) NSString *stringValue;
120 
121 /// Represents a boolean value.
122 @property(nonatomic, readwrite) BOOL boolValue;
123 
124 /// Represents a structured value.
125 @property(nonatomic, readwrite, strong, null_resettable) GPBStruct *structValue;
126 
127 /// Represents a repeated `Value`.
128 @property(nonatomic, readwrite, strong, null_resettable) GPBListValue *listValue;
129 
130 @end
131 
132 /// 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.
134 int32_t GPBValue_NullValue_RawValue(GPBValue *message);
135 /// 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.
138 void SetGPBValue_NullValue_RawValue(GPBValue *message, int32_t value);
139 
140 /// Clears whatever value was set for the oneof 'kind'.
141 void GPBValue_ClearKindOneOfCase(GPBValue *message);
142 
143 #pragma mark - GPBListValue
144 
145 typedef GPB_ENUM(GPBListValue_FieldNumber) {
146   GPBListValue_FieldNumber_ValuesArray = 1,
147 };
148 
149 /// `ListValue` is a wrapper around a repeated field of values.
150 ///
151 /// The JSON representation for `ListValue` is JSON array.
152 @interface GPBListValue : GPBMessage
153 
154 /// Repeated field of dynamically typed values.
155 @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBValue*> *valuesArray;
156 /// The number of items in @c valuesArray without causing the array to be created.
157 @property(nonatomic, readonly) NSUInteger valuesArray_Count;
158 
159 @end
160 
161 NS_ASSUME_NONNULL_END
162 
163 CF_EXTERN_C_END
164 
165 #pragma clang diagnostic pop
166 
167 // @@protoc_insertion_point(global_scope)
168