1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // source: google/protobuf/any.proto
3
4 #ifndef PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED
5 #define PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED
6
7 #include <string>
8
9 #include <google/protobuf/stubs/common.h>
10
11 #if GOOGLE_PROTOBUF_VERSION < 3005000
12 #error This file was generated by a newer version of protoc which is
13 #error incompatible with your Protocol Buffer headers. Please update
14 #error your headers.
15 #endif
16 #if 3005001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
17 #error This file was generated by an older version of protoc which is
18 #error incompatible with your Protocol Buffer headers. Please
19 #error regenerate this file with a newer version of protoc.
20 #endif
21
22 #include <google/protobuf/io/coded_stream.h>
23 #include <google/protobuf/arena.h>
24 #include <google/protobuf/arenastring.h>
25 #include <google/protobuf/generated_message_table_driven.h>
26 #include <google/protobuf/generated_message_util.h>
27 #include <google/protobuf/metadata.h>
28 #include <google/protobuf/message.h>
29 #include <google/protobuf/repeated_field.h> // IWYU pragma: export
30 #include <google/protobuf/extension_set.h> // IWYU pragma: export
31 #include <google/protobuf/unknown_field_set.h>
32 #include <google/protobuf/any.h>
33 // @@protoc_insertion_point(includes)
34
35 namespace protobuf_google_2fprotobuf_2fany_2eproto {
36 // Internal implementation detail -- do not use these members.
37 struct LIBPROTOBUF_EXPORT TableStruct {
38 static const ::google::protobuf::internal::ParseTableField entries[];
39 static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
40 static const ::google::protobuf::internal::ParseTable schema[1];
41 static const ::google::protobuf::internal::FieldMetadata field_metadata[];
42 static const ::google::protobuf::internal::SerializationTable serialization_table[];
43 static const ::google::protobuf::uint32 offsets[];
44 };
45 void LIBPROTOBUF_EXPORT AddDescriptors();
46 void LIBPROTOBUF_EXPORT InitDefaultsAnyImpl();
47 void LIBPROTOBUF_EXPORT InitDefaultsAny();
InitDefaults()48 inline void LIBPROTOBUF_EXPORT InitDefaults() {
49 InitDefaultsAny();
50 }
51 } // namespace protobuf_google_2fprotobuf_2fany_2eproto
52 namespace google {
53 namespace protobuf {
54 class Any;
55 class AnyDefaultTypeInternal;
56 LIBPROTOBUF_EXPORT extern AnyDefaultTypeInternal _Any_default_instance_;
57 } // namespace protobuf
58 } // namespace google
59 namespace google {
60 namespace protobuf {
61
62 // ===================================================================
63
64 class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Any) */ {
65 public:
66 Any();
67 virtual ~Any();
68
69 Any(const Any& from);
70
71 inline Any& operator=(const Any& from) {
72 CopyFrom(from);
73 return *this;
74 }
75 #if LANG_CXX11
Any(Any && from)76 Any(Any&& from) noexcept
77 : Any() {
78 *this = ::std::move(from);
79 }
80
81 inline Any& operator=(Any&& from) noexcept {
82 if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
83 if (this != &from) InternalSwap(&from);
84 } else {
85 CopyFrom(from);
86 }
87 return *this;
88 }
89 #endif
90 static const ::google::protobuf::Descriptor* descriptor();
91 static const Any& default_instance();
92
93 static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
internal_default_instance()94 static inline const Any* internal_default_instance() {
95 return reinterpret_cast<const Any*>(
96 &_Any_default_instance_);
97 }
98 static PROTOBUF_CONSTEXPR int const kIndexInFileMessages =
99 0;
100
101 // implements Any -----------------------------------------------
102
103 void PackFrom(const ::google::protobuf::Message& message);
104 void PackFrom(const ::google::protobuf::Message& message,
105 const ::std::string& type_url_prefix);
106 bool UnpackTo(::google::protobuf::Message* message) const;
Is()107 template<typename T> bool Is() const {
108 return _any_metadata_.Is<T>();
109 }
110
111 void Swap(Any* other);
swap(Any & a,Any & b)112 friend void swap(Any& a, Any& b) {
113 a.Swap(&b);
114 }
115
116 // implements Message ----------------------------------------------
117
New()118 inline Any* New() const PROTOBUF_FINAL { return New(NULL); }
119
120 Any* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL;
121 void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
122 void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL;
123 void CopyFrom(const Any& from);
124 void MergeFrom(const Any& from);
125 void Clear() PROTOBUF_FINAL;
126 bool IsInitialized() const PROTOBUF_FINAL;
127
128 size_t ByteSizeLong() const PROTOBUF_FINAL;
129 bool MergePartialFromCodedStream(
130 ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL;
131 void SerializeWithCachedSizes(
132 ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL;
133 ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
134 bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINAL;
GetCachedSize()135 int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; }
136 private:
137 void SharedCtor();
138 void SharedDtor();
139 void SetCachedSize(int size) const PROTOBUF_FINAL;
140 void InternalSwap(Any* other);
141 private:
GetArenaNoVirtual()142 inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
143 return NULL;
144 }
MaybeArenaPtr()145 inline void* MaybeArenaPtr() const {
146 return NULL;
147 }
148 public:
149
150 ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL;
151
152 // nested types ----------------------------------------------------
153
154 // accessors -------------------------------------------------------
155
156 // string type_url = 1;
157 void clear_type_url();
158 static const int kTypeUrlFieldNumber = 1;
159 const ::std::string& type_url() const;
160 void set_type_url(const ::std::string& value);
161 #if LANG_CXX11
162 void set_type_url(::std::string&& value);
163 #endif
164 void set_type_url(const char* value);
165 void set_type_url(const char* value, size_t size);
166 ::std::string* mutable_type_url();
167 ::std::string* release_type_url();
168 void set_allocated_type_url(::std::string* type_url);
169
170 // bytes value = 2;
171 void clear_value();
172 static const int kValueFieldNumber = 2;
173 const ::std::string& value() const;
174 void set_value(const ::std::string& value);
175 #if LANG_CXX11
176 void set_value(::std::string&& value);
177 #endif
178 void set_value(const char* value);
179 void set_value(const void* value, size_t size);
180 ::std::string* mutable_value();
181 ::std::string* release_value();
182 void set_allocated_value(::std::string* value);
183
184 // @@protoc_insertion_point(class_scope:google.protobuf.Any)
185 private:
186
187 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
188 ::google::protobuf::internal::ArenaStringPtr type_url_;
189 ::google::protobuf::internal::ArenaStringPtr value_;
190 mutable int _cached_size_;
191 ::google::protobuf::internal::AnyMetadata _any_metadata_;
192 friend struct ::protobuf_google_2fprotobuf_2fany_2eproto::TableStruct;
193 friend void ::protobuf_google_2fprotobuf_2fany_2eproto::InitDefaultsAnyImpl();
194 };
195 // ===================================================================
196
197
198 // ===================================================================
199
200 #ifdef __GNUC__
201 #pragma GCC diagnostic push
202 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
203 #endif // __GNUC__
204 // Any
205
206 // string type_url = 1;
clear_type_url()207 inline void Any::clear_type_url() {
208 type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
209 }
type_url()210 inline const ::std::string& Any::type_url() const {
211 // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url)
212 return type_url_.GetNoArena();
213 }
set_type_url(const::std::string & value)214 inline void Any::set_type_url(const ::std::string& value) {
215
216 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
217 // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
218 }
219 #if LANG_CXX11
set_type_url(::std::string && value)220 inline void Any::set_type_url(::std::string&& value) {
221
222 type_url_.SetNoArena(
223 &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
224 // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.type_url)
225 }
226 #endif
set_type_url(const char * value)227 inline void Any::set_type_url(const char* value) {
228 GOOGLE_DCHECK(value != NULL);
229
230 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
231 // @@protoc_insertion_point(field_set_char:google.protobuf.Any.type_url)
232 }
set_type_url(const char * value,size_t size)233 inline void Any::set_type_url(const char* value, size_t size) {
234
235 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
236 ::std::string(reinterpret_cast<const char*>(value), size));
237 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.type_url)
238 }
mutable_type_url()239 inline ::std::string* Any::mutable_type_url() {
240
241 // @@protoc_insertion_point(field_mutable:google.protobuf.Any.type_url)
242 return type_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
243 }
release_type_url()244 inline ::std::string* Any::release_type_url() {
245 // @@protoc_insertion_point(field_release:google.protobuf.Any.type_url)
246
247 return type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
248 }
set_allocated_type_url(::std::string * type_url)249 inline void Any::set_allocated_type_url(::std::string* type_url) {
250 if (type_url != NULL) {
251
252 } else {
253
254 }
255 type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_url);
256 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
257 }
258
259 // bytes value = 2;
clear_value()260 inline void Any::clear_value() {
261 value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
262 }
value()263 inline const ::std::string& Any::value() const {
264 // @@protoc_insertion_point(field_get:google.protobuf.Any.value)
265 return value_.GetNoArena();
266 }
set_value(const::std::string & value)267 inline void Any::set_value(const ::std::string& value) {
268
269 value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
270 // @@protoc_insertion_point(field_set:google.protobuf.Any.value)
271 }
272 #if LANG_CXX11
set_value(::std::string && value)273 inline void Any::set_value(::std::string&& value) {
274
275 value_.SetNoArena(
276 &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
277 // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.value)
278 }
279 #endif
set_value(const char * value)280 inline void Any::set_value(const char* value) {
281 GOOGLE_DCHECK(value != NULL);
282
283 value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
284 // @@protoc_insertion_point(field_set_char:google.protobuf.Any.value)
285 }
set_value(const void * value,size_t size)286 inline void Any::set_value(const void* value, size_t size) {
287
288 value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
289 ::std::string(reinterpret_cast<const char*>(value), size));
290 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.value)
291 }
mutable_value()292 inline ::std::string* Any::mutable_value() {
293
294 // @@protoc_insertion_point(field_mutable:google.protobuf.Any.value)
295 return value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
296 }
release_value()297 inline ::std::string* Any::release_value() {
298 // @@protoc_insertion_point(field_release:google.protobuf.Any.value)
299
300 return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
301 }
set_allocated_value(::std::string * value)302 inline void Any::set_allocated_value(::std::string* value) {
303 if (value != NULL) {
304
305 } else {
306
307 }
308 value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
309 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
310 }
311
312 #ifdef __GNUC__
313 #pragma GCC diagnostic pop
314 #endif // __GNUC__
315
316 // @@protoc_insertion_point(namespace_scope)
317
318 } // namespace protobuf
319 } // namespace google
320
321 // @@protoc_insertion_point(global_scope)
322
323 #endif // PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED
324