status.pb.cc 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490
  1. /*
  2. * Copyright 2018 Google
  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/stubs/common.h>
  21. #include <google/protobuf/io/coded_stream.h>
  22. #include <google/protobuf/extension_set.h>
  23. #include <google/protobuf/wire_format_lite.h>
  24. #include <google/protobuf/descriptor.h>
  25. #include <google/protobuf/generated_message_reflection.h>
  26. #include <google/protobuf/reflection_ops.h>
  27. #include <google/protobuf/wire_format.h>
  28. // @@protoc_insertion_point(includes)
  29. #include <google/protobuf/port_def.inc>
  30. extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2fany_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Any_google_2fprotobuf_2fany_2eproto;
  31. namespace google {
  32. namespace rpc {
  33. class StatusDefaultTypeInternal {
  34. public:
  35. ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<Status> _instance;
  36. } _Status_default_instance_;
  37. } // namespace rpc
  38. } // namespace google
  39. static void InitDefaultsscc_info_Status_google_2frpc_2fstatus_2eproto() {
  40. GOOGLE_PROTOBUF_VERIFY_VERSION;
  41. {
  42. void* ptr = &::google::rpc::_Status_default_instance_;
  43. new (ptr) ::google::rpc::Status();
  44. ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  45. }
  46. ::google::rpc::Status::InitAsDefaultInstance();
  47. }
  48. ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Status_google_2frpc_2fstatus_2eproto =
  49. {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsscc_info_Status_google_2frpc_2fstatus_2eproto}, {
  50. &scc_info_Any_google_2fprotobuf_2fany_2eproto.base,}};
  51. static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_google_2frpc_2fstatus_2eproto[1];
  52. static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_google_2frpc_2fstatus_2eproto = nullptr;
  53. static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_google_2frpc_2fstatus_2eproto = nullptr;
  54. const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_google_2frpc_2fstatus_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  55. ~0u, // no _has_bits_
  56. PROTOBUF_FIELD_OFFSET(::google::rpc::Status, _internal_metadata_),
  57. ~0u, // no _extensions_
  58. ~0u, // no _oneof_case_
  59. ~0u, // no _weak_field_map_
  60. PROTOBUF_FIELD_OFFSET(::google::rpc::Status, code_),
  61. PROTOBUF_FIELD_OFFSET(::google::rpc::Status, message_),
  62. PROTOBUF_FIELD_OFFSET(::google::rpc::Status, details_),
  63. };
  64. static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  65. { 0, -1, sizeof(::google::rpc::Status)},
  66. };
  67. static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  68. reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::google::rpc::_Status_default_instance_),
  69. };
  70. const char descriptor_table_protodef_google_2frpc_2fstatus_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  71. "\n\027google/rpc/status.proto\022\ngoogle.rpc\032\031g"
  72. "oogle/protobuf/any.proto\"N\n\006Status\022\014\n\004co"
  73. "de\030\001 \001(\005\022\017\n\007message\030\002 \001(\t\022%\n\007details\030\003 \003"
  74. "(\0132\024.google.protobuf.AnyB^\n\016com.google.r"
  75. "pcB\013StatusProtoP\001Z7google.golang.org/gen"
  76. "proto/googleapis/rpc/status;status\242\002\003RPC"
  77. "b\006proto3"
  78. ;
  79. static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_google_2frpc_2fstatus_2eproto_deps[1] = {
  80. &::descriptor_table_google_2fprotobuf_2fany_2eproto,
  81. };
  82. static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_google_2frpc_2fstatus_2eproto_sccs[1] = {
  83. &scc_info_Status_google_2frpc_2fstatus_2eproto.base,
  84. };
  85. static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_google_2frpc_2fstatus_2eproto_once;
  86. static bool descriptor_table_google_2frpc_2fstatus_2eproto_initialized = false;
  87. const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2frpc_2fstatus_2eproto = {
  88. &descriptor_table_google_2frpc_2fstatus_2eproto_initialized, descriptor_table_protodef_google_2frpc_2fstatus_2eproto, "google/rpc/status.proto", 248,
  89. &descriptor_table_google_2frpc_2fstatus_2eproto_once, descriptor_table_google_2frpc_2fstatus_2eproto_sccs, descriptor_table_google_2frpc_2fstatus_2eproto_deps, 1, 1,
  90. schemas, file_default_instances, TableStruct_google_2frpc_2fstatus_2eproto::offsets,
  91. file_level_metadata_google_2frpc_2fstatus_2eproto, 1, file_level_enum_descriptors_google_2frpc_2fstatus_2eproto, file_level_service_descriptors_google_2frpc_2fstatus_2eproto,
  92. };
  93. // Force running AddDescriptors() at dynamic initialization time.
  94. static bool dynamic_init_dummy_google_2frpc_2fstatus_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_google_2frpc_2fstatus_2eproto), true);
  95. namespace google {
  96. namespace rpc {
  97. // ===================================================================
  98. void Status::InitAsDefaultInstance() {
  99. }
  100. class Status::_Internal {
  101. public:
  102. };
  103. void Status::clear_details() {
  104. details_.Clear();
  105. }
  106. Status::Status()
  107. : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) {
  108. SharedCtor();
  109. // @@protoc_insertion_point(constructor:google.rpc.Status)
  110. }
  111. Status::Status(const Status& from)
  112. : ::PROTOBUF_NAMESPACE_ID::Message(),
  113. _internal_metadata_(nullptr),
  114. details_(from.details_) {
  115. _internal_metadata_.MergeFrom(from._internal_metadata_);
  116. message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  117. if (!from.message().empty()) {
  118. message_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.message_);
  119. }
  120. code_ = from.code_;
  121. // @@protoc_insertion_point(copy_constructor:google.rpc.Status)
  122. }
  123. void Status::SharedCtor() {
  124. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Status_google_2frpc_2fstatus_2eproto.base);
  125. message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  126. code_ = 0;
  127. }
  128. Status::~Status() {
  129. // @@protoc_insertion_point(destructor:google.rpc.Status)
  130. SharedDtor();
  131. }
  132. void Status::SharedDtor() {
  133. message_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  134. }
  135. void Status::SetCachedSize(int size) const {
  136. _cached_size_.Set(size);
  137. }
  138. const Status& Status::default_instance() {
  139. ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Status_google_2frpc_2fstatus_2eproto.base);
  140. return *internal_default_instance();
  141. }
  142. void Status::Clear() {
  143. // @@protoc_insertion_point(message_clear_start:google.rpc.Status)
  144. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  145. // Prevent compiler warnings about cached_has_bits being unused
  146. (void) cached_has_bits;
  147. details_.Clear();
  148. message_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  149. code_ = 0;
  150. _internal_metadata_.Clear();
  151. }
  152. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  153. const char* Status::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
  154. #define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  155. while (!ctx->Done(&ptr)) {
  156. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  157. ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
  158. CHK_(ptr);
  159. switch (tag >> 3) {
  160. // int32 code = 1;
  161. case 1:
  162. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
  163. code_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr);
  164. CHK_(ptr);
  165. } else goto handle_unusual;
  166. continue;
  167. // string message = 2;
  168. case 2:
  169. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
  170. ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(mutable_message(), ptr, ctx, "google.rpc.Status.message");
  171. CHK_(ptr);
  172. } else goto handle_unusual;
  173. continue;
  174. // repeated .google.protobuf.Any details = 3;
  175. case 3:
  176. if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
  177. ptr -= 1;
  178. do {
  179. ptr += 1;
  180. ptr = ctx->ParseMessage(add_details(), ptr);
  181. CHK_(ptr);
  182. if (!ctx->DataAvailable(ptr)) break;
  183. } while (::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<::PROTOBUF_NAMESPACE_ID::uint8>(ptr) == 26);
  184. } else goto handle_unusual;
  185. continue;
  186. default: {
  187. handle_unusual:
  188. if ((tag & 7) == 4 || tag == 0) {
  189. ctx->SetLastTag(tag);
  190. goto success;
  191. }
  192. ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx);
  193. CHK_(ptr != nullptr);
  194. continue;
  195. }
  196. } // switch
  197. } // while
  198. success:
  199. return ptr;
  200. failure:
  201. ptr = nullptr;
  202. goto success;
  203. #undef CHK_
  204. }
  205. #else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  206. bool Status::MergePartialFromCodedStream(
  207. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) {
  208. #define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure
  209. ::PROTOBUF_NAMESPACE_ID::uint32 tag;
  210. // @@protoc_insertion_point(parse_start:google.rpc.Status)
  211. for (;;) {
  212. ::std::pair<::PROTOBUF_NAMESPACE_ID::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
  213. tag = p.first;
  214. if (!p.second) goto handle_unusual;
  215. switch (::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::GetTagFieldNumber(tag)) {
  216. // int32 code = 1;
  217. case 1: {
  218. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (8 & 0xFF)) {
  219. DO_((::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadPrimitive<
  220. ::PROTOBUF_NAMESPACE_ID::int32, ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::TYPE_INT32>(
  221. input, &code_)));
  222. } else {
  223. goto handle_unusual;
  224. }
  225. break;
  226. }
  227. // string message = 2;
  228. case 2: {
  229. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (18 & 0xFF)) {
  230. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadString(
  231. input, this->mutable_message()));
  232. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  233. this->message().data(), static_cast<int>(this->message().length()),
  234. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::PARSE,
  235. "google.rpc.Status.message"));
  236. } else {
  237. goto handle_unusual;
  238. }
  239. break;
  240. }
  241. // repeated .google.protobuf.Any details = 3;
  242. case 3: {
  243. if (static_cast< ::PROTOBUF_NAMESPACE_ID::uint8>(tag) == (26 & 0xFF)) {
  244. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::ReadMessage(
  245. input, add_details()));
  246. } else {
  247. goto handle_unusual;
  248. }
  249. break;
  250. }
  251. default: {
  252. handle_unusual:
  253. if (tag == 0) {
  254. goto success;
  255. }
  256. DO_(::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SkipField(
  257. input, tag, _internal_metadata_.mutable_unknown_fields()));
  258. break;
  259. }
  260. }
  261. }
  262. success:
  263. // @@protoc_insertion_point(parse_success:google.rpc.Status)
  264. return true;
  265. failure:
  266. // @@protoc_insertion_point(parse_failure:google.rpc.Status)
  267. return false;
  268. #undef DO_
  269. }
  270. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  271. void Status::SerializeWithCachedSizes(
  272. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const {
  273. // @@protoc_insertion_point(serialize_start:google.rpc.Status)
  274. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  275. (void) cached_has_bits;
  276. // int32 code = 1;
  277. if (this->code() != 0) {
  278. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32(1, this->code(), output);
  279. }
  280. // string message = 2;
  281. if (this->message().size() > 0) {
  282. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  283. this->message().data(), static_cast<int>(this->message().length()),
  284. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  285. "google.rpc.Status.message");
  286. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringMaybeAliased(
  287. 2, this->message(), output);
  288. }
  289. // repeated .google.protobuf.Any details = 3;
  290. for (unsigned int i = 0,
  291. n = static_cast<unsigned int>(this->details_size()); i < n; i++) {
  292. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteMessageMaybeToArray(
  293. 3,
  294. this->details(static_cast<int>(i)),
  295. output);
  296. }
  297. if (_internal_metadata_.have_unknown_fields()) {
  298. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFields(
  299. _internal_metadata_.unknown_fields(), output);
  300. }
  301. // @@protoc_insertion_point(serialize_end:google.rpc.Status)
  302. }
  303. ::PROTOBUF_NAMESPACE_ID::uint8* Status::InternalSerializeWithCachedSizesToArray(
  304. ::PROTOBUF_NAMESPACE_ID::uint8* target) const {
  305. // @@protoc_insertion_point(serialize_to_array_start:google.rpc.Status)
  306. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  307. (void) cached_has_bits;
  308. // int32 code = 1;
  309. if (this->code() != 0) {
  310. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->code(), target);
  311. }
  312. // string message = 2;
  313. if (this->message().size() > 0) {
  314. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String(
  315. this->message().data(), static_cast<int>(this->message().length()),
  316. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE,
  317. "google.rpc.Status.message");
  318. target =
  319. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteStringToArray(
  320. 2, this->message(), target);
  321. }
  322. // repeated .google.protobuf.Any details = 3;
  323. for (unsigned int i = 0,
  324. n = static_cast<unsigned int>(this->details_size()); i < n; i++) {
  325. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
  326. InternalWriteMessageToArray(
  327. 3, this->details(static_cast<int>(i)), target);
  328. }
  329. if (_internal_metadata_.have_unknown_fields()) {
  330. target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SerializeUnknownFieldsToArray(
  331. _internal_metadata_.unknown_fields(), target);
  332. }
  333. // @@protoc_insertion_point(serialize_to_array_end:google.rpc.Status)
  334. return target;
  335. }
  336. size_t Status::ByteSizeLong() const {
  337. // @@protoc_insertion_point(message_byte_size_start:google.rpc.Status)
  338. size_t total_size = 0;
  339. if (_internal_metadata_.have_unknown_fields()) {
  340. total_size +=
  341. ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::ComputeUnknownFieldsSize(
  342. _internal_metadata_.unknown_fields());
  343. }
  344. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  345. // Prevent compiler warnings about cached_has_bits being unused
  346. (void) cached_has_bits;
  347. // repeated .google.protobuf.Any details = 3;
  348. {
  349. unsigned int count = static_cast<unsigned int>(this->details_size());
  350. total_size += 1UL * count;
  351. for (unsigned int i = 0; i < count; i++) {
  352. total_size +=
  353. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
  354. this->details(static_cast<int>(i)));
  355. }
  356. }
  357. // string message = 2;
  358. if (this->message().size() > 0) {
  359. total_size += 1 +
  360. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize(
  361. this->message());
  362. }
  363. // int32 code = 1;
  364. if (this->code() != 0) {
  365. total_size += 1 +
  366. ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
  367. this->code());
  368. }
  369. int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  370. SetCachedSize(cached_size);
  371. return total_size;
  372. }
  373. void Status::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  374. // @@protoc_insertion_point(generalized_merge_from_start:google.rpc.Status)
  375. GOOGLE_DCHECK_NE(&from, this);
  376. const Status* source =
  377. ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<Status>(
  378. &from);
  379. if (source == nullptr) {
  380. // @@protoc_insertion_point(generalized_merge_from_cast_fail:google.rpc.Status)
  381. ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  382. } else {
  383. // @@protoc_insertion_point(generalized_merge_from_cast_success:google.rpc.Status)
  384. MergeFrom(*source);
  385. }
  386. }
  387. void Status::MergeFrom(const Status& from) {
  388. // @@protoc_insertion_point(class_specific_merge_from_start:google.rpc.Status)
  389. GOOGLE_DCHECK_NE(&from, this);
  390. _internal_metadata_.MergeFrom(from._internal_metadata_);
  391. ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  392. (void) cached_has_bits;
  393. details_.MergeFrom(from.details_);
  394. if (from.message().size() > 0) {
  395. message_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.message_);
  396. }
  397. if (from.code() != 0) {
  398. set_code(from.code());
  399. }
  400. }
  401. void Status::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
  402. // @@protoc_insertion_point(generalized_copy_from_start:google.rpc.Status)
  403. if (&from == this) return;
  404. Clear();
  405. MergeFrom(from);
  406. }
  407. void Status::CopyFrom(const Status& from) {
  408. // @@protoc_insertion_point(class_specific_copy_from_start:google.rpc.Status)
  409. if (&from == this) return;
  410. Clear();
  411. MergeFrom(from);
  412. }
  413. bool Status::IsInitialized() const {
  414. return true;
  415. }
  416. void Status::InternalSwap(Status* other) {
  417. using std::swap;
  418. _internal_metadata_.Swap(&other->_internal_metadata_);
  419. CastToBase(&details_)->InternalSwap(CastToBase(&other->details_));
  420. message_.Swap(&other->message_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  421. GetArenaNoVirtual());
  422. swap(code_, other->code_);
  423. }
  424. ::PROTOBUF_NAMESPACE_ID::Metadata Status::GetMetadata() const {
  425. return GetMetadataStatic();
  426. }
  427. // @@protoc_insertion_point(namespace_scope)
  428. } // namespace rpc
  429. } // namespace google
  430. PROTOBUF_NAMESPACE_OPEN
  431. template<> PROTOBUF_NOINLINE ::google::rpc::Status* Arena::CreateMaybeMessage< ::google::rpc::Status >(Arena* arena) {
  432. return Arena::CreateInternal< ::google::rpc::Status >(arena);
  433. }
  434. PROTOBUF_NAMESPACE_CLOSE
  435. // @@protoc_insertion_point(global_scope)
  436. #include <google/protobuf/port_undef.inc>