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