GPBStruct.pbobjc.h 5.8 KB

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