GPBStruct.pbobjc.h 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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. #import "GPBDescriptor.h"
  6. #import "GPBMessage.h"
  7. #import "GPBRootObject.h"
  8. #if GOOGLE_PROTOBUF_OBJC_VERSION < 30007
  9. #error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
  10. #endif
  11. #if 30007 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
  12. #error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
  13. #endif
  14. // @@protoc_insertion_point(imports)
  15. #pragma clang diagnostic push
  16. #pragma clang diagnostic ignored "-Wdeprecated-declarations"
  17. CF_EXTERN_C_BEGIN
  18. @class GPBListValue;
  19. @class GPBStruct;
  20. @class GPBValue;
  21. NS_ASSUME_NONNULL_BEGIN
  22. #pragma mark - Enum GPBNullValue
  23. /**
  24. * `NullValue` is a singleton enumeration to represent the null value for the
  25. * `Value` type union.
  26. *
  27. * The JSON representation for `NullValue` is JSON `null`.
  28. **/
  29. typedef GPB_ENUM(GPBNullValue) {
  30. /**
  31. * Value used if any message's field encounters a value that is not defined
  32. * by this enum. The message will also have C functions to get/set the rawValue
  33. * of the field.
  34. **/
  35. GPBNullValue_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
  36. /** Null value. */
  37. GPBNullValue_NullValue = 0,
  38. };
  39. GPBEnumDescriptor *GPBNullValue_EnumDescriptor(void);
  40. /**
  41. * Checks to see if the given value is defined by the enum or was not known at
  42. * the time this source was generated.
  43. **/
  44. BOOL GPBNullValue_IsValidValue(int32_t value);
  45. #pragma mark - GPBStructRoot
  46. /**
  47. * Exposes the extension registry for this file.
  48. *
  49. * The base class provides:
  50. * @code
  51. * + (GPBExtensionRegistry *)extensionRegistry;
  52. * @endcode
  53. * which is a @c GPBExtensionRegistry that includes all the extensions defined by
  54. * this file and all files that it depends on.
  55. **/
  56. GPB_FINAL @interface GPBStructRoot : GPBRootObject
  57. @end
  58. #pragma mark - GPBStruct
  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. **/
  72. GPB_FINAL @interface GPBStruct : GPBMessage
  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 container to be created. */
  76. @property(nonatomic, readonly) NSUInteger fields_Count;
  77. @end
  78. #pragma mark - GPBValue
  79. typedef GPB_ENUM(GPBValue_FieldNumber) {
  80. GPBValue_FieldNumber_NullValue = 1,
  81. GPBValue_FieldNumber_NumberValue = 2,
  82. GPBValue_FieldNumber_StringValue = 3,
  83. GPBValue_FieldNumber_BoolValue = 4,
  84. GPBValue_FieldNumber_StructValue = 5,
  85. GPBValue_FieldNumber_ListValue = 6,
  86. };
  87. typedef GPB_ENUM(GPBValue_Kind_OneOfCase) {
  88. GPBValue_Kind_OneOfCase_GPBUnsetOneOfCase = 0,
  89. GPBValue_Kind_OneOfCase_NullValue = 1,
  90. GPBValue_Kind_OneOfCase_NumberValue = 2,
  91. GPBValue_Kind_OneOfCase_StringValue = 3,
  92. GPBValue_Kind_OneOfCase_BoolValue = 4,
  93. GPBValue_Kind_OneOfCase_StructValue = 5,
  94. GPBValue_Kind_OneOfCase_ListValue = 6,
  95. };
  96. /**
  97. * `Value` represents a dynamically typed value which can be either
  98. * null, a number, a string, a boolean, a recursive struct value, or a
  99. * list of values. A producer of value is expected to set one of these
  100. * variants. Absence of any variant indicates an error.
  101. *
  102. * The JSON representation for `Value` is JSON value.
  103. **/
  104. GPB_FINAL @interface GPBValue : GPBMessage
  105. /** The kind of value. */
  106. @property(nonatomic, readonly) GPBValue_Kind_OneOfCase kindOneOfCase;
  107. /** Represents a null value. */
  108. @property(nonatomic, readwrite) GPBNullValue nullValue;
  109. /** Represents a double value. */
  110. @property(nonatomic, readwrite) double numberValue;
  111. /** Represents a string value. */
  112. @property(nonatomic, readwrite, copy, null_resettable) NSString *stringValue;
  113. /** Represents a boolean value. */
  114. @property(nonatomic, readwrite) BOOL boolValue;
  115. /** Represents a structured value. */
  116. @property(nonatomic, readwrite, strong, null_resettable) GPBStruct *structValue;
  117. /** Represents a repeated `Value`. */
  118. @property(nonatomic, readwrite, strong, null_resettable) GPBListValue *listValue;
  119. @end
  120. /**
  121. * Fetches the raw value of a @c GPBValue's @c nullValue property, even
  122. * if the value was not defined by the enum at the time the code was generated.
  123. **/
  124. int32_t GPBValue_NullValue_RawValue(GPBValue *message);
  125. /**
  126. * Sets the raw value of an @c GPBValue's @c nullValue property, allowing
  127. * it to be set to a value that was not defined by the enum at the time the code
  128. * was generated.
  129. **/
  130. void SetGPBValue_NullValue_RawValue(GPBValue *message, int32_t value);
  131. /**
  132. * Clears whatever value was set for the oneof 'kind'.
  133. **/
  134. void GPBValue_ClearKindOneOfCase(GPBValue *message);
  135. #pragma mark - GPBListValue
  136. typedef GPB_ENUM(GPBListValue_FieldNumber) {
  137. GPBListValue_FieldNumber_ValuesArray = 1,
  138. };
  139. /**
  140. * `ListValue` is a wrapper around a repeated field of values.
  141. *
  142. * The JSON representation for `ListValue` is JSON array.
  143. **/
  144. GPB_FINAL @interface GPBListValue : GPBMessage
  145. /** Repeated field of dynamically typed values. */
  146. @property(nonatomic, readwrite, strong, null_resettable) NSMutableArray<GPBValue*> *valuesArray;
  147. /** The number of items in @c valuesArray without causing the container to be created. */
  148. @property(nonatomic, readonly) NSUInteger valuesArray_Count;
  149. @end
  150. NS_ASSUME_NONNULL_END
  151. CF_EXTERN_C_END
  152. #pragma clang diagnostic pop
  153. // @@protoc_insertion_point(global_scope)
  154. // clang-format on