duration.pb.h 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: google/protobuf/duration.proto
  3. #ifndef PROTOBUF_INCLUDED_google_2fprotobuf_2fduration_2eproto
  4. #define PROTOBUF_INCLUDED_google_2fprotobuf_2fduration_2eproto
  5. #include <string>
  6. #include <google/protobuf/stubs/common.h>
  7. #if GOOGLE_PROTOBUF_VERSION < 3006001
  8. #error This file was generated by a newer version of protoc which is
  9. #error incompatible with your Protocol Buffer headers. Please update
  10. #error your headers.
  11. #endif
  12. #if 3006001 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION
  13. #error This file was generated by an older version of protoc which is
  14. #error incompatible with your Protocol Buffer headers. Please
  15. #error regenerate this file with a newer version of protoc.
  16. #endif
  17. #include <google/protobuf/io/coded_stream.h>
  18. #include <google/protobuf/arena.h>
  19. #include <google/protobuf/arenastring.h>
  20. #include <google/protobuf/generated_message_table_driven.h>
  21. #include <google/protobuf/generated_message_util.h>
  22. #include <google/protobuf/inlined_string_field.h>
  23. #include <google/protobuf/metadata.h>
  24. #include <google/protobuf/message.h>
  25. #include <google/protobuf/repeated_field.h> // IWYU pragma: export
  26. #include <google/protobuf/extension_set.h> // IWYU pragma: export
  27. #include <google/protobuf/unknown_field_set.h>
  28. // @@protoc_insertion_point(includes)
  29. #define PROTOBUF_INTERNAL_EXPORT_protobuf_google_2fprotobuf_2fduration_2eproto LIBPROTOBUF_EXPORT
  30. namespace protobuf_google_2fprotobuf_2fduration_2eproto {
  31. // Internal implementation detail -- do not use these members.
  32. struct LIBPROTOBUF_EXPORT TableStruct {
  33. static const ::google::protobuf::internal::ParseTableField entries[];
  34. static const ::google::protobuf::internal::AuxillaryParseTableField aux[];
  35. static const ::google::protobuf::internal::ParseTable schema[1];
  36. static const ::google::protobuf::internal::FieldMetadata field_metadata[];
  37. static const ::google::protobuf::internal::SerializationTable serialization_table[];
  38. static const ::google::protobuf::uint32 offsets[];
  39. };
  40. void LIBPROTOBUF_EXPORT AddDescriptors();
  41. } // namespace protobuf_google_2fprotobuf_2fduration_2eproto
  42. namespace google {
  43. namespace protobuf {
  44. class Duration;
  45. class DurationDefaultTypeInternal;
  46. LIBPROTOBUF_EXPORT extern DurationDefaultTypeInternal _Duration_default_instance_;
  47. } // namespace protobuf
  48. } // namespace google
  49. namespace google {
  50. namespace protobuf {
  51. template<> LIBPROTOBUF_EXPORT ::google::protobuf::Duration* Arena::CreateMaybeMessage<::google::protobuf::Duration>(Arena*);
  52. } // namespace protobuf
  53. } // namespace google
  54. namespace google {
  55. namespace protobuf {
  56. // ===================================================================
  57. class LIBPROTOBUF_EXPORT Duration : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Duration) */ {
  58. public:
  59. Duration();
  60. virtual ~Duration();
  61. Duration(const Duration& from);
  62. inline Duration& operator=(const Duration& from) {
  63. CopyFrom(from);
  64. return *this;
  65. }
  66. #if LANG_CXX11
  67. Duration(Duration&& from) noexcept
  68. : Duration() {
  69. *this = ::std::move(from);
  70. }
  71. inline Duration& operator=(Duration&& from) noexcept {
  72. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  73. if (this != &from) InternalSwap(&from);
  74. } else {
  75. CopyFrom(from);
  76. }
  77. return *this;
  78. }
  79. #endif
  80. inline ::google::protobuf::Arena* GetArena() const final {
  81. return GetArenaNoVirtual();
  82. }
  83. inline void* GetMaybeArenaPointer() const final {
  84. return MaybeArenaPtr();
  85. }
  86. static const ::google::protobuf::Descriptor* descriptor();
  87. static const Duration& default_instance();
  88. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  89. static inline const Duration* internal_default_instance() {
  90. return reinterpret_cast<const Duration*>(
  91. &_Duration_default_instance_);
  92. }
  93. static constexpr int kIndexInFileMessages =
  94. 0;
  95. void UnsafeArenaSwap(Duration* other);
  96. void Swap(Duration* other);
  97. friend void swap(Duration& a, Duration& b) {
  98. a.Swap(&b);
  99. }
  100. // implements Message ----------------------------------------------
  101. inline Duration* New() const final {
  102. return CreateMaybeMessage<Duration>(NULL);
  103. }
  104. Duration* New(::google::protobuf::Arena* arena) const final {
  105. return CreateMaybeMessage<Duration>(arena);
  106. }
  107. void CopyFrom(const ::google::protobuf::Message& from) final;
  108. void MergeFrom(const ::google::protobuf::Message& from) final;
  109. void CopyFrom(const Duration& from);
  110. void MergeFrom(const Duration& from);
  111. void Clear() final;
  112. bool IsInitialized() const final;
  113. size_t ByteSizeLong() const final;
  114. bool MergePartialFromCodedStream(
  115. ::google::protobuf::io::CodedInputStream* input) final;
  116. void SerializeWithCachedSizes(
  117. ::google::protobuf::io::CodedOutputStream* output) const final;
  118. ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray(
  119. bool deterministic, ::google::protobuf::uint8* target) const final;
  120. int GetCachedSize() const final { return _cached_size_.Get(); }
  121. private:
  122. void SharedCtor();
  123. void SharedDtor();
  124. void SetCachedSize(int size) const final;
  125. void InternalSwap(Duration* other);
  126. protected:
  127. explicit Duration(::google::protobuf::Arena* arena);
  128. private:
  129. static void ArenaDtor(void* object);
  130. inline void RegisterArenaDtor(::google::protobuf::Arena* arena);
  131. private:
  132. inline ::google::protobuf::Arena* GetArenaNoVirtual() const {
  133. return _internal_metadata_.arena();
  134. }
  135. inline void* MaybeArenaPtr() const {
  136. return _internal_metadata_.raw_arena_ptr();
  137. }
  138. public:
  139. ::google::protobuf::Metadata GetMetadata() const final;
  140. // nested types ----------------------------------------------------
  141. // accessors -------------------------------------------------------
  142. // int64 seconds = 1;
  143. void clear_seconds();
  144. static const int kSecondsFieldNumber = 1;
  145. ::google::protobuf::int64 seconds() const;
  146. void set_seconds(::google::protobuf::int64 value);
  147. // int32 nanos = 2;
  148. void clear_nanos();
  149. static const int kNanosFieldNumber = 2;
  150. ::google::protobuf::int32 nanos() const;
  151. void set_nanos(::google::protobuf::int32 value);
  152. // @@protoc_insertion_point(class_scope:google.protobuf.Duration)
  153. private:
  154. ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_;
  155. template <typename T> friend class ::google::protobuf::Arena::InternalHelper;
  156. typedef void InternalArenaConstructable_;
  157. typedef void DestructorSkippable_;
  158. ::google::protobuf::int64 seconds_;
  159. ::google::protobuf::int32 nanos_;
  160. mutable ::google::protobuf::internal::CachedSize _cached_size_;
  161. friend struct ::protobuf_google_2fprotobuf_2fduration_2eproto::TableStruct;
  162. };
  163. // ===================================================================
  164. // ===================================================================
  165. #ifdef __GNUC__
  166. #pragma GCC diagnostic push
  167. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  168. #endif // __GNUC__
  169. // Duration
  170. // int64 seconds = 1;
  171. inline void Duration::clear_seconds() {
  172. seconds_ = GOOGLE_LONGLONG(0);
  173. }
  174. inline ::google::protobuf::int64 Duration::seconds() const {
  175. // @@protoc_insertion_point(field_get:google.protobuf.Duration.seconds)
  176. return seconds_;
  177. }
  178. inline void Duration::set_seconds(::google::protobuf::int64 value) {
  179. seconds_ = value;
  180. // @@protoc_insertion_point(field_set:google.protobuf.Duration.seconds)
  181. }
  182. // int32 nanos = 2;
  183. inline void Duration::clear_nanos() {
  184. nanos_ = 0;
  185. }
  186. inline ::google::protobuf::int32 Duration::nanos() const {
  187. // @@protoc_insertion_point(field_get:google.protobuf.Duration.nanos)
  188. return nanos_;
  189. }
  190. inline void Duration::set_nanos(::google::protobuf::int32 value) {
  191. nanos_ = value;
  192. // @@protoc_insertion_point(field_set:google.protobuf.Duration.nanos)
  193. }
  194. #ifdef __GNUC__
  195. #pragma GCC diagnostic pop
  196. #endif // __GNUC__
  197. // @@protoc_insertion_point(namespace_scope)
  198. } // namespace protobuf
  199. } // namespace google
  200. // @@protoc_insertion_point(global_scope)
  201. #endif // PROTOBUF_INCLUDED_google_2fprotobuf_2fduration_2eproto