Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(93)

Side by Side Diff: third_party/protobuf/objectivec/google/protobuf/Any.pbobjc.h

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

Powered by Google App Engine
This is Rietveld 408576698