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