Struct.pbobjc.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/struct.proto
  3. #import "GPBProtocolBuffers.h"
  4. #if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000
  5. #error This file was generated by a different version of protoc-gen-objc which is incompatible with your Protocol Buffer sources.
  6. #endif
  7. // @@protoc_insertion_point(imports)
  8. CF_EXTERN_C_BEGIN
  9. @class GPBListValue;
  10. @class GPBStruct;
  11. #pragma mark - Enum GPBNullValue
  12. // `NullValue` is a singleton enumeration to represent the null
  13. // value for the `Value` type union.
  14. typedef GPB_ENUM(GPBNullValue) {
  15. GPBNullValue_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
  16. // Null value.
  17. GPBNullValue_NullValue = 0,
  18. };
  19. GPBEnumDescriptor *GPBNullValue_EnumDescriptor(void);
  20. BOOL GPBNullValue_IsValidValue(int32_t value);
  21. #pragma mark - GPBStructRoot
  22. @interface GPBStructRoot : GPBRootObject
  23. // The base class provides:
  24. // + (GPBExtensionRegistry *)extensionRegistry;
  25. // which is an GPBExtensionRegistry that includes all the extensions defined by
  26. // this file and all files that it depends on.
  27. @end
  28. #pragma mark - GPBStruct
  29. typedef GPB_ENUM(GPBStruct_FieldNumber) {
  30. GPBStruct_FieldNumber_Fields = 1,
  31. };
  32. // `Struct` represents a structured data value, consisting of fields
  33. // which map to dynamically typed values. In some languages, `Struct`
  34. // might be supported by a native representation. For example, in
  35. // scripting languages like JS a struct is represented as an
  36. // object. The details of that representation are described together
  37. // with the proto support for the language.
  38. @interface GPBStruct : GPBMessage
  39. // Map of dynamically typed values.
  40. // |fields| values are |GPBValue|
  41. @property(nonatomic, readwrite, strong) NSMutableDictionary *fields;
  42. @end
  43. #pragma mark - GPBValue
  44. typedef GPB_ENUM(GPBValue_FieldNumber) {
  45. GPBValue_FieldNumber_NullValue = 1,
  46. GPBValue_FieldNumber_NumberValue = 2,
  47. GPBValue_FieldNumber_StringValue = 3,
  48. GPBValue_FieldNumber_BoolValue = 4,
  49. GPBValue_FieldNumber_StructValue = 5,
  50. GPBValue_FieldNumber_ListValue = 6,
  51. };
  52. typedef GPB_ENUM(GPBValue_Kind_OneOfCase) {
  53. GPBValue_Kind_OneOfCase_GPBUnsetOneOfCase = 0,
  54. GPBValue_Kind_OneOfCase_NullValue = 1,
  55. GPBValue_Kind_OneOfCase_NumberValue = 2,
  56. GPBValue_Kind_OneOfCase_StringValue = 3,
  57. GPBValue_Kind_OneOfCase_BoolValue = 4,
  58. GPBValue_Kind_OneOfCase_StructValue = 5,
  59. GPBValue_Kind_OneOfCase_ListValue = 6,
  60. };
  61. // `Value` represents a dynamically typed value which can be either
  62. // null, a number, a string, a boolean, a recursive struct value, or a
  63. // list of values. A producer of value is expected to set one of that
  64. // variants, absence of any variant indicates an error.
  65. @interface GPBValue : GPBMessage
  66. @property(nonatomic, readonly) GPBValue_Kind_OneOfCase kindOneOfCase;
  67. // Represents a null value.
  68. @property(nonatomic, readwrite) GPBNullValue nullValue;
  69. // Represents a double value.
  70. @property(nonatomic, readwrite) double numberValue;
  71. // Represents a string value.
  72. @property(nonatomic, readwrite, copy) NSString *stringValue;
  73. // Represents a boolean value.
  74. @property(nonatomic, readwrite) BOOL boolValue;
  75. // Represents a structured value.
  76. @property(nonatomic, readwrite, strong) GPBStruct *structValue;
  77. // Represents a repeated `Value`.
  78. @property(nonatomic, readwrite, strong) GPBListValue *listValue;
  79. @end
  80. int32_t GPBValue_NullValue_RawValue(GPBValue *message);
  81. void SetGPBValue_NullValue_RawValue(GPBValue *message, int32_t value);
  82. void GPBValue_ClearKindOneOfCase(GPBValue *message);
  83. #pragma mark - GPBListValue
  84. typedef GPB_ENUM(GPBListValue_FieldNumber) {
  85. GPBListValue_FieldNumber_ValuesArray = 1,
  86. };
  87. // `ListValue` is a wrapper around a repeated field of values.
  88. @interface GPBListValue : GPBMessage
  89. // Repeated field of dynamically typed values.
  90. // |valuesArray| contains |GPBValue|
  91. @property(nonatomic, readwrite, strong) NSMutableArray *valuesArray;
  92. @end
  93. CF_EXTERN_C_END
  94. // @@protoc_insertion_point(global_scope)