status.pb.h 11 KB

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