status.pb.go 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163
  1. // Code generated by protoc-gen-go. DO NOT EDIT.
  2. // source: google/rpc/status.proto
  3. package status
  4. import (
  5. fmt "fmt"
  6. math "math"
  7. proto "github.com/golang/protobuf/proto"
  8. any "github.com/golang/protobuf/ptypes/any"
  9. )
  10. // Reference imports to suppress errors if they are not otherwise used.
  11. var _ = proto.Marshal
  12. var _ = fmt.Errorf
  13. var _ = math.Inf
  14. // This is a compile-time assertion to ensure that this generated file
  15. // is compatible with the proto package it is being compiled against.
  16. // A compilation error at this line likely means your copy of the
  17. // proto package needs to be updated.
  18. const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
  19. // The `Status` type defines a logical error model that is suitable for
  20. // different programming environments, including REST APIs and RPC APIs. It is
  21. // used by [gRPC](https://github.com/grpc). The error model is designed to be:
  22. //
  23. // - Simple to use and understand for most users
  24. // - Flexible enough to meet unexpected needs
  25. //
  26. // # Overview
  27. //
  28. // The `Status` message contains three pieces of data: error code, error
  29. // message, and error details. The error code should be an enum value of
  30. // [google.rpc.Code][google.rpc.Code], but it may accept additional error codes
  31. // if needed. The error message should be a developer-facing English message
  32. // that helps developers *understand* and *resolve* the error. If a localized
  33. // user-facing error message is needed, put the localized message in the error
  34. // details or localize it in the client. The optional error details may contain
  35. // arbitrary information about the error. There is a predefined set of error
  36. // detail types in the package `google.rpc` that can be used for common error
  37. // conditions.
  38. //
  39. // # Language mapping
  40. //
  41. // The `Status` message is the logical representation of the error model, but it
  42. // is not necessarily the actual wire format. When the `Status` message is
  43. // exposed in different client libraries and different wire protocols, it can be
  44. // mapped differently. For example, it will likely be mapped to some exceptions
  45. // in Java, but more likely mapped to some error codes in C.
  46. //
  47. // # Other uses
  48. //
  49. // The error model and the `Status` message can be used in a variety of
  50. // environments, either with or without APIs, to provide a
  51. // consistent developer experience across different environments.
  52. //
  53. // Example uses of this error model include:
  54. //
  55. // - Partial errors. If a service needs to return partial errors to the client,
  56. // it may embed the `Status` in the normal response to indicate the partial
  57. // errors.
  58. //
  59. // - Workflow errors. A typical workflow has multiple steps. Each step may
  60. // have a `Status` message for error reporting.
  61. //
  62. // - Batch operations. If a client uses batch request and batch response, the
  63. // `Status` message should be used directly inside batch response, one for
  64. // each error sub-response.
  65. //
  66. // - Asynchronous operations. If an API call embeds asynchronous operation
  67. // results in its response, the status of those operations should be
  68. // represented directly using the `Status` message.
  69. //
  70. // - Logging. If some API errors are stored in logs, the message `Status` could
  71. // be used directly after any stripping needed for security/privacy reasons.
  72. type Status struct {
  73. // The status code, which should be an enum value of
  74. // [google.rpc.Code][google.rpc.Code].
  75. Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
  76. // A developer-facing error message, which should be in English. Any
  77. // user-facing error message should be localized and sent in the
  78. // [google.rpc.Status.details][google.rpc.Status.details] field, or localized
  79. // by the client.
  80. Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
  81. // A list of messages that carry the error details. There is a common set of
  82. // message types for APIs to use.
  83. Details []*any.Any `protobuf:"bytes,3,rep,name=details,proto3" json:"details,omitempty"`
  84. XXX_NoUnkeyedLiteral struct{} `json:"-"`
  85. XXX_unrecognized []byte `json:"-"`
  86. XXX_sizecache int32 `json:"-"`
  87. }
  88. func (m *Status) Reset() { *m = Status{} }
  89. func (m *Status) String() string { return proto.CompactTextString(m) }
  90. func (*Status) ProtoMessage() {}
  91. func (*Status) Descriptor() ([]byte, []int) {
  92. return fileDescriptor_24d244abaf643bfe, []int{0}
  93. }
  94. func (m *Status) XXX_Unmarshal(b []byte) error {
  95. return xxx_messageInfo_Status.Unmarshal(m, b)
  96. }
  97. func (m *Status) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
  98. return xxx_messageInfo_Status.Marshal(b, m, deterministic)
  99. }
  100. func (m *Status) XXX_Merge(src proto.Message) {
  101. xxx_messageInfo_Status.Merge(m, src)
  102. }
  103. func (m *Status) XXX_Size() int {
  104. return xxx_messageInfo_Status.Size(m)
  105. }
  106. func (m *Status) XXX_DiscardUnknown() {
  107. xxx_messageInfo_Status.DiscardUnknown(m)
  108. }
  109. var xxx_messageInfo_Status proto.InternalMessageInfo
  110. func (m *Status) GetCode() int32 {
  111. if m != nil {
  112. return m.Code
  113. }
  114. return 0
  115. }
  116. func (m *Status) GetMessage() string {
  117. if m != nil {
  118. return m.Message
  119. }
  120. return ""
  121. }
  122. func (m *Status) GetDetails() []*any.Any {
  123. if m != nil {
  124. return m.Details
  125. }
  126. return nil
  127. }
  128. func init() {
  129. proto.RegisterType((*Status)(nil), "google.rpc.Status")
  130. }
  131. func init() { proto.RegisterFile("google/rpc/status.proto", fileDescriptor_24d244abaf643bfe) }
  132. var fileDescriptor_24d244abaf643bfe = []byte{
  133. // 209 bytes of a gzipped FileDescriptorProto
  134. 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x12, 0x4f, 0xcf, 0xcf, 0x4f,
  135. 0xcf, 0x49, 0xd5, 0x2f, 0x2a, 0x48, 0xd6, 0x2f, 0x2e, 0x49, 0x2c, 0x29, 0x2d, 0xd6, 0x2b, 0x28,
  136. 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x82, 0x48, 0xe8, 0x15, 0x15, 0x24, 0x4b, 0x49, 0x42, 0x15, 0x81,
  137. 0x65, 0x92, 0x4a, 0xd3, 0xf4, 0x13, 0xf3, 0x2a, 0x21, 0xca, 0x94, 0xd2, 0xb8, 0xd8, 0x82, 0xc1,
  138. 0xda, 0x84, 0x84, 0xb8, 0x58, 0x92, 0xf3, 0x53, 0x52, 0x25, 0x18, 0x15, 0x18, 0x35, 0x58, 0x83,
  139. 0xc0, 0x6c, 0x21, 0x09, 0x2e, 0xf6, 0xdc, 0xd4, 0xe2, 0xe2, 0xc4, 0xf4, 0x54, 0x09, 0x26, 0x05,
  140. 0x46, 0x0d, 0xce, 0x20, 0x18, 0x57, 0x48, 0x8f, 0x8b, 0x3d, 0x25, 0xb5, 0x24, 0x31, 0x33, 0xa7,
  141. 0x58, 0x82, 0x59, 0x81, 0x59, 0x83, 0xdb, 0x48, 0x44, 0x0f, 0x6a, 0x21, 0xcc, 0x12, 0x3d, 0xc7,
  142. 0xbc, 0xca, 0x20, 0x98, 0x22, 0xa7, 0x38, 0x2e, 0xbe, 0xe4, 0xfc, 0x5c, 0x3d, 0x84, 0xa3, 0x9c,
  143. 0xb8, 0x21, 0xf6, 0x06, 0x80, 0x94, 0x07, 0x30, 0x46, 0x99, 0x43, 0xa5, 0xd2, 0xf3, 0x73, 0x12,
  144. 0xf3, 0xd2, 0xf5, 0xf2, 0x8b, 0xd2, 0xf5, 0xd3, 0x53, 0xf3, 0xc0, 0x86, 0xe9, 0x43, 0xa4, 0x12,
  145. 0x0b, 0x32, 0x8b, 0x91, 0xfc, 0x69, 0x0d, 0xa1, 0x16, 0x31, 0x31, 0x07, 0x05, 0x38, 0x27, 0xb1,
  146. 0x81, 0x55, 0x1a, 0x03, 0x02, 0x00, 0x00, 0xff, 0xff, 0xa4, 0x53, 0xf0, 0x7c, 0x10, 0x01, 0x00,
  147. 0x00,
  148. }