"Fossies" - the Fresh Open Source Software Archive

Member "protobuf-3.12.3/src/google/protobuf/any.pb.h" (2 Jun 2020, 17726 Bytes) of package /linux/misc/protobuf-all-3.12.3.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "any.pb.h": 3.12.2_vs_3.12.3.

    1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
    2 // source: google/protobuf/any.proto
    3 
    4 #ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto
    5 #define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto
    6 
    7 #include <limits>
    8 #include <string>
    9 
   10 #include <google/protobuf/port_def.inc>
   11 #if PROTOBUF_VERSION < 3012000
   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 3012003 < 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/port_undef.inc>
   23 #include <google/protobuf/io/coded_stream.h>
   24 #include <google/protobuf/arena.h>
   25 #include <google/protobuf/arenastring.h>
   26 #include <google/protobuf/generated_message_table_driven.h>
   27 #include <google/protobuf/generated_message_util.h>
   28 #include <google/protobuf/inlined_string_field.h>
   29 #include <google/protobuf/metadata_lite.h>
   30 #include <google/protobuf/generated_message_reflection.h>
   31 #include <google/protobuf/message.h>
   32 #include <google/protobuf/repeated_field.h>  // IWYU pragma: export
   33 #include <google/protobuf/extension_set.h>  // IWYU pragma: export
   34 #include <google/protobuf/unknown_field_set.h>
   35 // @@protoc_insertion_point(includes)
   36 #include <google/protobuf/port_def.inc>
   37 #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fany_2eproto PROTOBUF_EXPORT
   38 PROTOBUF_NAMESPACE_OPEN
   39 namespace internal {
   40 class AnyMetadata;
   41 }  // namespace internal
   42 PROTOBUF_NAMESPACE_CLOSE
   43 
   44 // Internal implementation detail -- do not use these members.
   45 struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fany_2eproto {
   46   static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
   47     PROTOBUF_SECTION_VARIABLE(protodesc_cold);
   48   static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
   49     PROTOBUF_SECTION_VARIABLE(protodesc_cold);
   50   static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
   51     PROTOBUF_SECTION_VARIABLE(protodesc_cold);
   52   static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
   53   static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
   54   static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
   55 };
   56 extern PROTOBUF_EXPORT const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2fany_2eproto;
   57 PROTOBUF_NAMESPACE_OPEN
   58 class Any;
   59 class AnyDefaultTypeInternal;
   60 PROTOBUF_EXPORT extern AnyDefaultTypeInternal _Any_default_instance_;
   61 PROTOBUF_NAMESPACE_CLOSE
   62 PROTOBUF_NAMESPACE_OPEN
   63 template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Any* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Any>(Arena*);
   64 PROTOBUF_NAMESPACE_CLOSE
   65 PROTOBUF_NAMESPACE_OPEN
   66 
   67 // ===================================================================
   68 
   69 class PROTOBUF_EXPORT Any PROTOBUF_FINAL :
   70     public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Any) */ {
   71  public:
   72   inline Any() : Any(nullptr) {};
   73   virtual ~Any();
   74 
   75   Any(const Any& from);
   76   Any(Any&& from) noexcept
   77     : Any() {
   78     *this = ::std::move(from);
   79   }
   80 
   81   inline Any& operator=(const Any& from) {
   82     CopyFrom(from);
   83     return *this;
   84   }
   85   inline Any& operator=(Any&& from) noexcept {
   86     if (GetArena() == from.GetArena()) {
   87       if (this != &from) InternalSwap(&from);
   88     } else {
   89       CopyFrom(from);
   90     }
   91     return *this;
   92   }
   93 
   94   static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
   95     return GetDescriptor();
   96   }
   97   static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
   98     return GetMetadataStatic().descriptor;
   99   }
  100   static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
  101     return GetMetadataStatic().reflection;
  102   }
  103   static const Any& default_instance();
  104 
  105   static void InitAsDefaultInstance();  // FOR INTERNAL USE ONLY
  106   static inline const Any* internal_default_instance() {
  107     return reinterpret_cast<const Any*>(
  108                &_Any_default_instance_);
  109   }
  110   static constexpr int kIndexInFileMessages =
  111     0;
  112 
  113   // implements Any -----------------------------------------------
  114 
  115   void PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message) {
  116     _any_metadata_.PackFrom(message);
  117   }
  118   void PackFrom(const ::PROTOBUF_NAMESPACE_ID::Message& message,
  119                 const std::string& type_url_prefix) {
  120     _any_metadata_.PackFrom(message, type_url_prefix);
  121   }
  122   bool UnpackTo(::PROTOBUF_NAMESPACE_ID::Message* message) const {
  123     return _any_metadata_.UnpackTo(message);
  124   }
  125   static bool GetAnyFieldDescriptors(
  126       const ::PROTOBUF_NAMESPACE_ID::Message& message,
  127       const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** type_url_field,
  128       const ::PROTOBUF_NAMESPACE_ID::FieldDescriptor** value_field);
  129   template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
  130   void PackFrom(const T& message) {
  131     _any_metadata_.PackFrom<T>(message);
  132   }
  133   template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
  134   void PackFrom(const T& message,
  135                 const std::string& type_url_prefix) {
  136     _any_metadata_.PackFrom<T>(message, type_url_prefix);}
  137   template <typename T, class = typename std::enable_if<!std::is_convertible<T, const ::PROTOBUF_NAMESPACE_ID::Message&>::value>::type>
  138   bool UnpackTo(T* message) const {
  139     return _any_metadata_.UnpackTo<T>(message);
  140   }
  141   template<typename T> bool Is() const {
  142     return _any_metadata_.Is<T>();
  143   }
  144   static bool ParseAnyTypeUrl(const string& type_url,
  145                               std::string* full_type_name);
  146   friend void swap(Any& a, Any& b) {
  147     a.Swap(&b);
  148   }
  149   inline void Swap(Any* other) {
  150     if (other == this) return;
  151     if (GetArena() == other->GetArena()) {
  152       InternalSwap(other);
  153     } else {
  154       ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
  155     }
  156   }
  157   void UnsafeArenaSwap(Any* other) {
  158     if (other == this) return;
  159     GOOGLE_DCHECK(GetArena() == other->GetArena());
  160     InternalSwap(other);
  161   }
  162 
  163   // implements Message ----------------------------------------------
  164 
  165   inline Any* New() const final {
  166     return CreateMaybeMessage<Any>(nullptr);
  167   }
  168 
  169   Any* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
  170     return CreateMaybeMessage<Any>(arena);
  171   }
  172   void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  173   void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  174   void CopyFrom(const Any& from);
  175   void MergeFrom(const Any& from);
  176   PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  177   bool IsInitialized() const final;
  178 
  179   size_t ByteSizeLong() const final;
  180   const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  181   ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize(
  182       ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  183   int GetCachedSize() const final { return _cached_size_.Get(); }
  184 
  185   private:
  186   inline void SharedCtor();
  187   inline void SharedDtor();
  188   void SetCachedSize(int size) const final;
  189   void InternalSwap(Any* other);
  190   friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  191   static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
  192     return "google.protobuf.Any";
  193   }
  194   protected:
  195   explicit Any(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  196   private:
  197   static void ArenaDtor(void* object);
  198   inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena);
  199   public:
  200 
  201   ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  202   private:
  203   static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
  204     ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fany_2eproto);
  205     return ::descriptor_table_google_2fprotobuf_2fany_2eproto.file_level_metadata[kIndexInFileMessages];
  206   }
  207 
  208   public:
  209 
  210   // nested types ----------------------------------------------------
  211 
  212   // accessors -------------------------------------------------------
  213 
  214   enum : int {
  215     kTypeUrlFieldNumber = 1,
  216     kValueFieldNumber = 2,
  217   };
  218   // string type_url = 1;
  219   void clear_type_url();
  220   const std::string& type_url() const;
  221   void set_type_url(const std::string& value);
  222   void set_type_url(std::string&& value);
  223   void set_type_url(const char* value);
  224   void set_type_url(const char* value, size_t size);
  225   std::string* mutable_type_url();
  226   std::string* release_type_url();
  227   void set_allocated_type_url(std::string* type_url);
  228   GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
  229   "    string fields are deprecated and will be removed in a"
  230   "    future release.")
  231   std::string* unsafe_arena_release_type_url();
  232   GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
  233   "    string fields are deprecated and will be removed in a"
  234   "    future release.")
  235   void unsafe_arena_set_allocated_type_url(
  236       std::string* type_url);
  237   private:
  238   const std::string& _internal_type_url() const;
  239   void _internal_set_type_url(const std::string& value);
  240   std::string* _internal_mutable_type_url();
  241   public:
  242 
  243   // bytes value = 2;
  244   void clear_value();
  245   const std::string& value() const;
  246   void set_value(const std::string& value);
  247   void set_value(std::string&& value);
  248   void set_value(const char* value);
  249   void set_value(const void* value, size_t size);
  250   std::string* mutable_value();
  251   std::string* release_value();
  252   void set_allocated_value(std::string* value);
  253   GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
  254   "    string fields are deprecated and will be removed in a"
  255   "    future release.")
  256   std::string* unsafe_arena_release_value();
  257   GOOGLE_PROTOBUF_RUNTIME_DEPRECATED("The unsafe_arena_ accessors for"
  258   "    string fields are deprecated and will be removed in a"
  259   "    future release.")
  260   void unsafe_arena_set_allocated_value(
  261       std::string* value);
  262   private:
  263   const std::string& _internal_value() const;
  264   void _internal_set_value(const std::string& value);
  265   std::string* _internal_mutable_value();
  266   public:
  267 
  268   // @@protoc_insertion_point(class_scope:google.protobuf.Any)
  269  private:
  270   class _Internal;
  271 
  272   template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  273   typedef void InternalArenaConstructable_;
  274   typedef void DestructorSkippable_;
  275   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr type_url_;
  276   ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_;
  277   mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  278   ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata _any_metadata_;
  279   friend struct ::TableStruct_google_2fprotobuf_2fany_2eproto;
  280 };
  281 // ===================================================================
  282 
  283 
  284 // ===================================================================
  285 
  286 #ifdef __GNUC__
  287   #pragma GCC diagnostic push
  288   #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  289 #endif  // __GNUC__
  290 // Any
  291 
  292 // string type_url = 1;
  293 inline void Any::clear_type_url() {
  294   type_url_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  295 }
  296 inline const std::string& Any::type_url() const {
  297   // @@protoc_insertion_point(field_get:google.protobuf.Any.type_url)
  298   return _internal_type_url();
  299 }
  300 inline void Any::set_type_url(const std::string& value) {
  301   _internal_set_type_url(value);
  302   // @@protoc_insertion_point(field_set:google.protobuf.Any.type_url)
  303 }
  304 inline std::string* Any::mutable_type_url() {
  305   // @@protoc_insertion_point(field_mutable:google.protobuf.Any.type_url)
  306   return _internal_mutable_type_url();
  307 }
  308 inline const std::string& Any::_internal_type_url() const {
  309   return type_url_.Get();
  310 }
  311 inline void Any::_internal_set_type_url(const std::string& value) {
  312   
  313   type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena());
  314 }
  315 inline void Any::set_type_url(std::string&& value) {
  316   
  317   type_url_.Set(
  318     &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena());
  319   // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.type_url)
  320 }
  321 inline void Any::set_type_url(const char* value) {
  322   GOOGLE_DCHECK(value != nullptr);
  323   
  324   type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
  325               GetArena());
  326   // @@protoc_insertion_point(field_set_char:google.protobuf.Any.type_url)
  327 }
  328 inline void Any::set_type_url(const char* value,
  329     size_t size) {
  330   
  331   type_url_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(
  332       reinterpret_cast<const char*>(value), size), GetArena());
  333   // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.type_url)
  334 }
  335 inline std::string* Any::_internal_mutable_type_url() {
  336   
  337   return type_url_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  338 }
  339 inline std::string* Any::release_type_url() {
  340   // @@protoc_insertion_point(field_release:google.protobuf.Any.type_url)
  341   return type_url_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  342 }
  343 inline void Any::set_allocated_type_url(std::string* type_url) {
  344   if (type_url != nullptr) {
  345     
  346   } else {
  347     
  348   }
  349   type_url_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), type_url,
  350       GetArena());
  351   // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.type_url)
  352 }
  353 inline std::string* Any::unsafe_arena_release_type_url() {
  354   // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Any.type_url)
  355   GOOGLE_DCHECK(GetArena() != nullptr);
  356   
  357   return type_url_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  358       GetArena());
  359 }
  360 inline void Any::unsafe_arena_set_allocated_type_url(
  361     std::string* type_url) {
  362   GOOGLE_DCHECK(GetArena() != nullptr);
  363   if (type_url != nullptr) {
  364     
  365   } else {
  366     
  367   }
  368   type_url_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  369       type_url, GetArena());
  370   // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Any.type_url)
  371 }
  372 
  373 // bytes value = 2;
  374 inline void Any::clear_value() {
  375   value_.ClearToEmpty(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  376 }
  377 inline const std::string& Any::value() const {
  378   // @@protoc_insertion_point(field_get:google.protobuf.Any.value)
  379   return _internal_value();
  380 }
  381 inline void Any::set_value(const std::string& value) {
  382   _internal_set_value(value);
  383   // @@protoc_insertion_point(field_set:google.protobuf.Any.value)
  384 }
  385 inline std::string* Any::mutable_value() {
  386   // @@protoc_insertion_point(field_mutable:google.protobuf.Any.value)
  387   return _internal_mutable_value();
  388 }
  389 inline const std::string& Any::_internal_value() const {
  390   return value_.Get();
  391 }
  392 inline void Any::_internal_set_value(const std::string& value) {
  393   
  394   value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value, GetArena());
  395 }
  396 inline void Any::set_value(std::string&& value) {
  397   
  398   value_.Set(
  399     &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value), GetArena());
  400   // @@protoc_insertion_point(field_set_rvalue:google.protobuf.Any.value)
  401 }
  402 inline void Any::set_value(const char* value) {
  403   GOOGLE_DCHECK(value != nullptr);
  404   
  405   value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value),
  406               GetArena());
  407   // @@protoc_insertion_point(field_set_char:google.protobuf.Any.value)
  408 }
  409 inline void Any::set_value(const void* value,
  410     size_t size) {
  411   
  412   value_.Set(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(
  413       reinterpret_cast<const char*>(value), size), GetArena());
  414   // @@protoc_insertion_point(field_set_pointer:google.protobuf.Any.value)
  415 }
  416 inline std::string* Any::_internal_mutable_value() {
  417   
  418   return value_.Mutable(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  419 }
  420 inline std::string* Any::release_value() {
  421   // @@protoc_insertion_point(field_release:google.protobuf.Any.value)
  422   return value_.Release(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArena());
  423 }
  424 inline void Any::set_allocated_value(std::string* value) {
  425   if (value != nullptr) {
  426     
  427   } else {
  428     
  429   }
  430   value_.SetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value,
  431       GetArena());
  432   // @@protoc_insertion_point(field_set_allocated:google.protobuf.Any.value)
  433 }
  434 inline std::string* Any::unsafe_arena_release_value() {
  435   // @@protoc_insertion_point(field_unsafe_arena_release:google.protobuf.Any.value)
  436   GOOGLE_DCHECK(GetArena() != nullptr);
  437   
  438   return value_.UnsafeArenaRelease(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  439       GetArena());
  440 }
  441 inline void Any::unsafe_arena_set_allocated_value(
  442     std::string* value) {
  443   GOOGLE_DCHECK(GetArena() != nullptr);
  444   if (value != nullptr) {
  445     
  446   } else {
  447     
  448   }
  449   value_.UnsafeArenaSetAllocated(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  450       value, GetArena());
  451   // @@protoc_insertion_point(field_unsafe_arena_set_allocated:google.protobuf.Any.value)
  452 }
  453 
  454 #ifdef __GNUC__
  455   #pragma GCC diagnostic pop
  456 #endif  // __GNUC__
  457 
  458 // @@protoc_insertion_point(namespace_scope)
  459 
  460 PROTOBUF_NAMESPACE_CLOSE
  461 
  462 // @@protoc_insertion_point(global_scope)
  463 
  464 #include <google/protobuf/port_undef.inc>
  465 #endif  // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fany_2eproto