• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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 < 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>
30 #include <google/protobuf/any.h>
31 // @@protoc_insertion_point(includes)
32 
33 namespace google {
34 namespace protobuf {
35 
36 // Internal implementation detail -- do not call these.
37 void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fany_2eproto();
38 void protobuf_AssignDesc_google_2fprotobuf_2fany_2eproto();
39 void protobuf_ShutdownFile_google_2fprotobuf_2fany_2eproto();
40 
41 class Any;
42 
43 // ===================================================================
44 
45 class LIBPROTOBUF_EXPORT Any : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Any) */ {
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 
60   // implements Any -----------------------------------------------
61 
62   void PackFrom(const ::google::protobuf::Message& message);
63   void PackFrom(const ::google::protobuf::Message& message,
64                 const ::std::string& type_url_prefix);
65   bool UnpackTo(::google::protobuf::Message* message) const;
Is()66   template<typename T> bool Is() const {
67     return _any_metadata_.Is<T>();
68   }
69 
70   void Swap(Any* other);
71 
72   // implements Message ----------------------------------------------
73 
New()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* InternalSerializeWithCachedSizesToArray(
90       bool deterministic, ::google::protobuf::uint8* output) const;
SerializeWithCachedSizesToArray(::google::protobuf::uint8 * output)91   ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const {
92     return InternalSerializeWithCachedSizesToArray(false, output);
93   }
GetCachedSize()94   int GetCachedSize() const { return _cached_size_; }
95   private:
96   void SharedCtor();
97   void SharedDtor();
98   void SetCachedSize(int size) const;
99   void InternalSwap(Any* other);
100   private:
GetArenaNoVirtual()101   inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
102     return _internal_metadata_.arena();
103   }
MaybeArenaPtr()104   inline void* MaybeArenaPtr() const {
105     return _internal_metadata_.raw_arena_ptr();
106   }
107   public:
108 
109   ::google::protobuf::Metadata GetMetadata() const;
110 
111   // nested types ----------------------------------------------------
112 
113   // accessors -------------------------------------------------------
114 
115   // optional string type_url = 1;
116   void clear_type_url();
117   static const int kTypeUrlFieldNumber = 1;
118   const ::std::string& type_url() const;
119   void set_type_url(const ::std::string& value);
120   void set_type_url(const char* value);
121   void set_type_url(const char* value, size_t size);
122   ::std::string* mutable_type_url();
123   ::std::string* release_type_url();
124   void set_allocated_type_url(::std::string* type_url);
125 
126   // optional bytes value = 2;
127   void clear_value();
128   static const int kValueFieldNumber = 2;
129   const ::std::string& value() const;
130   void set_value(const ::std::string& value);
131   void set_value(const char* value);
132   void set_value(const void* value, size_t size);
133   ::std::string* mutable_value();
134   ::std::string* release_value();
135   void set_allocated_value(::std::string* value);
136 
137   // @@protoc_insertion_point(class_scope:google.protobuf.Any)
138  private:
139 
140   ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
141   bool _is_default_instance_;
142   ::google::protobuf::internal::ArenaStringPtr type_url_;
143   ::google::protobuf::internal::ArenaStringPtr value_;
144   mutable int _cached_size_;
145   ::google::protobuf::internal::AnyMetadata _any_metadata_;
146   friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fany_2eproto();
147   friend void protobuf_AssignDesc_google_2fprotobuf_2fany_2eproto();
148   friend void protobuf_ShutdownFile_google_2fprotobuf_2fany_2eproto();
149 
150   void InitAsDefaultInstance();
151   static Any* default_instance_;
152 };
153 // ===================================================================
154 
155 
156 // ===================================================================
157 
158 #if !PROTOBUF_INLINE_NOT_IN_HEADERS
159 // Any
160 
161 // optional string type_url = 1;
clear_type_url()162 inline void Any::clear_type_url() {
163   type_url_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
164 }
type_url()165 inline const ::std::string& Any::type_url() const {
166   // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url)
167   return type_url_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
168 }
set_type_url(const::std::string & value)169 inline void Any::set_type_url(const ::std::string& value) {
170 
171   type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
172   // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
173 }
set_type_url(const char * value)174 inline void Any::set_type_url(const char* value) {
175 
176   type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
177   // @@protoc_insertion_point(field_set_char:google.protobuf.Any.type_url)
178 }
set_type_url(const char * value,size_t size)179 inline void Any::set_type_url(const char* value, size_t size) {
180 
181   type_url_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
182       ::std::string(reinterpret_cast<const char*>(value), size));
183   // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.type_url)
184 }
mutable_type_url()185 inline ::std::string* Any::mutable_type_url() {
186 
187   // @@protoc_insertion_point(field_mutable:google.protobuf.Any.type_url)
188   return type_url_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
189 }
release_type_url()190 inline ::std::string* Any::release_type_url() {
191   // @@protoc_insertion_point(field_release:google.protobuf.Any.type_url)
192 
193   return type_url_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
194 }
set_allocated_type_url(::std::string * type_url)195 inline void Any::set_allocated_type_url(::std::string* type_url) {
196   if (type_url != NULL) {
197 
198   } else {
199 
200   }
201   type_url_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), type_url);
202   // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
203 }
204 
205 // optional bytes value = 2;
clear_value()206 inline void Any::clear_value() {
207   value_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
208 }
value()209 inline const ::std::string& Any::value() const {
210   // @@protoc_insertion_point(field_get:google.protobuf.Any.value)
211   return value_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
212 }
set_value(const::std::string & value)213 inline void Any::set_value(const ::std::string& value) {
214 
215   value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
216   // @@protoc_insertion_point(field_set:google.protobuf.Any.value)
217 }
set_value(const char * value)218 inline void Any::set_value(const char* value) {
219 
220   value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
221   // @@protoc_insertion_point(field_set_char:google.protobuf.Any.value)
222 }
set_value(const void * value,size_t size)223 inline void Any::set_value(const void* value, size_t size) {
224 
225   value_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(),
226       ::std::string(reinterpret_cast<const char*>(value), size));
227   // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.value)
228 }
mutable_value()229 inline ::std::string* Any::mutable_value() {
230 
231   // @@protoc_insertion_point(field_mutable:google.protobuf.Any.value)
232   return value_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
233 }
release_value()234 inline ::std::string* Any::release_value() {
235   // @@protoc_insertion_point(field_release:google.protobuf.Any.value)
236 
237   return value_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
238 }
set_allocated_value(::std::string * value)239 inline void Any::set_allocated_value(::std::string* value) {
240   if (value != NULL) {
241 
242   } else {
243 
244   }
245   value_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value);
246   // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
247 }
248 
249 #endif  // !PROTOBUF_INLINE_NOT_IN_HEADERS
250 
251 // @@protoc_insertion_point(namespace_scope)
252 
253 }  // namespace protobuf
254 }  // namespace google
255 
256 // @@protoc_insertion_point(global_scope)
257 
258 #endif  // PROTOBUF_google_2fprotobuf_2fany_2eproto__INCLUDED
259