blob: fb2042519999a5385ed5697305976e7dce09f734 [file] [log] [blame]
Brian Silverman9c614bc2016-02-15 20:20:02 -05001// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: google/protobuf/struct.proto
3
Austin Schuh40c16522018-10-28 20:27:54 -07004// 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
Brian Silverman9c614bc2016-02-15 20:20:02 -05009
Austin Schuh40c16522018-10-28 20:27:54 -070010#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
20#if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
21#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
22#endif
23#if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
24#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
Brian Silverman9c614bc2016-02-15 20:20:02 -050025#endif
26
27// @@protoc_insertion_point(imports)
28
Austin Schuh40c16522018-10-28 20:27:54 -070029#pragma clang diagnostic push
30#pragma clang diagnostic ignored "-Wdeprecated-declarations"
31
Brian Silverman9c614bc2016-02-15 20:20:02 -050032CF_EXTERN_C_BEGIN
33
34@class GPBListValue;
35@class GPBStruct;
Austin Schuh40c16522018-10-28 20:27:54 -070036@class GPBValue;
Brian Silverman9c614bc2016-02-15 20:20:02 -050037
38NS_ASSUME_NONNULL_BEGIN
39
40#pragma mark - Enum GPBNullValue
41
Austin Schuh40c16522018-10-28 20:27:54 -070042/**
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 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -050048typedef GPB_ENUM(GPBNullValue) {
Austin Schuh40c16522018-10-28 20:27:54 -070049 /**
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 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -050054 GPBNullValue_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
Austin Schuh40c16522018-10-28 20:27:54 -070055 /** Null value. */
Brian Silverman9c614bc2016-02-15 20:20:02 -050056 GPBNullValue_NullValue = 0,
57};
58
59GPBEnumDescriptor *GPBNullValue_EnumDescriptor(void);
60
Austin Schuh40c16522018-10-28 20:27:54 -070061/**
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 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -050065BOOL GPBNullValue_IsValidValue(int32_t value);
66
67#pragma mark - GPBStructRoot
68
Austin Schuh40c16522018-10-28 20:27:54 -070069/**
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 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -050079@interface GPBStructRoot : GPBRootObject
Brian Silverman9c614bc2016-02-15 20:20:02 -050080@end
81
82#pragma mark - GPBStruct
83
84typedef GPB_ENUM(GPBStruct_FieldNumber) {
85 GPBStruct_FieldNumber_Fields = 1,
86};
87
Austin Schuh40c16522018-10-28 20:27:54 -070088/**
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 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -050098@interface GPBStruct : GPBMessage
99
Austin Schuh40c16522018-10-28 20:27:54 -0700100/** 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. */
Brian Silverman9c614bc2016-02-15 20:20:02 -0500103@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
Austin Schuh40c16522018-10-28 20:27:54 -0700128/**
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 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -0500136@interface GPBValue : GPBMessage
137
Austin Schuh40c16522018-10-28 20:27:54 -0700138/** The kind of value. */
Brian Silverman9c614bc2016-02-15 20:20:02 -0500139@property(nonatomic, readonly) GPBValue_Kind_OneOfCase kindOneOfCase;
140
Austin Schuh40c16522018-10-28 20:27:54 -0700141/** Represents a null value. */
Brian Silverman9c614bc2016-02-15 20:20:02 -0500142@property(nonatomic, readwrite) GPBNullValue nullValue;
143
Austin Schuh40c16522018-10-28 20:27:54 -0700144/** Represents a double value. */
Brian Silverman9c614bc2016-02-15 20:20:02 -0500145@property(nonatomic, readwrite) double numberValue;
146
Austin Schuh40c16522018-10-28 20:27:54 -0700147/** Represents a string value. */
Brian Silverman9c614bc2016-02-15 20:20:02 -0500148@property(nonatomic, readwrite, copy, null_resettable) NSString *stringValue;
149
Austin Schuh40c16522018-10-28 20:27:54 -0700150/** Represents a boolean value. */
Brian Silverman9c614bc2016-02-15 20:20:02 -0500151@property(nonatomic, readwrite) BOOL boolValue;
152
Austin Schuh40c16522018-10-28 20:27:54 -0700153/** Represents a structured value. */
Brian Silverman9c614bc2016-02-15 20:20:02 -0500154@property(nonatomic, readwrite, strong, null_resettable) GPBStruct *structValue;
155
Austin Schuh40c16522018-10-28 20:27:54 -0700156/** Represents a repeated `Value`. */
Brian Silverman9c614bc2016-02-15 20:20:02 -0500157@property(nonatomic, readwrite, strong, null_resettable) GPBListValue *listValue;
158
159@end
160
Austin Schuh40c16522018-10-28 20:27:54 -0700161/**
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 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -0500165int32_t GPBValue_NullValue_RawValue(GPBValue *message);
Austin Schuh40c16522018-10-28 20:27:54 -0700166/**
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 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -0500171void SetGPBValue_NullValue_RawValue(GPBValue *message, int32_t value);
172
Austin Schuh40c16522018-10-28 20:27:54 -0700173/**
174 * Clears whatever value was set for the oneof 'kind'.
175 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -0500176void GPBValue_ClearKindOneOfCase(GPBValue *message);
177
178#pragma mark - GPBListValue
179
180typedef GPB_ENUM(GPBListValue_FieldNumber) {
181 GPBListValue_FieldNumber_ValuesArray = 1,
182};
183
Austin Schuh40c16522018-10-28 20:27:54 -0700184/**
185 * `ListValue` is a wrapper around a repeated field of values.
186 *
187 * The JSON representation for `ListValue` is JSON array.
188 **/
Brian Silverman9c614bc2016-02-15 20:20:02 -0500189@interface GPBListValue : GPBMessage
190
Austin Schuh40c16522018-10-28 20:27:54 -0700191/** 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. */
Brian Silverman9c614bc2016-02-15 20:20:02 -0500194@property(nonatomic, readonly) NSUInteger valuesArray_Count;
195
196@end
197
198NS_ASSUME_NONNULL_END
199
200CF_EXTERN_C_END
201
Austin Schuh40c16522018-10-28 20:27:54 -0700202#pragma clang diagnostic pop
203
Brian Silverman9c614bc2016-02-15 20:20:02 -0500204// @@protoc_insertion_point(global_scope)