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.

173 lines
5.1 KiB

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