| 1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
| 2 | // source: google/protobuf/timestamp.proto |
| 3 | |
| 4 | #include <google/protobuf/timestamp.pb.h> |
| 5 | |
| 6 | #include <algorithm> |
| 7 | |
| 8 | #include <google/protobuf/io/coded_stream.h> |
| 9 | #include <google/protobuf/extension_set.h> |
| 10 | #include <google/protobuf/wire_format_lite.h> |
| 11 | #include <google/protobuf/descriptor.h> |
| 12 | #include <google/protobuf/generated_message_reflection.h> |
| 13 | #include <google/protobuf/reflection_ops.h> |
| 14 | #include <google/protobuf/wire_format.h> |
| 15 | // @@protoc_insertion_point(includes) |
| 16 | #include <google/protobuf/port_def.inc> |
| 17 | |
| 18 | PROTOBUF_PRAGMA_INIT_SEG |
| 19 | |
| 20 | namespace _pb = ::PROTOBUF_NAMESPACE_ID; |
| 21 | namespace _pbi = _pb::internal; |
| 22 | |
| 23 | PROTOBUF_NAMESPACE_OPEN |
| 24 | PROTOBUF_CONSTEXPR Timestamp::Timestamp( |
| 25 | ::_pbi::ConstantInitialized): _impl_{ |
| 26 | /*decltype(_impl_.seconds_)*/.seconds_: int64_t{0} |
| 27 | , /*decltype(_impl_.nanos_)*/.nanos_: 0 |
| 28 | , /*decltype(_impl_._cached_size_)*/._cached_size_: {}} {} |
| 29 | struct TimestampDefaultTypeInternal { |
| 30 | PROTOBUF_CONSTEXPR TimestampDefaultTypeInternal() |
| 31 | : _instance(::_pbi::ConstantInitialized{}) {} |
| 32 | ~TimestampDefaultTypeInternal() {} |
| 33 | union { |
| 34 | Timestamp _instance; |
| 35 | }; |
| 36 | }; |
| 37 | PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TimestampDefaultTypeInternal _Timestamp_default_instance_; |
| 38 | PROTOBUF_NAMESPACE_CLOSE |
| 39 | static ::_pb::Metadata file_level_metadata_google_2fprotobuf_2ftimestamp_2eproto[1]; |
| 40 | static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_google_2fprotobuf_2ftimestamp_2eproto = nullptr; |
| 41 | static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_google_2fprotobuf_2ftimestamp_2eproto = nullptr; |
| 42 | |
| 43 | const uint32_t TableStruct_google_2fprotobuf_2ftimestamp_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
| 44 | ~0u, // no _has_bits_ |
| 45 | PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Timestamp, _internal_metadata_), |
| 46 | ~0u, // no _extensions_ |
| 47 | ~0u, // no _oneof_case_ |
| 48 | ~0u, // no _weak_field_map_ |
| 49 | ~0u, // no _inlined_string_donated_ |
| 50 | PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Timestamp, _impl_.seconds_), |
| 51 | PROTOBUF_FIELD_OFFSET(::PROTOBUF_NAMESPACE_ID::Timestamp, _impl_.nanos_), |
| 52 | }; |
| 53 | static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { |
| 54 | { .offsets_index: 0, .has_bit_indices_index: -1, .inlined_string_indices_index: -1, .object_size: sizeof(::PROTOBUF_NAMESPACE_ID::Timestamp)}, |
| 55 | }; |
| 56 | |
| 57 | static const ::_pb::Message* const file_default_instances[] = { |
| 58 | &::PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_._instance, |
| 59 | }; |
| 60 | |
| 61 | const char descriptor_table_protodef_google_2fprotobuf_2ftimestamp_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = |
| 62 | "\n\037google/protobuf/timestamp.proto\022\017googl" |
| 63 | "e.protobuf\"+\n\tTimestamp\022\017\n\007seconds\030\001 \001(\003" |
| 64 | "\022\r\n\005nanos\030\002 \001(\005B\205\001\n\023com.google.protobufB" |
| 65 | "\016TimestampProtoP\001Z2google.golang.org/pro" |
| 66 | "tobuf/types/known/timestamppb\370\001\001\242\002\003GPB\252\002" |
| 67 | "\036Google.Protobuf.WellKnownTypesb\006proto3" |
| 68 | ; |
| 69 | static ::_pbi::once_flag descriptor_table_google_2fprotobuf_2ftimestamp_2eproto_once; |
| 70 | const ::_pbi::DescriptorTable descriptor_table_google_2fprotobuf_2ftimestamp_2eproto = { |
| 71 | .is_initialized: false, .is_eager: false, .size: 239, .descriptor: descriptor_table_protodef_google_2fprotobuf_2ftimestamp_2eproto, |
| 72 | .filename: "google/protobuf/timestamp.proto" , |
| 73 | .once: &descriptor_table_google_2fprotobuf_2ftimestamp_2eproto_once, .deps: nullptr, .num_deps: 0, .num_messages: 1, |
| 74 | .schemas: schemas, .default_instances: file_default_instances, .offsets: TableStruct_google_2fprotobuf_2ftimestamp_2eproto::offsets, |
| 75 | .file_level_metadata: file_level_metadata_google_2fprotobuf_2ftimestamp_2eproto, .file_level_enum_descriptors: file_level_enum_descriptors_google_2fprotobuf_2ftimestamp_2eproto, |
| 76 | .file_level_service_descriptors: file_level_service_descriptors_google_2fprotobuf_2ftimestamp_2eproto, |
| 77 | }; |
| 78 | PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2fprotobuf_2ftimestamp_2eproto_getter() { |
| 79 | return &descriptor_table_google_2fprotobuf_2ftimestamp_2eproto; |
| 80 | } |
| 81 | |
| 82 | // Force running AddDescriptors() at dynamic initialization time. |
| 83 | PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_google_2fprotobuf_2ftimestamp_2eproto(&descriptor_table_google_2fprotobuf_2ftimestamp_2eproto); |
| 84 | PROTOBUF_NAMESPACE_OPEN |
| 85 | |
| 86 | // =================================================================== |
| 87 | |
| 88 | class Timestamp::_Internal { |
| 89 | public: |
| 90 | }; |
| 91 | |
| 92 | Timestamp::Timestamp(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
| 93 | bool is_message_owned) |
| 94 | : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { |
| 95 | SharedCtor(arena, is_message_owned); |
| 96 | // @@protoc_insertion_point(arena_constructor:google.protobuf.Timestamp) |
| 97 | } |
| 98 | Timestamp::Timestamp(const Timestamp& from) |
| 99 | : ::PROTOBUF_NAMESPACE_ID::Message() { |
| 100 | Timestamp* const _this = this; (void)_this; |
| 101 | new (&_impl_) Impl_{ |
| 102 | .seconds_: decltype(_impl_.seconds_){} |
| 103 | , .nanos_: decltype(_impl_.nanos_){} |
| 104 | , /*decltype(_impl_._cached_size_)*/._cached_size_: {}}; |
| 105 | |
| 106 | _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(other: from._internal_metadata_); |
| 107 | ::memcpy(dest: &_impl_.seconds_, src: &from._impl_.seconds_, |
| 108 | n: static_cast<size_t>(reinterpret_cast<char*>(&_impl_.nanos_) - |
| 109 | reinterpret_cast<char*>(&_impl_.seconds_)) + sizeof(_impl_.nanos_)); |
| 110 | // @@protoc_insertion_point(copy_constructor:google.protobuf.Timestamp) |
| 111 | } |
| 112 | |
| 113 | inline void Timestamp::SharedCtor( |
| 114 | ::_pb::Arena* arena, bool is_message_owned) { |
| 115 | (void)arena; |
| 116 | (void)is_message_owned; |
| 117 | new (&_impl_) Impl_{ |
| 118 | .seconds_: decltype(_impl_.seconds_){int64_t{0}} |
| 119 | , .nanos_: decltype(_impl_.nanos_){0} |
| 120 | , /*decltype(_impl_._cached_size_)*/._cached_size_: {} |
| 121 | }; |
| 122 | } |
| 123 | |
| 124 | Timestamp::~Timestamp() { |
| 125 | // @@protoc_insertion_point(destructor:google.protobuf.Timestamp) |
| 126 | if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { |
| 127 | (void)arena; |
| 128 | return; |
| 129 | } |
| 130 | SharedDtor(); |
| 131 | } |
| 132 | |
| 133 | inline void Timestamp::SharedDtor() { |
| 134 | GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); |
| 135 | } |
| 136 | |
| 137 | void Timestamp::SetCachedSize(int size) const { |
| 138 | _impl_._cached_size_.Set(size); |
| 139 | } |
| 140 | |
| 141 | void Timestamp::Clear() { |
| 142 | // @@protoc_insertion_point(message_clear_start:google.protobuf.Timestamp) |
| 143 | uint32_t cached_has_bits = 0; |
| 144 | // Prevent compiler warnings about cached_has_bits being unused |
| 145 | (void) cached_has_bits; |
| 146 | |
| 147 | ::memset(s: &_impl_.seconds_, c: 0, n: static_cast<size_t>( |
| 148 | reinterpret_cast<char*>(&_impl_.nanos_) - |
| 149 | reinterpret_cast<char*>(&_impl_.seconds_)) + sizeof(_impl_.nanos_)); |
| 150 | _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); |
| 151 | } |
| 152 | |
| 153 | const char* Timestamp::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { |
| 154 | #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure |
| 155 | while (!ctx->Done(ptr: &ptr)) { |
| 156 | uint32_t tag; |
| 157 | ptr = ::_pbi::ReadTag(p: ptr, out: &tag); |
| 158 | switch (tag >> 3) { |
| 159 | // int64 seconds = 1; |
| 160 | case 1: |
| 161 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) { |
| 162 | _impl_.seconds_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(p: &ptr); |
| 163 | CHK_(ptr); |
| 164 | } else |
| 165 | goto handle_unusual; |
| 166 | continue; |
| 167 | // int32 nanos = 2; |
| 168 | case 2: |
| 169 | if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 16)) { |
| 170 | _impl_.nanos_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(p: &ptr); |
| 171 | CHK_(ptr); |
| 172 | } else |
| 173 | goto handle_unusual; |
| 174 | continue; |
| 175 | default: |
| 176 | goto handle_unusual; |
| 177 | } // switch |
| 178 | handle_unusual: |
| 179 | if ((tag == 0) || ((tag & 7) == 4)) { |
| 180 | CHK_(ptr); |
| 181 | ctx->SetLastTag(tag); |
| 182 | goto message_done; |
| 183 | } |
| 184 | ptr = UnknownFieldParse( |
| 185 | tag, |
| 186 | unknown: _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), |
| 187 | ptr, ctx); |
| 188 | CHK_(ptr != nullptr); |
| 189 | } // while |
| 190 | message_done: |
| 191 | return ptr; |
| 192 | failure: |
| 193 | ptr = nullptr; |
| 194 | goto message_done; |
| 195 | #undef CHK_ |
| 196 | } |
| 197 | |
| 198 | uint8_t* Timestamp::_InternalSerialize( |
| 199 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { |
| 200 | // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.Timestamp) |
| 201 | uint32_t cached_has_bits = 0; |
| 202 | (void) cached_has_bits; |
| 203 | |
| 204 | // int64 seconds = 1; |
| 205 | if (this->_internal_seconds() != 0) { |
| 206 | target = stream->EnsureSpace(ptr: target); |
| 207 | target = ::_pbi::WireFormatLite::WriteInt64ToArray(field_number: 1, value: this->_internal_seconds(), target); |
| 208 | } |
| 209 | |
| 210 | // int32 nanos = 2; |
| 211 | if (this->_internal_nanos() != 0) { |
| 212 | target = stream->EnsureSpace(ptr: target); |
| 213 | target = ::_pbi::WireFormatLite::WriteInt32ToArray(field_number: 2, value: this->_internal_nanos(), target); |
| 214 | } |
| 215 | |
| 216 | if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { |
| 217 | target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( |
| 218 | unknown_fields: _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(default_instance: ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); |
| 219 | } |
| 220 | // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.Timestamp) |
| 221 | return target; |
| 222 | } |
| 223 | |
| 224 | size_t Timestamp::ByteSizeLong() const { |
| 225 | // @@protoc_insertion_point(message_byte_size_start:google.protobuf.Timestamp) |
| 226 | size_t total_size = 0; |
| 227 | |
| 228 | uint32_t cached_has_bits = 0; |
| 229 | // Prevent compiler warnings about cached_has_bits being unused |
| 230 | (void) cached_has_bits; |
| 231 | |
| 232 | // int64 seconds = 1; |
| 233 | if (this->_internal_seconds() != 0) { |
| 234 | total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(value: this->_internal_seconds()); |
| 235 | } |
| 236 | |
| 237 | // int32 nanos = 2; |
| 238 | if (this->_internal_nanos() != 0) { |
| 239 | total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(value: this->_internal_nanos()); |
| 240 | } |
| 241 | |
| 242 | return MaybeComputeUnknownFieldsSize(total_size, cached_size: &_impl_._cached_size_); |
| 243 | } |
| 244 | |
| 245 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData Timestamp::_class_data_ = { |
| 246 | .copy_to_from: ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck, |
| 247 | .merge_to_from: Timestamp::MergeImpl |
| 248 | }; |
| 249 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*Timestamp::GetClassData() const { return &_class_data_; } |
| 250 | |
| 251 | |
| 252 | void Timestamp::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) { |
| 253 | auto* const _this = static_cast<Timestamp*>(&to_msg); |
| 254 | auto& from = static_cast<const Timestamp&>(from_msg); |
| 255 | // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.Timestamp) |
| 256 | GOOGLE_DCHECK_NE(&from, _this); |
| 257 | uint32_t cached_has_bits = 0; |
| 258 | (void) cached_has_bits; |
| 259 | |
| 260 | if (from._internal_seconds() != 0) { |
| 261 | _this->_internal_set_seconds(value: from._internal_seconds()); |
| 262 | } |
| 263 | if (from._internal_nanos() != 0) { |
| 264 | _this->_internal_set_nanos(value: from._internal_nanos()); |
| 265 | } |
| 266 | _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(other: from._internal_metadata_); |
| 267 | } |
| 268 | |
| 269 | void Timestamp::CopyFrom(const Timestamp& from) { |
| 270 | // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.Timestamp) |
| 271 | if (&from == this) return; |
| 272 | Clear(); |
| 273 | MergeFrom(from); |
| 274 | } |
| 275 | |
| 276 | bool Timestamp::IsInitialized() const { |
| 277 | return true; |
| 278 | } |
| 279 | |
| 280 | void Timestamp::InternalSwap(Timestamp* other) { |
| 281 | using std::swap; |
| 282 | _internal_metadata_.InternalSwap(other: &other->_internal_metadata_); |
| 283 | ::PROTOBUF_NAMESPACE_ID::internal::memswap< |
| 284 | PROTOBUF_FIELD_OFFSET(Timestamp, _impl_.nanos_) |
| 285 | + sizeof(Timestamp::_impl_.nanos_) |
| 286 | - PROTOBUF_FIELD_OFFSET(Timestamp, _impl_.seconds_)>( |
| 287 | p: reinterpret_cast<char*>(&_impl_.seconds_), |
| 288 | q: reinterpret_cast<char*>(&other->_impl_.seconds_)); |
| 289 | } |
| 290 | |
| 291 | ::PROTOBUF_NAMESPACE_ID::Metadata Timestamp::GetMetadata() const { |
| 292 | return ::_pbi::AssignDescriptors( |
| 293 | table: &descriptor_table_google_2fprotobuf_2ftimestamp_2eproto_getter, once: &descriptor_table_google_2fprotobuf_2ftimestamp_2eproto_once, |
| 294 | metadata: file_level_metadata_google_2fprotobuf_2ftimestamp_2eproto[0]); |
| 295 | } |
| 296 | |
| 297 | // @@protoc_insertion_point(namespace_scope) |
| 298 | PROTOBUF_NAMESPACE_CLOSE |
| 299 | PROTOBUF_NAMESPACE_OPEN |
| 300 | template<> PROTOBUF_NOINLINE ::PROTOBUF_NAMESPACE_ID::Timestamp* |
| 301 | Arena::CreateMaybeMessage< ::PROTOBUF_NAMESPACE_ID::Timestamp >(Arena* arena) { |
| 302 | return Arena::CreateMessageInternal< ::PROTOBUF_NAMESPACE_ID::Timestamp >(arena); |
| 303 | } |
| 304 | PROTOBUF_NAMESPACE_CLOSE |
| 305 | |
| 306 | // @@protoc_insertion_point(global_scope) |
| 307 | #include <google/protobuf/port_undef.inc> |
| 308 | |