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