resource.pb.cc 32 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793
  1. /*
  2. * Copyright 2024 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/resource.proto
  18. #include "google/api/resource.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 ResourceReference::Impl_::Impl_(
  38. ::_pbi::ConstantInitialized) noexcept
  39. : type_(
  40. &::google::protobuf::internal::fixed_address_empty_string,
  41. ::_pbi::ConstantInitialized()),
  42. child_type_(
  43. &::google::protobuf::internal::fixed_address_empty_string,
  44. ::_pbi::ConstantInitialized()),
  45. _cached_size_{0} {}
  46. template <typename>
  47. PROTOBUF_CONSTEXPR ResourceReference::ResourceReference(::_pbi::ConstantInitialized)
  48. : _impl_(::_pbi::ConstantInitialized()) {}
  49. struct ResourceReferenceDefaultTypeInternal {
  50. PROTOBUF_CONSTEXPR ResourceReferenceDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  51. ~ResourceReferenceDefaultTypeInternal() {}
  52. union {
  53. ResourceReference _instance;
  54. };
  55. };
  56. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  57. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ResourceReferenceDefaultTypeInternal _ResourceReference_default_instance_;
  58. inline constexpr ResourceDescriptor::Impl_::Impl_(
  59. ::_pbi::ConstantInitialized) noexcept
  60. : pattern_{},
  61. type_(
  62. &::google::protobuf::internal::fixed_address_empty_string,
  63. ::_pbi::ConstantInitialized()),
  64. name_field_(
  65. &::google::protobuf::internal::fixed_address_empty_string,
  66. ::_pbi::ConstantInitialized()),
  67. plural_(
  68. &::google::protobuf::internal::fixed_address_empty_string,
  69. ::_pbi::ConstantInitialized()),
  70. singular_(
  71. &::google::protobuf::internal::fixed_address_empty_string,
  72. ::_pbi::ConstantInitialized()),
  73. history_{static_cast< ::google::api::ResourceDescriptor_History >(0)},
  74. _cached_size_{0} {}
  75. template <typename>
  76. PROTOBUF_CONSTEXPR ResourceDescriptor::ResourceDescriptor(::_pbi::ConstantInitialized)
  77. : _impl_(::_pbi::ConstantInitialized()) {}
  78. struct ResourceDescriptorDefaultTypeInternal {
  79. PROTOBUF_CONSTEXPR ResourceDescriptorDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  80. ~ResourceDescriptorDefaultTypeInternal() {}
  81. union {
  82. ResourceDescriptor _instance;
  83. };
  84. };
  85. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  86. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ResourceDescriptorDefaultTypeInternal _ResourceDescriptor_default_instance_;
  87. } // namespace api
  88. } // namespace google
  89. static ::_pb::Metadata file_level_metadata_google_2fapi_2fresource_2eproto[2];
  90. static const ::_pb::EnumDescriptor* file_level_enum_descriptors_google_2fapi_2fresource_2eproto[1];
  91. static constexpr const ::_pb::ServiceDescriptor**
  92. file_level_service_descriptors_google_2fapi_2fresource_2eproto = nullptr;
  93. const ::uint32_t TableStruct_google_2fapi_2fresource_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(
  94. protodesc_cold) = {
  95. ~0u, // no _has_bits_
  96. PROTOBUF_FIELD_OFFSET(::google::api::ResourceDescriptor, _internal_metadata_),
  97. ~0u, // no _extensions_
  98. ~0u, // no _oneof_case_
  99. ~0u, // no _weak_field_map_
  100. ~0u, // no _inlined_string_donated_
  101. ~0u, // no _split_
  102. ~0u, // no sizeof(Split)
  103. PROTOBUF_FIELD_OFFSET(::google::api::ResourceDescriptor, _impl_.type_),
  104. PROTOBUF_FIELD_OFFSET(::google::api::ResourceDescriptor, _impl_.pattern_),
  105. PROTOBUF_FIELD_OFFSET(::google::api::ResourceDescriptor, _impl_.name_field_),
  106. PROTOBUF_FIELD_OFFSET(::google::api::ResourceDescriptor, _impl_.history_),
  107. PROTOBUF_FIELD_OFFSET(::google::api::ResourceDescriptor, _impl_.plural_),
  108. PROTOBUF_FIELD_OFFSET(::google::api::ResourceDescriptor, _impl_.singular_),
  109. ~0u, // no _has_bits_
  110. PROTOBUF_FIELD_OFFSET(::google::api::ResourceReference, _internal_metadata_),
  111. ~0u, // no _extensions_
  112. ~0u, // no _oneof_case_
  113. ~0u, // no _weak_field_map_
  114. ~0u, // no _inlined_string_donated_
  115. ~0u, // no _split_
  116. ~0u, // no sizeof(Split)
  117. PROTOBUF_FIELD_OFFSET(::google::api::ResourceReference, _impl_.type_),
  118. PROTOBUF_FIELD_OFFSET(::google::api::ResourceReference, _impl_.child_type_),
  119. };
  120. static const ::_pbi::MigrationSchema
  121. schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  122. {0, -1, -1, sizeof(::google::api::ResourceDescriptor)},
  123. {14, -1, -1, sizeof(::google::api::ResourceReference)},
  124. };
  125. static const ::_pb::Message* const file_default_instances[] = {
  126. &::google::api::_ResourceDescriptor_default_instance_._instance,
  127. &::google::api::_ResourceReference_default_instance_._instance,
  128. };
  129. const char descriptor_table_protodef_google_2fapi_2fresource_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  130. "\n\031google/api/resource.proto\022\ngoogle.api\032"
  131. " google/protobuf/descriptor.proto\"\377\001\n\022Re"
  132. "sourceDescriptor\022\014\n\004type\030\001 \001(\t\022\017\n\007patter"
  133. "n\030\002 \003(\t\022\022\n\nname_field\030\003 \001(\t\0227\n\007history\030\004"
  134. " \001(\0162&.google.api.ResourceDescriptor.His"
  135. "tory\022\016\n\006plural\030\005 \001(\t\022\020\n\010singular\030\006 \001(\t\"["
  136. "\n\007History\022\027\n\023HISTORY_UNSPECIFIED\020\000\022\035\n\031OR"
  137. "IGINALLY_SINGLE_PATTERN\020\001\022\030\n\024FUTURE_MULT"
  138. "I_PATTERN\020\002\"5\n\021ResourceReference\022\014\n\004type"
  139. "\030\001 \001(\t\022\022\n\nchild_type\030\002 \001(\t:Y\n\022resource_r"
  140. "eference\022\035.google.protobuf.FieldOptions\030"
  141. "\237\010 \001(\0132\035.google.api.ResourceReference:Z\n"
  142. "\023resource_definition\022\034.google.protobuf.F"
  143. "ileOptions\030\235\010 \003(\0132\036.google.api.ResourceD"
  144. "escriptor:R\n\010resource\022\037.google.protobuf."
  145. "MessageOptions\030\235\010 \001(\0132\036.google.api.Resou"
  146. "rceDescriptorBn\n\016com.google.apiB\rResourc"
  147. "eProtoP\001ZAgoogle.golang.org/genproto/goo"
  148. "gleapis/api/annotations;annotations\370\001\001\242\002"
  149. "\004GAPIb\006proto3"
  150. };
  151. static const ::_pbi::DescriptorTable* const descriptor_table_google_2fapi_2fresource_2eproto_deps[1] =
  152. {
  153. &::descriptor_table_google_2fprotobuf_2fdescriptor_2eproto,
  154. };
  155. static ::absl::once_flag descriptor_table_google_2fapi_2fresource_2eproto_once;
  156. const ::_pbi::DescriptorTable descriptor_table_google_2fapi_2fresource_2eproto = {
  157. false,
  158. false,
  159. 773,
  160. descriptor_table_protodef_google_2fapi_2fresource_2eproto,
  161. "google/api/resource.proto",
  162. &descriptor_table_google_2fapi_2fresource_2eproto_once,
  163. descriptor_table_google_2fapi_2fresource_2eproto_deps,
  164. 1,
  165. 2,
  166. schemas,
  167. file_default_instances,
  168. TableStruct_google_2fapi_2fresource_2eproto::offsets,
  169. file_level_metadata_google_2fapi_2fresource_2eproto,
  170. file_level_enum_descriptors_google_2fapi_2fresource_2eproto,
  171. file_level_service_descriptors_google_2fapi_2fresource_2eproto,
  172. };
  173. // This function exists to be marked as weak.
  174. // It can significantly speed up compilation by breaking up LLVM's SCC
  175. // in the .pb.cc translation units. Large translation units see a
  176. // reduction of more than 35% of walltime for optimized builds. Without
  177. // the weak attribute all the messages in the file, including all the
  178. // vtables and everything they use become part of the same SCC through
  179. // a cycle like:
  180. // GetMetadata -> descriptor table -> default instances ->
  181. // vtables -> GetMetadata
  182. // By adding a weak function here we break the connection from the
  183. // individual vtables back into the descriptor table.
  184. PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2fapi_2fresource_2eproto_getter() {
  185. return &descriptor_table_google_2fapi_2fresource_2eproto;
  186. }
  187. // Force running AddDescriptors() at dynamic initialization time.
  188. PROTOBUF_ATTRIBUTE_INIT_PRIORITY2
  189. static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_google_2fapi_2fresource_2eproto(&descriptor_table_google_2fapi_2fresource_2eproto);
  190. namespace google {
  191. namespace api {
  192. const ::google::protobuf::EnumDescriptor* ResourceDescriptor_History_descriptor() {
  193. ::google::protobuf::internal::AssignDescriptors(&descriptor_table_google_2fapi_2fresource_2eproto);
  194. return file_level_enum_descriptors_google_2fapi_2fresource_2eproto[0];
  195. }
  196. PROTOBUF_CONSTINIT const uint32_t ResourceDescriptor_History_internal_data_[] = {
  197. 196608u, 0u, };
  198. bool ResourceDescriptor_History_IsValid(int value) {
  199. return 0 <= value && value <= 2;
  200. }
  201. #if (__cplusplus < 201703) && \
  202. (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
  203. constexpr ResourceDescriptor_History ResourceDescriptor::HISTORY_UNSPECIFIED;
  204. constexpr ResourceDescriptor_History ResourceDescriptor::ORIGINALLY_SINGLE_PATTERN;
  205. constexpr ResourceDescriptor_History ResourceDescriptor::FUTURE_MULTI_PATTERN;
  206. constexpr ResourceDescriptor_History ResourceDescriptor::History_MIN;
  207. constexpr ResourceDescriptor_History ResourceDescriptor::History_MAX;
  208. constexpr int ResourceDescriptor::History_ARRAYSIZE;
  209. #endif // (__cplusplus < 201703) &&
  210. // (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912))
  211. // ===================================================================
  212. class ResourceDescriptor::_Internal {
  213. public:
  214. };
  215. ResourceDescriptor::ResourceDescriptor(::google::protobuf::Arena* arena)
  216. : ::google::protobuf::Message(arena) {
  217. SharedCtor(arena);
  218. // @@protoc_insertion_point(arena_constructor:google.api.ResourceDescriptor)
  219. }
  220. inline PROTOBUF_NDEBUG_INLINE ResourceDescriptor::Impl_::Impl_(
  221. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  222. const Impl_& from)
  223. : pattern_{visibility, arena, from.pattern_},
  224. type_(arena, from.type_),
  225. name_field_(arena, from.name_field_),
  226. plural_(arena, from.plural_),
  227. singular_(arena, from.singular_),
  228. _cached_size_{0} {}
  229. ResourceDescriptor::ResourceDescriptor(
  230. ::google::protobuf::Arena* arena,
  231. const ResourceDescriptor& from)
  232. : ::google::protobuf::Message(arena) {
  233. ResourceDescriptor* const _this = this;
  234. (void)_this;
  235. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  236. from._internal_metadata_);
  237. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  238. _impl_.history_ = from._impl_.history_;
  239. // @@protoc_insertion_point(copy_constructor:google.api.ResourceDescriptor)
  240. }
  241. inline PROTOBUF_NDEBUG_INLINE ResourceDescriptor::Impl_::Impl_(
  242. ::google::protobuf::internal::InternalVisibility visibility,
  243. ::google::protobuf::Arena* arena)
  244. : pattern_{visibility, arena},
  245. type_(arena),
  246. name_field_(arena),
  247. plural_(arena),
  248. singular_(arena),
  249. _cached_size_{0} {}
  250. inline void ResourceDescriptor::SharedCtor(::_pb::Arena* arena) {
  251. new (&_impl_) Impl_(internal_visibility(), arena);
  252. _impl_.history_ = {};
  253. }
  254. ResourceDescriptor::~ResourceDescriptor() {
  255. // @@protoc_insertion_point(destructor:google.api.ResourceDescriptor)
  256. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  257. SharedDtor();
  258. }
  259. inline void ResourceDescriptor::SharedDtor() {
  260. ABSL_DCHECK(GetArena() == nullptr);
  261. _impl_.type_.Destroy();
  262. _impl_.name_field_.Destroy();
  263. _impl_.plural_.Destroy();
  264. _impl_.singular_.Destroy();
  265. _impl_.~Impl_();
  266. }
  267. PROTOBUF_NOINLINE void ResourceDescriptor::Clear() {
  268. // @@protoc_insertion_point(message_clear_start:google.api.ResourceDescriptor)
  269. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  270. ::uint32_t cached_has_bits = 0;
  271. // Prevent compiler warnings about cached_has_bits being unused
  272. (void) cached_has_bits;
  273. _impl_.pattern_.Clear();
  274. _impl_.type_.ClearToEmpty();
  275. _impl_.name_field_.ClearToEmpty();
  276. _impl_.plural_.ClearToEmpty();
  277. _impl_.singular_.ClearToEmpty();
  278. _impl_.history_ = 0;
  279. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  280. }
  281. const char* ResourceDescriptor::_InternalParse(
  282. const char* ptr, ::_pbi::ParseContext* ctx) {
  283. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  284. return ptr;
  285. }
  286. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  287. const ::_pbi::TcParseTable<3, 6, 0, 73, 2> ResourceDescriptor::_table_ = {
  288. {
  289. 0, // no _has_bits_
  290. 0, // no _extensions_
  291. 6, 56, // max_field_number, fast_idx_mask
  292. offsetof(decltype(_table_), field_lookup_table),
  293. 4294967232, // skipmap
  294. offsetof(decltype(_table_), field_entries),
  295. 6, // num_field_entries
  296. 0, // num_aux_entries
  297. offsetof(decltype(_table_), field_names), // no aux_entries
  298. &_ResourceDescriptor_default_instance_._instance,
  299. ::_pbi::TcParser::GenericFallback, // fallback
  300. }, {{
  301. {::_pbi::TcParser::MiniParse, {}},
  302. // string type = 1;
  303. {::_pbi::TcParser::FastUS1,
  304. {10, 63, 0, PROTOBUF_FIELD_OFFSET(ResourceDescriptor, _impl_.type_)}},
  305. // repeated string pattern = 2;
  306. {::_pbi::TcParser::FastUR1,
  307. {18, 63, 0, PROTOBUF_FIELD_OFFSET(ResourceDescriptor, _impl_.pattern_)}},
  308. // string name_field = 3;
  309. {::_pbi::TcParser::FastUS1,
  310. {26, 63, 0, PROTOBUF_FIELD_OFFSET(ResourceDescriptor, _impl_.name_field_)}},
  311. // .google.api.ResourceDescriptor.History history = 4;
  312. {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(ResourceDescriptor, _impl_.history_), 63>(),
  313. {32, 63, 0, PROTOBUF_FIELD_OFFSET(ResourceDescriptor, _impl_.history_)}},
  314. // string plural = 5;
  315. {::_pbi::TcParser::FastUS1,
  316. {42, 63, 0, PROTOBUF_FIELD_OFFSET(ResourceDescriptor, _impl_.plural_)}},
  317. // string singular = 6;
  318. {::_pbi::TcParser::FastUS1,
  319. {50, 63, 0, PROTOBUF_FIELD_OFFSET(ResourceDescriptor, _impl_.singular_)}},
  320. {::_pbi::TcParser::MiniParse, {}},
  321. }}, {{
  322. 65535, 65535
  323. }}, {{
  324. // string type = 1;
  325. {PROTOBUF_FIELD_OFFSET(ResourceDescriptor, _impl_.type_), 0, 0,
  326. (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
  327. // repeated string pattern = 2;
  328. {PROTOBUF_FIELD_OFFSET(ResourceDescriptor, _impl_.pattern_), 0, 0,
  329. (0 | ::_fl::kFcRepeated | ::_fl::kUtf8String | ::_fl::kRepSString)},
  330. // string name_field = 3;
  331. {PROTOBUF_FIELD_OFFSET(ResourceDescriptor, _impl_.name_field_), 0, 0,
  332. (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
  333. // .google.api.ResourceDescriptor.History history = 4;
  334. {PROTOBUF_FIELD_OFFSET(ResourceDescriptor, _impl_.history_), 0, 0,
  335. (0 | ::_fl::kFcSingular | ::_fl::kOpenEnum)},
  336. // string plural = 5;
  337. {PROTOBUF_FIELD_OFFSET(ResourceDescriptor, _impl_.plural_), 0, 0,
  338. (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
  339. // string singular = 6;
  340. {PROTOBUF_FIELD_OFFSET(ResourceDescriptor, _impl_.singular_), 0, 0,
  341. (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
  342. }},
  343. // no aux_entries
  344. {{
  345. "\35\4\7\12\0\6\10\0"
  346. "google.api.ResourceDescriptor"
  347. "type"
  348. "pattern"
  349. "name_field"
  350. "plural"
  351. "singular"
  352. }},
  353. };
  354. ::uint8_t* ResourceDescriptor::_InternalSerialize(
  355. ::uint8_t* target,
  356. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  357. // @@protoc_insertion_point(serialize_to_array_start:google.api.ResourceDescriptor)
  358. ::uint32_t cached_has_bits = 0;
  359. (void)cached_has_bits;
  360. // string type = 1;
  361. if (!this->_internal_type().empty()) {
  362. const std::string& _s = this->_internal_type();
  363. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  364. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.api.ResourceDescriptor.type");
  365. target = stream->WriteStringMaybeAliased(1, _s, target);
  366. }
  367. // repeated string pattern = 2;
  368. for (int i = 0, n = this->_internal_pattern_size(); i < n; ++i) {
  369. const auto& s = this->_internal_pattern().Get(i);
  370. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  371. s.data(), static_cast<int>(s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.api.ResourceDescriptor.pattern");
  372. target = stream->WriteString(2, s, target);
  373. }
  374. // string name_field = 3;
  375. if (!this->_internal_name_field().empty()) {
  376. const std::string& _s = this->_internal_name_field();
  377. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  378. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.api.ResourceDescriptor.name_field");
  379. target = stream->WriteStringMaybeAliased(3, _s, target);
  380. }
  381. // .google.api.ResourceDescriptor.History history = 4;
  382. if (this->_internal_history() != 0) {
  383. target = stream->EnsureSpace(target);
  384. target = ::_pbi::WireFormatLite::WriteEnumToArray(
  385. 4, this->_internal_history(), target);
  386. }
  387. // string plural = 5;
  388. if (!this->_internal_plural().empty()) {
  389. const std::string& _s = this->_internal_plural();
  390. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  391. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.api.ResourceDescriptor.plural");
  392. target = stream->WriteStringMaybeAliased(5, _s, target);
  393. }
  394. // string singular = 6;
  395. if (!this->_internal_singular().empty()) {
  396. const std::string& _s = this->_internal_singular();
  397. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  398. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.api.ResourceDescriptor.singular");
  399. target = stream->WriteStringMaybeAliased(6, _s, target);
  400. }
  401. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  402. target =
  403. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  404. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  405. }
  406. // @@protoc_insertion_point(serialize_to_array_end:google.api.ResourceDescriptor)
  407. return target;
  408. }
  409. ::size_t ResourceDescriptor::ByteSizeLong() const {
  410. // @@protoc_insertion_point(message_byte_size_start:google.api.ResourceDescriptor)
  411. ::size_t total_size = 0;
  412. ::uint32_t cached_has_bits = 0;
  413. // Prevent compiler warnings about cached_has_bits being unused
  414. (void) cached_has_bits;
  415. // repeated string pattern = 2;
  416. total_size += 1 * ::google::protobuf::internal::FromIntSize(_internal_pattern().size());
  417. for (int i = 0, n = _internal_pattern().size(); i < n; ++i) {
  418. total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
  419. _internal_pattern().Get(i));
  420. }
  421. // string type = 1;
  422. if (!this->_internal_type().empty()) {
  423. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  424. this->_internal_type());
  425. }
  426. // string name_field = 3;
  427. if (!this->_internal_name_field().empty()) {
  428. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  429. this->_internal_name_field());
  430. }
  431. // string plural = 5;
  432. if (!this->_internal_plural().empty()) {
  433. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  434. this->_internal_plural());
  435. }
  436. // string singular = 6;
  437. if (!this->_internal_singular().empty()) {
  438. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  439. this->_internal_singular());
  440. }
  441. // .google.api.ResourceDescriptor.History history = 4;
  442. if (this->_internal_history() != 0) {
  443. total_size += 1 +
  444. ::_pbi::WireFormatLite::EnumSize(this->_internal_history());
  445. }
  446. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  447. }
  448. const ::google::protobuf::Message::ClassData ResourceDescriptor::_class_data_ = {
  449. ResourceDescriptor::MergeImpl,
  450. nullptr, // OnDemandRegisterArenaDtor
  451. };
  452. const ::google::protobuf::Message::ClassData* ResourceDescriptor::GetClassData() const {
  453. return &_class_data_;
  454. }
  455. void ResourceDescriptor::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  456. auto* const _this = static_cast<ResourceDescriptor*>(&to_msg);
  457. auto& from = static_cast<const ResourceDescriptor&>(from_msg);
  458. // @@protoc_insertion_point(class_specific_merge_from_start:google.api.ResourceDescriptor)
  459. ABSL_DCHECK_NE(&from, _this);
  460. ::uint32_t cached_has_bits = 0;
  461. (void) cached_has_bits;
  462. _this->_internal_mutable_pattern()->MergeFrom(from._internal_pattern());
  463. if (!from._internal_type().empty()) {
  464. _this->_internal_set_type(from._internal_type());
  465. }
  466. if (!from._internal_name_field().empty()) {
  467. _this->_internal_set_name_field(from._internal_name_field());
  468. }
  469. if (!from._internal_plural().empty()) {
  470. _this->_internal_set_plural(from._internal_plural());
  471. }
  472. if (!from._internal_singular().empty()) {
  473. _this->_internal_set_singular(from._internal_singular());
  474. }
  475. if (from._internal_history() != 0) {
  476. _this->_internal_set_history(from._internal_history());
  477. }
  478. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  479. }
  480. void ResourceDescriptor::CopyFrom(const ResourceDescriptor& from) {
  481. // @@protoc_insertion_point(class_specific_copy_from_start:google.api.ResourceDescriptor)
  482. if (&from == this) return;
  483. Clear();
  484. MergeFrom(from);
  485. }
  486. PROTOBUF_NOINLINE bool ResourceDescriptor::IsInitialized() const {
  487. return true;
  488. }
  489. ::_pbi::CachedSize* ResourceDescriptor::AccessCachedSize() const {
  490. return &_impl_._cached_size_;
  491. }
  492. void ResourceDescriptor::InternalSwap(ResourceDescriptor* PROTOBUF_RESTRICT other) {
  493. using std::swap;
  494. auto* arena = GetArena();
  495. ABSL_DCHECK_EQ(arena, other->GetArena());
  496. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  497. _impl_.pattern_.InternalSwap(&other->_impl_.pattern_);
  498. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.type_, &other->_impl_.type_, arena);
  499. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.name_field_, &other->_impl_.name_field_, arena);
  500. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.plural_, &other->_impl_.plural_, arena);
  501. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.singular_, &other->_impl_.singular_, arena);
  502. swap(_impl_.history_, other->_impl_.history_);
  503. }
  504. ::google::protobuf::Metadata ResourceDescriptor::GetMetadata() const {
  505. return ::_pbi::AssignDescriptors(
  506. &descriptor_table_google_2fapi_2fresource_2eproto_getter, &descriptor_table_google_2fapi_2fresource_2eproto_once,
  507. file_level_metadata_google_2fapi_2fresource_2eproto[0]);
  508. }
  509. // ===================================================================
  510. class ResourceReference::_Internal {
  511. public:
  512. };
  513. ResourceReference::ResourceReference(::google::protobuf::Arena* arena)
  514. : ::google::protobuf::Message(arena) {
  515. SharedCtor(arena);
  516. // @@protoc_insertion_point(arena_constructor:google.api.ResourceReference)
  517. }
  518. inline PROTOBUF_NDEBUG_INLINE ResourceReference::Impl_::Impl_(
  519. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  520. const Impl_& from)
  521. : type_(arena, from.type_),
  522. child_type_(arena, from.child_type_),
  523. _cached_size_{0} {}
  524. ResourceReference::ResourceReference(
  525. ::google::protobuf::Arena* arena,
  526. const ResourceReference& from)
  527. : ::google::protobuf::Message(arena) {
  528. ResourceReference* const _this = this;
  529. (void)_this;
  530. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  531. from._internal_metadata_);
  532. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  533. // @@protoc_insertion_point(copy_constructor:google.api.ResourceReference)
  534. }
  535. inline PROTOBUF_NDEBUG_INLINE ResourceReference::Impl_::Impl_(
  536. ::google::protobuf::internal::InternalVisibility visibility,
  537. ::google::protobuf::Arena* arena)
  538. : type_(arena),
  539. child_type_(arena),
  540. _cached_size_{0} {}
  541. inline void ResourceReference::SharedCtor(::_pb::Arena* arena) {
  542. new (&_impl_) Impl_(internal_visibility(), arena);
  543. }
  544. ResourceReference::~ResourceReference() {
  545. // @@protoc_insertion_point(destructor:google.api.ResourceReference)
  546. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  547. SharedDtor();
  548. }
  549. inline void ResourceReference::SharedDtor() {
  550. ABSL_DCHECK(GetArena() == nullptr);
  551. _impl_.type_.Destroy();
  552. _impl_.child_type_.Destroy();
  553. _impl_.~Impl_();
  554. }
  555. PROTOBUF_NOINLINE void ResourceReference::Clear() {
  556. // @@protoc_insertion_point(message_clear_start:google.api.ResourceReference)
  557. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  558. ::uint32_t cached_has_bits = 0;
  559. // Prevent compiler warnings about cached_has_bits being unused
  560. (void) cached_has_bits;
  561. _impl_.type_.ClearToEmpty();
  562. _impl_.child_type_.ClearToEmpty();
  563. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  564. }
  565. const char* ResourceReference::_InternalParse(
  566. const char* ptr, ::_pbi::ParseContext* ctx) {
  567. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  568. return ptr;
  569. }
  570. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  571. const ::_pbi::TcParseTable<1, 2, 0, 51, 2> ResourceReference::_table_ = {
  572. {
  573. 0, // no _has_bits_
  574. 0, // no _extensions_
  575. 2, 8, // max_field_number, fast_idx_mask
  576. offsetof(decltype(_table_), field_lookup_table),
  577. 4294967292, // skipmap
  578. offsetof(decltype(_table_), field_entries),
  579. 2, // num_field_entries
  580. 0, // num_aux_entries
  581. offsetof(decltype(_table_), field_names), // no aux_entries
  582. &_ResourceReference_default_instance_._instance,
  583. ::_pbi::TcParser::GenericFallback, // fallback
  584. }, {{
  585. // string child_type = 2;
  586. {::_pbi::TcParser::FastUS1,
  587. {18, 63, 0, PROTOBUF_FIELD_OFFSET(ResourceReference, _impl_.child_type_)}},
  588. // string type = 1;
  589. {::_pbi::TcParser::FastUS1,
  590. {10, 63, 0, PROTOBUF_FIELD_OFFSET(ResourceReference, _impl_.type_)}},
  591. }}, {{
  592. 65535, 65535
  593. }}, {{
  594. // string type = 1;
  595. {PROTOBUF_FIELD_OFFSET(ResourceReference, _impl_.type_), 0, 0,
  596. (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
  597. // string child_type = 2;
  598. {PROTOBUF_FIELD_OFFSET(ResourceReference, _impl_.child_type_), 0, 0,
  599. (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
  600. }},
  601. // no aux_entries
  602. {{
  603. "\34\4\12\0\0\0\0\0"
  604. "google.api.ResourceReference"
  605. "type"
  606. "child_type"
  607. }},
  608. };
  609. ::uint8_t* ResourceReference::_InternalSerialize(
  610. ::uint8_t* target,
  611. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  612. // @@protoc_insertion_point(serialize_to_array_start:google.api.ResourceReference)
  613. ::uint32_t cached_has_bits = 0;
  614. (void)cached_has_bits;
  615. // string type = 1;
  616. if (!this->_internal_type().empty()) {
  617. const std::string& _s = this->_internal_type();
  618. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  619. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.api.ResourceReference.type");
  620. target = stream->WriteStringMaybeAliased(1, _s, target);
  621. }
  622. // string child_type = 2;
  623. if (!this->_internal_child_type().empty()) {
  624. const std::string& _s = this->_internal_child_type();
  625. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  626. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.api.ResourceReference.child_type");
  627. target = stream->WriteStringMaybeAliased(2, _s, target);
  628. }
  629. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  630. target =
  631. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  632. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  633. }
  634. // @@protoc_insertion_point(serialize_to_array_end:google.api.ResourceReference)
  635. return target;
  636. }
  637. ::size_t ResourceReference::ByteSizeLong() const {
  638. // @@protoc_insertion_point(message_byte_size_start:google.api.ResourceReference)
  639. ::size_t total_size = 0;
  640. ::uint32_t cached_has_bits = 0;
  641. // Prevent compiler warnings about cached_has_bits being unused
  642. (void) cached_has_bits;
  643. // string type = 1;
  644. if (!this->_internal_type().empty()) {
  645. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  646. this->_internal_type());
  647. }
  648. // string child_type = 2;
  649. if (!this->_internal_child_type().empty()) {
  650. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  651. this->_internal_child_type());
  652. }
  653. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  654. }
  655. const ::google::protobuf::Message::ClassData ResourceReference::_class_data_ = {
  656. ResourceReference::MergeImpl,
  657. nullptr, // OnDemandRegisterArenaDtor
  658. };
  659. const ::google::protobuf::Message::ClassData* ResourceReference::GetClassData() const {
  660. return &_class_data_;
  661. }
  662. void ResourceReference::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  663. auto* const _this = static_cast<ResourceReference*>(&to_msg);
  664. auto& from = static_cast<const ResourceReference&>(from_msg);
  665. // @@protoc_insertion_point(class_specific_merge_from_start:google.api.ResourceReference)
  666. ABSL_DCHECK_NE(&from, _this);
  667. ::uint32_t cached_has_bits = 0;
  668. (void) cached_has_bits;
  669. if (!from._internal_type().empty()) {
  670. _this->_internal_set_type(from._internal_type());
  671. }
  672. if (!from._internal_child_type().empty()) {
  673. _this->_internal_set_child_type(from._internal_child_type());
  674. }
  675. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  676. }
  677. void ResourceReference::CopyFrom(const ResourceReference& from) {
  678. // @@protoc_insertion_point(class_specific_copy_from_start:google.api.ResourceReference)
  679. if (&from == this) return;
  680. Clear();
  681. MergeFrom(from);
  682. }
  683. PROTOBUF_NOINLINE bool ResourceReference::IsInitialized() const {
  684. return true;
  685. }
  686. ::_pbi::CachedSize* ResourceReference::AccessCachedSize() const {
  687. return &_impl_._cached_size_;
  688. }
  689. void ResourceReference::InternalSwap(ResourceReference* PROTOBUF_RESTRICT other) {
  690. using std::swap;
  691. auto* arena = GetArena();
  692. ABSL_DCHECK_EQ(arena, other->GetArena());
  693. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  694. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.type_, &other->_impl_.type_, arena);
  695. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.child_type_, &other->_impl_.child_type_, arena);
  696. }
  697. ::google::protobuf::Metadata ResourceReference::GetMetadata() const {
  698. return ::_pbi::AssignDescriptors(
  699. &descriptor_table_google_2fapi_2fresource_2eproto_getter, &descriptor_table_google_2fapi_2fresource_2eproto_once,
  700. file_level_metadata_google_2fapi_2fresource_2eproto[1]);
  701. }
  702. PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FieldOptions,
  703. ::google::protobuf::internal::MessageTypeTraits< ::google::api::ResourceReference >, 11, false>
  704. resource_reference(kResourceReferenceFieldNumber, ::google::api::ResourceReference::default_instance(), nullptr);
  705. PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::FileOptions,
  706. ::google::protobuf::internal::RepeatedMessageTypeTraits< ::google::api::ResourceDescriptor >, 11, false>
  707. resource_definition(kResourceDefinitionFieldNumber, ::google::api::ResourceDescriptor::default_instance(), nullptr);
  708. PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 ::google::protobuf::internal::ExtensionIdentifier< ::google::protobuf::MessageOptions,
  709. ::google::protobuf::internal::MessageTypeTraits< ::google::api::ResourceDescriptor >, 11, false>
  710. resource(kResourceFieldNumber, ::google::api::ResourceDescriptor::default_instance(), nullptr);
  711. // @@protoc_insertion_point(namespace_scope)
  712. } // namespace api
  713. } // namespace google
  714. namespace google {
  715. namespace protobuf {
  716. } // namespace protobuf
  717. } // namespace google
  718. // @@protoc_insertion_point(global_scope)
  719. #include "google/protobuf/port_undef.inc"