OLD | NEW |
1 // Generated by the protocol buffer compiler. DO NOT EDIT! | 1 // Generated by the protocol buffer compiler. DO NOT EDIT! |
2 // source: google/protobuf/duration.proto | 2 // source: google/protobuf/duration.proto |
3 | 3 |
4 #ifndef PROTOBUF_google_2fprotobuf_2fduration_2eproto__INCLUDED | 4 #ifndef PROTOBUF_google_2fprotobuf_2fduration_2eproto__INCLUDED |
5 #define PROTOBUF_google_2fprotobuf_2fduration_2eproto__INCLUDED | 5 #define PROTOBUF_google_2fprotobuf_2fduration_2eproto__INCLUDED |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include <google/protobuf/stubs/common.h> | 9 #include <google/protobuf/stubs/common.h> |
10 | 10 |
11 #if GOOGLE_PROTOBUF_VERSION < 3001000 | 11 #if GOOGLE_PROTOBUF_VERSION < 3000000 |
12 #error This file was generated by a newer version of protoc which is | 12 #error This file was generated by a newer version of protoc which is |
13 #error incompatible with your Protocol Buffer headers. Please update | 13 #error incompatible with your Protocol Buffer headers. Please update |
14 #error your headers. | 14 #error your headers. |
15 #endif | 15 #endif |
16 #if 3001000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION | 16 #if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION |
17 #error This file was generated by an older version of protoc which is | 17 #error This file was generated by an older version of protoc which is |
18 #error incompatible with your Protocol Buffer headers. Please | 18 #error incompatible with your Protocol Buffer headers. Please |
19 #error regenerate this file with a newer version of protoc. | 19 #error regenerate this file with a newer version of protoc. |
20 #endif | 20 #endif |
21 | 21 |
22 #include <google/protobuf/arena.h> | 22 #include <google/protobuf/arena.h> |
23 #include <google/protobuf/arenastring.h> | 23 #include <google/protobuf/arenastring.h> |
24 #include <google/protobuf/generated_message_util.h> | 24 #include <google/protobuf/generated_message_util.h> |
25 #include <google/protobuf/metadata.h> | 25 #include <google/protobuf/metadata.h> |
26 #include <google/protobuf/message.h> | 26 #include <google/protobuf/message.h> |
27 #include <google/protobuf/repeated_field.h> // IWYU pragma: export | 27 #include <google/protobuf/repeated_field.h> |
28 #include <google/protobuf/extension_set.h> // IWYU pragma: export | 28 #include <google/protobuf/extension_set.h> |
29 #include <google/protobuf/unknown_field_set.h> | 29 #include <google/protobuf/unknown_field_set.h> |
30 // @@protoc_insertion_point(includes) | 30 // @@protoc_insertion_point(includes) |
31 namespace google { | |
32 namespace protobuf { | |
33 class Duration; | |
34 class DurationDefaultTypeInternal; | |
35 LIBPROTOBUF_EXPORT extern DurationDefaultTypeInternal _Duration_default_instance
_; | |
36 } // namespace protobuf | |
37 } // namespace google | |
38 | 31 |
39 namespace google { | 32 namespace google { |
40 namespace protobuf { | 33 namespace protobuf { |
41 | 34 |
42 // Internal implementation detail -- do not call these. | 35 // Internal implementation detail -- do not call these. |
43 void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fduration_2eproto(); | 36 void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fduration_2eproto(); |
44 void LIBPROTOBUF_EXPORT protobuf_InitDefaults_google_2fprotobuf_2fduration_2epro
to(); | 37 void protobuf_AssignDesc_google_2fprotobuf_2fduration_2eproto(); |
| 38 void protobuf_ShutdownFile_google_2fprotobuf_2fduration_2eproto(); |
| 39 |
| 40 class Duration; |
45 | 41 |
46 // =================================================================== | 42 // =================================================================== |
47 | 43 |
48 class LIBPROTOBUF_EXPORT Duration : public ::google::protobuf::Message /* @@prot
oc_insertion_point(class_definition:google.protobuf.Duration) */ { | 44 class LIBPROTOBUF_EXPORT Duration : public ::google::protobuf::Message { |
49 public: | 45 public: |
50 Duration(); | 46 Duration(); |
51 virtual ~Duration(); | 47 virtual ~Duration(); |
52 | 48 |
53 Duration(const Duration& from); | 49 Duration(const Duration& from); |
54 | 50 |
55 inline Duration& operator=(const Duration& from) { | 51 inline Duration& operator=(const Duration& from) { |
56 CopyFrom(from); | 52 CopyFrom(from); |
57 return *this; | 53 return *this; |
58 } | 54 } |
59 | 55 |
60 inline ::google::protobuf::Arena* GetArena() const PROTOBUF_FINAL { | |
61 return GetArenaNoVirtual(); | |
62 } | |
63 inline void* GetMaybeArenaPointer() const PROTOBUF_FINAL { | |
64 return MaybeArenaPtr(); | |
65 } | |
66 static const ::google::protobuf::Descriptor* descriptor(); | 56 static const ::google::protobuf::Descriptor* descriptor(); |
67 static const Duration& default_instance(); | 57 static const Duration& default_instance(); |
68 | 58 |
69 static inline const Duration* internal_default_instance() { | |
70 return reinterpret_cast<const Duration*>( | |
71 &_Duration_default_instance_); | |
72 } | |
73 | |
74 void UnsafeArenaSwap(Duration* other); | |
75 void Swap(Duration* other); | 59 void Swap(Duration* other); |
76 | 60 |
77 // implements Message ---------------------------------------------- | 61 // implements Message ---------------------------------------------- |
78 | 62 |
79 inline Duration* New() const PROTOBUF_FINAL { return New(NULL); } | 63 inline Duration* New() const { return New(NULL); } |
80 | 64 |
81 Duration* New(::google::protobuf::Arena* arena) const PROTOBUF_FINAL; | 65 Duration* New(::google::protobuf::Arena* arena) const; |
82 void CopyFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; | 66 void CopyFrom(const ::google::protobuf::Message& from); |
83 void MergeFrom(const ::google::protobuf::Message& from) PROTOBUF_FINAL; | 67 void MergeFrom(const ::google::protobuf::Message& from); |
84 void CopyFrom(const Duration& from); | 68 void CopyFrom(const Duration& from); |
85 void MergeFrom(const Duration& from); | 69 void MergeFrom(const Duration& from); |
86 void Clear() PROTOBUF_FINAL; | 70 void Clear(); |
87 bool IsInitialized() const PROTOBUF_FINAL; | 71 bool IsInitialized() const; |
88 | 72 |
89 size_t ByteSizeLong() const PROTOBUF_FINAL; | 73 int ByteSize() const; |
90 bool MergePartialFromCodedStream( | 74 bool MergePartialFromCodedStream( |
91 ::google::protobuf::io::CodedInputStream* input) PROTOBUF_FINAL; | 75 ::google::protobuf::io::CodedInputStream* input); |
92 void SerializeWithCachedSizes( | 76 void SerializeWithCachedSizes( |
93 ::google::protobuf::io::CodedOutputStream* output) const PROTOBUF_FINAL; | 77 ::google::protobuf::io::CodedOutputStream* output) const; |
94 ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( | 78 ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf:
:uint8* output) const; |
95 bool deterministic, ::google::protobuf::uint8* target) const PROTOBUF_FINA
L; | 79 int GetCachedSize() const { return _cached_size_; } |
96 ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf:
:uint8* output) | |
97 const PROTOBUF_FINAL { | |
98 return InternalSerializeWithCachedSizesToArray(false, output); | |
99 } | |
100 int GetCachedSize() const PROTOBUF_FINAL { return _cached_size_; } | |
101 private: | 80 private: |
102 void SharedCtor(); | 81 void SharedCtor(); |
103 void SharedDtor(); | 82 void SharedDtor(); |
104 void SetCachedSize(int size) const PROTOBUF_FINAL; | 83 void SetCachedSize(int size) const; |
105 void InternalSwap(Duration* other); | 84 void InternalSwap(Duration* other); |
106 protected: | |
107 explicit Duration(::google::protobuf::Arena* arena); | |
108 private: | |
109 static void ArenaDtor(void* object); | |
110 inline void RegisterArenaDtor(::google::protobuf::Arena* arena); | |
111 private: | 85 private: |
112 inline ::google::protobuf::Arena* GetArenaNoVirtual() const { | 86 inline ::google::protobuf::Arena* GetArenaNoVirtual() const { |
113 return _internal_metadata_.arena(); | 87 return _internal_metadata_.arena(); |
114 } | 88 } |
115 inline void* MaybeArenaPtr() const { | 89 inline void* MaybeArenaPtr() const { |
116 return _internal_metadata_.raw_arena_ptr(); | 90 return _internal_metadata_.raw_arena_ptr(); |
117 } | 91 } |
118 public: | 92 public: |
119 | 93 |
120 ::google::protobuf::Metadata GetMetadata() const PROTOBUF_FINAL; | 94 ::google::protobuf::Metadata GetMetadata() const; |
121 | 95 |
122 // nested types ---------------------------------------------------- | 96 // nested types ---------------------------------------------------- |
123 | 97 |
124 // accessors ------------------------------------------------------- | 98 // accessors ------------------------------------------------------- |
125 | 99 |
126 // int64 seconds = 1; | 100 // optional int64 seconds = 1; |
127 void clear_seconds(); | 101 void clear_seconds(); |
128 static const int kSecondsFieldNumber = 1; | 102 static const int kSecondsFieldNumber = 1; |
129 ::google::protobuf::int64 seconds() const; | 103 ::google::protobuf::int64 seconds() const; |
130 void set_seconds(::google::protobuf::int64 value); | 104 void set_seconds(::google::protobuf::int64 value); |
131 | 105 |
132 // int32 nanos = 2; | 106 // optional int32 nanos = 2; |
133 void clear_nanos(); | 107 void clear_nanos(); |
134 static const int kNanosFieldNumber = 2; | 108 static const int kNanosFieldNumber = 2; |
135 ::google::protobuf::int32 nanos() const; | 109 ::google::protobuf::int32 nanos() const; |
136 void set_nanos(::google::protobuf::int32 value); | 110 void set_nanos(::google::protobuf::int32 value); |
137 | 111 |
138 // @@protoc_insertion_point(class_scope:google.protobuf.Duration) | 112 // @@protoc_insertion_point(class_scope:google.protobuf.Duration) |
139 private: | 113 private: |
140 | 114 |
141 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; | 115 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; |
142 friend class ::google::protobuf::Arena; | 116 bool _is_default_instance_; |
143 typedef void InternalArenaConstructable_; | |
144 typedef void DestructorSkippable_; | |
145 ::google::protobuf::int64 seconds_; | 117 ::google::protobuf::int64 seconds_; |
146 ::google::protobuf::int32 nanos_; | 118 ::google::protobuf::int32 nanos_; |
147 mutable int _cached_size_; | 119 mutable int _cached_size_; |
148 friend void LIBPROTOBUF_EXPORT protobuf_InitDefaults_google_2fprotobuf_2fdurat
ion_2eproto_impl(); | 120 friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fduration_2
eproto(); |
149 friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fduration_2
eproto_impl(); | 121 friend void protobuf_AssignDesc_google_2fprotobuf_2fduration_2eproto(); |
150 friend const ::google::protobuf::uint32* protobuf_Offsets_google_2fprotobuf_2f
duration_2eproto(); | |
151 friend void protobuf_ShutdownFile_google_2fprotobuf_2fduration_2eproto(); | 122 friend void protobuf_ShutdownFile_google_2fprotobuf_2fduration_2eproto(); |
152 | 123 |
| 124 void InitAsDefaultInstance(); |
| 125 static Duration* default_instance_; |
153 }; | 126 }; |
154 // =================================================================== | 127 // =================================================================== |
155 | 128 |
156 | 129 |
157 // =================================================================== | 130 // =================================================================== |
158 | 131 |
159 #if !PROTOBUF_INLINE_NOT_IN_HEADERS | 132 #if !PROTOBUF_INLINE_NOT_IN_HEADERS |
160 // Duration | 133 // Duration |
161 | 134 |
162 // int64 seconds = 1; | 135 // optional int64 seconds = 1; |
163 inline void Duration::clear_seconds() { | 136 inline void Duration::clear_seconds() { |
164 seconds_ = GOOGLE_LONGLONG(0); | 137 seconds_ = GOOGLE_LONGLONG(0); |
165 } | 138 } |
166 inline ::google::protobuf::int64 Duration::seconds() const { | 139 inline ::google::protobuf::int64 Duration::seconds() const { |
167 // @@protoc_insertion_point(field_get:google.protobuf.Duration.seconds) | 140 // @@protoc_insertion_point(field_get:google.protobuf.Duration.seconds) |
168 return seconds_; | 141 return seconds_; |
169 } | 142 } |
170 inline void Duration::set_seconds(::google::protobuf::int64 value) { | 143 inline void Duration::set_seconds(::google::protobuf::int64 value) { |
171 | 144 |
172 seconds_ = value; | 145 seconds_ = value; |
173 // @@protoc_insertion_point(field_set:google.protobuf.Duration.seconds) | 146 // @@protoc_insertion_point(field_set:google.protobuf.Duration.seconds) |
174 } | 147 } |
175 | 148 |
176 // int32 nanos = 2; | 149 // optional int32 nanos = 2; |
177 inline void Duration::clear_nanos() { | 150 inline void Duration::clear_nanos() { |
178 nanos_ = 0; | 151 nanos_ = 0; |
179 } | 152 } |
180 inline ::google::protobuf::int32 Duration::nanos() const { | 153 inline ::google::protobuf::int32 Duration::nanos() const { |
181 // @@protoc_insertion_point(field_get:google.protobuf.Duration.nanos) | 154 // @@protoc_insertion_point(field_get:google.protobuf.Duration.nanos) |
182 return nanos_; | 155 return nanos_; |
183 } | 156 } |
184 inline void Duration::set_nanos(::google::protobuf::int32 value) { | 157 inline void Duration::set_nanos(::google::protobuf::int32 value) { |
185 | 158 |
186 nanos_ = value; | 159 nanos_ = value; |
187 // @@protoc_insertion_point(field_set:google.protobuf.Duration.nanos) | 160 // @@protoc_insertion_point(field_set:google.protobuf.Duration.nanos) |
188 } | 161 } |
189 | 162 |
190 #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS | 163 #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS |
191 | 164 |
192 // @@protoc_insertion_point(namespace_scope) | 165 // @@protoc_insertion_point(namespace_scope) |
193 | 166 |
194 | |
195 } // namespace protobuf | 167 } // namespace protobuf |
196 } // namespace google | 168 } // namespace google |
197 | 169 |
198 // @@protoc_insertion_point(global_scope) | 170 // @@protoc_insertion_point(global_scope) |
199 | 171 |
200 #endif // PROTOBUF_google_2fprotobuf_2fduration_2eproto__INCLUDED | 172 #endif // PROTOBUF_google_2fprotobuf_2fduration_2eproto__INCLUDED |
OLD | NEW |