status.pb.cc 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400
  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/rpc/status.proto
  18. #include "google/rpc/status.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 rpc {
  37. inline constexpr Status::Impl_::Impl_(
  38. ::_pbi::ConstantInitialized) noexcept
  39. : details_{},
  40. message_(
  41. &::google::protobuf::internal::fixed_address_empty_string,
  42. ::_pbi::ConstantInitialized()),
  43. code_{0},
  44. _cached_size_{0} {}
  45. template <typename>
  46. PROTOBUF_CONSTEXPR Status::Status(::_pbi::ConstantInitialized)
  47. : _impl_(::_pbi::ConstantInitialized()) {}
  48. struct StatusDefaultTypeInternal {
  49. PROTOBUF_CONSTEXPR StatusDefaultTypeInternal() : _instance(::_pbi::ConstantInitialized{}) {}
  50. ~StatusDefaultTypeInternal() {}
  51. union {
  52. Status _instance;
  53. };
  54. };
  55. PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT
  56. PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StatusDefaultTypeInternal _Status_default_instance_;
  57. } // namespace rpc
  58. } // namespace google
  59. static ::_pb::Metadata file_level_metadata_google_2frpc_2fstatus_2eproto[1];
  60. static constexpr const ::_pb::EnumDescriptor**
  61. file_level_enum_descriptors_google_2frpc_2fstatus_2eproto = nullptr;
  62. static constexpr const ::_pb::ServiceDescriptor**
  63. file_level_service_descriptors_google_2frpc_2fstatus_2eproto = nullptr;
  64. const ::uint32_t TableStruct_google_2frpc_2fstatus_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(
  65. protodesc_cold) = {
  66. ~0u, // no _has_bits_
  67. PROTOBUF_FIELD_OFFSET(::google::rpc::Status, _internal_metadata_),
  68. ~0u, // no _extensions_
  69. ~0u, // no _oneof_case_
  70. ~0u, // no _weak_field_map_
  71. ~0u, // no _inlined_string_donated_
  72. ~0u, // no _split_
  73. ~0u, // no sizeof(Split)
  74. PROTOBUF_FIELD_OFFSET(::google::rpc::Status, _impl_.code_),
  75. PROTOBUF_FIELD_OFFSET(::google::rpc::Status, _impl_.message_),
  76. PROTOBUF_FIELD_OFFSET(::google::rpc::Status, _impl_.details_),
  77. };
  78. static const ::_pbi::MigrationSchema
  79. schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  80. {0, -1, -1, sizeof(::google::rpc::Status)},
  81. };
  82. static const ::_pb::Message* const file_default_instances[] = {
  83. &::google::rpc::_Status_default_instance_._instance,
  84. };
  85. const char descriptor_table_protodef_google_2frpc_2fstatus_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  86. "\n\027google/rpc/status.proto\022\ngoogle.rpc\032\031g"
  87. "oogle/protobuf/any.proto\"N\n\006Status\022\014\n\004co"
  88. "de\030\001 \001(\005\022\017\n\007message\030\002 \001(\t\022%\n\007details\030\003 \003"
  89. "(\0132\024.google.protobuf.AnyB^\n\016com.google.r"
  90. "pcB\013StatusProtoP\001Z7google.golang.org/gen"
  91. "proto/googleapis/rpc/status;status\242\002\003RPC"
  92. "b\006proto3"
  93. };
  94. static const ::_pbi::DescriptorTable* const descriptor_table_google_2frpc_2fstatus_2eproto_deps[1] =
  95. {
  96. &::descriptor_table_google_2fprotobuf_2fany_2eproto,
  97. };
  98. static ::absl::once_flag descriptor_table_google_2frpc_2fstatus_2eproto_once;
  99. const ::_pbi::DescriptorTable descriptor_table_google_2frpc_2fstatus_2eproto = {
  100. false,
  101. false,
  102. 248,
  103. descriptor_table_protodef_google_2frpc_2fstatus_2eproto,
  104. "google/rpc/status.proto",
  105. &descriptor_table_google_2frpc_2fstatus_2eproto_once,
  106. descriptor_table_google_2frpc_2fstatus_2eproto_deps,
  107. 1,
  108. 1,
  109. schemas,
  110. file_default_instances,
  111. TableStruct_google_2frpc_2fstatus_2eproto::offsets,
  112. file_level_metadata_google_2frpc_2fstatus_2eproto,
  113. file_level_enum_descriptors_google_2frpc_2fstatus_2eproto,
  114. file_level_service_descriptors_google_2frpc_2fstatus_2eproto,
  115. };
  116. // This function exists to be marked as weak.
  117. // It can significantly speed up compilation by breaking up LLVM's SCC
  118. // in the .pb.cc translation units. Large translation units see a
  119. // reduction of more than 35% of walltime for optimized builds. Without
  120. // the weak attribute all the messages in the file, including all the
  121. // vtables and everything they use become part of the same SCC through
  122. // a cycle like:
  123. // GetMetadata -> descriptor table -> default instances ->
  124. // vtables -> GetMetadata
  125. // By adding a weak function here we break the connection from the
  126. // individual vtables back into the descriptor table.
  127. PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_google_2frpc_2fstatus_2eproto_getter() {
  128. return &descriptor_table_google_2frpc_2fstatus_2eproto;
  129. }
  130. // Force running AddDescriptors() at dynamic initialization time.
  131. PROTOBUF_ATTRIBUTE_INIT_PRIORITY2
  132. static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_google_2frpc_2fstatus_2eproto(&descriptor_table_google_2frpc_2fstatus_2eproto);
  133. namespace google {
  134. namespace rpc {
  135. // ===================================================================
  136. class Status::_Internal {
  137. public:
  138. };
  139. void Status::clear_details() {
  140. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  141. _impl_.details_.Clear();
  142. }
  143. Status::Status(::google::protobuf::Arena* arena)
  144. : ::google::protobuf::Message(arena) {
  145. SharedCtor(arena);
  146. // @@protoc_insertion_point(arena_constructor:google.rpc.Status)
  147. }
  148. inline PROTOBUF_NDEBUG_INLINE Status::Impl_::Impl_(
  149. ::google::protobuf::internal::InternalVisibility visibility, ::google::protobuf::Arena* arena,
  150. const Impl_& from)
  151. : details_{visibility, arena, from.details_},
  152. message_(arena, from.message_),
  153. _cached_size_{0} {}
  154. Status::Status(
  155. ::google::protobuf::Arena* arena,
  156. const Status& from)
  157. : ::google::protobuf::Message(arena) {
  158. Status* const _this = this;
  159. (void)_this;
  160. _internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(
  161. from._internal_metadata_);
  162. new (&_impl_) Impl_(internal_visibility(), arena, from._impl_);
  163. _impl_.code_ = from._impl_.code_;
  164. // @@protoc_insertion_point(copy_constructor:google.rpc.Status)
  165. }
  166. inline PROTOBUF_NDEBUG_INLINE Status::Impl_::Impl_(
  167. ::google::protobuf::internal::InternalVisibility visibility,
  168. ::google::protobuf::Arena* arena)
  169. : details_{visibility, arena},
  170. message_(arena),
  171. _cached_size_{0} {}
  172. inline void Status::SharedCtor(::_pb::Arena* arena) {
  173. new (&_impl_) Impl_(internal_visibility(), arena);
  174. _impl_.code_ = {};
  175. }
  176. Status::~Status() {
  177. // @@protoc_insertion_point(destructor:google.rpc.Status)
  178. _internal_metadata_.Delete<::google::protobuf::UnknownFieldSet>();
  179. SharedDtor();
  180. }
  181. inline void Status::SharedDtor() {
  182. ABSL_DCHECK(GetArena() == nullptr);
  183. _impl_.message_.Destroy();
  184. _impl_.~Impl_();
  185. }
  186. PROTOBUF_NOINLINE void Status::Clear() {
  187. // @@protoc_insertion_point(message_clear_start:google.rpc.Status)
  188. PROTOBUF_TSAN_WRITE(&_impl_._tsan_detect_race);
  189. ::uint32_t cached_has_bits = 0;
  190. // Prevent compiler warnings about cached_has_bits being unused
  191. (void) cached_has_bits;
  192. _impl_.details_.Clear();
  193. _impl_.message_.ClearToEmpty();
  194. _impl_.code_ = 0;
  195. _internal_metadata_.Clear<::google::protobuf::UnknownFieldSet>();
  196. }
  197. const char* Status::_InternalParse(
  198. const char* ptr, ::_pbi::ParseContext* ctx) {
  199. ptr = ::_pbi::TcParser::ParseLoop(this, ptr, ctx, &_table_.header);
  200. return ptr;
  201. }
  202. PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1
  203. const ::_pbi::TcParseTable<2, 3, 1, 33, 2> Status::_table_ = {
  204. {
  205. 0, // no _has_bits_
  206. 0, // no _extensions_
  207. 3, 24, // max_field_number, fast_idx_mask
  208. offsetof(decltype(_table_), field_lookup_table),
  209. 4294967288, // skipmap
  210. offsetof(decltype(_table_), field_entries),
  211. 3, // num_field_entries
  212. 1, // num_aux_entries
  213. offsetof(decltype(_table_), aux_entries),
  214. &_Status_default_instance_._instance,
  215. ::_pbi::TcParser::GenericFallback, // fallback
  216. }, {{
  217. {::_pbi::TcParser::MiniParse, {}},
  218. // int32 code = 1;
  219. {::_pbi::TcParser::SingularVarintNoZag1<::uint32_t, offsetof(Status, _impl_.code_), 63>(),
  220. {8, 63, 0, PROTOBUF_FIELD_OFFSET(Status, _impl_.code_)}},
  221. // string message = 2;
  222. {::_pbi::TcParser::FastUS1,
  223. {18, 63, 0, PROTOBUF_FIELD_OFFSET(Status, _impl_.message_)}},
  224. // repeated .google.protobuf.Any details = 3;
  225. {::_pbi::TcParser::FastMtR1,
  226. {26, 63, 0, PROTOBUF_FIELD_OFFSET(Status, _impl_.details_)}},
  227. }}, {{
  228. 65535, 65535
  229. }}, {{
  230. // int32 code = 1;
  231. {PROTOBUF_FIELD_OFFSET(Status, _impl_.code_), 0, 0,
  232. (0 | ::_fl::kFcSingular | ::_fl::kInt32)},
  233. // string message = 2;
  234. {PROTOBUF_FIELD_OFFSET(Status, _impl_.message_), 0, 0,
  235. (0 | ::_fl::kFcSingular | ::_fl::kUtf8String | ::_fl::kRepAString)},
  236. // repeated .google.protobuf.Any details = 3;
  237. {PROTOBUF_FIELD_OFFSET(Status, _impl_.details_), 0, 0,
  238. (0 | ::_fl::kFcRepeated | ::_fl::kMessage | ::_fl::kTvTable)},
  239. }}, {{
  240. {::_pbi::TcParser::GetTable<::google::protobuf::Any>()},
  241. }}, {{
  242. "\21\0\7\0\0\0\0\0"
  243. "google.rpc.Status"
  244. "message"
  245. }},
  246. };
  247. ::uint8_t* Status::_InternalSerialize(
  248. ::uint8_t* target,
  249. ::google::protobuf::io::EpsCopyOutputStream* stream) const {
  250. // @@protoc_insertion_point(serialize_to_array_start:google.rpc.Status)
  251. ::uint32_t cached_has_bits = 0;
  252. (void)cached_has_bits;
  253. // int32 code = 1;
  254. if (this->_internal_code() != 0) {
  255. target = ::google::protobuf::internal::WireFormatLite::
  256. WriteInt32ToArrayWithField<1>(
  257. stream, this->_internal_code(), target);
  258. }
  259. // string message = 2;
  260. if (!this->_internal_message().empty()) {
  261. const std::string& _s = this->_internal_message();
  262. ::google::protobuf::internal::WireFormatLite::VerifyUtf8String(
  263. _s.data(), static_cast<int>(_s.length()), ::google::protobuf::internal::WireFormatLite::SERIALIZE, "google.rpc.Status.message");
  264. target = stream->WriteStringMaybeAliased(2, _s, target);
  265. }
  266. // repeated .google.protobuf.Any details = 3;
  267. for (unsigned i = 0,
  268. n = static_cast<unsigned>(this->_internal_details_size()); i < n; i++) {
  269. const auto& repfield = this->_internal_details().Get(i);
  270. target = ::google::protobuf::internal::WireFormatLite::
  271. InternalWriteMessage(3, repfield, repfield.GetCachedSize(), target, stream);
  272. }
  273. if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
  274. target =
  275. ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray(
  276. _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance), target, stream);
  277. }
  278. // @@protoc_insertion_point(serialize_to_array_end:google.rpc.Status)
  279. return target;
  280. }
  281. ::size_t Status::ByteSizeLong() const {
  282. // @@protoc_insertion_point(message_byte_size_start:google.rpc.Status)
  283. ::size_t total_size = 0;
  284. ::uint32_t cached_has_bits = 0;
  285. // Prevent compiler warnings about cached_has_bits being unused
  286. (void) cached_has_bits;
  287. // repeated .google.protobuf.Any details = 3;
  288. total_size += 1UL * this->_internal_details_size();
  289. for (const auto& msg : this->_internal_details()) {
  290. total_size +=
  291. ::google::protobuf::internal::WireFormatLite::MessageSize(msg);
  292. }
  293. // string message = 2;
  294. if (!this->_internal_message().empty()) {
  295. total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize(
  296. this->_internal_message());
  297. }
  298. // int32 code = 1;
  299. if (this->_internal_code() != 0) {
  300. total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(
  301. this->_internal_code());
  302. }
  303. return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
  304. }
  305. const ::google::protobuf::Message::ClassData Status::_class_data_ = {
  306. Status::MergeImpl,
  307. nullptr, // OnDemandRegisterArenaDtor
  308. };
  309. const ::google::protobuf::Message::ClassData* Status::GetClassData() const {
  310. return &_class_data_;
  311. }
  312. void Status::MergeImpl(::google::protobuf::Message& to_msg, const ::google::protobuf::Message& from_msg) {
  313. auto* const _this = static_cast<Status*>(&to_msg);
  314. auto& from = static_cast<const Status&>(from_msg);
  315. // @@protoc_insertion_point(class_specific_merge_from_start:google.rpc.Status)
  316. ABSL_DCHECK_NE(&from, _this);
  317. ::uint32_t cached_has_bits = 0;
  318. (void) cached_has_bits;
  319. _this->_internal_mutable_details()->MergeFrom(
  320. from._internal_details());
  321. if (!from._internal_message().empty()) {
  322. _this->_internal_set_message(from._internal_message());
  323. }
  324. if (from._internal_code() != 0) {
  325. _this->_internal_set_code(from._internal_code());
  326. }
  327. _this->_internal_metadata_.MergeFrom<::google::protobuf::UnknownFieldSet>(from._internal_metadata_);
  328. }
  329. void Status::CopyFrom(const Status& from) {
  330. // @@protoc_insertion_point(class_specific_copy_from_start:google.rpc.Status)
  331. if (&from == this) return;
  332. Clear();
  333. MergeFrom(from);
  334. }
  335. PROTOBUF_NOINLINE bool Status::IsInitialized() const {
  336. return true;
  337. }
  338. ::_pbi::CachedSize* Status::AccessCachedSize() const {
  339. return &_impl_._cached_size_;
  340. }
  341. void Status::InternalSwap(Status* PROTOBUF_RESTRICT other) {
  342. using std::swap;
  343. auto* arena = GetArena();
  344. ABSL_DCHECK_EQ(arena, other->GetArena());
  345. _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  346. _impl_.details_.InternalSwap(&other->_impl_.details_);
  347. ::_pbi::ArenaStringPtr::InternalSwap(&_impl_.message_, &other->_impl_.message_, arena);
  348. swap(_impl_.code_, other->_impl_.code_);
  349. }
  350. ::google::protobuf::Metadata Status::GetMetadata() const {
  351. return ::_pbi::AssignDescriptors(
  352. &descriptor_table_google_2frpc_2fstatus_2eproto_getter, &descriptor_table_google_2frpc_2fstatus_2eproto_once,
  353. file_level_metadata_google_2frpc_2fstatus_2eproto[0]);
  354. }
  355. // @@protoc_insertion_point(namespace_scope)
  356. } // namespace rpc
  357. } // namespace google
  358. namespace google {
  359. namespace protobuf {
  360. } // namespace protobuf
  361. } // namespace google
  362. // @@protoc_insertion_point(global_scope)
  363. #include "google/protobuf/port_undef.inc"