duration.pb.h 9.1 KB

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