1 // Generated by the protocol buffer compiler. DO NOT EDIT! 2 // source: google/protobuf/duration.proto 3 4 #ifndef PROTOBUF_google_2fprotobuf_2fduration_2eproto__INCLUDED 5 #define PROTOBUF_google_2fprotobuf_2fduration_2eproto__INCLUDED 6 7 #include <string> 8 9 #include <google/protobuf/stubs/common.h> 10 11 #if GOOGLE_PROTOBUF_VERSION < 3000000 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 3000000 < GOOGLE_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/arena.h> 23 #include <google/protobuf/arenastring.h> 24 #include <google/protobuf/generated_message_util.h> 25 #include <google/protobuf/metadata.h> 26 #include <google/protobuf/message.h> 27 #include <google/protobuf/repeated_field.h> 28 #include <google/protobuf/extension_set.h> 29 #include <google/protobuf/unknown_field_set.h> 30 // @@protoc_insertion_point(includes) 31 32 namespace google { 33 namespace protobuf { 34 35 // Internal implementation detail -- do not call these. 36 void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fduration_2eproto(); 37 void protobuf_AssignDesc_google_2fprotobuf_2fduration_2eproto(); 38 void protobuf_ShutdownFile_google_2fprotobuf_2fduration_2eproto(); 39 40 class Duration; 41 42 // =================================================================== 43 44 class LIBPROTOBUF_EXPORT Duration : public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:google.protobuf.Duration) */ { 45 public: 46 Duration(); 47 virtual ~Duration(); 48 49 Duration(const Duration& from); 50 51 inline Duration& operator=(const Duration& from) { 52 CopyFrom(from); 53 return *this; 54 } 55 56 static const ::google::protobuf::Descriptor* descriptor(); 57 static const Duration& default_instance(); 58 59 void Swap(Duration* other); 60 61 // implements Message ---------------------------------------------- 62 New()63 inline Duration* New() const { return New(NULL); } 64 65 Duration* New(::google::protobuf::Arena* arena) const; 66 void CopyFrom(const ::google::protobuf::Message& from); 67 void MergeFrom(const ::google::protobuf::Message& from); 68 void CopyFrom(const Duration& from); 69 void MergeFrom(const Duration& from); 70 void Clear(); 71 bool IsInitialized() const; 72 73 int ByteSize() const; 74 bool MergePartialFromCodedStream( 75 ::google::protobuf::io::CodedInputStream* input); 76 void SerializeWithCachedSizes( 77 ::google::protobuf::io::CodedOutputStream* output) const; 78 ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( 79 bool deterministic, ::google::protobuf::uint8* output) const; SerializeWithCachedSizesToArray(::google::protobuf::uint8 * output)80 ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const { 81 return InternalSerializeWithCachedSizesToArray(false, output); 82 } GetCachedSize()83 int GetCachedSize() const { return _cached_size_; } 84 private: 85 void SharedCtor(); 86 void SharedDtor(); 87 void SetCachedSize(int size) const; 88 void InternalSwap(Duration* other); 89 private: GetArenaNoVirtual()90 inline ::google::protobuf::Arena* GetArenaNoVirtual() const { 91 return _internal_metadata_.arena(); 92 } MaybeArenaPtr()93 inline void* MaybeArenaPtr() const { 94 return _internal_metadata_.raw_arena_ptr(); 95 } 96 public: 97 98 ::google::protobuf::Metadata GetMetadata() const; 99 100 // nested types ---------------------------------------------------- 101 102 // accessors ------------------------------------------------------- 103 104 // optional int64 seconds = 1; 105 void clear_seconds(); 106 static const int kSecondsFieldNumber = 1; 107 ::google::protobuf::int64 seconds() const; 108 void set_seconds(::google::protobuf::int64 value); 109 110 // optional int32 nanos = 2; 111 void clear_nanos(); 112 static const int kNanosFieldNumber = 2; 113 ::google::protobuf::int32 nanos() const; 114 void set_nanos(::google::protobuf::int32 value); 115 116 // @@protoc_insertion_point(class_scope:google.protobuf.Duration) 117 private: 118 119 ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; 120 bool _is_default_instance_; 121 ::google::protobuf::int64 seconds_; 122 ::google::protobuf::int32 nanos_; 123 mutable int _cached_size_; 124 friend void LIBPROTOBUF_EXPORT protobuf_AddDesc_google_2fprotobuf_2fduration_2eproto(); 125 friend void protobuf_AssignDesc_google_2fprotobuf_2fduration_2eproto(); 126 friend void protobuf_ShutdownFile_google_2fprotobuf_2fduration_2eproto(); 127 128 void InitAsDefaultInstance(); 129 static Duration* default_instance_; 130 }; 131 // =================================================================== 132 133 134 // =================================================================== 135 136 #if !PROTOBUF_INLINE_NOT_IN_HEADERS 137 // Duration 138 139 // optional int64 seconds = 1; clear_seconds()140inline void Duration::clear_seconds() { 141 seconds_ = GOOGLE_LONGLONG(0); 142 } seconds()143inline ::google::protobuf::int64 Duration::seconds() const { 144 // @@protoc_insertion_point(field_get:google.protobuf.Duration.seconds) 145 return seconds_; 146 } set_seconds(::google::protobuf::int64 value)147inline void Duration::set_seconds(::google::protobuf::int64 value) { 148 149 seconds_ = value; 150 // @@protoc_insertion_point(field_set:google.protobuf.Duration.seconds) 151 } 152 153 // optional int32 nanos = 2; clear_nanos()154inline void Duration::clear_nanos() { 155 nanos_ = 0; 156 } nanos()157inline ::google::protobuf::int32 Duration::nanos() const { 158 // @@protoc_insertion_point(field_get:google.protobuf.Duration.nanos) 159 return nanos_; 160 } set_nanos(::google::protobuf::int32 value)161inline void Duration::set_nanos(::google::protobuf::int32 value) { 162 163 nanos_ = value; 164 // @@protoc_insertion_point(field_set:google.protobuf.Duration.nanos) 165 } 166 167 #endif // !PROTOBUF_INLINE_NOT_IN_HEADERS 168 169 // @@protoc_insertion_point(namespace_scope) 170 171 } // namespace protobuf 172 } // namespace google 173 174 // @@protoc_insertion_point(global_scope) 175 176 #endif // PROTOBUF_google_2fprotobuf_2fduration_2eproto__INCLUDED 177