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