1 // Generated by the protocol buffer compiler. DO NOT EDIT!
2 // NO CHECKED-IN PROTOBUF GENCODE
3 // source: google/protobuf/timestamp.proto
4 // Protobuf C++ Version: 5.29.4
5
6 #include "google/protobuf/timestamp.pb.h"
7
8 #include <algorithm>
9 #include <type_traits>
10 #include "google/protobuf/io/coded_stream.h"
11 #include "google/protobuf/generated_message_tctable_impl.h"
12 #include "google/protobuf/extension_set.h"
13 #include "google/protobuf/generated_message_util.h"
14 #include "google/protobuf/wire_format_lite.h"
15 #include "google/protobuf/descriptor.h"
16 #include "google/protobuf/generated_message_reflection.h"
17 #include "google/protobuf/reflection_ops.h"
18 #include "google/protobuf/wire_format.h"
19 // @@protoc_insertion_point(includes)
20
21 // Must be included last.
22 #include "google/protobuf/port_def.inc"
23 PROTOBUF_PRAGMA_INIT_SEG
24 namespace _pb = ::google::protobuf;
25 namespace _pbi = ::google::protobuf::internal;
26 namespace _fl = ::google::protobuf::internal::field_layout;
27 namespace google {
28 namespace protobuf {
29
Impl_(::_pbi::ConstantInitialized)30 inline constexpr Timestamp::Impl_::Impl_(
31 ::_pbi::ConstantInitialized) noexcept
32 : seconds_{::int64_t{0}},
33 nanos_{0},
34 _cached_size_{0} {}
35
36 template <typename>
Timestamp(::_pbi::ConstantInitialized)37 PROTOBUF_CONSTEXPR Timestamp::Timestamp(::_pbi::ConstantInitialized)
38 #if defined(PROTOBUF_CUSTOM_VTABLE)
39 : ::google::protobuf::Message(_class_data_.base()),
40 #else // PROTOBUF_CUSTOM_VTABLE
41 : ::google::protobuf::Message(),
42 #endif // PROTOBUF_CUSTOM_VTABLE
43 _impl_(::_pbi::ConstantInitialized()) {
44 }
45 struct TimestampDefaultTypeInternal {
TimestampDefaultTypeInternalgoogle::protobuf::TimestampDefaultTypeInternal46 PROTOBUF_CONSTEXPR TimestampDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
~TimestampDefaultTypeInternalgoogle::protobuf::TimestampDefaultTypeInternal47 ~TimestampDefaultTypeInternal() {}
48 union {
49 Timestamp _instance;
50 };
51 };
52
53 PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_EXPORT
54 PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TimestampDefaultTypeInternal _Timestamp_default_instance_;
55 } // namespace protobuf
56 } // namespace google
57 static constexpr const ::_pb::EnumDescriptor**
58 file_level_enum_descriptors_google_2fprotobuf_2ftimestamp_2eproto = nullptr;
59 static constexpr const ::_pb::ServiceDescriptor**
60 file_level_service_descriptors_google_2fprotobuf_2ftimestamp_2eproto = nullptr;
61 const ::uint32_t
62 TableStruct_google_2fprotobuf_2ftimestamp_2eproto::offsets[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
63 protodesc_cold) = {
64 ~0u, // no _has_bits_
65 PROTOBUF_FIELD_OFFSET(::google::protobuf::Timestamp, _internal_metadata_),
66 ~0u, // no _extensions_
67 ~0u, // no _oneof_case_
68 ~0u, // no _weak_field_map_
69 ~0u, // no _inlined_string_donated_
70 ~0u, // no _split_
71 ~0u, // no sizeof(Split)
72 PROTOBUF_FIELD_OFFSET(::google::protobuf::Timestamp, _impl_.seconds_),
73 PROTOBUF_FIELD_OFFSET(::google::protobuf::Timestamp, _impl_.nanos_),
74 };
75
76 static const ::_pbi::MigrationSchema
77 schemas[] ABSL_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
78 {0, -1, -1, sizeof(::google::protobuf::Timestamp)},
79 };
80 static const ::_pb::Message* const file_default_instances[] = {
81 &::google::protobuf::_Timestamp_default_instance_._instance,
82 };
83 const char descriptor_table_protodef_google_2fprotobuf_2ftimestamp_2eproto[] ABSL_ATTRIBUTE_SECTION_VARIABLE(
84 protodesc_cold) = {
85 "\n\037google/protobuf/timestamp.proto\022\017googl"
86 "e.protobuf\"+\n\tTimestamp\022\017\n\007seconds\030\001 \001(\003"
87 "\022\r\n\005nanos\030\002 \001(\005B\205\001\n\023com.google.protobufB"
88 "\016TimestampProtoP\001Z2google.golang.org/pro"
89 "tobuf/types/known/timestamppb\370\001\001\242\002\003GPB\252\002"
90 "\036Google.Protobuf.WellKnownTypesb\006proto3"
91 };
92 static ::absl::once_flag descriptor_table_google_2fprotobuf_2ftimestamp_2eproto_once;
93 PROTOBUF_CONSTINIT const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2ftimestamp_2eproto = {
94 false,
95 false,
96 239,
97 descriptor_table_protodef_google_2fprotobuf_2ftimestamp_2eproto,
98 "google/protobuf/timestamp.proto",
99 &descriptor_table_google_2fprotobuf_2ftimestamp_2eproto_once,
100 nullptr,
101 0,
102 1,
103 schemas,
104 file_default_instances,
105 TableStruct_google_2fprotobuf_2ftimestamp_2eproto::offsets,
106 file_level_enum_descriptors_google_2fprotobuf_2ftimestamp_2eproto,
107 file_level_service_descriptors_google_2fprotobuf_2ftimestamp_2eproto,
108 };
109 namespace google {
110 namespace protobuf {
111 // ===================================================================
112
113 class Timestamp::_Internal {
114 public:
115 };
116
Timestamp(::google::protobuf::Arena * arena)117 Timestamp::Timestamp(::google::protobuf::Arena* arena)
118 #if defined(PROTOBUF_CUSTOM_VTABLE)
119 : ::google::protobuf::Message(arena, _class_data_.base()) {
120 #else // PROTOBUF_CUSTOM_VTABLE
121 : ::google::protobuf::Message(arena) {
122 #endif // PROTOBUF_CUSTOM_VTABLE
123 SharedCtor(arena);
124 // @@protoc_insertion_point(arena_constructor:google.protobuf.Timestamp)
125 }
126 Timestamp::Timestamp(
127 ::google::protobuf::Arena* arena, const Timestamp& from)
128 : Timestamp(arena) {
129 MergeFrom(from);
130 }
131 inline PROTOBUF_NDEBUG_INLINE Timestamp::Impl_::Impl_(
132 ::google::protobuf::internal::InternalVisibility visibility,
133 ::google::protobuf::Arena* arena)
134 : _cached_size_{0} {}
135
136 inline void Timestamp::SharedCtor(::_pb::Arena* arena) {
137 new (&_impl_) Impl_(internal_visibility(), arena);
138 ::memset(reinterpret_cast<char *>(&_impl_) +
139 offsetof(Impl_, seconds_),
140 0,
141 offsetof(Impl_, nanos_) -
142 offsetof(Impl_, seconds_) +
143 sizeof(Impl_::nanos_));
144 }
145 Timestamp::~Timestamp() {
146 // @@protoc_insertion_point(destructor:google.protobuf.Timestamp)
147 SharedDtor(*this);
148 }
149 inline void Timestamp::SharedDtor(MessageLite& self) {
150 Timestamp& this_ = static_cast<Timestamp&>(self);
151 this_._internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
152 ABSL_DCHECK(this_.GetArena() == nullptr);
153 this_._impl_.~Impl_();
154 }
155
156 inline void* Timestamp::PlacementNew_(const void*, void* mem,
157 ::google::protobuf::Arena* arena) {
158 return ::new (mem) Timestamp(arena);
159 }
160 constexpr auto Timestamp::InternalNewImpl_() {
161 return ::google::protobuf::internal::MessageCreator::ZeroInit(sizeof(Timestamp),
162 alignof(Timestamp));
163 }
164 PROTOBUF_CONSTINIT
165 PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
166 const ::google::protobuf::internal::ClassDataFull Timestamp::_class_data_ = {
167 ::google::protobuf::internal::ClassData{
168 &_Timestamp_default_instance_._instance,
169 &_table_.header,
170 nullptr, // OnDemandRegisterArenaDtor
171 nullptr, // IsInitialized
172 &Timestamp::MergeImpl,
173 ::google::protobuf::Message::GetNewImpl<Timestamp>(),
174 #if defined(PROTOBUF_CUSTOM_VTABLE)
175 &Timestamp::SharedDtor,
176 ::google::protobuf::Message::GetClearImpl<Timestamp>(), &Timestamp::ByteSizeLong,
177 &Timestamp::_InternalSerialize,
178 #endif // PROTOBUF_CUSTOM_VTABLE
179 PROTOBUF_FIELD_OFFSET(Timestamp, _impl_._cached_size_),
180 false,
181 },
182 &Timestamp::kDescriptorMethods,
183 &descriptor_table_google_2fprotobuf_2ftimestamp_2eproto,
184 nullptr, // tracker
185 };
186 const ::google::protobuf::internal::ClassData* Timestamp::GetClassData() const {
187 ::google::protobuf::internal::PrefetchToLocalCache(&_class_data_);
188 ::google::protobuf::internal::PrefetchToLocalCache(_class_data_.tc_table);
189 return _class_data_.base();
190 }
191 PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
192 const ::_pbi::TcParseTable<1, 2, 0, 0, 2> Timestamp::_table_ = {
193 {
194 0, // no _has_bits_
195 0, // no _extensions_
196 2, 8, // max_field_number, fast_idx_mask
197 offsetof(decltype(_table_), field_lookup_table),
198 4294967292, // skipmap
199 offsetof(decltype(_table_), field_entries),
200 2, // num_field_entries
201 0, // num_aux_entries
202 offsetof(decltype(_table_), field_names), // no aux_entries
203 _class_data_.base(),
204 nullptr, // post_loop_handler
205 ::_pbi::TcParser::GenericFallback, // fallback
206 #ifdef PROTOBUF_PREFETCH_PARSE_TABLE
207 ::_pbi::TcParser::GetTable<::google::protobuf::Timestamp>(), // to_prefetch
208 #endif // PROTOBUF_PREFETCH_PARSE_TABLE
209 }, {{
210 // int32 nanos = 2;
211 {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Timestamp, _impl_.nanos_), 63>(),
212 {16, 63, 0, PROTOBUF_FIELD_OFFSET(Timestamp, _impl_.nanos_)}},
213 // int64 seconds = 1;
214 {::_pbi::TcParser::SingularVarintNoZag1<::uint64_t, offsetof(Timestamp, _impl_.seconds_), 63>(),
215 {8, 63, 0, PROTOBUF_FIELD_OFFSET(Timestamp, _impl_.seconds_)}},
216 }}, {{
217 65535, 65535
218 }}, {{
219 // int64 seconds = 1;
220 {PROTOBUF_FIELD_OFFSET(Timestamp, _impl_.seconds_), 0, 0,
221 (0 | ::_fl::kFcSingular | ::_fl::kInt64)},
222 // int32 nanos = 2;
223 {PROTOBUF_FIELD_OFFSET(Timestamp, _impl_.nanos_), 0, 0,
224 (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
225 }},
226 // no aux_entries
227 {{
228 }},
229 };
230
231 PROTOBUF_NOINLINE void Timestamp::Clear() {
232 // @@protoc_insertion_point(message_clear_start:google.protobuf.Timestamp)
233 ::google::protobuf::internal::TSanWrite(&_impl_);
234 ::uint32_t cached_has_bits = 0;
235 // Prevent compiler warnings about cached_has_bits being unused
236 (void) cached_has_bits;
237
238 ::memset(&_impl_.seconds_, 0, static_cast<::size_t>(
239 reinterpret_cast<char*>(&_impl_.nanos_) -
240 reinterpret_cast<char*>(&_impl_.seconds_)) + sizeof(_impl_.nanos_));
241 _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
242 }
243
244 #if defined(PROTOBUF_CUSTOM_VTABLE)
245 ::uint8_t* Timestamp::_InternalSerialize(
246 const MessageLite& base, ::uint8_t* target,
247 ::google::protobuf::io::EpsCopyOutputStream* stream) {
248 const Timestamp& this_ = static_cast<const Timestamp&>(base);
249 #else // PROTOBUF_CUSTOM_VTABLE
250 ::uint8_t* Timestamp::_InternalSerialize(
251 ::uint8_t* target,
252 ::google::protobuf::io::EpsCopyOutputStream* stream) const {
253 const Timestamp& this_ = *this;
254 #endif // PROTOBUF_CUSTOM_VTABLE
255 // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Timestamp)
256 ::uint32_t cached_has_bits = 0;
257 (void)cached_has_bits;
258
259 // int64 seconds = 1;
260 if (this_._internal_seconds() != 0) {
261 target = ::google::protobuf::internal::WireFormatLite::
262 WriteInt64ToArrayWithField<1>(
263 stream, this_._internal_seconds(), target);
264 }
265
266 // int32 nanos = 2;
267 if (this_._internal_nanos() != 0) {
268 target = ::google::protobuf::internal::WireFormatLite::
269 WriteInt32ToArrayWithField<2>(
270 stream, this_._internal_nanos(), target);
271 }
272
273 if (PROTOBUF_PREDICT_FALSE(this_._internal_metadata_.have_unknown_fields())) {
274 target =
275 ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
276 this_._internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
277 }
278 // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Timestamp)
279 return target;
280 }
281
282 #if defined(PROTOBUF_CUSTOM_VTABLE)
283 ::size_t Timestamp::ByteSizeLong(const MessageLite& base) {
284 const Timestamp& this_ = static_cast<const Timestamp&>(base);
285 #else // PROTOBUF_CUSTOM_VTABLE
286 ::size_t Timestamp::ByteSizeLong() const {
287 const Timestamp& this_ = *this;
288 #endif // PROTOBUF_CUSTOM_VTABLE
289 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Timestamp)
290 ::size_t total_size = 0;
291
292 ::uint32_t cached_has_bits = 0;
293 // Prevent compiler warnings about cached_has_bits being unused
294 (void)cached_has_bits;
295
296 ::_pbi::Prefetch5LinesFrom7Lines(&this_);
297 {
298 // int64 seconds = 1;
299 if (this_._internal_seconds() != 0) {
300 total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(
301 this_._internal_seconds());
302 }
303 // int32 nanos = 2;
304 if (this_._internal_nanos() != 0) {
305 total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
306 this_._internal_nanos());
307 }
308 }
309 return this_.MaybeComputeUnknownFieldsSize(total_size,
310 &this_._impl_._cached_size_);
311 }
312
313 void Timestamp::MergeImpl(::google::protobuf::MessageLite& to_msg, const ::google::protobuf::MessageLite& from_msg) {
314 auto* const _this = static_cast<Timestamp*>(&to_msg);
315 auto& from = static_cast<const Timestamp&>(from_msg);
316 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Timestamp)
317 ABSL_DCHECK_NE(&from, _this);
318 ::uint32_t cached_has_bits = 0;
319 (void) cached_has_bits;
320
321 if (from._internal_seconds() != 0) {
322 _this->_impl_.seconds_ = from._impl_.seconds_;
323 }
324 if (from._internal_nanos() != 0) {
325 _this->_impl_.nanos_ = from._impl_.nanos_;
326 }
327 _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
328 }
329
330 void Timestamp::CopyFrom(const Timestamp& from) {
331 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Timestamp)
332 if (&from == this) return;
333 Clear();
334 MergeFrom(from);
335 }
336
337
338 void Timestamp::InternalSwap(Timestamp* PROTOBUF_RESTRICT other) {
339 using std::swap;
340 _internal_metadata_.InternalSwap(&other->_internal_metadata_);
341 ::google::protobuf::internal::memswap<
342 PROTOBUF_FIELD_OFFSET(Timestamp, _impl_.nanos_)
343 + sizeof(Timestamp::_impl_.nanos_)
344 - PROTOBUF_FIELD_OFFSET(Timestamp, _impl_.seconds_)>(
345 reinterpret_cast<char*>(&_impl_.seconds_),
346 reinterpret_cast<char*>(&other->_impl_.seconds_));
347 }
348
349 ::google::protobuf::Metadata Timestamp::GetMetadata() const {
350 return ::google::protobuf::Message::GetMetadataImpl(GetClassData()->full());
351 }
352 // @@protoc_insertion_point(namespace_scope)
353 } // namespace protobuf
354 } // namespace google
355 namespace google {
356 namespace protobuf {
357 } // namespace protobuf
358 } // namespace google
359 // @@protoc_insertion_point(global_scope)
360 PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::std::false_type
361 _static_init2_ PROTOBUF_UNUSED =
362 (::_pbi::AddDescriptors(&descriptor_table_google_2fprotobuf_2ftimestamp_2eproto),
363 ::std::false_type{});
364 #include "google/protobuf/port_undef.inc"
365