status.pb.h 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359
  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. #ifndef GOOGLE_PROTOBUF_INCLUDED_google_2frpc_2fstatus_2eproto
  19. #define GOOGLE_PROTOBUF_INCLUDED_google_2frpc_2fstatus_2eproto
  20. #include <limits>
  21. #include <string>
  22. #include <google/protobuf/port_def.inc>
  23. #if PROTOBUF_VERSION < 3009000
  24. #error This file was generated by a newer version of protoc which is
  25. #error incompatible with your Protocol Buffer headers. Please update
  26. #error your headers.
  27. #endif
  28. #if 3009002 < PROTOBUF_MIN_PROTOC_VERSION
  29. #error This file was generated by an older version of protoc which is
  30. #error incompatible with your Protocol Buffer headers. Please
  31. #error regenerate this file with a newer version of protoc.
  32. #endif
  33. #include <google/protobuf/port_undef.inc>
  34. #include <google/protobuf/io/coded_stream.h>
  35. #include <google/protobuf/arena.h>
  36. #include <google/protobuf/arenastring.h>
  37. #include <google/protobuf/generated_message_table_driven.h>
  38. #include <google/protobuf/generated_message_util.h>
  39. #include <google/protobuf/inlined_string_field.h>
  40. #include <google/protobuf/metadata.h>
  41. #include <google/protobuf/generated_message_reflection.h>
  42. #include <google/protobuf/message.h>
  43. #include <google/protobuf/repeated_field.h> // IWYU pragma: export
  44. #include <google/protobuf/extension_set.h> // IWYU pragma: export
  45. #include <google/protobuf/unknown_field_set.h>
  46. #include <google/protobuf/any.pb.h>
  47. // @@protoc_insertion_point(includes)
  48. #include <google/protobuf/port_def.inc>
  49. #define PROTOBUF_INTERNAL_EXPORT_google_2frpc_2fstatus_2eproto
  50. PROTOBUF_NAMESPACE_OPEN
  51. namespace internal {
  52. class AnyMetadata;
  53. } // namespace internal
  54. PROTOBUF_NAMESPACE_CLOSE
  55. // Internal implementation detail -- do not use these members.
  56. struct TableStruct_google_2frpc_2fstatus_2eproto {
  57. static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[]
  58. PROTOBUF_SECTION_VARIABLE(protodesc_cold);
  59. static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[]
  60. PROTOBUF_SECTION_VARIABLE(protodesc_cold);
  61. static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[1]
  62. PROTOBUF_SECTION_VARIABLE(protodesc_cold);
  63. static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[];
  64. static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[];
  65. static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[];
  66. };
  67. extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_google_2frpc_2fstatus_2eproto;
  68. namespace google {
  69. namespace rpc {
  70. class Status;
  71. class StatusDefaultTypeInternal;
  72. extern StatusDefaultTypeInternal _Status_default_instance_;
  73. } // namespace rpc
  74. } // namespace google
  75. PROTOBUF_NAMESPACE_OPEN
  76. template<> ::google::rpc::Status* Arena::CreateMaybeMessage<::google::rpc::Status>(Arena*);
  77. PROTOBUF_NAMESPACE_CLOSE
  78. namespace google {
  79. namespace rpc {
  80. // ===================================================================
  81. class Status :
  82. public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:google.rpc.Status) */ {
  83. public:
  84. Status();
  85. virtual ~Status();
  86. Status(const Status& from);
  87. Status(Status&& from) noexcept
  88. : Status() {
  89. *this = ::std::move(from);
  90. }
  91. inline Status& operator=(const Status& from) {
  92. CopyFrom(from);
  93. return *this;
  94. }
  95. inline Status& operator=(Status&& from) noexcept {
  96. if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) {
  97. if (this != &from) InternalSwap(&from);
  98. } else {
  99. CopyFrom(from);
  100. }
  101. return *this;
  102. }
  103. static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() {
  104. return GetDescriptor();
  105. }
  106. static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() {
  107. return GetMetadataStatic().descriptor;
  108. }
  109. static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() {
  110. return GetMetadataStatic().reflection;
  111. }
  112. static const Status& default_instance();
  113. static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY
  114. static inline const Status* internal_default_instance() {
  115. return reinterpret_cast<const Status*>(
  116. &_Status_default_instance_);
  117. }
  118. static constexpr int kIndexInFileMessages =
  119. 0;
  120. friend void swap(Status& a, Status& b) {
  121. a.Swap(&b);
  122. }
  123. inline void Swap(Status* other) {
  124. if (other == this) return;
  125. InternalSwap(other);
  126. }
  127. // implements Message ----------------------------------------------
  128. inline Status* New() const final {
  129. return CreateMaybeMessage<Status>(nullptr);
  130. }
  131. Status* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final {
  132. return CreateMaybeMessage<Status>(arena);
  133. }
  134. void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  135. void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final;
  136. void CopyFrom(const Status& from);
  137. void MergeFrom(const Status& from);
  138. PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final;
  139. bool IsInitialized() const final;
  140. size_t ByteSizeLong() const final;
  141. #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  142. const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final;
  143. #else
  144. bool MergePartialFromCodedStream(
  145. ::PROTOBUF_NAMESPACE_ID::io::CodedInputStream* input) final;
  146. #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER
  147. void SerializeWithCachedSizes(
  148. ::PROTOBUF_NAMESPACE_ID::io::CodedOutputStream* output) const final;
  149. ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray(
  150. ::PROTOBUF_NAMESPACE_ID::uint8* target) const final;
  151. int GetCachedSize() const final { return _cached_size_.Get(); }
  152. private:
  153. inline void SharedCtor();
  154. inline void SharedDtor();
  155. void SetCachedSize(int size) const final;
  156. void InternalSwap(Status* other);
  157. friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata;
  158. static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() {
  159. return "google.rpc.Status";
  160. }
  161. private:
  162. inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const {
  163. return nullptr;
  164. }
  165. inline void* MaybeArenaPtr() const {
  166. return nullptr;
  167. }
  168. public:
  169. ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final;
  170. private:
  171. static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() {
  172. ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_google_2frpc_2fstatus_2eproto);
  173. return ::descriptor_table_google_2frpc_2fstatus_2eproto.file_level_metadata[kIndexInFileMessages];
  174. }
  175. public:
  176. // nested types ----------------------------------------------------
  177. // accessors -------------------------------------------------------
  178. enum : int {
  179. kDetailsFieldNumber = 3,
  180. kMessageFieldNumber = 2,
  181. kCodeFieldNumber = 1,
  182. };
  183. // repeated .google.protobuf.Any details = 3;
  184. int details_size() const;
  185. void clear_details();
  186. PROTOBUF_NAMESPACE_ID::Any* mutable_details(int index);
  187. ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Any >*
  188. mutable_details();
  189. const PROTOBUF_NAMESPACE_ID::Any& details(int index) const;
  190. PROTOBUF_NAMESPACE_ID::Any* add_details();
  191. const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Any >&
  192. details() const;
  193. // string message = 2;
  194. void clear_message();
  195. const std::string& message() const;
  196. void set_message(const std::string& value);
  197. void set_message(std::string&& value);
  198. void set_message(const char* value);
  199. void set_message(const char* value, size_t size);
  200. std::string* mutable_message();
  201. std::string* release_message();
  202. void set_allocated_message(std::string* message);
  203. // int32 code = 1;
  204. void clear_code();
  205. ::PROTOBUF_NAMESPACE_ID::int32 code() const;
  206. void set_code(::PROTOBUF_NAMESPACE_ID::int32 value);
  207. // @@protoc_insertion_point(class_scope:google.rpc.Status)
  208. private:
  209. class _Internal;
  210. ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_;
  211. ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Any > details_;
  212. ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr message_;
  213. ::PROTOBUF_NAMESPACE_ID::int32 code_;
  214. mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_;
  215. friend struct ::TableStruct_google_2frpc_2fstatus_2eproto;
  216. };
  217. // ===================================================================
  218. // ===================================================================
  219. #ifdef __GNUC__
  220. #pragma GCC diagnostic push
  221. #pragma GCC diagnostic ignored "-Wstrict-aliasing"
  222. #endif // __GNUC__
  223. // Status
  224. // int32 code = 1;
  225. inline void Status::clear_code() {
  226. code_ = 0;
  227. }
  228. inline ::PROTOBUF_NAMESPACE_ID::int32 Status::code() const {
  229. // @@protoc_insertion_point(field_get:google.rpc.Status.code)
  230. return code_;
  231. }
  232. inline void Status::set_code(::PROTOBUF_NAMESPACE_ID::int32 value) {
  233. code_ = value;
  234. // @@protoc_insertion_point(field_set:google.rpc.Status.code)
  235. }
  236. // string message = 2;
  237. inline void Status::clear_message() {
  238. message_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  239. }
  240. inline const std::string& Status::message() const {
  241. // @@protoc_insertion_point(field_get:google.rpc.Status.message)
  242. return message_.GetNoArena();
  243. }
  244. inline void Status::set_message(const std::string& value) {
  245. message_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value);
  246. // @@protoc_insertion_point(field_set:google.rpc.Status.message)
  247. }
  248. inline void Status::set_message(std::string&& value) {
  249. message_.SetNoArena(
  250. &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value));
  251. // @@protoc_insertion_point(field_set_rvalue:google.rpc.Status.message)
  252. }
  253. inline void Status::set_message(const char* value) {
  254. GOOGLE_DCHECK(value != nullptr);
  255. message_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value));
  256. // @@protoc_insertion_point(field_set_char:google.rpc.Status.message)
  257. }
  258. inline void Status::set_message(const char* value, size_t size) {
  259. message_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(),
  260. ::std::string(reinterpret_cast<const char*>(value), size));
  261. // @@protoc_insertion_point(field_set_pointer:google.rpc.Status.message)
  262. }
  263. inline std::string* Status::mutable_message() {
  264. // @@protoc_insertion_point(field_mutable:google.rpc.Status.message)
  265. return message_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  266. }
  267. inline std::string* Status::release_message() {
  268. // @@protoc_insertion_point(field_release:google.rpc.Status.message)
  269. return message_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited());
  270. }
  271. inline void Status::set_allocated_message(std::string* message) {
  272. if (message != nullptr) {
  273. } else {
  274. }
  275. message_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), message);
  276. // @@protoc_insertion_point(field_set_allocated:google.rpc.Status.message)
  277. }
  278. // repeated .google.protobuf.Any details = 3;
  279. inline int Status::details_size() const {
  280. return details_.size();
  281. }
  282. inline PROTOBUF_NAMESPACE_ID::Any* Status::mutable_details(int index) {
  283. // @@protoc_insertion_point(field_mutable:google.rpc.Status.details)
  284. return details_.Mutable(index);
  285. }
  286. inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Any >*
  287. Status::mutable_details() {
  288. // @@protoc_insertion_point(field_mutable_list:google.rpc.Status.details)
  289. return &details_;
  290. }
  291. inline const PROTOBUF_NAMESPACE_ID::Any& Status::details(int index) const {
  292. // @@protoc_insertion_point(field_get:google.rpc.Status.details)
  293. return details_.Get(index);
  294. }
  295. inline PROTOBUF_NAMESPACE_ID::Any* Status::add_details() {
  296. // @@protoc_insertion_point(field_add:google.rpc.Status.details)
  297. return details_.Add();
  298. }
  299. inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< PROTOBUF_NAMESPACE_ID::Any >&
  300. Status::details() const {
  301. // @@protoc_insertion_point(field_list:google.rpc.Status.details)
  302. return details_;
  303. }
  304. #ifdef __GNUC__
  305. #pragma GCC diagnostic pop
  306. #endif // __GNUC__
  307. // @@protoc_insertion_point(namespace_scope)
  308. } // namespace rpc
  309. } // namespace google
  310. // @@protoc_insertion_point(global_scope)
  311. #include <google/protobuf/port_undef.inc>
  312. #endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_google_2frpc_2fstatus_2eproto