1 // Generated by the protocol buffer compiler.  DO NOT EDIT!
2 // source: fetch_msg_types.proto
3 
4 #include "fetch_msg_types.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/io/zero_copy_stream_impl_lite.h>
12 // @@protoc_insertion_point(includes)
13 #include <google/protobuf/port_def.inc>
14 extern PROTOBUF_INTERNAL_EXPORT_fetch_5fmsg_5ftypes_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Request_HeadersEntry_DoNotUse_fetch_5fmsg_5ftypes_2eproto;
15 extern PROTOBUF_INTERNAL_EXPORT_fetch_5fmsg_5ftypes_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Response_HeadersEntry_DoNotUse_fetch_5fmsg_5ftypes_2eproto;
16 namespace mozilla {
17 namespace appservices {
18 namespace httpconfig {
19 namespace protobuf {
20 class Request_HeadersEntry_DoNotUseDefaultTypeInternal {
21  public:
22   ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Request_HeadersEntry_DoNotUse> _instance;
23 } _Request_HeadersEntry_DoNotUse_default_instance_;
24 class RequestDefaultTypeInternal {
25  public:
26   ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Request> _instance;
27 } _Request_default_instance_;
28 class Response_HeadersEntry_DoNotUseDefaultTypeInternal {
29  public:
30   ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Response_HeadersEntry_DoNotUse> _instance;
31 } _Response_HeadersEntry_DoNotUse_default_instance_;
32 class ResponseDefaultTypeInternal {
33  public:
34   ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Response> _instance;
35 } _Response_default_instance_;
36 }  // namespace protobuf
37 }  // namespace httpconfig
38 }  // namespace appservices
39 }  // namespace mozilla
InitDefaultsscc_info_Request_fetch_5fmsg_5ftypes_2eproto()40 static void InitDefaultsscc_info_Request_fetch_5fmsg_5ftypes_2eproto() {
41   GOOGLE_PROTOBUF_VERIFY_VERSION;
42 
43   {
44     void* ptr = &::mozilla::appservices::httpconfig::protobuf::_Request_default_instance_;
45     new (ptr) ::mozilla::appservices::httpconfig::protobuf::Request();
46     ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
47   }
48   ::mozilla::appservices::httpconfig::protobuf::Request::InitAsDefaultInstance();
49 }
50 
51 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Request_fetch_5fmsg_5ftypes_2eproto =
52     {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Request_fetch_5fmsg_5ftypes_2eproto}, {
53       &scc_info_Request_HeadersEntry_DoNotUse_fetch_5fmsg_5ftypes_2eproto.base,}};
54 
InitDefaultsscc_info_Request_HeadersEntry_DoNotUse_fetch_5fmsg_5ftypes_2eproto()55 static void InitDefaultsscc_info_Request_HeadersEntry_DoNotUse_fetch_5fmsg_5ftypes_2eproto() {
56   GOOGLE_PROTOBUF_VERIFY_VERSION;
57 
58   {
59     void* ptr = &::mozilla::appservices::httpconfig::protobuf::_Request_HeadersEntry_DoNotUse_default_instance_;
60     new (ptr) ::mozilla::appservices::httpconfig::protobuf::Request_HeadersEntry_DoNotUse();
61   }
62   ::mozilla::appservices::httpconfig::protobuf::Request_HeadersEntry_DoNotUse::InitAsDefaultInstance();
63 }
64 
65 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Request_HeadersEntry_DoNotUse_fetch_5fmsg_5ftypes_2eproto =
66     {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Request_HeadersEntry_DoNotUse_fetch_5fmsg_5ftypes_2eproto}, {}};
67 
InitDefaultsscc_info_Response_fetch_5fmsg_5ftypes_2eproto()68 static void InitDefaultsscc_info_Response_fetch_5fmsg_5ftypes_2eproto() {
69   GOOGLE_PROTOBUF_VERIFY_VERSION;
70 
71   {
72     void* ptr = &::mozilla::appservices::httpconfig::protobuf::_Response_default_instance_;
73     new (ptr) ::mozilla::appservices::httpconfig::protobuf::Response();
74     ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
75   }
76   ::mozilla::appservices::httpconfig::protobuf::Response::InitAsDefaultInstance();
77 }
78 
79 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Response_fetch_5fmsg_5ftypes_2eproto =
80     {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Response_fetch_5fmsg_5ftypes_2eproto}, {
81       &scc_info_Response_HeadersEntry_DoNotUse_fetch_5fmsg_5ftypes_2eproto.base,}};
82 
InitDefaultsscc_info_Response_HeadersEntry_DoNotUse_fetch_5fmsg_5ftypes_2eproto()83 static void InitDefaultsscc_info_Response_HeadersEntry_DoNotUse_fetch_5fmsg_5ftypes_2eproto() {
84   GOOGLE_PROTOBUF_VERIFY_VERSION;
85 
86   {
87     void* ptr = &::mozilla::appservices::httpconfig::protobuf::_Response_HeadersEntry_DoNotUse_default_instance_;
88     new (ptr) ::mozilla::appservices::httpconfig::protobuf::Response_HeadersEntry_DoNotUse();
89   }
90   ::mozilla::appservices::httpconfig::protobuf::Response_HeadersEntry_DoNotUse::InitAsDefaultInstance();
91 }
92 
93 ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Response_HeadersEntry_DoNotUse_fetch_5fmsg_5ftypes_2eproto =
94     {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Response_HeadersEntry_DoNotUse_fetch_5fmsg_5ftypes_2eproto}, {}};
95 
96 namespace mozilla {
97 namespace appservices {
98 namespace httpconfig {
99 namespace protobuf {
Request_Method_IsValid(int value)100 bool Request_Method_IsValid(int value) {
101   switch (value) {
102     case 0:
103     case 1:
104     case 2:
105     case 3:
106     case 4:
107     case 5:
108     case 6:
109     case 7:
110       return true;
111     default:
112       return false;
113   }
114 }
115 
116 static ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<std::string> Request_Method_strings[8] = {};
117 
118 static const char Request_Method_names[] =
119   "CONNECT"
120   "DELETE"
121   "GET"
122   "HEAD"
123   "OPTIONS"
124   "POST"
125   "PUT"
126   "TRACE";
127 
128 static const ::PROTOBUF_NAMESPACE_ID::internal::EnumEntry Request_Method_entries[] = {
129   { {Request_Method_names + 0, 7}, 5 },
130   { {Request_Method_names + 7, 6}, 4 },
131   { {Request_Method_names + 13, 3}, 0 },
132   { {Request_Method_names + 16, 4}, 1 },
133   { {Request_Method_names + 20, 7}, 6 },
134   { {Request_Method_names + 27, 4}, 2 },
135   { {Request_Method_names + 31, 3}, 3 },
136   { {Request_Method_names + 34, 5}, 7 },
137 };
138 
139 static const int Request_Method_entries_by_number[] = {
140   2, // 0 -> GET
141   3, // 1 -> HEAD
142   5, // 2 -> POST
143   6, // 3 -> PUT
144   1, // 4 -> DELETE
145   0, // 5 -> CONNECT
146   4, // 6 -> OPTIONS
147   7, // 7 -> TRACE
148 };
149 
Request_Method_Name(Request_Method value)150 const std::string& Request_Method_Name(
151     Request_Method value) {
152   static const bool dummy =
153       ::PROTOBUF_NAMESPACE_ID::internal::InitializeEnumStrings(
154           Request_Method_entries,
155           Request_Method_entries_by_number,
156           8, Request_Method_strings);
157   (void) dummy;
158   int idx = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumName(
159       Request_Method_entries,
160       Request_Method_entries_by_number,
161       8, value);
162   return idx == -1 ? ::PROTOBUF_NAMESPACE_ID::internal::GetEmptyString() :
163                      Request_Method_strings[idx].get();
164 }
Request_Method_Parse(const std::string & name,Request_Method * value)165 bool Request_Method_Parse(
166     const std::string& name, Request_Method* value) {
167   int int_value;
168   bool success = ::PROTOBUF_NAMESPACE_ID::internal::LookUpEnumValue(
169       Request_Method_entries, 8, name, &int_value);
170   if (success) {
171     *value = static_cast<Request_Method>(int_value);
172   }
173   return success;
174 }
175 #if (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
176 constexpr Request_Method Request::GET;
177 constexpr Request_Method Request::HEAD;
178 constexpr Request_Method Request::POST;
179 constexpr Request_Method Request::PUT;
180 constexpr Request_Method Request::DELETE;
181 constexpr Request_Method Request::CONNECT;
182 constexpr Request_Method Request::OPTIONS;
183 constexpr Request_Method Request::TRACE;
184 constexpr Request_Method Request::Method_MIN;
185 constexpr Request_Method Request::Method_MAX;
186 constexpr int Request::Method_ARRAYSIZE;
187 #endif  // (__cplusplus < 201703) && (!defined(_MSC_VER) || _MSC_VER >= 1900)
188 
189 // ===================================================================
190 
Request_HeadersEntry_DoNotUse()191 Request_HeadersEntry_DoNotUse::Request_HeadersEntry_DoNotUse() {}
Request_HeadersEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena * arena)192 Request_HeadersEntry_DoNotUse::Request_HeadersEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
193     : SuperType(arena) {}
MergeFrom(const Request_HeadersEntry_DoNotUse & other)194 void Request_HeadersEntry_DoNotUse::MergeFrom(const Request_HeadersEntry_DoNotUse& other) {
195   MergeFromInternal(other);
196 }
197 
198 // ===================================================================
199 
InitAsDefaultInstance()200 void Request::InitAsDefaultInstance() {
201 }
202 class Request::_Internal {
203  public:
204   using HasBits = decltype(std::declval<Request>()._has_bits_);
set_has_method(HasBits * has_bits)205   static void set_has_method(HasBits* has_bits) {
206     (*has_bits)[0] |= 4u;
207   }
set_has_url(HasBits * has_bits)208   static void set_has_url(HasBits* has_bits) {
209     (*has_bits)[0] |= 1u;
210   }
set_has_body(HasBits * has_bits)211   static void set_has_body(HasBits* has_bits) {
212     (*has_bits)[0] |= 2u;
213   }
set_has_follow_redirects(HasBits * has_bits)214   static void set_has_follow_redirects(HasBits* has_bits) {
215     (*has_bits)[0] |= 8u;
216   }
set_has_use_caches(HasBits * has_bits)217   static void set_has_use_caches(HasBits* has_bits) {
218     (*has_bits)[0] |= 16u;
219   }
set_has_connect_timeout_secs(HasBits * has_bits)220   static void set_has_connect_timeout_secs(HasBits* has_bits) {
221     (*has_bits)[0] |= 32u;
222   }
set_has_read_timeout_secs(HasBits * has_bits)223   static void set_has_read_timeout_secs(HasBits* has_bits) {
224     (*has_bits)[0] |= 64u;
225   }
226 };
227 
Request()228 Request::Request()
229   : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _internal_metadata_(nullptr) {
230   SharedCtor();
231   // @@protoc_insertion_point(constructor:mozilla.appservices.httpconfig.protobuf.Request)
232 }
Request(const Request & from)233 Request::Request(const Request& from)
234   : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
235       _internal_metadata_(nullptr),
236       _has_bits_(from._has_bits_) {
237   _internal_metadata_.MergeFrom(from._internal_metadata_);
238   headers_.MergeFrom(from.headers_);
239   url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
240   if (from._internal_has_url()) {
241     url_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.url_);
242   }
243   body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
244   if (from._internal_has_body()) {
245     body_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.body_);
246   }
247   ::memcpy(&method_, &from.method_,
248     static_cast<size_t>(reinterpret_cast<char*>(&read_timeout_secs_) -
249     reinterpret_cast<char*>(&method_)) + sizeof(read_timeout_secs_));
250   // @@protoc_insertion_point(copy_constructor:mozilla.appservices.httpconfig.protobuf.Request)
251 }
252 
SharedCtor()253 void Request::SharedCtor() {
254   ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Request_fetch_5fmsg_5ftypes_2eproto.base);
255   url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
256   body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
257   ::memset(&method_, 0, static_cast<size_t>(
258       reinterpret_cast<char*>(&read_timeout_secs_) -
259       reinterpret_cast<char*>(&method_)) + sizeof(read_timeout_secs_));
260 }
261 
~Request()262 Request::~Request() {
263   // @@protoc_insertion_point(destructor:mozilla.appservices.httpconfig.protobuf.Request)
264   SharedDtor();
265 }
266 
SharedDtor()267 void Request::SharedDtor() {
268   url_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
269   body_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
270 }
271 
SetCachedSize(int size) const272 void Request::SetCachedSize(int size) const {
273   _cached_size_.Set(size);
274 }
default_instance()275 const Request& Request::default_instance() {
276   ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Request_fetch_5fmsg_5ftypes_2eproto.base);
277   return *internal_default_instance();
278 }
279 
280 
Clear()281 void Request::Clear() {
282 // @@protoc_insertion_point(message_clear_start:mozilla.appservices.httpconfig.protobuf.Request)
283   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
284   // Prevent compiler warnings about cached_has_bits being unused
285   (void) cached_has_bits;
286 
287   headers_.Clear();
288   cached_has_bits = _has_bits_[0];
289   if (cached_has_bits & 0x00000003u) {
290     if (cached_has_bits & 0x00000001u) {
291       url_.ClearNonDefaultToEmptyNoArena();
292     }
293     if (cached_has_bits & 0x00000002u) {
294       body_.ClearNonDefaultToEmptyNoArena();
295     }
296   }
297   if (cached_has_bits & 0x0000007cu) {
298     ::memset(&method_, 0, static_cast<size_t>(
299         reinterpret_cast<char*>(&read_timeout_secs_) -
300         reinterpret_cast<char*>(&method_)) + sizeof(read_timeout_secs_));
301   }
302   _has_bits_.Clear();
303   _internal_metadata_.Clear();
304 }
305 
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)306 const char* Request::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
307 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
308   _Internal::HasBits has_bits{};
309   while (!ctx->Done(&ptr)) {
310     ::PROTOBUF_NAMESPACE_ID::uint32 tag;
311     ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
312     CHK_(ptr);
313     switch (tag >> 3) {
314       // required .mozilla.appservices.httpconfig.protobuf.Request.Method method = 1;
315       case 1:
316         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
317           ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
318           CHK_(ptr);
319           if (PROTOBUF_PREDICT_TRUE(::mozilla::appservices::httpconfig::protobuf::Request_Method_IsValid(val))) {
320             _internal_set_method(static_cast<::mozilla::appservices::httpconfig::protobuf::Request_Method>(val));
321           } else {
322             ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields());
323           }
324         } else goto handle_unusual;
325         continue;
326       // required string url = 2;
327       case 2:
328         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
329           auto str = _internal_mutable_url();
330           ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
331           CHK_(ptr);
332         } else goto handle_unusual;
333         continue;
334       // optional bytes body = 3;
335       case 3:
336         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
337           auto str = _internal_mutable_body();
338           ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
339           CHK_(ptr);
340         } else goto handle_unusual;
341         continue;
342       // map<string, string> headers = 4;
343       case 4:
344         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
345           ptr -= 1;
346           do {
347             ptr += 1;
348             ptr = ctx->ParseMessage(&headers_, ptr);
349             CHK_(ptr);
350             if (!ctx->DataAvailable(ptr)) break;
351           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr));
352         } else goto handle_unusual;
353         continue;
354       // required bool follow_redirects = 5;
355       case 5:
356         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 40)) {
357           _Internal::set_has_follow_redirects(&has_bits);
358           follow_redirects_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
359           CHK_(ptr);
360         } else goto handle_unusual;
361         continue;
362       // required bool use_caches = 6;
363       case 6:
364         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) {
365           _Internal::set_has_use_caches(&has_bits);
366           use_caches_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
367           CHK_(ptr);
368         } else goto handle_unusual;
369         continue;
370       // required int32 connect_timeout_secs = 7;
371       case 7:
372         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
373           _Internal::set_has_connect_timeout_secs(&has_bits);
374           connect_timeout_secs_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
375           CHK_(ptr);
376         } else goto handle_unusual;
377         continue;
378       // required int32 read_timeout_secs = 8;
379       case 8:
380         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) {
381           _Internal::set_has_read_timeout_secs(&has_bits);
382           read_timeout_secs_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
383           CHK_(ptr);
384         } else goto handle_unusual;
385         continue;
386       default: {
387       handle_unusual:
388         if ((tag & 7) == 4 || tag == 0) {
389           ctx->SetLastTag(tag);
390           goto success;
391         }
392         ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
393         CHK_(ptr != nullptr);
394         continue;
395       }
396     }  // switch
397   }  // while
398 success:
399   _has_bits_.Or(has_bits);
400   return ptr;
401 failure:
402   ptr = nullptr;
403   goto success;
404 #undef CHK_
405 }
406 
_InternalSerialize(::PROTOBUF_NAMESPACE_ID::uint8 * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const407 ::PROTOBUF_NAMESPACE_ID::uint8* Request::_InternalSerialize(
408     ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
409   // @@protoc_insertion_point(serialize_to_array_start:mozilla.appservices.httpconfig.protobuf.Request)
410   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
411   (void) cached_has_bits;
412 
413   cached_has_bits = _has_bits_[0];
414   // required .mozilla.appservices.httpconfig.protobuf.Request.Method method = 1;
415   if (cached_has_bits & 0x00000004u) {
416     target = stream->EnsureSpace(target);
417     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray(
418       1, this->_internal_method(), target);
419   }
420 
421   // required string url = 2;
422   if (cached_has_bits & 0x00000001u) {
423     target = stream->WriteStringMaybeAliased(
424         2, this->_internal_url(), target);
425   }
426 
427   // optional bytes body = 3;
428   if (cached_has_bits & 0x00000002u) {
429     target = stream->WriteBytesMaybeAliased(
430         3, this->_internal_body(), target);
431   }
432 
433   // map<string, string> headers = 4;
434   if (!this->_internal_headers().empty()) {
435     typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer
436         ConstPtr;
437     typedef ConstPtr SortItem;
438     typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
439     struct Utf8Check {
440       static void Check(ConstPtr p) {
441       }
442     };
443 
444     if (stream->IsSerializationDeterministic() &&
445         this->_internal_headers().size() > 1) {
446       ::std::unique_ptr<SortItem[]> items(
447           new SortItem[this->_internal_headers().size()]);
448       typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type;
449       size_type n = 0;
450       for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
451           it = this->_internal_headers().begin();
452           it != this->_internal_headers().end(); ++it, ++n) {
453         items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
454       }
455       ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
456       for (size_type i = 0; i < n; i++) {
457         target = Request_HeadersEntry_DoNotUse::Funcs::InternalSerialize(4, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target, stream);
458         Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
459       }
460     } else {
461       for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
462           it = this->_internal_headers().begin();
463           it != this->_internal_headers().end(); ++it) {
464         target = Request_HeadersEntry_DoNotUse::Funcs::InternalSerialize(4, it->first, it->second, target, stream);
465         Utf8Check::Check(&(*it));
466       }
467     }
468   }
469 
470   // required bool follow_redirects = 5;
471   if (cached_has_bits & 0x00000008u) {
472     target = stream->EnsureSpace(target);
473     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(5, this->_internal_follow_redirects(), target);
474   }
475 
476   // required bool use_caches = 6;
477   if (cached_has_bits & 0x00000010u) {
478     target = stream->EnsureSpace(target);
479     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_use_caches(), target);
480   }
481 
482   // required int32 connect_timeout_secs = 7;
483   if (cached_has_bits & 0x00000020u) {
484     target = stream->EnsureSpace(target);
485     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_connect_timeout_secs(), target);
486   }
487 
488   // required int32 read_timeout_secs = 8;
489   if (cached_has_bits & 0x00000040u) {
490     target = stream->EnsureSpace(target);
491     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(8, this->_internal_read_timeout_secs(), target);
492   }
493 
494   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
495     target = stream->WriteRaw(_internal_metadata_.unknown_fields().data(),
496         static_cast<int>(_internal_metadata_.unknown_fields().size()), target);
497   }
498   // @@protoc_insertion_point(serialize_to_array_end:mozilla.appservices.httpconfig.protobuf.Request)
499   return target;
500 }
501 
RequiredFieldsByteSizeFallback() const502 size_t Request::RequiredFieldsByteSizeFallback() const {
503 // @@protoc_insertion_point(required_fields_byte_size_fallback_start:mozilla.appservices.httpconfig.protobuf.Request)
504   size_t total_size = 0;
505 
506   if (_internal_has_url()) {
507     // required string url = 2;
508     total_size += 1 +
509       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
510         this->_internal_url());
511   }
512 
513   if (_internal_has_method()) {
514     // required .mozilla.appservices.httpconfig.protobuf.Request.Method method = 1;
515     total_size += 1 +
516       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_method());
517   }
518 
519   if (_internal_has_follow_redirects()) {
520     // required bool follow_redirects = 5;
521     total_size += 1 + 1;
522   }
523 
524   if (_internal_has_use_caches()) {
525     // required bool use_caches = 6;
526     total_size += 1 + 1;
527   }
528 
529   if (_internal_has_connect_timeout_secs()) {
530     // required int32 connect_timeout_secs = 7;
531     total_size += 1 +
532       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
533         this->_internal_connect_timeout_secs());
534   }
535 
536   if (_internal_has_read_timeout_secs()) {
537     // required int32 read_timeout_secs = 8;
538     total_size += 1 +
539       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
540         this->_internal_read_timeout_secs());
541   }
542 
543   return total_size;
544 }
ByteSizeLong() const545 size_t Request::ByteSizeLong() const {
546 // @@protoc_insertion_point(message_byte_size_start:mozilla.appservices.httpconfig.protobuf.Request)
547   size_t total_size = 0;
548 
549   if (((_has_bits_[0] & 0x0000007d) ^ 0x0000007d) == 0) {  // All required fields are present.
550     // required string url = 2;
551     total_size += 1 +
552       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
553         this->_internal_url());
554 
555     // required .mozilla.appservices.httpconfig.protobuf.Request.Method method = 1;
556     total_size += 1 +
557       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_method());
558 
559     // required bool follow_redirects = 5;
560     total_size += 1 + 1;
561 
562     // required bool use_caches = 6;
563     total_size += 1 + 1;
564 
565     // required int32 connect_timeout_secs = 7;
566     total_size += 1 +
567       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
568         this->_internal_connect_timeout_secs());
569 
570     // required int32 read_timeout_secs = 8;
571     total_size += 1 +
572       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
573         this->_internal_read_timeout_secs());
574 
575   } else {
576     total_size += RequiredFieldsByteSizeFallback();
577   }
578   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
579   // Prevent compiler warnings about cached_has_bits being unused
580   (void) cached_has_bits;
581 
582   // map<string, string> headers = 4;
583   total_size += 1 *
584       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_headers_size());
585   for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
586       it = this->_internal_headers().begin();
587       it != this->_internal_headers().end(); ++it) {
588     total_size += Request_HeadersEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
589   }
590 
591   // optional bytes body = 3;
592   cached_has_bits = _has_bits_[0];
593   if (cached_has_bits & 0x00000002u) {
594     total_size += 1 +
595       ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
596         this->_internal_body());
597   }
598 
599   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
600     total_size += _internal_metadata_.unknown_fields().size();
601   }
602   int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
603   SetCachedSize(cached_size);
604   return total_size;
605 }
606 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)607 void Request::CheckTypeAndMergeFrom(
608     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
609   MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const Request*>(
610       &from));
611 }
612 
MergeFrom(const Request & from)613 void Request::MergeFrom(const Request& from) {
614 // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.appservices.httpconfig.protobuf.Request)
615   GOOGLE_DCHECK_NE(&from, this);
616   _internal_metadata_.MergeFrom(from._internal_metadata_);
617   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
618   (void) cached_has_bits;
619 
620   headers_.MergeFrom(from.headers_);
621   cached_has_bits = from._has_bits_[0];
622   if (cached_has_bits & 0x0000007fu) {
623     if (cached_has_bits & 0x00000001u) {
624       _has_bits_[0] |= 0x00000001u;
625       url_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.url_);
626     }
627     if (cached_has_bits & 0x00000002u) {
628       _has_bits_[0] |= 0x00000002u;
629       body_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.body_);
630     }
631     if (cached_has_bits & 0x00000004u) {
632       method_ = from.method_;
633     }
634     if (cached_has_bits & 0x00000008u) {
635       follow_redirects_ = from.follow_redirects_;
636     }
637     if (cached_has_bits & 0x00000010u) {
638       use_caches_ = from.use_caches_;
639     }
640     if (cached_has_bits & 0x00000020u) {
641       connect_timeout_secs_ = from.connect_timeout_secs_;
642     }
643     if (cached_has_bits & 0x00000040u) {
644       read_timeout_secs_ = from.read_timeout_secs_;
645     }
646     _has_bits_[0] |= cached_has_bits;
647   }
648 }
649 
CopyFrom(const Request & from)650 void Request::CopyFrom(const Request& from) {
651 // @@protoc_insertion_point(class_specific_copy_from_start:mozilla.appservices.httpconfig.protobuf.Request)
652   if (&from == this) return;
653   Clear();
654   MergeFrom(from);
655 }
656 
IsInitialized() const657 bool Request::IsInitialized() const {
658   if ((_has_bits_[0] & 0x0000007d) != 0x0000007d) return false;
659   return true;
660 }
661 
InternalSwap(Request * other)662 void Request::InternalSwap(Request* other) {
663   using std::swap;
664   _internal_metadata_.Swap(&other->_internal_metadata_);
665   swap(_has_bits_[0], other->_has_bits_[0]);
666   headers_.Swap(&other->headers_);
667   url_.Swap(&other->url_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
668     GetArenaNoVirtual());
669   body_.Swap(&other->body_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
670     GetArenaNoVirtual());
671   swap(method_, other->method_);
672   swap(follow_redirects_, other->follow_redirects_);
673   swap(use_caches_, other->use_caches_);
674   swap(connect_timeout_secs_, other->connect_timeout_secs_);
675   swap(read_timeout_secs_, other->read_timeout_secs_);
676 }
677 
GetTypeName() const678 std::string Request::GetTypeName() const {
679   return "mozilla.appservices.httpconfig.protobuf.Request";
680 }
681 
682 
683 // ===================================================================
684 
Response_HeadersEntry_DoNotUse()685 Response_HeadersEntry_DoNotUse::Response_HeadersEntry_DoNotUse() {}
Response_HeadersEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena * arena)686 Response_HeadersEntry_DoNotUse::Response_HeadersEntry_DoNotUse(::PROTOBUF_NAMESPACE_ID::Arena* arena)
687     : SuperType(arena) {}
MergeFrom(const Response_HeadersEntry_DoNotUse & other)688 void Response_HeadersEntry_DoNotUse::MergeFrom(const Response_HeadersEntry_DoNotUse& other) {
689   MergeFromInternal(other);
690 }
691 
692 // ===================================================================
693 
InitAsDefaultInstance()694 void Response::InitAsDefaultInstance() {
695 }
696 class Response::_Internal {
697  public:
698   using HasBits = decltype(std::declval<Response>()._has_bits_);
set_has_exception_message(HasBits * has_bits)699   static void set_has_exception_message(HasBits* has_bits) {
700     (*has_bits)[0] |= 1u;
701   }
set_has_url(HasBits * has_bits)702   static void set_has_url(HasBits* has_bits) {
703     (*has_bits)[0] |= 2u;
704   }
set_has_status(HasBits * has_bits)705   static void set_has_status(HasBits* has_bits) {
706     (*has_bits)[0] |= 8u;
707   }
set_has_body(HasBits * has_bits)708   static void set_has_body(HasBits* has_bits) {
709     (*has_bits)[0] |= 4u;
710   }
711 };
712 
Response()713 Response::Response()
714   : ::PROTOBUF_NAMESPACE_ID::MessageLite(), _internal_metadata_(nullptr) {
715   SharedCtor();
716   // @@protoc_insertion_point(constructor:mozilla.appservices.httpconfig.protobuf.Response)
717 }
Response(const Response & from)718 Response::Response(const Response& from)
719   : ::PROTOBUF_NAMESPACE_ID::MessageLite(),
720       _internal_metadata_(nullptr),
721       _has_bits_(from._has_bits_) {
722   _internal_metadata_.MergeFrom(from._internal_metadata_);
723   headers_.MergeFrom(from.headers_);
724   exception_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
725   if (from._internal_has_exception_message()) {
726     exception_message_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.exception_message_);
727   }
728   url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
729   if (from._internal_has_url()) {
730     url_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.url_);
731   }
732   body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
733   if (from._internal_has_body()) {
734     body_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.body_);
735   }
736   status_ = from.status_;
737   // @@protoc_insertion_point(copy_constructor:mozilla.appservices.httpconfig.protobuf.Response)
738 }
739 
SharedCtor()740 void Response::SharedCtor() {
741   ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Response_fetch_5fmsg_5ftypes_2eproto.base);
742   exception_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
743   url_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
744   body_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
745   status_ = 0;
746 }
747 
~Response()748 Response::~Response() {
749   // @@protoc_insertion_point(destructor:mozilla.appservices.httpconfig.protobuf.Response)
750   SharedDtor();
751 }
752 
SharedDtor()753 void Response::SharedDtor() {
754   exception_message_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
755   url_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
756   body_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
757 }
758 
SetCachedSize(int size) const759 void Response::SetCachedSize(int size) const {
760   _cached_size_.Set(size);
761 }
default_instance()762 const Response& Response::default_instance() {
763   ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Response_fetch_5fmsg_5ftypes_2eproto.base);
764   return *internal_default_instance();
765 }
766 
767 
Clear()768 void Response::Clear() {
769 // @@protoc_insertion_point(message_clear_start:mozilla.appservices.httpconfig.protobuf.Response)
770   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
771   // Prevent compiler warnings about cached_has_bits being unused
772   (void) cached_has_bits;
773 
774   headers_.Clear();
775   cached_has_bits = _has_bits_[0];
776   if (cached_has_bits & 0x00000007u) {
777     if (cached_has_bits & 0x00000001u) {
778       exception_message_.ClearNonDefaultToEmptyNoArena();
779     }
780     if (cached_has_bits & 0x00000002u) {
781       url_.ClearNonDefaultToEmptyNoArena();
782     }
783     if (cached_has_bits & 0x00000004u) {
784       body_.ClearNonDefaultToEmptyNoArena();
785     }
786   }
787   status_ = 0;
788   _has_bits_.Clear();
789   _internal_metadata_.Clear();
790 }
791 
_InternalParse(const char * ptr,::PROTOBUF_NAMESPACE_ID::internal::ParseContext * ctx)792 const char* Response::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
793 #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
794   _Internal::HasBits has_bits{};
795   while (!ctx->Done(&ptr)) {
796     ::PROTOBUF_NAMESPACE_ID::uint32 tag;
797     ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
798     CHK_(ptr);
799     switch (tag >> 3) {
800       // optional string exception_message = 1;
801       case 1:
802         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
803           auto str = _internal_mutable_exception_message();
804           ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
805           CHK_(ptr);
806         } else goto handle_unusual;
807         continue;
808       // optional string url = 2;
809       case 2:
810         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
811           auto str = _internal_mutable_url();
812           ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
813           CHK_(ptr);
814         } else goto handle_unusual;
815         continue;
816       // optional int32 status = 3;
817       case 3:
818         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
819           _Internal::set_has_status(&has_bits);
820           status_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
821           CHK_(ptr);
822         } else goto handle_unusual;
823         continue;
824       // optional bytes body = 4;
825       case 4:
826         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) {
827           auto str = _internal_mutable_body();
828           ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParser(str, ptr, ctx);
829           CHK_(ptr);
830         } else goto handle_unusual;
831         continue;
832       // map<string, string> headers = 5;
833       case 5:
834         if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
835           ptr -= 1;
836           do {
837             ptr += 1;
838             ptr = ctx->ParseMessage(&headers_, ptr);
839             CHK_(ptr);
840             if (!ctx->DataAvailable(ptr)) break;
841           } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr));
842         } else goto handle_unusual;
843         continue;
844       default: {
845       handle_unusual:
846         if ((tag & 7) == 4 || tag == 0) {
847           ctx->SetLastTag(tag);
848           goto success;
849         }
850         ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
851         CHK_(ptr != nullptr);
852         continue;
853       }
854     }  // switch
855   }  // while
856 success:
857   _has_bits_.Or(has_bits);
858   return ptr;
859 failure:
860   ptr = nullptr;
861   goto success;
862 #undef CHK_
863 }
864 
_InternalSerialize(::PROTOBUF_NAMESPACE_ID::uint8 * target,::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream * stream) const865 ::PROTOBUF_NAMESPACE_ID::uint8* Response::_InternalSerialize(
866     ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
867   // @@protoc_insertion_point(serialize_to_array_start:mozilla.appservices.httpconfig.protobuf.Response)
868   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
869   (void) cached_has_bits;
870 
871   cached_has_bits = _has_bits_[0];
872   // optional string exception_message = 1;
873   if (cached_has_bits & 0x00000001u) {
874     target = stream->WriteStringMaybeAliased(
875         1, this->_internal_exception_message(), target);
876   }
877 
878   // optional string url = 2;
879   if (cached_has_bits & 0x00000002u) {
880     target = stream->WriteStringMaybeAliased(
881         2, this->_internal_url(), target);
882   }
883 
884   // optional int32 status = 3;
885   if (cached_has_bits & 0x00000008u) {
886     target = stream->EnsureSpace(target);
887     target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_status(), target);
888   }
889 
890   // optional bytes body = 4;
891   if (cached_has_bits & 0x00000004u) {
892     target = stream->WriteBytesMaybeAliased(
893         4, this->_internal_body(), target);
894   }
895 
896   // map<string, string> headers = 5;
897   if (!this->_internal_headers().empty()) {
898     typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_pointer
899         ConstPtr;
900     typedef ConstPtr SortItem;
901     typedef ::PROTOBUF_NAMESPACE_ID::internal::CompareByDerefFirst<SortItem> Less;
902     struct Utf8Check {
903       static void Check(ConstPtr p) {
904       }
905     };
906 
907     if (stream->IsSerializationDeterministic() &&
908         this->_internal_headers().size() > 1) {
909       ::std::unique_ptr<SortItem[]> items(
910           new SortItem[this->_internal_headers().size()]);
911       typedef ::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::size_type size_type;
912       size_type n = 0;
913       for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
914           it = this->_internal_headers().begin();
915           it != this->_internal_headers().end(); ++it, ++n) {
916         items[static_cast<ptrdiff_t>(n)] = SortItem(&*it);
917       }
918       ::std::sort(&items[0], &items[static_cast<ptrdiff_t>(n)], Less());
919       for (size_type i = 0; i < n; i++) {
920         target = Response_HeadersEntry_DoNotUse::Funcs::InternalSerialize(5, items[static_cast<ptrdiff_t>(i)]->first, items[static_cast<ptrdiff_t>(i)]->second, target, stream);
921         Utf8Check::Check(&(*items[static_cast<ptrdiff_t>(i)]));
922       }
923     } else {
924       for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
925           it = this->_internal_headers().begin();
926           it != this->_internal_headers().end(); ++it) {
927         target = Response_HeadersEntry_DoNotUse::Funcs::InternalSerialize(5, it->first, it->second, target, stream);
928         Utf8Check::Check(&(*it));
929       }
930     }
931   }
932 
933   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
934     target = stream->WriteRaw(_internal_metadata_.unknown_fields().data(),
935         static_cast<int>(_internal_metadata_.unknown_fields().size()), target);
936   }
937   // @@protoc_insertion_point(serialize_to_array_end:mozilla.appservices.httpconfig.protobuf.Response)
938   return target;
939 }
940 
ByteSizeLong() const941 size_t Response::ByteSizeLong() const {
942 // @@protoc_insertion_point(message_byte_size_start:mozilla.appservices.httpconfig.protobuf.Response)
943   size_t total_size = 0;
944 
945   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
946   // Prevent compiler warnings about cached_has_bits being unused
947   (void) cached_has_bits;
948 
949   // map<string, string> headers = 5;
950   total_size += 1 *
951       ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(this->_internal_headers_size());
952   for (::PROTOBUF_NAMESPACE_ID::Map< std::string, std::string >::const_iterator
953       it = this->_internal_headers().begin();
954       it != this->_internal_headers().end(); ++it) {
955     total_size += Response_HeadersEntry_DoNotUse::Funcs::ByteSizeLong(it->first, it->second);
956   }
957 
958   cached_has_bits = _has_bits_[0];
959   if (cached_has_bits & 0x0000000fu) {
960     // optional string exception_message = 1;
961     if (cached_has_bits & 0x00000001u) {
962       total_size += 1 +
963         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
964           this->_internal_exception_message());
965     }
966 
967     // optional string url = 2;
968     if (cached_has_bits & 0x00000002u) {
969       total_size += 1 +
970         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
971           this->_internal_url());
972     }
973 
974     // optional bytes body = 4;
975     if (cached_has_bits & 0x00000004u) {
976       total_size += 1 +
977         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize(
978           this->_internal_body());
979     }
980 
981     // optional int32 status = 3;
982     if (cached_has_bits & 0x00000008u) {
983       total_size += 1 +
984         ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
985           this->_internal_status());
986     }
987 
988   }
989   if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
990     total_size += _internal_metadata_.unknown_fields().size();
991   }
992   int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
993   SetCachedSize(cached_size);
994   return total_size;
995 }
996 
CheckTypeAndMergeFrom(const::PROTOBUF_NAMESPACE_ID::MessageLite & from)997 void Response::CheckTypeAndMergeFrom(
998     const ::PROTOBUF_NAMESPACE_ID::MessageLite& from) {
999   MergeFrom(*::PROTOBUF_NAMESPACE_ID::internal::DownCast<const Response*>(
1000       &from));
1001 }
1002 
MergeFrom(const Response & from)1003 void Response::MergeFrom(const Response& from) {
1004 // @@protoc_insertion_point(class_specific_merge_from_start:mozilla.appservices.httpconfig.protobuf.Response)
1005   GOOGLE_DCHECK_NE(&from, this);
1006   _internal_metadata_.MergeFrom(from._internal_metadata_);
1007   ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
1008   (void) cached_has_bits;
1009 
1010   headers_.MergeFrom(from.headers_);
1011   cached_has_bits = from._has_bits_[0];
1012   if (cached_has_bits & 0x0000000fu) {
1013     if (cached_has_bits & 0x00000001u) {
1014       _has_bits_[0] |= 0x00000001u;
1015       exception_message_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.exception_message_);
1016     }
1017     if (cached_has_bits & 0x00000002u) {
1018       _has_bits_[0] |= 0x00000002u;
1019       url_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.url_);
1020     }
1021     if (cached_has_bits & 0x00000004u) {
1022       _has_bits_[0] |= 0x00000004u;
1023       body_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.body_);
1024     }
1025     if (cached_has_bits & 0x00000008u) {
1026       status_ = from.status_;
1027     }
1028     _has_bits_[0] |= cached_has_bits;
1029   }
1030 }
1031 
CopyFrom(const Response & from)1032 void Response::CopyFrom(const Response& from) {
1033 // @@protoc_insertion_point(class_specific_copy_from_start:mozilla.appservices.httpconfig.protobuf.Response)
1034   if (&from == this) return;
1035   Clear();
1036   MergeFrom(from);
1037 }
1038 
IsInitialized() const1039 bool Response::IsInitialized() const {
1040   return true;
1041 }
1042 
InternalSwap(Response * other)1043 void Response::InternalSwap(Response* other) {
1044   using std::swap;
1045   _internal_metadata_.Swap(&other->_internal_metadata_);
1046   swap(_has_bits_[0], other->_has_bits_[0]);
1047   headers_.Swap(&other->headers_);
1048   exception_message_.Swap(&other->exception_message_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
1049     GetArenaNoVirtual());
1050   url_.Swap(&other->url_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
1051     GetArenaNoVirtual());
1052   body_.Swap(&other->body_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
1053     GetArenaNoVirtual());
1054   swap(status_, other->status_);
1055 }
1056 
GetTypeName() const1057 std::string Response::GetTypeName() const {
1058   return "mozilla.appservices.httpconfig.protobuf.Response";
1059 }
1060 
1061 
1062 // @@protoc_insertion_point(namespace_scope)
1063 }  // namespace protobuf
1064 }  // namespace httpconfig
1065 }  // namespace appservices
1066 }  // namespace mozilla
1067 PROTOBUF_NAMESPACE_OPEN
CreateMaybeMessage(Arena * arena)1068 template<> PROTOBUF_NOINLINE ::mozilla::appservices::httpconfig::protobuf::Request_HeadersEntry_DoNotUse* Arena::CreateMaybeMessage< ::mozilla::appservices::httpconfig::protobuf::Request_HeadersEntry_DoNotUse >(Arena* arena) {
1069   return Arena::CreateInternal< ::mozilla::appservices::httpconfig::protobuf::Request_HeadersEntry_DoNotUse >(arena);
1070 }
CreateMaybeMessage(Arena * arena)1071 template<> PROTOBUF_NOINLINE ::mozilla::appservices::httpconfig::protobuf::Request* Arena::CreateMaybeMessage< ::mozilla::appservices::httpconfig::protobuf::Request >(Arena* arena) {
1072   return Arena::CreateInternal< ::mozilla::appservices::httpconfig::protobuf::Request >(arena);
1073 }
CreateMaybeMessage(Arena * arena)1074 template<> PROTOBUF_NOINLINE ::mozilla::appservices::httpconfig::protobuf::Response_HeadersEntry_DoNotUse* Arena::CreateMaybeMessage< ::mozilla::appservices::httpconfig::protobuf::Response_HeadersEntry_DoNotUse >(Arena* arena) {
1075   return Arena::CreateInternal< ::mozilla::appservices::httpconfig::protobuf::Response_HeadersEntry_DoNotUse >(arena);
1076 }
CreateMaybeMessage(Arena * arena)1077 template<> PROTOBUF_NOINLINE ::mozilla::appservices::httpconfig::protobuf::Response* Arena::CreateMaybeMessage< ::mozilla::appservices::httpconfig::protobuf::Response >(Arena* arena) {
1078   return Arena::CreateInternal< ::mozilla::appservices::httpconfig::protobuf::Response >(arena);
1079 }
1080 PROTOBUF_NAMESPACE_CLOSE
1081 
1082 // @@protoc_insertion_point(global_scope)
1083 #include <google/protobuf/port_undef.inc>
1084