You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

183 lines
5.5 KiB

6 years ago
6 years ago
6 years ago
6 years ago
6 years ago
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/any.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/GPBDescriptor.h>
  10. #import <Protobuf/GPBMessage.h>
  11. #import <Protobuf/GPBRootObject.h>
  12. #else
  13. #import "GPBDescriptor.h"
  14. #import "GPBMessage.h"
  15. #import "GPBRootObject.h"
  16. #endif
  17. #if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
  18. #error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
  19. #endif
  20. #if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
  21. #error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
  22. #endif
  23. // @@protoc_insertion_point(imports)
  24. #pragma clang diagnostic push
  25. #pragma clang diagnostic ignored "-Wdeprecated-declarations"
  26. CF_EXTERN_C_BEGIN
  27. NS_ASSUME_NONNULL_BEGIN
  28. #pragma mark - GPBAnyRoot
  29. /**
  30. * Exposes the extension registry for this file.
  31. *
  32. * The base class provides:
  33. * @code
  34. * + (GPBExtensionRegistry *)extensionRegistry;
  35. * @endcode
  36. * which is a @c GPBExtensionRegistry that includes all the extensions defined by
  37. * this file and all files that it depends on.
  38. **/
  39. @interface GPBAnyRoot : GPBRootObject
  40. @end
  41. #pragma mark - GPBAny
  42. typedef GPB_ENUM(GPBAny_FieldNumber) {
  43. GPBAny_FieldNumber_TypeURL = 1,
  44. GPBAny_FieldNumber_Value = 2,
  45. };
  46. /**
  47. * `Any` contains an arbitrary serialized protocol buffer message along with a
  48. * URL that describes the type of the serialized message.
  49. *
  50. * Protobuf library provides support to pack/unpack Any values in the form
  51. * of utility functions or additional generated methods of the Any type.
  52. *
  53. * Example 1: Pack and unpack a message in C++.
  54. *
  55. * Foo foo = ...;
  56. * Any any;
  57. * any.PackFrom(foo);
  58. * ...
  59. * if (any.UnpackTo(&foo)) {
  60. * ...
  61. * }
  62. *
  63. * Example 2: Pack and unpack a message in Java.
  64. *
  65. * Foo foo = ...;
  66. * Any any = Any.pack(foo);
  67. * ...
  68. * if (any.is(Foo.class)) {
  69. * foo = any.unpack(Foo.class);
  70. * }
  71. *
  72. * Example 3: Pack and unpack a message in Python.
  73. *
  74. * foo = Foo(...)
  75. * any = Any()
  76. * any.Pack(foo)
  77. * ...
  78. * if any.Is(Foo.DESCRIPTOR):
  79. * any.Unpack(foo)
  80. * ...
  81. *
  82. * Example 4: Pack and unpack a message in Go
  83. *
  84. * foo := &pb.Foo{...}
  85. * any, err := ptypes.MarshalAny(foo)
  86. * ...
  87. * foo := &pb.Foo{}
  88. * if err := ptypes.UnmarshalAny(any, foo); err != nil {
  89. * ...
  90. * }
  91. *
  92. * The pack methods provided by protobuf library will by default use
  93. * 'type.googleapis.com/full.type.name' as the type URL and the unpack
  94. * methods only use the fully qualified type name after the last '/'
  95. * in the type URL, for example "foo.bar.com/x/y.z" will yield type
  96. * name "y.z".
  97. *
  98. *
  99. * JSON
  100. * ====
  101. * The JSON representation of an `Any` value uses the regular
  102. * representation of the deserialized, embedded message, with an
  103. * additional field `\@type` which contains the type URL. Example:
  104. *
  105. * package google.profile;
  106. * message Person {
  107. * string first_name = 1;
  108. * string last_name = 2;
  109. * }
  110. *
  111. * {
  112. * "\@type": "type.googleapis.com/google.profile.Person",
  113. * "firstName": <string>,
  114. * "lastName": <string>
  115. * }
  116. *
  117. * If the embedded message type is well-known and has a custom JSON
  118. * representation, that representation will be embedded adding a field
  119. * `value` which holds the custom JSON in addition to the `\@type`
  120. * field. Example (for message [google.protobuf.Duration][]):
  121. *
  122. * {
  123. * "\@type": "type.googleapis.com/google.protobuf.Duration",
  124. * "value": "1.212s"
  125. * }
  126. **/
  127. @interface GPBAny : GPBMessage
  128. /**
  129. * A URL/resource name that uniquely identifies the type of the serialized
  130. * protocol buffer message. This string must contain at least
  131. * one "/" character. The last segment of the URL's path must represent
  132. * the fully qualified name of the type (as in
  133. * `path/google.protobuf.Duration`). The name should be in a canonical form
  134. * (e.g., leading "." is not accepted).
  135. *
  136. * In practice, teams usually precompile into the binary all types that they
  137. * expect it to use in the context of Any. However, for URLs which use the
  138. * scheme `http`, `https`, or no scheme, one can optionally set up a type
  139. * server that maps type URLs to message definitions as follows:
  140. *
  141. * * If no scheme is provided, `https` is assumed.
  142. * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
  143. * value in binary format, or produce an error.
  144. * * Applications are allowed to cache lookup results based on the
  145. * URL, or have them precompiled into a binary to avoid any
  146. * lookup. Therefore, binary compatibility needs to be preserved
  147. * on changes to types. (Use versioned type names to manage
  148. * breaking changes.)
  149. *
  150. * Note: this functionality is not currently available in the official
  151. * protobuf release, and it is not used for type URLs beginning with
  152. * type.googleapis.com.
  153. *
  154. * Schemes other than `http`, `https` (or the empty scheme) might be
  155. * used with implementation specific semantics.
  156. **/
  157. @property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL;
  158. /** Must be a valid serialized protocol buffer of the above specified type. */
  159. @property(nonatomic, readwrite, copy, null_resettable) NSData *value;
  160. @end
  161. NS_ASSUME_NONNULL_END
  162. CF_EXTERN_C_END
  163. #pragma clang diagnostic pop
  164. // @@protoc_insertion_point(global_scope)