http.pb.cc 42 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142
  1. /*
  2. * Copyright 2025 Google LLC
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. // Generated by the protocol buffer compiler. DO NOT EDIT!
  17. // source: google/api/http.proto
  18. #include "google/api/http.pb.h"
  19. #include <algorithm>
  20. #include "google/protobuf/io/coded_stream.h"
  21. #include "google/protobuf/extension_set.h"
  22. #include "google/protobuf/wire_format_lite.h"
  23. #include "google/protobuf/descriptor.h"
  24. #include "google/protobuf/generated_message_reflection.h"
  25. #include "google/protobuf/reflection_ops.h"
  26. #include "google/protobuf/wire_format.h"
  27. #include "google/protobuf/generated_message_tctable_impl.h"
  28. // @@protoc_insertion_point(includes)
  29. // Must be included last.
  30. #include "google/protobuf/port_def.inc"
  31. PROTOBUF_PRAGMA_INIT_SEG
  32. namespace _pb = ::google::protobuf;
  33. namespace _pbi = ::google::protobuf::internal;
  34. namespace _fl = ::google::protobuf::internal::field_layout;
  35. namespace google {
  36. namespace api {
  37. inline constexpr CustomHttpPattern::Impl_::Impl_(
  38. ::_pbi::ConstantInitialized) noexcept
  39. : kind_(
  40. &::google::protobuf::internal::fixed_address_empty_string,
  41. ::_pbi::ConstantInitialized()),
  42. path_(
  43. &::google::protobuf::internal::fixed_address_empty_string,
  44. ::_pbi::ConstantInitialized()),
  45. _cached_size_{0} {}
  46. template <typename>
  47. PROTOBUF_CONSTEXPR CustomHttpPattern::CustomHttpPattern(::_pbi::ConstantInitialized)
  48. : _impl_(::_pbi::ConstantInitialized()) {}
  49. struct CustomHttpPatternDefaultTypeInternal {
  50. PROTOBUF_CONSTEXPR CustomHttpPatternDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  51. ~CustomHttpPatternDefaultTypeInternal() {}
  52. union {
  53. CustomHttpPattern _instance;
  54. };
  55. };
  56. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  57. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CustomHttpPatternDefaultTypeInternal _CustomHttpPattern_default_instance_;
  58. inline constexpr HttpRule::Impl_::Impl_(
  59. ::_pbi::ConstantInitialized) noexcept
  60. : additional_bindings_{},
  61. selector_(
  62. &::google::protobuf::internal::fixed_address_empty_string,
  63. ::_pbi::ConstantInitialized()),
  64. body_(
  65. &::google::protobuf::internal::fixed_address_empty_string,
  66. ::_pbi::ConstantInitialized()),
  67. pattern_{},
  68. _cached_size_{0},
  69. _oneof_case_{} {}
  70. template <typename>
  71. PROTOBUF_CONSTEXPR HttpRule::HttpRule(::_pbi::ConstantInitialized)
  72. : _impl_(::_pbi::ConstantInitialized()) {}
  73. struct HttpRuleDefaultTypeInternal {
  74. PROTOBUF_CONSTEXPR HttpRuleDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  75. ~HttpRuleDefaultTypeInternal() {}
  76. union {
  77. HttpRule _instance;
  78. };
  79. };
  80. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  81. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HttpRuleDefaultTypeInternal _HttpRule_default_instance_;
  82. inline constexpr Http::Impl_::Impl_(
  83. ::_pbi::ConstantInitialized) noexcept
  84. : rules_{},
  85. fully_decode_reserved_expansion_{false},
  86. _cached_size_{0} {}
  87. template <typename>
  88. PROTOBUF_CONSTEXPR Http::Http(::_pbi::ConstantInitialized)
  89. : _impl_(::_pbi::ConstantInitialized()) {}
  90. struct HttpDefaultTypeInternal {
  91. PROTOBUF_CONSTEXPR HttpDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  92. ~HttpDefaultTypeInternal() {}
  93. union {
  94. Http _instance;
  95. };
  96. };
  97. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  98. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HttpDefaultTypeInternal _Http_default_instance_;
  99. } // namespace api
  100. } // namespace google
  101. static ::_pb::Metadata file_level_metadata_google_2fapi_2fhttp_2eproto[3];
  102. static constexpr const ::_pb::EnumDescriptor**
  103. file_level_enum_descriptors_google_2fapi_2fhttp_2eproto = nullptr;
  104. static constexpr const ::_pb::ServiceDescriptor**
  105. file_level_service_descriptors_google_2fapi_2fhttp_2eproto = nullptr;
  106. const ::uint32_t TableStruct_google_2fapi_2fhttp_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(
  107. protodesc_cold) = {
  108. ~0u, // no _has_bits_
  109. PROTOBUF_FIELD_OFFSET(::google::api::Http, _internal_metadata_),
  110. ~0u, // no _extensions_
  111. ~0u, // no _oneof_case_
  112. ~0u, // no _weak_field_map_
  113. ~0u, // no _inlined_string_donated_
  114. ~0u, // no _split_
  115. ~0u, // no sizeof(Split)
  116. PROTOBUF_FIELD_OFFSET(::google::api::Http, _impl_.rules_),
  117. PROTOBUF_FIELD_OFFSET(::google::api::Http, _impl_.fully_decode_reserved_expansion_),
  118. ~0u, // no _has_bits_
  119. PROTOBUF_FIELD_OFFSET(::google::api::HttpRule, _internal_metadata_),
  120. ~0u, // no _extensions_
  121. PROTOBUF_FIELD_OFFSET(::google::api::HttpRule, _impl_._oneof_case_[0]),
  122. ~0u, // no _weak_field_map_
  123. ~0u, // no _inlined_string_donated_
  124. ~0u, // no _split_
  125. ~0u, // no sizeof(Split)
  126. PROTOBUF_FIELD_OFFSET(::google::api::HttpRule, _impl_.selector_),
  127. ::_pbi::kInvalidFieldOffsetTag,
  128. ::_pbi::kInvalidFieldOffsetTag,
  129. ::_pbi::kInvalidFieldOffsetTag,
  130. ::_pbi::kInvalidFieldOffsetTag,
  131. ::_pbi::kInvalidFieldOffsetTag,
  132. ::_pbi::kInvalidFieldOffsetTag,
  133. PROTOBUF_FIELD_OFFSET(::google::api::HttpRule, _impl_.body_),
  134. PROTOBUF_FIELD_OFFSET(::google::api::HttpRule, _impl_.additional_bindings_),
  135. PROTOBUF_FIELD_OFFSET(::google::api::HttpRule, _impl_.pattern_),
  136. ~0u, // no _has_bits_
  137. PROTOBUF_FIELD_OFFSET(::google::api::CustomHttpPattern, _internal_metadata_),
  138. ~0u, // no _extensions_
  139. ~0u, // no _oneof_case_
  140. ~0u, // no _weak_field_map_
  141. ~0u, // no _inlined_string_donated_
  142. ~0u, // no _split_
  143. ~0u, // no sizeof(Split)
  144. PROTOBUF_FIELD_OFFSET(::google::api::CustomHttpPattern, _impl_.kind_),
  145. PROTOBUF_FIELD_OFFSET(::google::api::CustomHttpPattern, _impl_.path_),
  146. };
  147. static const ::_pbi::MigrationSchema
  148. schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  149. {0, -1, -1, sizeof(::google::api::Http)},
  150. {10, -1, -1, sizeof(::google::api::HttpRule)},
  151. {28, -1, -1, sizeof(::google::api::CustomHttpPattern)},
  152. };
  153. static const ::_pb::Message* const file_default_instances[] = {
  154. &::google::api::_Http_default_instance_._instance,
  155. &::google::api::_HttpRule_default_instance_._instance,
  156. &::google::api::_CustomHttpPattern_default_instance_._instance,
  157. };
  158. const char descriptor_table_protodef_google_2fapi_2fhttp_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  159. "\n\025google/api/http.proto\022\ngoogle.api\"T\n\004H"
  160. "ttp\022#\n\005rules\030\001 \003(\0132\024.google.api.HttpRule"
  161. "\022\'\n\037fully_decode_reserved_expansion\030\002 \001("
  162. "\010\"\352\001\n\010HttpRule\022\020\n\010selector\030\001 \001(\t\022\r\n\003get\030"
  163. "\002 \001(\tH\000\022\r\n\003put\030\003 \001(\tH\000\022\016\n\004post\030\004 \001(\tH\000\022\020"
  164. "\n\006delete\030\005 \001(\tH\000\022\017\n\005patch\030\006 \001(\tH\000\022/\n\006cus"
  165. "tom\030\010 \001(\0132\035.google.api.CustomHttpPattern"
  166. "H\000\022\014\n\004body\030\007 \001(\t\0221\n\023additional_bindings\030"
  167. "\013 \003(\0132\024.google.api.HttpRuleB\t\n\007pattern\"/"
  168. "\n\021CustomHttpPattern\022\014\n\004kind\030\001 \001(\t\022\014\n\004pat"
  169. "h\030\002 \001(\tBj\n\016com.google.apiB\tHttpProtoP\001ZA"
  170. "google.golang.org/genproto/googleapis/ap"
  171. "i/annotations;annotations\370\001\001\242\002\004GAPIb\006pro"
  172. "to3"
  173. };
  174. static ::absl::once_flag descriptor_table_google_2fapi_2fhttp_2eproto_once;
  175. const ::_pbi::DescriptorTable descriptor_table_google_2fapi_2fhttp_2eproto = {
  176. false,
  177. false,
  178. 523,
  179. descriptor_table_protodef_google_2fapi_2fhttp_2eproto,
  180. "google/api/http.proto",
  181. &descriptor_table_google_2fapi_2fhttp_2eproto_once,
  182. nullptr,
  183. 0,
  184. 3,
  185. schemas,
  186. file_default_instances,
  187. TableStruct_google_2fapi_2fhttp_2eproto::offsets,
  188. file_level_metadata_google_2fapi_2fhttp_2eproto,
  189. file_level_enum_descriptors_google_2fapi_2fhttp_2eproto,
  190. file_level_service_descriptors_google_2fapi_2fhttp_2eproto,
  191. };
  192. // This function exists to be marked as weak.
  193. // It can significantly speed up compilation by breaking up LLVM's SCC
  194. // in the .pb.cc translation units. Large translation units see a
  195. // reduction of more than 35% of walltime for optimized builds. Without
  196. // the weak attribute all the messages in the file, including all the
  197. // vtables and everything they use become part of the same SCC through
  198. // a cycle like:
  199. // GetMetadata -> descriptor table -> default instances ->
  200. // vtables -> GetMetadata
  201. // By adding a weak function here we break the connection from the
  202. // individual vtables back into the descriptor table.
  203. PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2fapi_2fhttp_2eproto_getter() {
  204. return &descriptor_table_google_2fapi_2fhttp_2eproto;
  205. }
  206. // Force running AddDescriptors() at dynamic initialization time.
  207. PROTOBUF_ATTRIBUTE_INIT_PRIORITY2
  208. static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_google_2fapi_2fhttp_2eproto(&descriptor_table_google_2fapi_2fhttp_2eproto);
  209. namespace google {
  210. namespace api {
  211. // ===================================================================
  212. class Http::_Internal {
  213. public:
  214. };
  215. Http::Http(::google::protobuf::Arena* arena)
  216. : ::google::protobuf::Message(arena) {
  217. SharedCtor(arena);
  218. // @@protoc_insertion_point(arena_constructor:google.api.Http)
  219. }
  220. inline PROTOBUF_NDEBUG_INLINE Http::Impl_::Impl_(
  221. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  222. const Impl_& from)
  223. : rules_{visibility, arena, from.rules_},
  224. _cached_size_{0} {}
  225. Http::Http(
  226. ::google::protobuf::Arena* arena,
  227. const Http& from)
  228. : ::google::protobuf::Message(arena) {
  229. Http* const _this = this;
  230. (void)_this;
  231. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  232. from._internal_metadata_);
  233. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  234. _impl_.fully_decode_reserved_expansion_ = from._impl_.fully_decode_reserved_expansion_;
  235. // @@protoc_insertion_point(copy_constructor:google.api.Http)
  236. }
  237. inline PROTOBUF_NDEBUG_INLINE Http::Impl_::Impl_(
  238. ::google::protobuf::internal::InternalVisibility visibility,
  239. ::google::protobuf::Arena* arena)
  240. : rules_{visibility, arena},
  241. _cached_size_{0} {}
  242. inline void Http::SharedCtor(::_pb::Arena* arena) {
  243. new (&_impl_) Impl_(internal_visibility(), arena);
  244. _impl_.fully_decode_reserved_expansion_ = {};
  245. }
  246. Http::~Http() {
  247. // @@protoc_insertion_point(destructor:google.api.Http)
  248. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  249. SharedDtor();
  250. }
  251. inline void Http::SharedDtor() {
  252. ABSL_DCHECK(GetArena() == nullptr);
  253. _impl_.~Impl_();
  254. }
  255. PROTOBUF_NOINLINE void Http::Clear() {
  256. // @@protoc_insertion_point(message_clear_start:google.api.Http)
  257. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  258. ::uint32_t cached_has_bits = 0;
  259. // Prevent compiler warnings about cached_has_bits being unused
  260. (void) cached_has_bits;
  261. _impl_.rules_.Clear();
  262. _impl_.fully_decode_reserved_expansion_ = false;
  263. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  264. }
  265. const char* Http::_InternalParse(
  266. const char* ptr, ::_pbi::ParseContext* ctx) {
  267. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  268. return ptr;
  269. }
  270. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  271. const ::_pbi::TcParseTable<1, 2, 1, 0, 2> Http::_table_ = {
  272. {
  273. 0, // no _has_bits_
  274. 0, // no _extensions_
  275. 2, 8, // max_field_number, fast_idx_mask
  276. offsetof(decltype(_table_), field_lookup_table),
  277. 4294967292, // skipmap
  278. offsetof(decltype(_table_), field_entries),
  279. 2, // num_field_entries
  280. 1, // num_aux_entries
  281. offsetof(decltype(_table_), aux_entries),
  282. &_Http_default_instance_._instance,
  283. ::_pbi::TcParser::GenericFallback, // fallback
  284. }, {{
  285. // bool fully_decode_reserved_expansion = 2;
  286. {::_pbi::TcParser::SingularVarintNoZag1<bool, offsetof(Http, _impl_.fully_decode_reserved_expansion_), 63>(),
  287. {16, 63, 0, PROTOBUF_FIELD_OFFSET(Http, _impl_.fully_decode_reserved_expansion_)}},
  288. // repeated .google.api.HttpRule rules = 1;
  289. {::_pbi::TcParser::FastMtR1,
  290. {10, 63, 0, PROTOBUF_FIELD_OFFSET(Http, _impl_.rules_)}},
  291. }}, {{
  292. 65535, 65535
  293. }}, {{
  294. // repeated .google.api.HttpRule rules = 1;
  295. {PROTOBUF_FIELD_OFFSET(Http, _impl_.rules_), 0, 0,
  296. (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
  297. // bool fully_decode_reserved_expansion = 2;
  298. {PROTOBUF_FIELD_OFFSET(Http, _impl_.fully_decode_reserved_expansion_), 0, 0,
  299. (0 | ::_fl::kFcSingular | ::_fl::kBool)},
  300. }}, {{
  301. {::_pbi::TcParser::GetTable<::google::api::HttpRule>()},
  302. }}, {{
  303. }},
  304. };
  305. ::uint8_t* Http::_InternalSerialize(
  306. ::uint8_t* target,
  307. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  308. // @@protoc_insertion_point(serialize_to_array_start:google.api.Http)
  309. ::uint32_t cached_has_bits = 0;
  310. (void)cached_has_bits;
  311. // repeated .google.api.HttpRule rules = 1;
  312. for (unsigned i = 0,
  313. n = static_cast<unsigned>(this->_internal_rules_size()); i < n; i++) {
  314. const auto& repfield = this->_internal_rules().Get(i);
  315. target = ::google::protobuf::internal::WireFormatLite::
  316. InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream);
  317. }
  318. // bool fully_decode_reserved_expansion = 2;
  319. if (this->_internal_fully_decode_reserved_expansion() != 0) {
  320. target = stream->EnsureSpace(target);
  321. target = ::_pbi::WireFormatLite::WriteBoolToArray(
  322. 2, this->_internal_fully_decode_reserved_expansion(), target);
  323. }
  324. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  325. target =
  326. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  327. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  328. }
  329. // @@protoc_insertion_point(serialize_to_array_end:google.api.Http)
  330. return target;
  331. }
  332. ::size_t Http::ByteSizeLong() const {
  333. // @@protoc_insertion_point(message_byte_size_start:google.api.Http)
  334. ::size_t total_size = 0;
  335. ::uint32_t cached_has_bits = 0;
  336. // Prevent compiler warnings about cached_has_bits being unused
  337. (void) cached_has_bits;
  338. // repeated .google.api.HttpRule rules = 1;
  339. total_size += 1UL * this->_internal_rules_size();
  340. for (const auto& msg : this->_internal_rules()) {
  341. total_size +=
  342. ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
  343. }
  344. // bool fully_decode_reserved_expansion = 2;
  345. if (this->_internal_fully_decode_reserved_expansion() != 0) {
  346. total_size += 2;
  347. }
  348. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  349. }
  350. const ::google::protobuf::Message::ClassData Http::_class_data_ = {
  351. Http::MergeImpl,
  352. nullptr, // OnDemandRegisterArenaDtor
  353. };
  354. const ::google::protobuf::Message::ClassData* Http::GetClassData() const {
  355. return &_class_data_;
  356. }
  357. void Http::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  358. auto* const _this = static_cast<Http*>(&to_msg);
  359. auto& from = static_cast<const Http&>(from_msg);
  360. // @@protoc_insertion_point(class_specific_merge_from_start:google.api.Http)
  361. ABSL_DCHECK_NE(&from, _this);
  362. ::uint32_t cached_has_bits = 0;
  363. (void) cached_has_bits;
  364. _this->_internal_mutable_rules()->MergeFrom(
  365. from._internal_rules());
  366. if (from._internal_fully_decode_reserved_expansion() != 0) {
  367. _this->_internal_set_fully_decode_reserved_expansion(from._internal_fully_decode_reserved_expansion());
  368. }
  369. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  370. }
  371. void Http::CopyFrom(const Http& from) {
  372. // @@protoc_insertion_point(class_specific_copy_from_start:google.api.Http)
  373. if (&from == this) return;
  374. Clear();
  375. MergeFrom(from);
  376. }
  377. PROTOBUF_NOINLINE bool Http::IsInitialized() const {
  378. return true;
  379. }
  380. ::_pbi::CachedSize* Http::AccessCachedSize() const {
  381. return &_impl_._cached_size_;
  382. }
  383. void Http::InternalSwap(Http* PROTOBUF_RESTRICT other) {
  384. using std::swap;
  385. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  386. _impl_.rules_.InternalSwap(&other->_impl_.rules_);
  387. swap(_impl_.fully_decode_reserved_expansion_, other->_impl_.fully_decode_reserved_expansion_);
  388. }
  389. ::google::protobuf::Metadata Http::GetMetadata() const {
  390. return ::_pbi::AssignDescriptors(
  391. &descriptor_table_google_2fapi_2fhttp_2eproto_getter, &descriptor_table_google_2fapi_2fhttp_2eproto_once,
  392. file_level_metadata_google_2fapi_2fhttp_2eproto[0]);
  393. }
  394. // ===================================================================
  395. class HttpRule::_Internal {
  396. public:
  397. static constexpr ::int32_t kOneofCaseOffset =
  398. PROTOBUF_FIELD_OFFSET(::google::api::HttpRule, _impl_._oneof_case_);
  399. static const ::google::api::CustomHttpPattern& custom(const HttpRule* msg);
  400. };
  401. const ::google::api::CustomHttpPattern& HttpRule::_Internal::custom(const HttpRule* msg) {
  402. return *msg->_impl_.pattern_.custom_;
  403. }
  404. void HttpRule::set_allocated_custom(::google::api::CustomHttpPattern* custom) {
  405. ::google::protobuf::Arena* message_arena = GetArena();
  406. clear_pattern();
  407. if (custom) {
  408. ::google::protobuf::Arena* submessage_arena = custom->GetArena();
  409. if (message_arena != submessage_arena) {
  410. custom = ::google::protobuf::internal::GetOwnedMessage(message_arena, custom, submessage_arena);
  411. }
  412. set_has_custom();
  413. _impl_.pattern_.custom_ = custom;
  414. }
  415. // @@protoc_insertion_point(field_set_allocated:google.api.HttpRule.custom)
  416. }
  417. HttpRule::HttpRule(::google::protobuf::Arena* arena)
  418. : ::google::protobuf::Message(arena) {
  419. SharedCtor(arena);
  420. // @@protoc_insertion_point(arena_constructor:google.api.HttpRule)
  421. }
  422. inline PROTOBUF_NDEBUG_INLINE HttpRule::Impl_::Impl_(
  423. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  424. const Impl_& from)
  425. : additional_bindings_{visibility, arena, from.additional_bindings_},
  426. selector_(arena, from.selector_),
  427. body_(arena, from.body_),
  428. pattern_{},
  429. _cached_size_{0},
  430. _oneof_case_{from._oneof_case_[0]} {}
  431. HttpRule::HttpRule(
  432. ::google::protobuf::Arena* arena,
  433. const HttpRule& from)
  434. : ::google::protobuf::Message(arena) {
  435. HttpRule* const _this = this;
  436. (void)_this;
  437. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  438. from._internal_metadata_);
  439. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  440. switch (pattern_case()) {
  441. case PATTERN_NOT_SET:
  442. break;
  443. case kGet:
  444. new (&_impl_.pattern_.get_) decltype(_impl_.pattern_.get_){arena, from._impl_.pattern_.get_};
  445. break;
  446. case kPut:
  447. new (&_impl_.pattern_.put_) decltype(_impl_.pattern_.put_){arena, from._impl_.pattern_.put_};
  448. break;
  449. case kPost:
  450. new (&_impl_.pattern_.post_) decltype(_impl_.pattern_.post_){arena, from._impl_.pattern_.post_};
  451. break;
  452. case kDelete:
  453. new (&_impl_.pattern_.delete__) decltype(_impl_.pattern_.delete__){arena, from._impl_.pattern_.delete__};
  454. break;
  455. case kPatch:
  456. new (&_impl_.pattern_.patch_) decltype(_impl_.pattern_.patch_){arena, from._impl_.pattern_.patch_};
  457. break;
  458. case kCustom:
  459. _impl_.pattern_.custom_ = CreateMaybeMessage<::google::api::CustomHttpPattern>(arena, *from._impl_.pattern_.custom_);
  460. break;
  461. }
  462. // @@protoc_insertion_point(copy_constructor:google.api.HttpRule)
  463. }
  464. inline PROTOBUF_NDEBUG_INLINE HttpRule::Impl_::Impl_(
  465. ::google::protobuf::internal::InternalVisibility visibility,
  466. ::google::protobuf::Arena* arena)
  467. : additional_bindings_{visibility, arena},
  468. selector_(arena),
  469. body_(arena),
  470. pattern_{},
  471. _cached_size_{0},
  472. _oneof_case_{} {}
  473. inline void HttpRule::SharedCtor(::_pb::Arena* arena) {
  474. new (&_impl_) Impl_(internal_visibility(), arena);
  475. }
  476. HttpRule::~HttpRule() {
  477. // @@protoc_insertion_point(destructor:google.api.HttpRule)
  478. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  479. SharedDtor();
  480. }
  481. inline void HttpRule::SharedDtor() {
  482. ABSL_DCHECK(GetArena() == nullptr);
  483. _impl_.selector_.Destroy();
  484. _impl_.body_.Destroy();
  485. if (has_pattern()) {
  486. clear_pattern();
  487. }
  488. _impl_.~Impl_();
  489. }
  490. void HttpRule::clear_pattern() {
  491. // @@protoc_insertion_point(one_of_clear_start:google.api.HttpRule)
  492. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  493. switch (pattern_case()) {
  494. case kGet: {
  495. _impl_.pattern_.get_.Destroy();
  496. break;
  497. }
  498. case kPut: {
  499. _impl_.pattern_.put_.Destroy();
  500. break;
  501. }
  502. case kPost: {
  503. _impl_.pattern_.post_.Destroy();
  504. break;
  505. }
  506. case kDelete: {
  507. _impl_.pattern_.delete__.Destroy();
  508. break;
  509. }
  510. case kPatch: {
  511. _impl_.pattern_.patch_.Destroy();
  512. break;
  513. }
  514. case kCustom: {
  515. if (GetArena() == nullptr) {
  516. delete _impl_.pattern_.custom_;
  517. }
  518. break;
  519. }
  520. case PATTERN_NOT_SET: {
  521. break;
  522. }
  523. }
  524. _impl_._oneof_case_[0] = PATTERN_NOT_SET;
  525. }
  526. PROTOBUF_NOINLINE void HttpRule::Clear() {
  527. // @@protoc_insertion_point(message_clear_start:google.api.HttpRule)
  528. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  529. ::uint32_t cached_has_bits = 0;
  530. // Prevent compiler warnings about cached_has_bits being unused
  531. (void) cached_has_bits;
  532. _impl_.additional_bindings_.Clear();
  533. _impl_.selector_.ClearToEmpty();
  534. _impl_.body_.ClearToEmpty();
  535. clear_pattern();
  536. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  537. }
  538. const char* HttpRule::_InternalParse(
  539. const char* ptr, ::_pbi::ParseContext* ctx) {
  540. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  541. return ptr;
  542. }
  543. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  544. const ::_pbi::TcParseTable<3, 9, 2, 69, 2> HttpRule::_table_ = {
  545. {
  546. 0, // no _has_bits_
  547. 0, // no _extensions_
  548. 11, 56, // max_field_number, fast_idx_mask
  549. offsetof(decltype(_table_), field_lookup_table),
  550. 4294966016, // skipmap
  551. offsetof(decltype(_table_), field_entries),
  552. 9, // num_field_entries
  553. 2, // num_aux_entries
  554. offsetof(decltype(_table_), aux_entries),
  555. &_HttpRule_default_instance_._instance,
  556. ::_pbi::TcParser::GenericFallback, // fallback
  557. }, {{
  558. {::_pbi::TcParser::MiniParse, {}},
  559. // string selector = 1;
  560. {::_pbi::TcParser::FastUS1,
  561. {10, 63, 0, PROTOBUF_FIELD_OFFSET(HttpRule, _impl_.selector_)}},
  562. {::_pbi::TcParser::MiniParse, {}},
  563. // repeated .google.api.HttpRule additional_bindings = 11;
  564. {::_pbi::TcParser::FastMtR1,
  565. {90, 63, 1, PROTOBUF_FIELD_OFFSET(HttpRule, _impl_.additional_bindings_)}},
  566. {::_pbi::TcParser::MiniParse, {}},
  567. {::_pbi::TcParser::MiniParse, {}},
  568. {::_pbi::TcParser::MiniParse, {}},
  569. // string body = 7;
  570. {::_pbi::TcParser::FastUS1,
  571. {58, 63, 0, PROTOBUF_FIELD_OFFSET(HttpRule, _impl_.body_)}},
  572. }}, {{
  573. 65535, 65535
  574. }}, {{
  575. // string selector = 1;
  576. {PROTOBUF_FIELD_OFFSET(HttpRule, _impl_.selector_), 0, 0,
  577. (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
  578. // string get = 2;
  579. {PROTOBUF_FIELD_OFFSET(HttpRule, _impl_.pattern_.get_), _Internal::kOneofCaseOffset + 0, 0,
  580. (0 | ::_fl::kFcOneof | ::_fl::kUtf8String | ::_fl::kRepAString)},
  581. // string put = 3;
  582. {PROTOBUF_FIELD_OFFSET(HttpRule, _impl_.pattern_.put_), _Internal::kOneofCaseOffset + 0, 0,
  583. (0 | ::_fl::kFcOneof | ::_fl::kUtf8String | ::_fl::kRepAString)},
  584. // string post = 4;
  585. {PROTOBUF_FIELD_OFFSET(HttpRule, _impl_.pattern_.post_), _Internal::kOneofCaseOffset + 0, 0,
  586. (0 | ::_fl::kFcOneof | ::_fl::kUtf8String | ::_fl::kRepAString)},
  587. // string delete = 5;
  588. {PROTOBUF_FIELD_OFFSET(HttpRule, _impl_.pattern_.delete__), _Internal::kOneofCaseOffset + 0, 0,
  589. (0 | ::_fl::kFcOneof | ::_fl::kUtf8String | ::_fl::kRepAString)},
  590. // string patch = 6;
  591. {PROTOBUF_FIELD_OFFSET(HttpRule, _impl_.pattern_.patch_), _Internal::kOneofCaseOffset + 0, 0,
  592. (0 | ::_fl::kFcOneof | ::_fl::kUtf8String | ::_fl::kRepAString)},
  593. // string body = 7;
  594. {PROTOBUF_FIELD_OFFSET(HttpRule, _impl_.body_), 0, 0,
  595. (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
  596. // .google.api.CustomHttpPattern custom = 8;
  597. {PROTOBUF_FIELD_OFFSET(HttpRule, _impl_.pattern_.custom_), _Internal::kOneofCaseOffset + 0, 0,
  598. (0 | ::_fl::kFcOneof | ::_fl::kMessage | ::_fl::kTvTable)},
  599. // repeated .google.api.HttpRule additional_bindings = 11;
  600. {PROTOBUF_FIELD_OFFSET(HttpRule, _impl_.additional_bindings_), 0, 1,
  601. (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
  602. }}, {{
  603. {::_pbi::TcParser::GetTable<::google::api::CustomHttpPattern>()},
  604. {::_pbi::TcParser::GetTable<::google::api::HttpRule>()},
  605. }}, {{
  606. "\23\10\3\3\4\6\5\4\0\0\0\0\0\0\0\0"
  607. "google.api.HttpRule"
  608. "selector"
  609. "get"
  610. "put"
  611. "post"
  612. "delete"
  613. "patch"
  614. "body"
  615. }},
  616. };
  617. ::uint8_t* HttpRule::_InternalSerialize(
  618. ::uint8_t* target,
  619. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  620. // @@protoc_insertion_point(serialize_to_array_start:google.api.HttpRule)
  621. ::uint32_t cached_has_bits = 0;
  622. (void)cached_has_bits;
  623. // string selector = 1;
  624. if (!this->_internal_selector().empty()) {
  625. const std::string& _s = this->_internal_selector();
  626. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  627. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.api.HttpRule.selector");
  628. target = stream->WriteStringMaybeAliased(1, _s, target);
  629. }
  630. switch (pattern_case()) {
  631. case kGet: {
  632. const std::string& _s = this->_internal_get();
  633. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  634. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.api.HttpRule.get");
  635. target = stream->WriteStringMaybeAliased(2, _s, target);
  636. break;
  637. }
  638. case kPut: {
  639. const std::string& _s = this->_internal_put();
  640. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  641. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.api.HttpRule.put");
  642. target = stream->WriteStringMaybeAliased(3, _s, target);
  643. break;
  644. }
  645. case kPost: {
  646. const std::string& _s = this->_internal_post();
  647. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  648. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.api.HttpRule.post");
  649. target = stream->WriteStringMaybeAliased(4, _s, target);
  650. break;
  651. }
  652. case kDelete: {
  653. const std::string& _s = this->_internal_delete_();
  654. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  655. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.api.HttpRule.delete");
  656. target = stream->WriteStringMaybeAliased(5, _s, target);
  657. break;
  658. }
  659. case kPatch: {
  660. const std::string& _s = this->_internal_patch();
  661. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  662. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.api.HttpRule.patch");
  663. target = stream->WriteStringMaybeAliased(6, _s, target);
  664. break;
  665. }
  666. default:
  667. break;
  668. }
  669. // string body = 7;
  670. if (!this->_internal_body().empty()) {
  671. const std::string& _s = this->_internal_body();
  672. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  673. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.api.HttpRule.body");
  674. target = stream->WriteStringMaybeAliased(7, _s, target);
  675. }
  676. // .google.api.CustomHttpPattern custom = 8;
  677. if (pattern_case() == kCustom) {
  678. target = ::google::protobuf::internal::WireFormatLite::InternalWriteMessage(
  679. 8, _Internal::custom(this),
  680. _Internal::custom(this).GetCachedSize(), target, stream);
  681. }
  682. // repeated .google.api.HttpRule additional_bindings = 11;
  683. for (unsigned i = 0,
  684. n = static_cast<unsigned>(this->_internal_additional_bindings_size()); i < n; i++) {
  685. const auto& repfield = this->_internal_additional_bindings().Get(i);
  686. target = ::google::protobuf::internal::WireFormatLite::
  687. InternalWriteMessage(11, repfield, repfield.GetCachedSize(), target, stream);
  688. }
  689. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  690. target =
  691. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  692. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  693. }
  694. // @@protoc_insertion_point(serialize_to_array_end:google.api.HttpRule)
  695. return target;
  696. }
  697. ::size_t HttpRule::ByteSizeLong() const {
  698. // @@protoc_insertion_point(message_byte_size_start:google.api.HttpRule)
  699. ::size_t total_size = 0;
  700. ::uint32_t cached_has_bits = 0;
  701. // Prevent compiler warnings about cached_has_bits being unused
  702. (void) cached_has_bits;
  703. // repeated .google.api.HttpRule additional_bindings = 11;
  704. total_size += 1UL * this->_internal_additional_bindings_size();
  705. for (const auto& msg : this->_internal_additional_bindings()) {
  706. total_size +=
  707. ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
  708. }
  709. // string selector = 1;
  710. if (!this->_internal_selector().empty()) {
  711. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  712. this->_internal_selector());
  713. }
  714. // string body = 7;
  715. if (!this->_internal_body().empty()) {
  716. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  717. this->_internal_body());
  718. }
  719. switch (pattern_case()) {
  720. // string get = 2;
  721. case kGet: {
  722. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  723. this->_internal_get());
  724. break;
  725. }
  726. // string put = 3;
  727. case kPut: {
  728. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  729. this->_internal_put());
  730. break;
  731. }
  732. // string post = 4;
  733. case kPost: {
  734. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  735. this->_internal_post());
  736. break;
  737. }
  738. // string delete = 5;
  739. case kDelete: {
  740. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  741. this->_internal_delete_());
  742. break;
  743. }
  744. // string patch = 6;
  745. case kPatch: {
  746. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  747. this->_internal_patch());
  748. break;
  749. }
  750. // .google.api.CustomHttpPattern custom = 8;
  751. case kCustom: {
  752. total_size +=
  753. 1 + ::google::protobuf::internal::WireFormatLite::MessageSize(*_impl_.pattern_.custom_);
  754. break;
  755. }
  756. case PATTERN_NOT_SET: {
  757. break;
  758. }
  759. }
  760. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  761. }
  762. const ::google::protobuf::Message::ClassData HttpRule::_class_data_ = {
  763. HttpRule::MergeImpl,
  764. nullptr, // OnDemandRegisterArenaDtor
  765. };
  766. const ::google::protobuf::Message::ClassData* HttpRule::GetClassData() const {
  767. return &_class_data_;
  768. }
  769. void HttpRule::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  770. auto* const _this = static_cast<HttpRule*>(&to_msg);
  771. auto& from = static_cast<const HttpRule&>(from_msg);
  772. // @@protoc_insertion_point(class_specific_merge_from_start:google.api.HttpRule)
  773. ABSL_DCHECK_NE(&from, _this);
  774. ::uint32_t cached_has_bits = 0;
  775. (void) cached_has_bits;
  776. _this->_internal_mutable_additional_bindings()->MergeFrom(
  777. from._internal_additional_bindings());
  778. if (!from._internal_selector().empty()) {
  779. _this->_internal_set_selector(from._internal_selector());
  780. }
  781. if (!from._internal_body().empty()) {
  782. _this->_internal_set_body(from._internal_body());
  783. }
  784. switch (from.pattern_case()) {
  785. case kGet: {
  786. _this->_internal_set_get(from._internal_get());
  787. break;
  788. }
  789. case kPut: {
  790. _this->_internal_set_put(from._internal_put());
  791. break;
  792. }
  793. case kPost: {
  794. _this->_internal_set_post(from._internal_post());
  795. break;
  796. }
  797. case kDelete: {
  798. _this->_internal_set_delete_(from._internal_delete_());
  799. break;
  800. }
  801. case kPatch: {
  802. _this->_internal_set_patch(from._internal_patch());
  803. break;
  804. }
  805. case kCustom: {
  806. _this->_internal_mutable_custom()->::google::api::CustomHttpPattern::MergeFrom(
  807. from._internal_custom());
  808. break;
  809. }
  810. case PATTERN_NOT_SET: {
  811. break;
  812. }
  813. }
  814. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  815. }
  816. void HttpRule::CopyFrom(const HttpRule& from) {
  817. // @@protoc_insertion_point(class_specific_copy_from_start:google.api.HttpRule)
  818. if (&from == this) return;
  819. Clear();
  820. MergeFrom(from);
  821. }
  822. PROTOBUF_NOINLINE bool HttpRule::IsInitialized() const {
  823. return true;
  824. }
  825. ::_pbi::CachedSize* HttpRule::AccessCachedSize() const {
  826. return &_impl_._cached_size_;
  827. }
  828. void HttpRule::InternalSwap(HttpRule* PROTOBUF_RESTRICT other) {
  829. using std::swap;
  830. auto* arena = GetArena();
  831. ABSL_DCHECK_EQ(arena, other->GetArena());
  832. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  833. _impl_.additional_bindings_.InternalSwap(&other->_impl_.additional_bindings_);
  834. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.selector_, &other->_impl_.selector_, arena);
  835. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.body_, &other->_impl_.body_, arena);
  836. swap(_impl_.pattern_, other->_impl_.pattern_);
  837. swap(_impl_._oneof_case_[0], other->_impl_._oneof_case_[0]);
  838. }
  839. ::google::protobuf::Metadata HttpRule::GetMetadata() const {
  840. return ::_pbi::AssignDescriptors(
  841. &descriptor_table_google_2fapi_2fhttp_2eproto_getter, &descriptor_table_google_2fapi_2fhttp_2eproto_once,
  842. file_level_metadata_google_2fapi_2fhttp_2eproto[1]);
  843. }
  844. // ===================================================================
  845. class CustomHttpPattern::_Internal {
  846. public:
  847. };
  848. CustomHttpPattern::CustomHttpPattern(::google::protobuf::Arena* arena)
  849. : ::google::protobuf::Message(arena) {
  850. SharedCtor(arena);
  851. // @@protoc_insertion_point(arena_constructor:google.api.CustomHttpPattern)
  852. }
  853. inline PROTOBUF_NDEBUG_INLINE CustomHttpPattern::Impl_::Impl_(
  854. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  855. const Impl_& from)
  856. : kind_(arena, from.kind_),
  857. path_(arena, from.path_),
  858. _cached_size_{0} {}
  859. CustomHttpPattern::CustomHttpPattern(
  860. ::google::protobuf::Arena* arena,
  861. const CustomHttpPattern& from)
  862. : ::google::protobuf::Message(arena) {
  863. CustomHttpPattern* const _this = this;
  864. (void)_this;
  865. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  866. from._internal_metadata_);
  867. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  868. // @@protoc_insertion_point(copy_constructor:google.api.CustomHttpPattern)
  869. }
  870. inline PROTOBUF_NDEBUG_INLINE CustomHttpPattern::Impl_::Impl_(
  871. ::google::protobuf::internal::InternalVisibility visibility,
  872. ::google::protobuf::Arena* arena)
  873. : kind_(arena),
  874. path_(arena),
  875. _cached_size_{0} {}
  876. inline void CustomHttpPattern::SharedCtor(::_pb::Arena* arena) {
  877. new (&_impl_) Impl_(internal_visibility(), arena);
  878. }
  879. CustomHttpPattern::~CustomHttpPattern() {
  880. // @@protoc_insertion_point(destructor:google.api.CustomHttpPattern)
  881. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  882. SharedDtor();
  883. }
  884. inline void CustomHttpPattern::SharedDtor() {
  885. ABSL_DCHECK(GetArena() == nullptr);
  886. _impl_.kind_.Destroy();
  887. _impl_.path_.Destroy();
  888. _impl_.~Impl_();
  889. }
  890. PROTOBUF_NOINLINE void CustomHttpPattern::Clear() {
  891. // @@protoc_insertion_point(message_clear_start:google.api.CustomHttpPattern)
  892. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  893. ::uint32_t cached_has_bits = 0;
  894. // Prevent compiler warnings about cached_has_bits being unused
  895. (void) cached_has_bits;
  896. _impl_.kind_.ClearToEmpty();
  897. _impl_.path_.ClearToEmpty();
  898. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  899. }
  900. const char* CustomHttpPattern::_InternalParse(
  901. const char* ptr, ::_pbi::ParseContext* ctx) {
  902. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  903. return ptr;
  904. }
  905. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  906. const ::_pbi::TcParseTable<1, 2, 0, 45, 2> CustomHttpPattern::_table_ = {
  907. {
  908. 0, // no _has_bits_
  909. 0, // no _extensions_
  910. 2, 8, // max_field_number, fast_idx_mask
  911. offsetof(decltype(_table_), field_lookup_table),
  912. 4294967292, // skipmap
  913. offsetof(decltype(_table_), field_entries),
  914. 2, // num_field_entries
  915. 0, // num_aux_entries
  916. offsetof(decltype(_table_), field_names), // no aux_entries
  917. &_CustomHttpPattern_default_instance_._instance,
  918. ::_pbi::TcParser::GenericFallback, // fallback
  919. }, {{
  920. // string path = 2;
  921. {::_pbi::TcParser::FastUS1,
  922. {18, 63, 0, PROTOBUF_FIELD_OFFSET(CustomHttpPattern, _impl_.path_)}},
  923. // string kind = 1;
  924. {::_pbi::TcParser::FastUS1,
  925. {10, 63, 0, PROTOBUF_FIELD_OFFSET(CustomHttpPattern, _impl_.kind_)}},
  926. }}, {{
  927. 65535, 65535
  928. }}, {{
  929. // string kind = 1;
  930. {PROTOBUF_FIELD_OFFSET(CustomHttpPattern, _impl_.kind_), 0, 0,
  931. (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
  932. // string path = 2;
  933. {PROTOBUF_FIELD_OFFSET(CustomHttpPattern, _impl_.path_), 0, 0,
  934. (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
  935. }},
  936. // no aux_entries
  937. {{
  938. "\34\4\4\0\0\0\0\0"
  939. "google.api.CustomHttpPattern"
  940. "kind"
  941. "path"
  942. }},
  943. };
  944. ::uint8_t* CustomHttpPattern::_InternalSerialize(
  945. ::uint8_t* target,
  946. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  947. // @@protoc_insertion_point(serialize_to_array_start:google.api.CustomHttpPattern)
  948. ::uint32_t cached_has_bits = 0;
  949. (void)cached_has_bits;
  950. // string kind = 1;
  951. if (!this->_internal_kind().empty()) {
  952. const std::string& _s = this->_internal_kind();
  953. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  954. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.api.CustomHttpPattern.kind");
  955. target = stream->WriteStringMaybeAliased(1, _s, target);
  956. }
  957. // string path = 2;
  958. if (!this->_internal_path().empty()) {
  959. const std::string& _s = this->_internal_path();
  960. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  961. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.api.CustomHttpPattern.path");
  962. target = stream->WriteStringMaybeAliased(2, _s, target);
  963. }
  964. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  965. target =
  966. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  967. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  968. }
  969. // @@protoc_insertion_point(serialize_to_array_end:google.api.CustomHttpPattern)
  970. return target;
  971. }
  972. ::size_t CustomHttpPattern::ByteSizeLong() const {
  973. // @@protoc_insertion_point(message_byte_size_start:google.api.CustomHttpPattern)
  974. ::size_t total_size = 0;
  975. ::uint32_t cached_has_bits = 0;
  976. // Prevent compiler warnings about cached_has_bits being unused
  977. (void) cached_has_bits;
  978. // string kind = 1;
  979. if (!this->_internal_kind().empty()) {
  980. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  981. this->_internal_kind());
  982. }
  983. // string path = 2;
  984. if (!this->_internal_path().empty()) {
  985. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  986. this->_internal_path());
  987. }
  988. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  989. }
  990. const ::google::protobuf::Message::ClassData CustomHttpPattern::_class_data_ = {
  991. CustomHttpPattern::MergeImpl,
  992. nullptr, // OnDemandRegisterArenaDtor
  993. };
  994. const ::google::protobuf::Message::ClassData* CustomHttpPattern::GetClassData() const {
  995. return &_class_data_;
  996. }
  997. void CustomHttpPattern::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  998. auto* const _this = static_cast<CustomHttpPattern*>(&to_msg);
  999. auto& from = static_cast<const CustomHttpPattern&>(from_msg);
  1000. // @@protoc_insertion_point(class_specific_merge_from_start:google.api.CustomHttpPattern)
  1001. ABSL_DCHECK_NE(&from, _this);
  1002. ::uint32_t cached_has_bits = 0;
  1003. (void) cached_has_bits;
  1004. if (!from._internal_kind().empty()) {
  1005. _this->_internal_set_kind(from._internal_kind());
  1006. }
  1007. if (!from._internal_path().empty()) {
  1008. _this->_internal_set_path(from._internal_path());
  1009. }
  1010. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  1011. }
  1012. void CustomHttpPattern::CopyFrom(const CustomHttpPattern& from) {
  1013. // @@protoc_insertion_point(class_specific_copy_from_start:google.api.CustomHttpPattern)
  1014. if (&from == this) return;
  1015. Clear();
  1016. MergeFrom(from);
  1017. }
  1018. PROTOBUF_NOINLINE bool CustomHttpPattern::IsInitialized() const {
  1019. return true;
  1020. }
  1021. ::_pbi::CachedSize* CustomHttpPattern::AccessCachedSize() const {
  1022. return &_impl_._cached_size_;
  1023. }
  1024. void CustomHttpPattern::InternalSwap(CustomHttpPattern* PROTOBUF_RESTRICT other) {
  1025. using std::swap;
  1026. auto* arena = GetArena();
  1027. ABSL_DCHECK_EQ(arena, other->GetArena());
  1028. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  1029. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.kind_, &other->_impl_.kind_, arena);
  1030. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.path_, &other->_impl_.path_, arena);
  1031. }
  1032. ::google::protobuf::Metadata CustomHttpPattern::GetMetadata() const {
  1033. return ::_pbi::AssignDescriptors(
  1034. &descriptor_table_google_2fapi_2fhttp_2eproto_getter, &descriptor_table_google_2fapi_2fhttp_2eproto_once,
  1035. file_level_metadata_google_2fapi_2fhttp_2eproto[2]);
  1036. }
  1037. // @@protoc_insertion_point(namespace_scope)
  1038. } // namespace api
  1039. } // namespace google
  1040. namespace google {
  1041. namespace protobuf {
  1042. } // namespace protobuf
  1043. } // namespace google
  1044. // @@protoc_insertion_point(global_scope)
  1045. #include "google/protobuf/port_undef.inc"