GPBStruct.pbobjc.h 5.8 KB

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