1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/any.proto
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
10 #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
11 #import <Protobuf/GPBDescriptor.h>
12 #import <Protobuf/GPBMessage.h>
13 #import <Protobuf/GPBRootObject.h>
15 #import "GPBDescriptor.h"
16 #import "GPBMessage.h"
17 #import "GPBRootObject.h"
20 #if GOOGLE_PROTOBUF_OBJC_VERSION < 30002
21 #error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
23 #if 30002 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
24 #error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
27 // @@protoc_insertion_point(imports)
29 #pragma clang diagnostic push
30 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
34 NS_ASSUME_NONNULL_BEGIN
36 #pragma mark - GPBAnyRoot
39 * Exposes the extension registry for this file.
41 * The base class provides:
43 * + (GPBExtensionRegistry *)extensionRegistry;
45 * which is a @c GPBExtensionRegistry that includes all the extensions defined by
46 * this file and all files that it depends on.
48 @interface GPBAnyRoot : GPBRootObject
53 typedef GPB_ENUM(GPBAny_FieldNumber) {
54 GPBAny_FieldNumber_TypeURL = 1,
55 GPBAny_FieldNumber_Value = 2,
59 * `Any` contains an arbitrary serialized protocol buffer message along with a
60 * URL that describes the type of the serialized message.
62 * Protobuf library provides support to pack/unpack Any values in the form
63 * of utility functions or additional generated methods of the Any type.
65 * Example 1: Pack and unpack a message in C++.
71 * if (any.UnpackTo(&foo)) {
75 * Example 2: Pack and unpack a message in Java.
78 * Any any = Any.pack(foo);
80 * if (any.is(Foo.class)) {
81 * foo = any.unpack(Foo.class);
84 * Example 3: Pack and unpack a message in Python.
90 * if any.Is(Foo.DESCRIPTOR):
94 * Example 4: Pack and unpack a message in Go
97 * any, err := ptypes.MarshalAny(foo)
100 * if err := ptypes.UnmarshalAny(any, foo); err != nil {
104 * The pack methods provided by protobuf library will by default use
105 * 'type.googleapis.com/full.type.name' as the type URL and the unpack
106 * methods only use the fully qualified type name after the last '/'
107 * in the type URL, for example "foo.bar.com/x/y.z" will yield type
113 * The JSON representation of an `Any` value uses the regular
114 * representation of the deserialized, embedded message, with an
115 * additional field `\@type` which contains the type URL. Example:
117 * package google.profile;
119 * string first_name = 1;
120 * string last_name = 2;
124 * "\@type": "type.googleapis.com/google.profile.Person",
125 * "firstName": <string>,
126 * "lastName": <string>
129 * If the embedded message type is well-known and has a custom JSON
130 * representation, that representation will be embedded adding a field
131 * `value` which holds the custom JSON in addition to the `\@type`
132 * field. Example (for message [google.protobuf.Duration][]):
135 * "\@type": "type.googleapis.com/google.protobuf.Duration",
139 @interface GPBAny : GPBMessage
142 * A URL/resource name that uniquely identifies the type of the serialized
143 * protocol buffer message. The last segment of the URL's path must represent
144 * the fully qualified name of the type (as in
145 * `path/google.protobuf.Duration`). The name should be in a canonical form
146 * (e.g., leading "." is not accepted).
148 * In practice, teams usually precompile into the binary all types that they
149 * expect it to use in the context of Any. However, for URLs which use the
150 * scheme `http`, `https`, or no scheme, one can optionally set up a type
151 * server that maps type URLs to message definitions as follows:
153 * * If no scheme is provided, `https` is assumed.
154 * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
155 * value in binary format, or produce an error.
156 * * Applications are allowed to cache lookup results based on the
157 * URL, or have them precompiled into a binary to avoid any
158 * lookup. Therefore, binary compatibility needs to be preserved
159 * on changes to types. (Use versioned type names to manage
162 * Note: this functionality is not currently available in the official
163 * protobuf release, and it is not used for type URLs beginning with
164 * type.googleapis.com.
166 * Schemes other than `http`, `https` (or the empty scheme) might be
167 * used with implementation specific semantics.
169 @property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL;
171 /** Must be a valid serialized protocol buffer of the above specified type. */
172 @property(nonatomic, readwrite, copy, null_resettable) NSData *value;
176 NS_ASSUME_NONNULL_END
180 #pragma clang diagnostic pop
182 // @@protoc_insertion_point(global_scope)