You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

timestamp.pb.h 9.2 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/timestamp.proto
  3. #ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2ftimestamp_2eproto
  4. #define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2ftimestamp_2eproto
  5. #include <limits>
  6. #include <string>
  7. #include <google/protobuf/port_def.inc>
  8. #if PROTOBUF_VERSION < 3021000
  9. #error This file was generated by a newer version of protoc which is
  10. #error incompatible with your Protocol Buffer headers. Please update
  11. #error your headers.
  12. #endif
  13. #if 3021006 < PROTOBUF_MIN_PROTOC_VERSION
  14. #error This file was generated by an older version of protoc which is
  15. #error incompatible with your Protocol Buffer headers. Please
  16. #error regenerate this file with a newer version of protoc.
  17. #endif
  18. #include <google/protobuf/port_undef.inc>
  19. #include <google/protobuf/io/coded_stream.h>
  20. #include <google/protobuf/arena.h>
  21. #include <google/protobuf/arenastring.h>
  22. #include <google/protobuf/generated_message_util.h>
  23. #include <google/protobuf/metadata_lite.h>
  24. #include <google/protobuf/generated_message_reflection.h>
  25. #include <google/protobuf/message.h>
  26. #include <google/protobuf/repeated_field.h> // IWYU pragma: export
  27. #include <google/protobuf/extension_set.h> // IWYU pragma: export
  28. #include <google/protobuf/unknown_field_set.h>
  29. // @@protoc_insertion_point(includes)
  30. #include <google/protobuf/port_def.inc>
  31. #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftimestamp_2eproto PROTOBUF_EXPORT
  32. PROTOBUF_NAMESPACE_OPEN
  33. namespace internal {
  34. class AnyMetadata;
  35. } // namespace internal
  36. PROTOBUF_NAMESPACE_CLOSE
  37. // Internal implementation detail -- do not use these members.
  38. struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2ftimestamp_2eproto {
  39. static const uint32_t offsets[];
  40. };
  41. PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ftimestamp_2eproto;
  42. PROTOBUF_NAMESPACE_OPEN
  43. class Timestamp;
  44. struct TimestampDefaultTypeInternal;
  45. PROTOBUF_EXPORT extern TimestampDefaultTypeInternal _Timestamp_default_instance_;
  46. PROTOBUF_NAMESPACE_CLOSE
  47. PROTOBUF_NAMESPACE_OPEN
  48. template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Timestamp* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Timestamp>(Arena*);
  49. PROTOBUF_NAMESPACE_CLOSE
  50. PROTOBUF_NAMESPACE_OPEN
  51. // ===================================================================
  52. class PROTOBUF_EXPORT Timestamp final :
  53. public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Timestamp) */ {
  54. public:
  55. inline Timestamp() : Timestamp(nullptr) {}
  56. ~Timestamp() override;
  57. explicit PROTOBUF_CONSTEXPR Timestamp(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized);
  58. Timestamp(const Timestamp& from);
  59. Timestamp(Timestamp&& from) noexcept
  60. : Timestamp() {
  61. *this = ::std::move(from);
  62. }
  63. inline Timestamp& operator=(const Timestamp& from) {
  64. CopyFrom(from);
  65. return *this;
  66. }
  67. inline Timestamp& operator=(Timestamp&& from) noexcept {
  68. if (this == &from) return *this;
  69. if (GetOwningArena() == from.GetOwningArena()
  70. #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
  71. && GetOwningArena() != nullptr
  72. #endif // !PROTOBUF_FORCE_COPY_IN_MOVE
  73. ) {
  74. InternalSwap(&from);
  75. } else {
  76. CopyFrom(from);
  77. }
  78. return *this;
  79. }
  80. static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
  81. return GetDescriptor();
  82. }
  83. static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
  84. return default_instance().GetMetadata().descriptor;
  85. }
  86. static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
  87. return default_instance().GetMetadata().reflection;
  88. }
  89. static const Timestamp& default_instance() {
  90. return *internal_default_instance();
  91. }
  92. static inline const Timestamp* internal_default_instance() {
  93. return reinterpret_cast<const Timestamp*>(
  94. &_Timestamp_default_instance_);
  95. }
  96. static constexpr int kIndexInFileMessages =
  97. 0;
  98. friend void swap(Timestamp& a, Timestamp& b) {
  99. a.Swap(&b);
  100. }
  101. inline void Swap(Timestamp* other) {
  102. if (other == this) return;
  103. #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
  104. if (GetOwningArena() != nullptr &&
  105. GetOwningArena() == other->GetOwningArena()) {
  106. #else // PROTOBUF_FORCE_COPY_IN_SWAP
  107. if (GetOwningArena() == other->GetOwningArena()) {
  108. #endif // !PROTOBUF_FORCE_COPY_IN_SWAP
  109. InternalSwap(other);
  110. } else {
  111. ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other);
  112. }
  113. }
  114. void UnsafeArenaSwap(Timestamp* other) {
  115. if (other == this) return;
  116. GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena());
  117. InternalSwap(other);
  118. }
  119. // implements Message ----------------------------------------------
  120. Timestamp* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final {
  121. return CreateMaybeMessage<Timestamp>(arena);
  122. }
  123. using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom;
  124. void CopyFrom(const Timestamp& from);
  125. using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom;
  126. void MergeFrom( const Timestamp& from) {
  127. Timestamp::MergeImpl(*this, from);
  128. }
  129. private:
  130. static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg);
  131. public:
  132. PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  133. bool IsInitialized() const final;
  134. size_t ByteSizeLong() const final;
  135. const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  136. uint8_t* _InternalSerialize(
  137. uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final;
  138. int GetCachedSize() const final { return _impl_._cached_size_.Get(); }
  139. private:
  140. void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned);
  141. void SharedDtor();
  142. void SetCachedSize(int size) const final;
  143. void InternalSwap(Timestamp* other);
  144. private:
  145. friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  146. static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
  147. return "google.protobuf.Timestamp";
  148. }
  149. protected:
  150. explicit Timestamp(::PROTOBUF_NAMESPACE_ID::Arena* arena,
  151. bool is_message_owned = false);
  152. public:
  153. static const ClassData _class_data_;
  154. const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final;
  155. ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  156. // nested types ----------------------------------------------------
  157. // accessors -------------------------------------------------------
  158. enum : int {
  159. kSecondsFieldNumber = 1,
  160. kNanosFieldNumber = 2,
  161. };
  162. // int64 seconds = 1;
  163. void clear_seconds();
  164. int64_t seconds() const;
  165. void set_seconds(int64_t value);
  166. private:
  167. int64_t _internal_seconds() const;
  168. void _internal_set_seconds(int64_t value);
  169. public:
  170. // int32 nanos = 2;
  171. void clear_nanos();
  172. int32_t nanos() const;
  173. void set_nanos(int32_t value);
  174. private:
  175. int32_t _internal_nanos() const;
  176. void _internal_set_nanos(int32_t value);
  177. public:
  178. // @@protoc_insertion_point(class_scope:google.protobuf.Timestamp)
  179. private:
  180. class _Internal;
  181. template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper;
  182. typedef void InternalArenaConstructable_;
  183. typedef void DestructorSkippable_;
  184. struct Impl_ {
  185. int64_t seconds_;
  186. int32_t nanos_;
  187. mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  188. };
  189. union { Impl_ _impl_; };
  190. friend struct ::TableStruct_google_2fprotobuf_2ftimestamp_2eproto;
  191. };
  192. // ===================================================================
  193. // ===================================================================
  194. #ifdef __GNUC__
  195. #pragma GCC diagnostic push
  196. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  197. #endif // __GNUC__
  198. // Timestamp
  199. // int64 seconds = 1;
  200. inline void Timestamp::clear_seconds() {
  201. _impl_.seconds_ = int64_t{0};
  202. }
  203. inline int64_t Timestamp::_internal_seconds() const {
  204. return _impl_.seconds_;
  205. }
  206. inline int64_t Timestamp::seconds() const {
  207. // @@protoc_insertion_point(field_get:google.protobuf.Timestamp.seconds)
  208. return _internal_seconds();
  209. }
  210. inline void Timestamp::_internal_set_seconds(int64_t value) {
  211. _impl_.seconds_ = value;
  212. }
  213. inline void Timestamp::set_seconds(int64_t value) {
  214. _internal_set_seconds(value);
  215. // @@protoc_insertion_point(field_set:google.protobuf.Timestamp.seconds)
  216. }
  217. // int32 nanos = 2;
  218. inline void Timestamp::clear_nanos() {
  219. _impl_.nanos_ = 0;
  220. }
  221. inline int32_t Timestamp::_internal_nanos() const {
  222. return _impl_.nanos_;
  223. }
  224. inline int32_t Timestamp::nanos() const {
  225. // @@protoc_insertion_point(field_get:google.protobuf.Timestamp.nanos)
  226. return _internal_nanos();
  227. }
  228. inline void Timestamp::_internal_set_nanos(int32_t value) {
  229. _impl_.nanos_ = value;
  230. }
  231. inline void Timestamp::set_nanos(int32_t value) {
  232. _internal_set_nanos(value);
  233. // @@protoc_insertion_point(field_set:google.protobuf.Timestamp.nanos)
  234. }
  235. #ifdef __GNUC__
  236. #pragma GCC diagnostic pop
  237. #endif // __GNUC__
  238. // @@protoc_insertion_point(namespace_scope)
  239. PROTOBUF_NAMESPACE_CLOSE
  240. // @@protoc_insertion_point(global_scope)
  241. #include <google/protobuf/port_undef.inc>
  242. #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2ftimestamp_2eproto