blob: 82c70ad90ae887379b4fd30a289804f94f2f8ec9 [file] [log] [blame]
Feng Xiao33c92802015-05-11 13:47:41 -07001// 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 < 3000000
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 3000000 < 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/arena.h>
23#include <google/protobuf/arenastring.h>
24#include <google/protobuf/generated_message_util.h>
25#include <google/protobuf/metadata.h>
26#include <google/protobuf/message.h>
27#include <google/protobuf/repeated_field.h>
28#include <google/protobuf/extension_set.h>
29#include <google/protobuf/unknown_field_set.h>
Bo Yang1f0286a2015-12-04 13:18:44 -080030#include <google/protobuf/any.h>
Feng Xiao33c92802015-05-11 13:47:41 -070031// @@protoc_insertion_point(includes)
32
33namespace google {
34namespace protobuf {
35
36// Internal implementation detail -- do not call these.
37void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fany_2eproto();
38void protobuf_AssignDesc_google_2fprotobuf_2fany_2eproto();
39void protobuf_ShutdownFile_google_2fprotobuf_2fany_2eproto();
40
41class Any;
42
43// ===================================================================
44
45class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message {
46 public:
47 Any();
48 virtual ~Any();
49
50 Any(const Any& from);
51
52 inline Any& operator=(const Any& from) {
53 CopyFrom(from);
54 return *this;
55 }
56
57 static const ::google::protobuf::Descriptor* descriptor();
58 static const Any& default_instance();
59
Bo Yang5db21732015-05-21 14:28:59 -070060 // implements Any -----------------------------------------------
61
62 void PackFrom(const ::google::protobuf::Message& message);
Jisi Liu3b3c8ab2016-03-30 11:39:59 -070063 void PackFrom(const ::google::protobuf::Message& message,
64 const ::std::string& type_url_prefix);
Bo Yang5db21732015-05-21 14:28:59 -070065 bool UnpackTo(::google::protobuf::Message* message) const;
66 template<typename T> bool Is() const {
67 return _any_metadata_.Is<T>();
68 }
69
Feng Xiao33c92802015-05-11 13:47:41 -070070 void Swap(Any* other);
71
72 // implements Message ----------------------------------------------
73
74 inline Any* New() const { return New(NULL); }
75
76 Any* New(::google::protobuf::Arena* arena) const;
77 void CopyFrom(const ::google::protobuf::Message& from);
78 void MergeFrom(const ::google::protobuf::Message& from);
79 void CopyFrom(const Any& from);
80 void MergeFrom(const Any& from);
81 void Clear();
82 bool IsInitialized() const;
83
84 int ByteSize() const;
85 bool MergePartialFromCodedStream(
86 ::google::protobuf::io::CodedInputStream* input);
87 void SerializeWithCachedSizes(
88 ::google::protobuf::io::CodedOutputStream* output) const;
89 ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const;
90 int GetCachedSize() const { return _cached_size_; }
91 private:
92 void SharedCtor();
93 void SharedDtor();
94 void SetCachedSize(int size) const;
95 void InternalSwap(Any* other);
96 private:
97 inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
98 return _internal_metadata_.arena();
99 }
100 inline void* MaybeArenaPtr() const {
101 return _internal_metadata_.raw_arena_ptr();
102 }
103 public:
104
105 ::google::protobuf::Metadata GetMetadata() const;
106
107 // nested types ----------------------------------------------------
108
109 // accessors -------------------------------------------------------
110
111 // optional string type_url = 1;
112 void clear_type_url();
113 static const int kTypeUrlFieldNumber = 1;
114 const ::std::string& type_url() const;
115 void set_type_url(const ::std::string& value);
116 void set_type_url(const char* value);
117 void set_type_url(const char* value, size_t size);
118 ::std::string* mutable_type_url();
119 ::std::string* release_type_url();
120 void set_allocated_type_url(::std::string* type_url);
121
122 // optional bytes value = 2;
123 void clear_value();
124 static const int kValueFieldNumber = 2;
125 const ::std::string& value() const;
126 void set_value(const ::std::string& value);
127 void set_value(const char* value);
128 void set_value(const void* value, size_t size);
129 ::std::string* mutable_value();
130 ::std::string* release_value();
131 void set_allocated_value(::std::string* value);
132
133 // @@protoc_insertion_point(class_scope:google.protobuf.Any)
134 private:
135
136 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
137 bool _is_default_instance_;
138 ::google::protobuf::internal::ArenaStringPtr type_url_;
139 ::google::protobuf::internal::ArenaStringPtr value_;
140 mutable int _cached_size_;
Bo Yang5db21732015-05-21 14:28:59 -0700141 ::google::protobuf::internal::AnyMetadata _any_metadata_;
Feng Xiao33c92802015-05-11 13:47:41 -0700142 friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fany_2eproto();
143 friend void protobuf_AssignDesc_google_2fprotobuf_2fany_2eproto();
144 friend void protobuf_ShutdownFile_google_2fprotobuf_2fany_2eproto();
145
146 void InitAsDefaultInstance();
147 static Any* default_instance_;
148};
149// ===================================================================
150
151
152// ===================================================================
153
154#if !PROTOBUF_INLINE_NOT_IN_HEADERS
155// Any
156
157// optional string type_url = 1;
158inline void Any::clear_type_url() {
159 type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
160}
161inline const ::std::string& Any::type_url() const {
162 // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url)
163 return type_url_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
164}
165inline void Any::set_type_url(const ::std::string& value) {
166
167 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
168 // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
169}
170inline void Any::set_type_url(const char* value) {
171
172 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
173 // @@protoc_insertion_point(field_set_char:google.protobuf.Any.type_url)
174}
175inline void Any::set_type_url(const char* value, size_t size) {
176
177 type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
178 ::std::string(reinterpret_cast<const char*>(value), size));
179 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.type_url)
180}
181inline ::std::string* Any::mutable_type_url() {
182
183 // @@protoc_insertion_point(field_mutable:google.protobuf.Any.type_url)
184 return type_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
185}
186inline ::std::string* Any::release_type_url() {
187
188 return type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
189}
190inline void Any::set_allocated_type_url(::std::string* type_url) {
191 if (type_url != NULL) {
192
193 } else {
194
195 }
196 type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_url);
197 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
198}
199
200// optional bytes value = 2;
201inline void Any::clear_value() {
202 value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
203}
204inline const ::std::string& Any::value() const {
205 // @@protoc_insertion_point(field_get:google.protobuf.Any.value)
206 return value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
207}
208inline void Any::set_value(const ::std::string& value) {
209
210 value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
211 // @@protoc_insertion_point(field_set:google.protobuf.Any.value)
212}
213inline void Any::set_value(const char* value) {
214
215 value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
216 // @@protoc_insertion_point(field_set_char:google.protobuf.Any.value)
217}
218inline void Any::set_value(const void* value, size_t size) {
219
220 value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
221 ::std::string(reinterpret_cast<const char*>(value), size));
222 // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.value)
223}
224inline ::std::string* Any::mutable_value() {
225
226 // @@protoc_insertion_point(field_mutable:google.protobuf.Any.value)
227 return value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
228}
229inline ::std::string* Any::release_value() {
230
231 return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
232}
233inline void Any::set_allocated_value(::std::string* value) {
234 if (value != NULL) {
235
236 } else {
237
238 }
239 value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
240 // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
241}
242
243#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS
244
245// @@protoc_insertion_point(namespace_scope)
246
247} // namespace protobuf
248} // namespace google
249
250// @@protoc_insertion_point(global_scope)
251
252#endif // PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED