Struct.pbobjc.h 5.8 KB

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