1 // Generated by the protocol buffer compiler. DO NOT EDIT! 2 // source: google/protobuf/duration.proto 3 4 #ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fduration_2eproto 5 #define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fduration_2eproto 6 7 #include <limits> 8 #include <string> 9 10 #include <google/protobuf/port_def.inc> 11 #if PROTOBUF_VERSION < 3013000 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 3013000 < 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_2fduration_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_2fduration_2eproto { 46 static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] 47 PROTOBUF_SECTION_VARIABLE(protodesc_cold); 48 static const ::PROTOBUF_NAMESPACE_ID::internal::AuxiliaryParseTableField 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_2fduration_2eproto; 57 PROTOBUF_NAMESPACE_OPEN 58 class Duration; 59 class DurationDefaultTypeInternal; 60 PROTOBUF_EXPORT extern DurationDefaultTypeInternal _Duration_default_instance_; 61 PROTOBUF_NAMESPACE_CLOSE 62 PROTOBUF_NAMESPACE_OPEN 63 template<> PROTOBUF_EXPORT PROTOBUF_NAMESPACE_ID::Duration* Arena::CreateMaybeMessage<PROTOBUF_NAMESPACE_ID::Duration>(Arena*); 64 PROTOBUF_NAMESPACE_CLOSE 65 PROTOBUF_NAMESPACE_OPEN 66 67 // =================================================================== 68 69 class PROTOBUF_EXPORT Duration PROTOBUF_FINAL : 70 public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Duration) */ { 71 public: Duration()72 inline Duration() : Duration(nullptr) {} 73 virtual ~Duration(); 74 75 Duration(const Duration& from); Duration(Duration && from)76 Duration(Duration&& from) noexcept 77 : Duration() { 78 *this = ::std::move(from); 79 } 80 81 inline Duration& operator=(const Duration& from) { 82 CopyFrom(from); 83 return *this; 84 } 85 inline Duration& operator=(Duration&& from) noexcept { 86 if (GetArena() == from.GetArena()) { 87 if (this != &from) InternalSwap(&from); 88 } else { 89 CopyFrom(from); 90 } 91 return *this; 92 } 93 descriptor()94 static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { 95 return GetDescriptor(); 96 } GetDescriptor()97 static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { 98 return GetMetadataStatic().descriptor; 99 } GetReflection()100 static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { 101 return GetMetadataStatic().reflection; 102 } 103 static const Duration& default_instance(); 104 105 static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY internal_default_instance()106 static inline const Duration* internal_default_instance() { 107 return reinterpret_cast<const Duration*>( 108 &_Duration_default_instance_); 109 } 110 static constexpr int kIndexInFileMessages = 111 0; 112 swap(Duration & a,Duration & b)113 friend void swap(Duration& a, Duration& b) { 114 a.Swap(&b); 115 } Swap(Duration * other)116 inline void Swap(Duration* other) { 117 if (other == this) return; 118 if (GetArena() == other->GetArena()) { 119 InternalSwap(other); 120 } else { 121 ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); 122 } 123 } UnsafeArenaSwap(Duration * other)124 void UnsafeArenaSwap(Duration* other) { 125 if (other == this) return; 126 GOOGLE_DCHECK(GetArena() == other->GetArena()); 127 InternalSwap(other); 128 } 129 130 // implements Message ---------------------------------------------- 131 New()132 inline Duration* New() const final { 133 return CreateMaybeMessage<Duration>(nullptr); 134 } 135 New(::PROTOBUF_NAMESPACE_ID::Arena * arena)136 Duration* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { 137 return CreateMaybeMessage<Duration>(arena); 138 } 139 void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; 140 void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; 141 void CopyFrom(const Duration& from); 142 void MergeFrom(const Duration& from); 143 PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; 144 bool IsInitialized() const final; 145 146 size_t ByteSizeLong() const final; 147 const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; 148 ::PROTOBUF_NAMESPACE_ID::uint8* _InternalSerialize( 149 ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; GetCachedSize()150 int GetCachedSize() const final { return _cached_size_.Get(); } 151 152 private: 153 inline void SharedCtor(); 154 inline void SharedDtor(); 155 void SetCachedSize(int size) const final; 156 void InternalSwap(Duration* other); 157 friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; FullMessageName()158 static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { 159 return "google.protobuf.Duration"; 160 } 161 protected: 162 explicit Duration(::PROTOBUF_NAMESPACE_ID::Arena* arena); 163 private: 164 static void ArenaDtor(void* object); 165 inline void RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena* arena); 166 public: 167 168 ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; 169 private: GetMetadataStatic()170 static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { 171 ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2fprotobuf_2fduration_2eproto); 172 return ::descriptor_table_google_2fprotobuf_2fduration_2eproto.file_level_metadata[kIndexInFileMessages]; 173 } 174 175 public: 176 177 // nested types ---------------------------------------------------- 178 179 // accessors ------------------------------------------------------- 180 181 enum : int { 182 kSecondsFieldNumber = 1, 183 kNanosFieldNumber = 2, 184 }; 185 // int64 seconds = 1; 186 void clear_seconds(); 187 ::PROTOBUF_NAMESPACE_ID::int64 seconds() const; 188 void set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value); 189 private: 190 ::PROTOBUF_NAMESPACE_ID::int64 _internal_seconds() const; 191 void _internal_set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value); 192 public: 193 194 // int32 nanos = 2; 195 void clear_nanos(); 196 ::PROTOBUF_NAMESPACE_ID::int32 nanos() const; 197 void set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value); 198 private: 199 ::PROTOBUF_NAMESPACE_ID::int32 _internal_nanos() const; 200 void _internal_set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value); 201 public: 202 203 // @@protoc_insertion_point(class_scope:google.protobuf.Duration) 204 private: 205 class _Internal; 206 207 template <typename T> friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; 208 typedef void InternalArenaConstructable_; 209 typedef void DestructorSkippable_; 210 ::PROTOBUF_NAMESPACE_ID::int64 seconds_; 211 ::PROTOBUF_NAMESPACE_ID::int32 nanos_; 212 mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; 213 friend struct ::TableStruct_google_2fprotobuf_2fduration_2eproto; 214 }; 215 // =================================================================== 216 217 218 // =================================================================== 219 220 #ifdef __GNUC__ 221 #pragma GCC diagnostic push 222 #pragma GCC diagnostic ignored "-Wstrict-aliasing" 223 #endif // __GNUC__ 224 // Duration 225 226 // int64 seconds = 1; clear_seconds()227inline void Duration::clear_seconds() { 228 seconds_ = PROTOBUF_LONGLONG(0); 229 } _internal_seconds()230inline ::PROTOBUF_NAMESPACE_ID::int64 Duration::_internal_seconds() const { 231 return seconds_; 232 } seconds()233inline ::PROTOBUF_NAMESPACE_ID::int64 Duration::seconds() const { 234 // @@protoc_insertion_point(field_get:google.protobuf.Duration.seconds) 235 return _internal_seconds(); 236 } _internal_set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value)237inline void Duration::_internal_set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) { 238 239 seconds_ = value; 240 } set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value)241inline void Duration::set_seconds(::PROTOBUF_NAMESPACE_ID::int64 value) { 242 _internal_set_seconds(value); 243 // @@protoc_insertion_point(field_set:google.protobuf.Duration.seconds) 244 } 245 246 // int32 nanos = 2; clear_nanos()247inline void Duration::clear_nanos() { 248 nanos_ = 0; 249 } _internal_nanos()250inline ::PROTOBUF_NAMESPACE_ID::int32 Duration::_internal_nanos() const { 251 return nanos_; 252 } nanos()253inline ::PROTOBUF_NAMESPACE_ID::int32 Duration::nanos() const { 254 // @@protoc_insertion_point(field_get:google.protobuf.Duration.nanos) 255 return _internal_nanos(); 256 } _internal_set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value)257inline void Duration::_internal_set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value) { 258 259 nanos_ = value; 260 } set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value)261inline void Duration::set_nanos(::PROTOBUF_NAMESPACE_ID::int32 value) { 262 _internal_set_nanos(value); 263 // @@protoc_insertion_point(field_set:google.protobuf.Duration.nanos) 264 } 265 266 #ifdef __GNUC__ 267 #pragma GCC diagnostic pop 268 #endif // __GNUC__ 269 270 // @@protoc_insertion_point(namespace_scope) 271 272 PROTOBUF_NAMESPACE_CLOSE 273 274 // @@protoc_insertion_point(global_scope) 275 276 #include <google/protobuf/port_undef.inc> 277 #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fduration_2eproto 278