blob: 439e3b371e85faf7794c485f977d5b72b254672a [file] [log] [blame]
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -04001// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: google/protobuf/any.proto
3
4#import "GPBProtocolBuffers.h"
5
Thomas Van Lenten79a23c42016-03-17 10:04:21 -04006#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30001
Thomas Van Lenten536059e2015-12-02 14:43:05 -05007#error This file was generated by a different version of protoc which is incompatible with your Protocol Buffer library sources.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -04008#endif
9
10// @@protoc_insertion_point(imports)
11
Thomas Van Lentene664aa62016-04-19 13:13:04 -040012#pragma clang diagnostic push
13#pragma clang diagnostic ignored "-Wdeprecated-declarations"
14
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040015CF_EXTERN_C_BEGIN
16
Thomas Van Lenten8c889572015-06-16 16:45:14 -040017NS_ASSUME_NONNULL_BEGIN
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040018
19#pragma mark - GPBAnyRoot
20
Thomas Van Lenten36650a02016-03-07 12:07:03 -050021/// Exposes the extension registry for this file.
22///
23/// The base class provides:
24/// @code
25/// + (GPBExtensionRegistry *)extensionRegistry;
26/// @endcode
27/// which is a @c GPBExtensionRegistry that includes all the extensions defined by
28/// this file and all files that it depends on.
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040029@interface GPBAnyRoot : GPBRootObject
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040030@end
31
32#pragma mark - GPBAny
33
34typedef GPB_ENUM(GPBAny_FieldNumber) {
35 GPBAny_FieldNumber_TypeURL = 1,
36 GPBAny_FieldNumber_Value = 2,
37};
38
Thomas Van Lentene664aa62016-04-19 13:13:04 -040039/// `Any` contains an arbitrary serialized protocol buffer message along with a
40/// URL that describes the type of the serialized message.
41///
42/// Protobuf library provides support to pack/unpack Any values in the form
43/// of utility functions or additional generated methods of the Any type.
44///
45/// Example 1: Pack and unpack a message in C++.
46///
47/// Foo foo = ...;
48/// Any any;
49/// any.PackFrom(foo);
50/// ...
51/// if (any.UnpackTo(&foo)) {
52/// ...
53/// }
54///
55/// Example 2: Pack and unpack a message in Java.
56///
57/// Foo foo = ...;
58/// Any any = Any.pack(foo);
59/// ...
60/// if (any.is(Foo.class)) {
61/// foo = any.unpack(Foo.class);
62/// }
63///
64/// The pack methods provided by protobuf library will by default use
65/// 'type.googleapis.com/full.type.name' as the type URL and the unpack
66/// methods only use the fully qualified type name after the last '/'
67/// in the type URL, for example "foo.bar.com/x/y.z" will yield type
68/// name "y.z".
Thomas Van Lenten36650a02016-03-07 12:07:03 -050069///
70///
71/// JSON
72/// ====
73/// The JSON representation of an `Any` value uses the regular
74/// representation of the deserialized, embedded message, with an
75/// additional field `\@type` which contains the type URL. Example:
76///
77/// package google.profile;
78/// message Person {
79/// string first_name = 1;
80/// string last_name = 2;
81/// }
82///
83/// {
84/// "\@type": "type.googleapis.com/google.profile.Person",
85/// "firstName": <string>,
86/// "lastName": <string>
87/// }
88///
89/// If the embedded message type is well-known and has a custom JSON
90/// representation, that representation will be embedded adding a field
91/// `value` which holds the custom JSON in addition to the `\@type`
92/// field. Example (for message [google.protobuf.Duration][]):
93///
94/// {
95/// "\@type": "type.googleapis.com/google.protobuf.Duration",
96/// "value": "1.212s"
97/// }
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -040098@interface GPBAny : GPBMessage
99
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500100/// A URL/resource name whose content describes the type of the
Thomas Van Lentene664aa62016-04-19 13:13:04 -0400101/// serialized protocol buffer message.
Thomas Van Lenten36650a02016-03-07 12:07:03 -0500102///
103/// For URLs which use the schema `http`, `https`, or no schema, the
104/// following restrictions and interpretations apply:
105///
106/// * If no schema is provided, `https` is assumed.
107/// * The last segment of the URL's path must represent the fully
108/// qualified name of the type (as in `path/google.protobuf.Duration`).
109/// * An HTTP GET on the URL must yield a [google.protobuf.Type][]
110/// value in binary format, or produce an error.
111/// * Applications are allowed to cache lookup results based on the
112/// URL, or have them precompiled into a binary to avoid any
113/// lookup. Therefore, binary compatibility needs to be preserved
114/// on changes to types. (Use versioned type names to manage
115/// breaking changes.)
116///
117/// Schemas other than `http`, `https` (or the empty schema) might be
118/// used with implementation specific semantics.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400119@property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400120
Thomas Van Lentene664aa62016-04-19 13:13:04 -0400121/// Must be a valid serialized protocol buffer of the above specified type.
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400122@property(nonatomic, readwrite, copy, null_resettable) NSData *value;
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400123
124@end
125
Thomas Van Lenten8c889572015-06-16 16:45:14 -0400126NS_ASSUME_NONNULL_END
127
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400128CF_EXTERN_C_END
129
Thomas Van Lentene664aa62016-04-19 13:13:04 -0400130#pragma clang diagnostic pop
131
Thomas Van Lenten1dcc3292015-05-21 17:14:52 -0400132// @@protoc_insertion_point(global_scope)