status.pb.go 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203
  1. // Copyright 2022 Google LLC
  2. //
  3. // Licensed under the Apache License, Version 2.0 (the "License");
  4. // you may not use this file except in compliance with the License.
  5. // You may obtain a copy of the License at
  6. //
  7. // http://www.apache.org/licenses/LICENSE-2.0
  8. //
  9. // Unless required by applicable law or agreed to in writing, software
  10. // distributed under the License is distributed on an "AS IS" BASIS,
  11. // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  12. // See the License for the specific language governing permissions and
  13. // limitations under the License.
  14. // Code generated by protoc-gen-go. DO NOT EDIT.
  15. // versions:
  16. // protoc-gen-go v1.26.0
  17. // protoc v3.21.9
  18. // source: google/rpc/status.proto
  19. package status
  20. import (
  21. reflect "reflect"
  22. sync "sync"
  23. protoreflect "google.golang.org/protobuf/reflect/protoreflect"
  24. protoimpl "google.golang.org/protobuf/runtime/protoimpl"
  25. anypb "google.golang.org/protobuf/types/known/anypb"
  26. )
  27. const (
  28. // Verify that this generated code is sufficiently up-to-date.
  29. _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
  30. // Verify that runtime/protoimpl is sufficiently up-to-date.
  31. _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
  32. )
  33. // The `Status` type defines a logical error model that is suitable for
  34. // different programming environments, including REST APIs and RPC APIs. It is
  35. // used by [gRPC](https://github.com/grpc). Each `Status` message contains
  36. // three pieces of data: error code, error message, and error details.
  37. //
  38. // You can find out more about this error model and how to work with it in the
  39. // [API Design Guide](https://cloud.google.com/apis/design/errors).
  40. type Status struct {
  41. state protoimpl.MessageState
  42. sizeCache protoimpl.SizeCache
  43. unknownFields protoimpl.UnknownFields
  44. // The status code, which should be an enum value of
  45. // [google.rpc.Code][google.rpc.Code].
  46. Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  47. // A developer-facing error message, which should be in English. Any
  48. // user-facing error message should be localized and sent in the
  49. // [google.rpc.Status.details][google.rpc.Status.details] field, or localized
  50. // by the client.
  51. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
  52. // A list of messages that carry the error details. There is a common set of
  53. // message types for APIs to use.
  54. Details []*anypb.Any `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty"`
  55. }
  56. func (x *Status) Reset() {
  57. *x = Status{}
  58. if protoimpl.UnsafeEnabled {
  59. mi := &file_google_rpc_status_proto_msgTypes[0]
  60. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  61. ms.StoreMessageInfo(mi)
  62. }
  63. }
  64. func (x *Status) String() string {
  65. return protoimpl.X.MessageStringOf(x)
  66. }
  67. func (*Status) ProtoMessage() {}
  68. func (x *Status) ProtoReflect() protoreflect.Message {
  69. mi := &file_google_rpc_status_proto_msgTypes[0]
  70. if protoimpl.UnsafeEnabled && x != nil {
  71. ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
  72. if ms.LoadMessageInfo() == nil {
  73. ms.StoreMessageInfo(mi)
  74. }
  75. return ms
  76. }
  77. return mi.MessageOf(x)
  78. }
  79. // Deprecated: Use Status.ProtoReflect.Descriptor instead.
  80. func (*Status) Descriptor() ([]byte, []int) {
  81. return file_google_rpc_status_proto_rawDescGZIP(), []int{0}
  82. }
  83. func (x *Status) GetCode() int32 {
  84. if x != nil {
  85. return x.Code
  86. }
  87. return 0
  88. }
  89. func (x *Status) GetMessage() string {
  90. if x != nil {
  91. return x.Message
  92. }
  93. return ""
  94. }
  95. func (x *Status) GetDetails() []*anypb.Any {
  96. if x != nil {
  97. return x.Details
  98. }
  99. return nil
  100. }
  101. var File_google_rpc_status_proto protoreflect.FileDescriptor
  102. var file_google_rpc_status_proto_rawDesc = []byte{
  103. 0x0a, 0x17, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61,
  104. 0x74, 0x75, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
  105. 0x65, 0x2e, 0x72, 0x70, 0x63, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72,
  106. 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f,
  107. 0x22, 0x66, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x6f,
  108. 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x18,
  109. 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
  110. 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x2e, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61,
  111. 0x69, 0x6c, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
  112. 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52,
  113. 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x61, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e,
  114. 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x42, 0x0b, 0x53, 0x74, 0x61, 0x74,
  115. 0x75, 0x73, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x37, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
  116. 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67, 0x65, 0x6e,
  117. 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73,
  118. 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x3b, 0x73, 0x74, 0x61, 0x74,
  119. 0x75, 0x73, 0xf8, 0x01, 0x01, 0xa2, 0x02, 0x03, 0x52, 0x50, 0x43, 0x62, 0x06, 0x70, 0x72, 0x6f,
  120. 0x74, 0x6f, 0x33,
  121. }
  122. var (
  123. file_google_rpc_status_proto_rawDescOnce sync.Once
  124. file_google_rpc_status_proto_rawDescData = file_google_rpc_status_proto_rawDesc
  125. )
  126. func file_google_rpc_status_proto_rawDescGZIP() []byte {
  127. file_google_rpc_status_proto_rawDescOnce.Do(func() {
  128. file_google_rpc_status_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_rpc_status_proto_rawDescData)
  129. })
  130. return file_google_rpc_status_proto_rawDescData
  131. }
  132. var file_google_rpc_status_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
  133. var file_google_rpc_status_proto_goTypes = []interface{}{
  134. (*Status)(nil), // 0: google.rpc.Status
  135. (*anypb.Any)(nil), // 1: google.protobuf.Any
  136. }
  137. var file_google_rpc_status_proto_depIdxs = []int32{
  138. 1, // 0: google.rpc.Status.details:type_name -> google.protobuf.Any
  139. 1, // [1:1] is the sub-list for method output_type
  140. 1, // [1:1] is the sub-list for method input_type
  141. 1, // [1:1] is the sub-list for extension type_name
  142. 1, // [1:1] is the sub-list for extension extendee
  143. 0, // [0:1] is the sub-list for field type_name
  144. }
  145. func init() { file_google_rpc_status_proto_init() }
  146. func file_google_rpc_status_proto_init() {
  147. if File_google_rpc_status_proto != nil {
  148. return
  149. }
  150. if !protoimpl.UnsafeEnabled {
  151. file_google_rpc_status_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
  152. switch v := v.(*Status); i {
  153. case 0:
  154. return &v.state
  155. case 1:
  156. return &v.sizeCache
  157. case 2:
  158. return &v.unknownFields
  159. default:
  160. return nil
  161. }
  162. }
  163. }
  164. type x struct{}
  165. out := protoimpl.TypeBuilder{
  166. File: protoimpl.DescBuilder{
  167. GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
  168. RawDescriptor: file_google_rpc_status_proto_rawDesc,
  169. NumEnums: 0,
  170. NumMessages: 1,
  171. NumExtensions: 0,
  172. NumServices: 0,
  173. },
  174. GoTypes: file_google_rpc_status_proto_goTypes,
  175. DependencyIndexes: file_google_rpc_status_proto_depIdxs,
  176. MessageInfos: file_google_rpc_status_proto_msgTypes,
  177. }.Build()
  178. File_google_rpc_status_proto = out.File
  179. file_google_rpc_status_proto_rawDesc = nil
  180. file_google_rpc_status_proto_goTypes = nil
  181. file_google_rpc_status_proto_depIdxs = nil
  182. }