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