1 | // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 | // source: google/protobuf/timestamp.proto |
3 | |
4 | #ifndef GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2ftimestamp_2eproto |
5 | #define GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2ftimestamp_2eproto |
6 | |
7 | #include <limits> |
8 | #include <string> |
9 | |
10 | #include <google/protobuf/port_def.inc> |
11 | #if PROTOBUF_VERSION < 3021000 |
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 3021004 < 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_util.h> |
27 | #include <google/protobuf/metadata_lite.h> |
28 | #include <google/protobuf/generated_message_reflection.h> |
29 | #include <google/protobuf/message.h> |
30 | #include <google/protobuf/repeated_field.h> // IWYU pragma: export |
31 | #include <google/protobuf/extension_set.h> // IWYU pragma: export |
32 | #include <google/protobuf/unknown_field_set.h> |
33 | // @@protoc_insertion_point(includes) |
34 | #include <google/protobuf/port_def.inc> |
35 | #define PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftimestamp_2eproto PROTOBUF_EXPORT |
36 | PROTOBUF_NAMESPACE_OPEN |
37 | namespace internal { |
38 | class AnyMetadata; |
39 | } // namespace internal |
40 | PROTOBUF_NAMESPACE_CLOSE |
41 | |
42 | // Internal implementation detail -- do not use these members. |
43 | struct PROTOBUF_EXPORT TableStruct_google_2fprotobuf_2ftimestamp_2eproto { |
44 | static const uint32_t offsets[]; |
45 | }; |
46 | PROTOBUF_EXPORT extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2fprotobuf_2ftimestamp_2eproto; |
47 | PROTOBUF_NAMESPACE_OPEN |
48 | class Timestamp; |
49 | struct TimestampDefaultTypeInternal; |
50 | PROTOBUF_EXPORT extern TimestampDefaultTypeInternal _Timestamp_default_instance_; |
51 | PROTOBUF_NAMESPACE_CLOSE |
52 | PROTOBUF_NAMESPACE_OPEN |
53 | template<> PROTOBUF_EXPORT ::PROTOBUF_NAMESPACE_ID::Timestamp* Arena::CreateMaybeMessage<::PROTOBUF_NAMESPACE_ID::Timestamp>(Arena*); |
54 | PROTOBUF_NAMESPACE_CLOSE |
55 | PROTOBUF_NAMESPACE_OPEN |
56 | |
57 | // =================================================================== |
58 | |
59 | class PROTOBUF_EXPORT Timestamp final : |
60 | public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Timestamp) */ { |
61 | public: |
62 | inline Timestamp() : Timestamp(nullptr) {} |
63 | ~Timestamp() override; |
64 | explicit PROTOBUF_CONSTEXPR Timestamp(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); |
65 | |
66 | Timestamp(const Timestamp& from); |
67 | Timestamp(Timestamp&& from) noexcept |
68 | : Timestamp() { |
69 | *this = ::std::move(from); |
70 | } |
71 | |
72 | inline Timestamp& operator=(const Timestamp& from) { |
73 | CopyFrom(from); |
74 | return *this; |
75 | } |
76 | inline Timestamp& operator=(Timestamp&& from) noexcept { |
77 | if (this == &from) return *this; |
78 | if (GetOwningArena() == from.GetOwningArena() |
79 | #ifdef PROTOBUF_FORCE_COPY_IN_MOVE |
80 | && GetOwningArena() != nullptr |
81 | #endif // !PROTOBUF_FORCE_COPY_IN_MOVE |
82 | ) { |
83 | InternalSwap(other: &from); |
84 | } else { |
85 | CopyFrom(from); |
86 | } |
87 | return *this; |
88 | } |
89 | |
90 | static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { |
91 | return GetDescriptor(); |
92 | } |
93 | static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { |
94 | return default_instance().GetMetadata().descriptor; |
95 | } |
96 | static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { |
97 | return default_instance().GetMetadata().reflection; |
98 | } |
99 | static const Timestamp& default_instance() { |
100 | return *internal_default_instance(); |
101 | } |
102 | static inline const Timestamp* internal_default_instance() { |
103 | return reinterpret_cast<const Timestamp*>( |
104 | &_Timestamp_default_instance_); |
105 | } |
106 | static constexpr int kIndexInFileMessages = |
107 | 0; |
108 | |
109 | friend void swap(Timestamp& a, Timestamp& b) { |
110 | a.Swap(other: &b); |
111 | } |
112 | inline void Swap(Timestamp* other) { |
113 | if (other == this) return; |
114 | #ifdef PROTOBUF_FORCE_COPY_IN_SWAP |
115 | if (GetOwningArena() != nullptr && |
116 | GetOwningArena() == other->GetOwningArena()) { |
117 | #else // PROTOBUF_FORCE_COPY_IN_SWAP |
118 | if (GetOwningArena() == other->GetOwningArena()) { |
119 | #endif // !PROTOBUF_FORCE_COPY_IN_SWAP |
120 | InternalSwap(other); |
121 | } else { |
122 | ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(m1: this, m2: other); |
123 | } |
124 | } |
125 | void UnsafeArenaSwap(Timestamp* other) { |
126 | if (other == this) return; |
127 | GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); |
128 | InternalSwap(other); |
129 | } |
130 | |
131 | // implements Message ---------------------------------------------- |
132 | |
133 | Timestamp* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { |
134 | return CreateMaybeMessage<Timestamp>(arena); |
135 | } |
136 | using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; |
137 | void CopyFrom(const Timestamp& from); |
138 | using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; |
139 | void MergeFrom( const Timestamp& from) { |
140 | Timestamp::MergeImpl(to_msg&: *this, from_msg: from); |
141 | } |
142 | private: |
143 | static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg); |
144 | public: |
145 | PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; |
146 | bool IsInitialized() const final; |
147 | |
148 | size_t ByteSizeLong() const final; |
149 | const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; |
150 | uint8_t* _InternalSerialize( |
151 | uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; |
152 | int GetCachedSize() const final { return _impl_._cached_size_.Get(); } |
153 | |
154 | private: |
155 | void SharedCtor(::PROTOBUF_NAMESPACE_ID::Arena* arena, bool is_message_owned); |
156 | void SharedDtor(); |
157 | void SetCachedSize(int size) const final; |
158 | void InternalSwap(Timestamp* other); |
159 | |
160 | private: |
161 | friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; |
162 | static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { |
163 | return "google.protobuf.Timestamp" ; |
164 | } |
165 | protected: |
166 | explicit Timestamp(::PROTOBUF_NAMESPACE_ID::Arena* arena, |
167 | bool is_message_owned = false); |
168 | public: |
169 | |
170 | static const ClassData _class_data_; |
171 | const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; |
172 | |
173 | ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; |
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 | int64_t seconds() const; |
186 | void set_seconds(int64_t value); |
187 | private: |
188 | int64_t _internal_seconds() const; |
189 | void _internal_set_seconds(int64_t value); |
190 | public: |
191 | |
192 | // int32 nanos = 2; |
193 | void clear_nanos(); |
194 | int32_t nanos() const; |
195 | void set_nanos(int32_t value); |
196 | private: |
197 | int32_t _internal_nanos() const; |
198 | void _internal_set_nanos(int32_t value); |
199 | public: |
200 | |
201 | // @@protoc_insertion_point(class_scope:google.protobuf.Timestamp) |
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 | struct Impl_ { |
209 | int64_t seconds_; |
210 | int32_t nanos_; |
211 | mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; |
212 | }; |
213 | union { Impl_ _impl_; }; |
214 | friend struct ::TableStruct_google_2fprotobuf_2ftimestamp_2eproto; |
215 | }; |
216 | // =================================================================== |
217 | |
218 | |
219 | // =================================================================== |
220 | |
221 | #ifdef __GNUC__ |
222 | #pragma GCC diagnostic push |
223 | #pragma GCC diagnostic ignored "-Wstrict-aliasing" |
224 | #endif // __GNUC__ |
225 | // Timestamp |
226 | |
227 | // int64 seconds = 1; |
228 | inline void Timestamp::clear_seconds() { |
229 | _impl_.seconds_ = int64_t{0}; |
230 | } |
231 | inline int64_t Timestamp::_internal_seconds() const { |
232 | return _impl_.seconds_; |
233 | } |
234 | inline int64_t Timestamp::seconds() const { |
235 | // @@protoc_insertion_point(field_get:google.protobuf.Timestamp.seconds) |
236 | return _internal_seconds(); |
237 | } |
238 | inline void Timestamp::_internal_set_seconds(int64_t value) { |
239 | |
240 | _impl_.seconds_ = value; |
241 | } |
242 | inline void Timestamp::set_seconds(int64_t value) { |
243 | _internal_set_seconds(value); |
244 | // @@protoc_insertion_point(field_set:google.protobuf.Timestamp.seconds) |
245 | } |
246 | |
247 | // int32 nanos = 2; |
248 | inline void Timestamp::clear_nanos() { |
249 | _impl_.nanos_ = 0; |
250 | } |
251 | inline int32_t Timestamp::_internal_nanos() const { |
252 | return _impl_.nanos_; |
253 | } |
254 | inline int32_t Timestamp::nanos() const { |
255 | // @@protoc_insertion_point(field_get:google.protobuf.Timestamp.nanos) |
256 | return _internal_nanos(); |
257 | } |
258 | inline void Timestamp::_internal_set_nanos(int32_t value) { |
259 | |
260 | _impl_.nanos_ = value; |
261 | } |
262 | inline void Timestamp::set_nanos(int32_t value) { |
263 | _internal_set_nanos(value); |
264 | // @@protoc_insertion_point(field_set:google.protobuf.Timestamp.nanos) |
265 | } |
266 | |
267 | #ifdef __GNUC__ |
268 | #pragma GCC diagnostic pop |
269 | #endif // __GNUC__ |
270 | |
271 | // @@protoc_insertion_point(namespace_scope) |
272 | |
273 | PROTOBUF_NAMESPACE_CLOSE |
274 | |
275 | // @@protoc_insertion_point(global_scope) |
276 | |
277 | #include <google/protobuf/port_undef.inc> |
278 | #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2fprotobuf_2ftimestamp_2eproto |
279 | |