Any.pbobjc.h 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/any.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 which is incompatible with your Protocol Buffer library sources.
  6. #endif
  7. // @@protoc_insertion_point(imports)
  8. CF_EXTERN_C_BEGIN
  9. NS_ASSUME_NONNULL_BEGIN
  10. #pragma mark - GPBAnyRoot
  11. /// Exposes the extension registry for this file.
  12. ///
  13. /// The base class provides:
  14. /// @code
  15. /// + (GPBExtensionRegistry *)extensionRegistry;
  16. /// @endcode
  17. /// which is a @c GPBExtensionRegistry that includes all the extensions defined by
  18. /// this file and all files that it depends on.
  19. @interface GPBAnyRoot : GPBRootObject
  20. @end
  21. #pragma mark - GPBAny
  22. typedef GPB_ENUM(GPBAny_FieldNumber) {
  23. GPBAny_FieldNumber_TypeURL = 1,
  24. GPBAny_FieldNumber_Value = 2,
  25. };
  26. /// `Any` contains an arbitrary serialized message along with a URL
  27. /// that describes the type of the serialized message.
  28. ///
  29. ///
  30. /// JSON
  31. /// ====
  32. /// The JSON representation of an `Any` value uses the regular
  33. /// representation of the deserialized, embedded message, with an
  34. /// additional field `\@type` which contains the type URL. Example:
  35. ///
  36. /// package google.profile;
  37. /// message Person {
  38. /// string first_name = 1;
  39. /// string last_name = 2;
  40. /// }
  41. ///
  42. /// {
  43. /// "\@type": "type.googleapis.com/google.profile.Person",
  44. /// "firstName": <string>,
  45. /// "lastName": <string>
  46. /// }
  47. ///
  48. /// If the embedded message type is well-known and has a custom JSON
  49. /// representation, that representation will be embedded adding a field
  50. /// `value` which holds the custom JSON in addition to the `\@type`
  51. /// field. Example (for message [google.protobuf.Duration][]):
  52. ///
  53. /// {
  54. /// "\@type": "type.googleapis.com/google.protobuf.Duration",
  55. /// "value": "1.212s"
  56. /// }
  57. @interface GPBAny : GPBMessage
  58. /// A URL/resource name whose content describes the type of the
  59. /// serialized message.
  60. ///
  61. /// For URLs which use the schema `http`, `https`, or no schema, the
  62. /// following restrictions and interpretations apply:
  63. ///
  64. /// * If no schema is provided, `https` is assumed.
  65. /// * The last segment of the URL's path must represent the fully
  66. /// qualified name of the type (as in `path/google.protobuf.Duration`).
  67. /// * An HTTP GET on the URL must yield a [google.protobuf.Type][]
  68. /// value in binary format, or produce an error.
  69. /// * Applications are allowed to cache lookup results based on the
  70. /// URL, or have them precompiled into a binary to avoid any
  71. /// lookup. Therefore, binary compatibility needs to be preserved
  72. /// on changes to types. (Use versioned type names to manage
  73. /// breaking changes.)
  74. ///
  75. /// Schemas other than `http`, `https` (or the empty schema) might be
  76. /// used with implementation specific semantics.
  77. @property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL;
  78. /// Must be valid serialized data of the above specified type.
  79. @property(nonatomic, readwrite, copy, null_resettable) NSData *value;
  80. @end
  81. NS_ASSUME_NONNULL_END
  82. CF_EXTERN_C_END
  83. // @@protoc_insertion_point(global_scope)