Any.pbobjc.h 3.0 KB

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