File indexing completed on 2025-01-31 10:12:19
0001
0002
0003
0004
0005
0006 #ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fduration_2eproto_2epb_2eh
0007 #define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2fduration_2eproto_2epb_2eh
0008
0009 #include <limits>
0010 #include <string>
0011 #include <type_traits>
0012 #include <utility>
0013
0014 #include "google/protobuf/runtime_version.h"
0015 #if PROTOBUF_VERSION != 5028002
0016 #error "Protobuf C++ gencode is built with an incompatible version of"
0017 #error "Protobuf C++ headers/runtime. See"
0018 #error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp"
0019 #endif
0020 #include "google/protobuf/io/coded_stream.h"
0021 #include "google/protobuf/arena.h"
0022 #include "google/protobuf/arenastring.h"
0023 #include "google/protobuf/generated_message_tctable_decl.h"
0024 #include "google/protobuf/generated_message_util.h"
0025 #include "google/protobuf/metadata_lite.h"
0026 #include "google/protobuf/generated_message_reflection.h"
0027 #include "google/protobuf/message.h"
0028 #include "google/protobuf/repeated_field.h" // IWYU pragma: export
0029 #include "google/protobuf/extension_set.h" // IWYU pragma: export
0030 #include "google/protobuf/unknown_field_set.h"
0031
0032
0033
0034 #include "google/protobuf/port_def.inc"
0035
0036 #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fduration_2eproto PROTOBUF_EXPORT
0037
0038 namespace google {
0039 namespace protobuf {
0040 namespace internal {
0041 class AnyMetadata;
0042 }
0043 }
0044 }
0045
0046
0047 struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2fduration_2eproto {
0048 static const ::uint32_t offsets[];
0049 };
0050 PROTOBUF_EXPORT extern const ::google::protobuf::internal::DescriptorTable
0051 descriptor_table_google_2fprotobuf_2fduration_2eproto;
0052 namespace google {
0053 namespace protobuf {
0054 class Duration;
0055 struct DurationDefaultTypeInternal;
0056 PROTOBUF_EXPORT extern DurationDefaultTypeInternal _Duration_default_instance_;
0057 }
0058 }
0059
0060 namespace google {
0061 namespace protobuf {
0062
0063
0064
0065
0066
0067
0068 class PROTOBUF_EXPORT Duration final : public ::google::protobuf::Message
0069 {
0070 public:
0071 inline Duration() : Duration(nullptr) {}
0072 ~Duration() PROTOBUF_FINAL;
0073 template <typename = void>
0074 explicit PROTOBUF_CONSTEXPR Duration(
0075 ::google::protobuf::internal::ConstantInitialized);
0076
0077 inline Duration(const Duration& from) : Duration(nullptr, from) {}
0078 inline Duration(Duration&& from) noexcept
0079 : Duration(nullptr, std::move(from)) {}
0080 inline Duration& operator=(const Duration& from) {
0081 CopyFrom(from);
0082 return *this;
0083 }
0084 inline Duration& operator=(Duration&& from) noexcept {
0085 if (this == &from) return *this;
0086 if (GetArena() == from.GetArena()
0087 #ifdef PROTOBUF_FORCE_COPY_IN_MOVE
0088 && GetArena() != nullptr
0089 #endif
0090 ) {
0091 InternalSwap(&from);
0092 } else {
0093 CopyFrom(from);
0094 }
0095 return *this;
0096 }
0097
0098 inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
0099 ABSL_ATTRIBUTE_LIFETIME_BOUND {
0100 return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
0101 }
0102 inline ::google::protobuf::UnknownFieldSet* mutable_unknown_fields()
0103 ABSL_ATTRIBUTE_LIFETIME_BOUND {
0104 return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
0105 }
0106
0107 static const ::google::protobuf::Descriptor* descriptor() {
0108 return GetDescriptor();
0109 }
0110 static const ::google::protobuf::Descriptor* GetDescriptor() {
0111 return default_instance().GetMetadata().descriptor;
0112 }
0113 static const ::google::protobuf::Reflection* GetReflection() {
0114 return default_instance().GetMetadata().reflection;
0115 }
0116 static const Duration& default_instance() {
0117 return *internal_default_instance();
0118 }
0119 static inline const Duration* internal_default_instance() {
0120 return reinterpret_cast<const Duration*>(
0121 &_Duration_default_instance_);
0122 }
0123 static constexpr int kIndexInFileMessages = 0;
0124 friend void swap(Duration& a, Duration& b) { a.Swap(&b); }
0125 inline void Swap(Duration* other) {
0126 if (other == this) return;
0127 #ifdef PROTOBUF_FORCE_COPY_IN_SWAP
0128 if (GetArena() != nullptr && GetArena() == other->GetArena()) {
0129 #else
0130 if (GetArena() == other->GetArena()) {
0131 #endif
0132 InternalSwap(other);
0133 } else {
0134 ::google::protobuf::internal::GenericSwap(this, other);
0135 }
0136 }
0137 void UnsafeArenaSwap(Duration* other) {
0138 if (other == this) return;
0139 ABSL_DCHECK(GetArena() == other->GetArena());
0140 InternalSwap(other);
0141 }
0142
0143
0144
0145 Duration* New(::google::protobuf::Arena* arena = nullptr) const PROTOBUF_FINAL {
0146 return ::google::protobuf::Message::DefaultConstruct<Duration>(arena);
0147 }
0148 using ::google::protobuf::Message::CopyFrom;
0149 void CopyFrom(const Duration& from);
0150 using ::google::protobuf::Message::MergeFrom;
0151 void MergeFrom(const Duration& from) { Duration::MergeImpl(*this, from); }
0152
0153 private:
0154 static void MergeImpl(
0155 ::google::protobuf::MessageLite& to_msg,
0156 const ::google::protobuf::MessageLite& from_msg);
0157
0158 public:
0159 bool IsInitialized() const {
0160 return true;
0161 }
0162 ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL;
0163 #if defined(PROTOBUF_CUSTOM_VTABLE)
0164 private:
0165 static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
0166 static ::uint8_t* _InternalSerialize(
0167 const MessageLite& msg, ::uint8_t* target,
0168 ::google::protobuf::io::EpsCopyOutputStream* stream);
0169
0170 public:
0171 ::size_t ByteSizeLong() const { return ByteSizeLong(*this); }
0172 ::uint8_t* _InternalSerialize(
0173 ::uint8_t* target,
0174 ::google::protobuf::io::EpsCopyOutputStream* stream) const {
0175 return _InternalSerialize(*this, target, stream);
0176 }
0177 #else
0178 ::size_t ByteSizeLong() const final;
0179 ::uint8_t* _InternalSerialize(
0180 ::uint8_t* target,
0181 ::google::protobuf::io::EpsCopyOutputStream* stream) const final;
0182 #endif
0183 int GetCachedSize() const { return _impl_._cached_size_.Get(); }
0184
0185 private:
0186 void SharedCtor(::google::protobuf::Arena* arena);
0187 void SharedDtor();
0188 void InternalSwap(Duration* other);
0189 private:
0190 friend class ::google::protobuf::internal::AnyMetadata;
0191 static ::absl::string_view FullMessageName() { return "google.protobuf.Duration"; }
0192
0193 protected:
0194 explicit Duration(::google::protobuf::Arena* arena);
0195 Duration(::google::protobuf::Arena* arena, const Duration& from);
0196 Duration(::google::protobuf::Arena* arena, Duration&& from) noexcept
0197 : Duration(arena) {
0198 *this = ::std::move(from);
0199 }
0200 const ::google::protobuf::Message::ClassData* GetClassData() const PROTOBUF_FINAL;
0201 static const ::google::protobuf::Message::ClassDataFull _class_data_;
0202
0203 public:
0204 ::google::protobuf::Metadata GetMetadata() const;
0205
0206
0207
0208 enum : int {
0209 kSecondsFieldNumber = 1,
0210 kNanosFieldNumber = 2,
0211 };
0212
0213 void clear_seconds() ;
0214 ::int64_t seconds() const;
0215 void set_seconds(::int64_t value);
0216
0217 private:
0218 ::int64_t _internal_seconds() const;
0219 void _internal_set_seconds(::int64_t value);
0220
0221 public:
0222
0223 void clear_nanos() ;
0224 ::int32_t nanos() const;
0225 void set_nanos(::int32_t value);
0226
0227 private:
0228 ::int32_t _internal_nanos() const;
0229 void _internal_set_nanos(::int32_t value);
0230
0231 public:
0232
0233 private:
0234 class _Internal;
0235 friend class ::google::protobuf::internal::TcParser;
0236 static const ::google::protobuf::internal::TcParseTable<
0237 1, 2, 0,
0238 0, 2>
0239 _table_;
0240
0241
0242 friend class ::google::protobuf::MessageLite;
0243 friend class ::google::protobuf::Arena;
0244 template <typename T>
0245 friend class ::google::protobuf::Arena::InternalHelper;
0246 using InternalArenaConstructable_ = void;
0247 using DestructorSkippable_ = void;
0248 struct Impl_ {
0249 inline explicit constexpr Impl_(
0250 ::google::protobuf::internal::ConstantInitialized) noexcept;
0251 inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
0252 ::google::protobuf::Arena* arena);
0253 inline explicit Impl_(::google::protobuf::internal::InternalVisibility visibility,
0254 ::google::protobuf::Arena* arena, const Impl_& from,
0255 const Duration& from_msg);
0256 ::int64_t seconds_;
0257 ::int32_t nanos_;
0258 mutable ::google::protobuf::internal::CachedSize _cached_size_;
0259 PROTOBUF_TSAN_DECLARE_MEMBER
0260 };
0261 union { Impl_ _impl_; };
0262 friend struct ::TableStruct_google_2fprotobuf_2fduration_2eproto;
0263 };
0264
0265
0266
0267
0268
0269
0270
0271
0272
0273 #ifdef __GNUC__
0274 #pragma GCC diagnostic push
0275 #pragma GCC diagnostic ignored "-Wstrict-aliasing"
0276 #endif
0277
0278
0279
0280
0281
0282 inline void Duration::clear_seconds() {
0283 ::google::protobuf::internal::TSanWrite(&_impl_);
0284 _impl_.seconds_ = ::int64_t{0};
0285 }
0286 inline ::int64_t Duration::seconds() const {
0287
0288 return _internal_seconds();
0289 }
0290 inline void Duration::set_seconds(::int64_t value) {
0291 _internal_set_seconds(value);
0292
0293 }
0294 inline ::int64_t Duration::_internal_seconds() const {
0295 ::google::protobuf::internal::TSanRead(&_impl_);
0296 return _impl_.seconds_;
0297 }
0298 inline void Duration::_internal_set_seconds(::int64_t value) {
0299 ::google::protobuf::internal::TSanWrite(&_impl_);
0300 _impl_.seconds_ = value;
0301 }
0302
0303
0304 inline void Duration::clear_nanos() {
0305 ::google::protobuf::internal::TSanWrite(&_impl_);
0306 _impl_.nanos_ = 0;
0307 }
0308 inline ::int32_t Duration::nanos() const {
0309
0310 return _internal_nanos();
0311 }
0312 inline void Duration::set_nanos(::int32_t value) {
0313 _internal_set_nanos(value);
0314
0315 }
0316 inline ::int32_t Duration::_internal_nanos() const {
0317 ::google::protobuf::internal::TSanRead(&_impl_);
0318 return _impl_.nanos_;
0319 }
0320 inline void Duration::_internal_set_nanos(::int32_t value) {
0321 ::google::protobuf::internal::TSanWrite(&_impl_);
0322 _impl_.nanos_ = value;
0323 }
0324
0325 #ifdef __GNUC__
0326 #pragma GCC diagnostic pop
0327 #endif
0328
0329
0330 }
0331 }
0332
0333
0334
0335
0336 #include "google/protobuf/port_undef.inc"
0337
0338 #endif