Home | History | Annotate | Download | only in protobuf
      1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
      2 // source: google/protobuf/field_mask.proto
      3 
      4 #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION
      5 #include <google/protobuf/field_mask.pb.h>
      6 
      7 #include <algorithm>
      8 
      9 #include <google/protobuf/stubs/common.h>
     10 #include <google/protobuf/stubs/port.h>
     11 #include <google/protobuf/stubs/once.h>
     12 #include <google/protobuf/io/coded_stream.h>
     13 #include <google/protobuf/wire_format_lite_inl.h>
     14 #include <google/protobuf/descriptor.h>
     15 #include <google/protobuf/generated_message_reflection.h>
     16 #include <google/protobuf/reflection_ops.h>
     17 #include <google/protobuf/wire_format.h>
     18 // @@protoc_insertion_point(includes)
     19 
     20 namespace google {
     21 namespace protobuf {
     22 
     23 namespace {
     24 
     25 const ::google::protobuf::Descriptor* FieldMask_descriptor_ = NULL;
     26 const ::google::protobuf::internal::GeneratedMessageReflection*
     27   FieldMask_reflection_ = NULL;
     28 
     29 }  // namespace
     30 
     31 
     32 void protobuf_AssignDesc_google_2fprotobuf_2ffield_5fmask_2eproto() {
     33   protobuf_AddDesc_google_2fprotobuf_2ffield_5fmask_2eproto();
     34   const ::google::protobuf::FileDescriptor* file =
     35     ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(
     36       "google/protobuf/field_mask.proto");
     37   GOOGLE_CHECK(file != NULL);
     38   FieldMask_descriptor_ = file->message_type(0);
     39   static const int FieldMask_offsets_[1] = {
     40     GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldMask, paths_),
     41   };
     42   FieldMask_reflection_ =
     43     ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection(
     44       FieldMask_descriptor_,
     45       FieldMask::default_instance_,
     46       FieldMask_offsets_,
     47       -1,
     48       -1,
     49       -1,
     50       sizeof(FieldMask),
     51       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldMask, _internal_metadata_),
     52       GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FieldMask, _is_default_instance_));
     53 }
     54 
     55 namespace {
     56 
     57 GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);
     58 inline void protobuf_AssignDescriptorsOnce() {
     59   ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_,
     60                  &protobuf_AssignDesc_google_2fprotobuf_2ffield_5fmask_2eproto);
     61 }
     62 
     63 void protobuf_RegisterTypes(const ::std::string&) {
     64   protobuf_AssignDescriptorsOnce();
     65   ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage(
     66       FieldMask_descriptor_, &FieldMask::default_instance());
     67 }
     68 
     69 }  // namespace
     70 
     71 void protobuf_ShutdownFile_google_2fprotobuf_2ffield_5fmask_2eproto() {
     72   delete FieldMask::default_instance_;
     73   delete FieldMask_reflection_;
     74 }
     75 
     76 void protobuf_AddDesc_google_2fprotobuf_2ffield_5fmask_2eproto() {
     77   static bool already_here = false;
     78   if (already_here) return;
     79   already_here = true;
     80   GOOGLE_PROTOBUF_VERIFY_VERSION;
     81 
     82   ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
     83     "\n google/protobuf/field_mask.proto\022\017goog"
     84     "le.protobuf\"\032\n\tFieldMask\022\r\n\005paths\030\001 \003(\tB"
     85     "Q\n\023com.google.protobufB\016FieldMaskProtoP\001"
     86     "\240\001\001\242\002\003GPB\252\002\036Google.Protobuf.WellKnownTyp"
     87     "esb\006proto3", 170);
     88   ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
     89     "google/protobuf/field_mask.proto", &protobuf_RegisterTypes);
     90   FieldMask::default_instance_ = new FieldMask();
     91   FieldMask::default_instance_->InitAsDefaultInstance();
     92   ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_google_2fprotobuf_2ffield_5fmask_2eproto);
     93 }
     94 
     95 // Force AddDescriptors() to be called at static initialization time.
     96 struct StaticDescriptorInitializer_google_2fprotobuf_2ffield_5fmask_2eproto {
     97   StaticDescriptorInitializer_google_2fprotobuf_2ffield_5fmask_2eproto() {
     98     protobuf_AddDesc_google_2fprotobuf_2ffield_5fmask_2eproto();
     99   }
    100 } static_descriptor_initializer_google_2fprotobuf_2ffield_5fmask_2eproto_;
    101 
    102 namespace {
    103 
    104 static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD;
    105 static void MergeFromFail(int line) {
    106   GOOGLE_CHECK(false) << __FILE__ << ":" << line;
    107 }
    108 
    109 }  // namespace
    110 
    111 
    112 // ===================================================================
    113 
    114 #if !defined(_MSC_VER) || _MSC_VER >= 1900
    115 const int FieldMask::kPathsFieldNumber;
    116 #endif  // !defined(_MSC_VER) || _MSC_VER >= 1900
    117 
    118 FieldMask::FieldMask()
    119   : ::google::protobuf::Message(), _internal_metadata_(NULL) {
    120   SharedCtor();
    121   // @@protoc_insertion_point(constructor:google.protobuf.FieldMask)
    122 }
    123 
    124 void FieldMask::InitAsDefaultInstance() {
    125   _is_default_instance_ = true;
    126 }
    127 
    128 FieldMask::FieldMask(const FieldMask& from)
    129   : ::google::protobuf::Message(),
    130     _internal_metadata_(NULL) {
    131   SharedCtor();
    132   MergeFrom(from);
    133   // @@protoc_insertion_point(copy_constructor:google.protobuf.FieldMask)
    134 }
    135 
    136 void FieldMask::SharedCtor() {
    137     _is_default_instance_ = false;
    138   ::google::protobuf::internal::GetEmptyString();
    139   _cached_size_ = 0;
    140 }
    141 
    142 FieldMask::~FieldMask() {
    143   // @@protoc_insertion_point(destructor:google.protobuf.FieldMask)
    144   SharedDtor();
    145 }
    146 
    147 void FieldMask::SharedDtor() {
    148   if (this != default_instance_) {
    149   }
    150 }
    151 
    152 void FieldMask::SetCachedSize(int size) const {
    153   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    154   _cached_size_ = size;
    155   GOOGLE_SAFE_CONCURRENT_WRITES_END();
    156 }
    157 const ::google::protobuf::Descriptor* FieldMask::descriptor() {
    158   protobuf_AssignDescriptorsOnce();
    159   return FieldMask_descriptor_;
    160 }
    161 
    162 const FieldMask& FieldMask::default_instance() {
    163   if (default_instance_ == NULL) protobuf_AddDesc_google_2fprotobuf_2ffield_5fmask_2eproto();
    164   return *default_instance_;
    165 }
    166 
    167 FieldMask* FieldMask::default_instance_ = NULL;
    168 
    169 FieldMask* FieldMask::New(::google::protobuf::Arena* arena) const {
    170   FieldMask* n = new FieldMask;
    171   if (arena != NULL) {
    172     arena->Own(n);
    173   }
    174   return n;
    175 }
    176 
    177 void FieldMask::Clear() {
    178 // @@protoc_insertion_point(message_clear_start:google.protobuf.FieldMask)
    179   paths_.Clear();
    180 }
    181 
    182 bool FieldMask::MergePartialFromCodedStream(
    183     ::google::protobuf::io::CodedInputStream* input) {
    184 #define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
    185   ::google::protobuf::uint32 tag;
    186   // @@protoc_insertion_point(parse_start:google.protobuf.FieldMask)
    187   for (;;) {
    188     ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127);
    189     tag = p.first;
    190     if (!p.second) goto handle_unusual;
    191     switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
    192       // repeated string paths = 1;
    193       case 1: {
    194         if (tag == 10) {
    195          parse_paths:
    196           DO_(::google::protobuf::internal::WireFormatLite::ReadString(
    197                 input, this->add_paths()));
    198           DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
    199             this->paths(this->paths_size() - 1).data(),
    200             this->paths(this->paths_size() - 1).length(),
    201             ::google::protobuf::internal::WireFormatLite::PARSE,
    202             "google.protobuf.FieldMask.paths"));
    203         } else {
    204           goto handle_unusual;
    205         }
    206         if (input->ExpectTag(10)) goto parse_paths;
    207         if (input->ExpectAtEnd()) goto success;
    208         break;
    209       }
    210 
    211       default: {
    212       handle_unusual:
    213         if (tag == 0 ||
    214             ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) ==
    215             ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) {
    216           goto success;
    217         }
    218         DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag));
    219         break;
    220       }
    221     }
    222   }
    223 success:
    224   // @@protoc_insertion_point(parse_success:google.protobuf.FieldMask)
    225   return true;
    226 failure:
    227   // @@protoc_insertion_point(parse_failure:google.protobuf.FieldMask)
    228   return false;
    229 #undef DO_
    230 }
    231 
    232 void FieldMask::SerializeWithCachedSizes(
    233     ::google::protobuf::io::CodedOutputStream* output) const {
    234   // @@protoc_insertion_point(serialize_start:google.protobuf.FieldMask)
    235   // repeated string paths = 1;
    236   for (int i = 0; i < this->paths_size(); i++) {
    237     ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
    238       this->paths(i).data(), this->paths(i).length(),
    239       ::google::protobuf::internal::WireFormatLite::SERIALIZE,
    240       "google.protobuf.FieldMask.paths");
    241     ::google::protobuf::internal::WireFormatLite::WriteString(
    242       1, this->paths(i), output);
    243   }
    244 
    245   // @@protoc_insertion_point(serialize_end:google.protobuf.FieldMask)
    246 }
    247 
    248 ::google::protobuf::uint8* FieldMask::SerializeWithCachedSizesToArray(
    249     ::google::protobuf::uint8* target) const {
    250   // @@protoc_insertion_point(serialize_to_array_start:google.protobuf.FieldMask)
    251   // repeated string paths = 1;
    252   for (int i = 0; i < this->paths_size(); i++) {
    253     ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
    254       this->paths(i).data(), this->paths(i).length(),
    255       ::google::protobuf::internal::WireFormatLite::SERIALIZE,
    256       "google.protobuf.FieldMask.paths");
    257     target = ::google::protobuf::internal::WireFormatLite::
    258       WriteStringToArray(1, this->paths(i), target);
    259   }
    260 
    261   // @@protoc_insertion_point(serialize_to_array_end:google.protobuf.FieldMask)
    262   return target;
    263 }
    264 
    265 int FieldMask::ByteSize() const {
    266 // @@protoc_insertion_point(message_byte_size_start:google.protobuf.FieldMask)
    267   int total_size = 0;
    268 
    269   // repeated string paths = 1;
    270   total_size += 1 * this->paths_size();
    271   for (int i = 0; i < this->paths_size(); i++) {
    272     total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
    273       this->paths(i));
    274   }
    275 
    276   GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN();
    277   _cached_size_ = total_size;
    278   GOOGLE_SAFE_CONCURRENT_WRITES_END();
    279   return total_size;
    280 }
    281 
    282 void FieldMask::MergeFrom(const ::google::protobuf::Message& from) {
    283 // @@protoc_insertion_point(generalized_merge_from_start:google.protobuf.FieldMask)
    284   if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
    285   const FieldMask* source =
    286       ::google::protobuf::internal::DynamicCastToGenerated<const FieldMask>(
    287           &from);
    288   if (source == NULL) {
    289   // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.protobuf.FieldMask)
    290     ::google::protobuf::internal::ReflectionOps::Merge(from, this);
    291   } else {
    292   // @@protoc_insertion_point(generalized_merge_from_cast_success:google.protobuf.FieldMask)
    293     MergeFrom(*source);
    294   }
    295 }
    296 
    297 void FieldMask::MergeFrom(const FieldMask& from) {
    298 // @@protoc_insertion_point(class_specific_merge_from_start:google.protobuf.FieldMask)
    299   if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__);
    300   paths_.MergeFrom(from.paths_);
    301 }
    302 
    303 void FieldMask::CopyFrom(const ::google::protobuf::Message& from) {
    304 // @@protoc_insertion_point(generalized_copy_from_start:google.protobuf.FieldMask)
    305   if (&from == this) return;
    306   Clear();
    307   MergeFrom(from);
    308 }
    309 
    310 void FieldMask::CopyFrom(const FieldMask& from) {
    311 // @@protoc_insertion_point(class_specific_copy_from_start:google.protobuf.FieldMask)
    312   if (&from == this) return;
    313   Clear();
    314   MergeFrom(from);
    315 }
    316 
    317 bool FieldMask::IsInitialized() const {
    318 
    319   return true;
    320 }
    321 
    322 void FieldMask::Swap(FieldMask* other) {
    323   if (other == this) return;
    324   InternalSwap(other);
    325 }
    326 void FieldMask::InternalSwap(FieldMask* other) {
    327   paths_.UnsafeArenaSwap(&other->paths_);
    328   _internal_metadata_.Swap(&other->_internal_metadata_);
    329   std::swap(_cached_size_, other->_cached_size_);
    330 }
    331 
    332 ::google::protobuf::Metadata FieldMask::GetMetadata() const {
    333   protobuf_AssignDescriptorsOnce();
    334   ::google::protobuf::Metadata metadata;
    335   metadata.descriptor = FieldMask_descriptor_;
    336   metadata.reflection = FieldMask_reflection_;
    337   return metadata;
    338 }
    339 
    340 #if PROTOBUF_INLINE_NOT_IN_HEADERS
    341 // FieldMask
    342 
    343 // repeated string paths = 1;
    344 int FieldMask::paths_size() const {
    345   return paths_.size();
    346 }
    347 void FieldMask::clear_paths() {
    348   paths_.Clear();
    349 }
    350  const ::std::string& FieldMask::paths(int index) const {
    351   // @@protoc_insertion_point(field_get:google.protobuf.FieldMask.paths)
    352   return paths_.Get(index);
    353 }
    354  ::std::string* FieldMask::mutable_paths(int index) {
    355   // @@protoc_insertion_point(field_mutable:google.protobuf.FieldMask.paths)
    356   return paths_.Mutable(index);
    357 }
    358  void FieldMask::set_paths(int index, const ::std::string& value) {
    359   // @@protoc_insertion_point(field_set:google.protobuf.FieldMask.paths)
    360   paths_.Mutable(index)->assign(value);
    361 }
    362  void FieldMask::set_paths(int index, const char* value) {
    363   paths_.Mutable(index)->assign(value);
    364   // @@protoc_insertion_point(field_set_char:google.protobuf.FieldMask.paths)
    365 }
    366  void FieldMask::set_paths(int index, const char* value, size_t size) {
    367   paths_.Mutable(index)->assign(
    368     reinterpret_cast<const char*>(value), size);
    369   // @@protoc_insertion_point(field_set_pointer:google.protobuf.FieldMask.paths)
    370 }
    371  ::std::string* FieldMask::add_paths() {
    372   // @@protoc_insertion_point(field_add_mutable:google.protobuf.FieldMask.paths)
    373   return paths_.Add();
    374 }
    375  void FieldMask::add_paths(const ::std::string& value) {
    376   paths_.Add()->assign(value);
    377   // @@protoc_insertion_point(field_add:google.protobuf.FieldMask.paths)
    378 }
    379  void FieldMask::add_paths(const char* value) {
    380   paths_.Add()->assign(value);
    381   // @@protoc_insertion_point(field_add_char:google.protobuf.FieldMask.paths)
    382 }
    383  void FieldMask::add_paths(const char* value, size_t size) {
    384   paths_.Add()->assign(reinterpret_cast<const char*>(value), size);
    385   // @@protoc_insertion_point(field_add_pointer:google.protobuf.FieldMask.paths)
    386 }
    387  const ::google::protobuf::RepeatedPtrField< ::std::string>&
    388 FieldMask::paths() const {
    389   // @@protoc_insertion_point(field_list:google.protobuf.FieldMask.paths)
    390   return paths_;
    391 }
    392  ::google::protobuf::RepeatedPtrField< ::std::string>*
    393 FieldMask::mutable_paths() {
    394   // @@protoc_insertion_point(field_mutable_list:google.protobuf.FieldMask.paths)
    395   return &paths_;
    396 }
    397 
    398 #endif  // PROTOBUF_INLINE_NOT_IN_HEADERS
    399 
    400 // @@protoc_insertion_point(namespace_scope)
    401 
    402 }  // namespace protobuf
    403 }  // namespace google
    404 
    405 // @@protoc_insertion_point(global_scope)
    406