Debian Codegraph @

v2/apierror/internal/proto/error.pb.go

raw
1 // Copyright 2021 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
15 // Code generated by protoc-gen-go. DO NOT EDIT.
16 // versions:
17 // protoc-gen-go v1.28.0
18 // protoc v3.15.8
19 // source: apierror/internal/proto/error.proto
20
21 package jsonerror
22
23 import (
24 reflect "reflect"
25 sync "sync"
26
27 code "google.golang.org/genproto/googleapis/rpc/code"
28 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
29 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
30 anypb "google.golang.org/protobuf/types/known/anypb"
31 )
32
33 const (
34 // Verify that this generated code is sufficiently up-to-date.
35 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
36 // Verify that runtime/protoimpl is sufficiently up-to-date.
37 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
38 )
39
40 // The error format v2 for Google JSON REST APIs.
41 // Copied from https://cloud.google.com/apis/design/errors#http_mapping.
42 //
43 // NOTE: This schema is not used for other wire protocols.
44 type Error struct {
45 state protoimpl.MessageState
46 sizeCache protoimpl.SizeCache
47 unknownFields protoimpl.UnknownFields
48
49 // The actual error payload. The nested message structure is for backward
50 // compatibility with Google API client libraries. It also makes the error
51 // more readable to developers.
52 Error *Error_Status `protobuf:"bytes,1,opt,name=error,proto3" json:"error,omitempty"`
53 }
54
55 func (x *Error) Reset() {
56 *x = Error{}
57 if protoimpl.UnsafeEnabled {
58 mi := &file_apierror_internal_proto_error_proto_msgTypes[0]
59 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
60 ms.StoreMessageInfo(mi)
61 }
62 }
63
64 func (x *Error) String() string {
65 return protoimpl.X.MessageStringOf(x)
66 }
67
68 func (*Error) ProtoMessage() {}
69
70 func (x *Error) ProtoReflect() protoreflect.Message {
71 mi := &file_apierror_internal_proto_error_proto_msgTypes[0]
72 if protoimpl.UnsafeEnabled && x != nil {
73 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
74 if ms.LoadMessageInfo() == nil {
75 ms.StoreMessageInfo(mi)
76 }
77 return ms
78 }
79 return mi.MessageOf(x)
80 }
81
82 // Deprecated: Use Error.ProtoReflect.Descriptor instead.
83 func (*Error) Descriptor() ([]byte, []int) {
84 return file_apierror_internal_proto_error_proto_rawDescGZIP(), []int{0}
85 }
86
87 func (x *Error) GetError() *Error_Status {
88 if x != nil {
89 return x.Error
90 }
91 return nil
92 }
93
94 // This message has the same semantics as `google.rpc.Status`. It uses HTTP
95 // status code instead of gRPC status code. It has an extra field `status`
96 // for backward compatibility with Google API Client Libraries.
97 type Error_Status struct {
98 state protoimpl.MessageState
99 sizeCache protoimpl.SizeCache
100 unknownFields protoimpl.UnknownFields
101
102 // The HTTP status code that corresponds to `google.rpc.Status.code`.
103 Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
104 // This corresponds to `google.rpc.Status.message`.
105 Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
106 // This is the enum version for `google.rpc.Status.code`.
107 Status code.Code `protobuf:"varint,4,opt,name=status,proto3,enum=google.rpc.Code" json:"status,omitempty"`
108 // This corresponds to `google.rpc.Status.details`.
109 Details []*anypb.Any `protobuf:"bytes,5,rep,name=details,proto3" json:"details,omitempty"`
110 }
111
112 func (x *Error_Status) Reset() {
113 *x = Error_Status{}
114 if protoimpl.UnsafeEnabled {
115 mi := &file_apierror_internal_proto_error_proto_msgTypes[1]
116 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
117 ms.StoreMessageInfo(mi)
118 }
119 }
120
121 func (x *Error_Status) String() string {
122 return protoimpl.X.MessageStringOf(x)
123 }
124
125 func (*Error_Status) ProtoMessage() {}
126
127 func (x *Error_Status) ProtoReflect() protoreflect.Message {
128 mi := &file_apierror_internal_proto_error_proto_msgTypes[1]
129 if protoimpl.UnsafeEnabled && x != nil {
130 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
131 if ms.LoadMessageInfo() == nil {
132 ms.StoreMessageInfo(mi)
133 }
134 return ms
135 }
136 return mi.MessageOf(x)
137 }
138
139 // Deprecated: Use Error_Status.ProtoReflect.Descriptor instead.
140 func (*Error_Status) Descriptor() ([]byte, []int) {
141 return file_apierror_internal_proto_error_proto_rawDescGZIP(), []int{0, 0}
142 }
143
144 func (x *Error_Status) GetCode() int32 {
145 if x != nil {
146 return x.Code
147 }
148 return 0
149 }
150
151 func (x *Error_Status) GetMessage() string {
152 if x != nil {
153 return x.Message
154 }
155 return ""
156 }
157
158 func (x *Error_Status) GetStatus() code.Code {
159 if x != nil {
160 return x.Status
161 }
162 return code.Code(0)
163 }
164
165 func (x *Error_Status) GetDetails() []*anypb.Any {
166 if x != nil {
167 return x.Details
168 }
169 return nil
170 }
171
172 var File_apierror_internal_proto_error_proto protoreflect.FileDescriptor
173
174 var file_apierror_internal_proto_error_proto_rawDesc = []byte{
175 0x0a, 0x23, 0x61, 0x70, 0x69, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72,
176 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e,
177 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x1a, 0x19, 0x67, 0x6f,
178 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e,
179 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
180 0x72, 0x70, 0x63, 0x2f, 0x63, 0x6f, 0x64, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xc5,
181 0x01, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x29, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f,
182 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x2e,
183 0x45, 0x72, 0x72, 0x6f, 0x72, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x05, 0x65, 0x72,
184 0x72, 0x6f, 0x72, 0x1a, 0x90, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x12,
185 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x05, 0x52, 0x04, 0x63, 0x6f,
186 0x64, 0x65, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x02, 0x20,
187 0x01, 0x28, 0x09, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x28, 0x0a, 0x06,
188 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x10, 0x2e, 0x67,
189 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x06,
190 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x2e, 0x0a, 0x07, 0x64, 0x65, 0x74, 0x61, 0x69, 0x6c,
191 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
192 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, 0x07, 0x64,
193 0x65, 0x74, 0x61, 0x69, 0x6c, 0x73, 0x42, 0x43, 0x5a, 0x41, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62,
194 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f,
195 0x67, 0x61, 0x78, 0x2d, 0x67, 0x6f, 0x2f, 0x76, 0x32, 0x2f, 0x61, 0x70, 0x69, 0x65, 0x72, 0x72,
196 0x6f, 0x72, 0x2f, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x70, 0x72, 0x6f, 0x74,
197 0x6f, 0x3b, 0x6a, 0x73, 0x6f, 0x6e, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f,
198 0x74, 0x6f, 0x33,
199 }
200
201 var (
202 file_apierror_internal_proto_error_proto_rawDescOnce sync.Once
203 file_apierror_internal_proto_error_proto_rawDescData = file_apierror_internal_proto_error_proto_rawDesc
204 )
205
206 func file_apierror_internal_proto_error_proto_rawDescGZIP() []byte {
207 file_apierror_internal_proto_error_proto_rawDescOnce.Do(func() {
208 file_apierror_internal_proto_error_proto_rawDescData = protoimpl.X.CompressGZIP(file_apierror_internal_proto_error_proto_rawDescData)
209 })
210 return file_apierror_internal_proto_error_proto_rawDescData
211 }
212
213 var file_apierror_internal_proto_error_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
214 var file_apierror_internal_proto_error_proto_goTypes = []interface{}{
215 (*Error)(nil), // 0: error.Error
216 (*Error_Status)(nil), // 1: error.Error.Status
217 (code.Code)(0), // 2: google.rpc.Code
218 (*anypb.Any)(nil), // 3: google.protobuf.Any
219 }
220 var file_apierror_internal_proto_error_proto_depIdxs = []int32{
221 1, // 0: error.Error.error:type_name -> error.Error.Status
222 2, // 1: error.Error.Status.status:type_name -> google.rpc.Code
223 3, // 2: error.Error.Status.details:type_name -> google.protobuf.Any
224 3, // [3:3] is the sub-list for method output_type
225 3, // [3:3] is the sub-list for method input_type
226 3, // [3:3] is the sub-list for extension type_name
227 3, // [3:3] is the sub-list for extension extendee
228 0, // [0:3] is the sub-list for field type_name
229 }
230
231 func init() { file_apierror_internal_proto_error_proto_init() }
232 func file_apierror_internal_proto_error_proto_init() {
233 if File_apierror_internal_proto_error_proto != nil {
234 return
235 }
236 if !protoimpl.UnsafeEnabled {
237 file_apierror_internal_proto_error_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
238 switch v := v.(*Error); i {
239 case 0:
240 return &v.state
241 case 1:
242 return &v.sizeCache
243 case 2:
244 return &v.unknownFields
245 default:
246 return nil
247 }
248 }
249 file_apierror_internal_proto_error_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
250 switch v := v.(*Error_Status); i {
251 case 0:
252 return &v.state
253 case 1:
254 return &v.sizeCache
255 case 2:
256 return &v.unknownFields
257 default:
258 return nil
259 }
260 }
261 }
262 type x struct{}
263 out := protoimpl.TypeBuilder{
264 File: protoimpl.DescBuilder{
265 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
266 RawDescriptor: file_apierror_internal_proto_error_proto_rawDesc,
267 NumEnums: 0,
268 NumMessages: 2,
269 NumExtensions: 0,
270 NumServices: 0,
271 },
272 GoTypes: file_apierror_internal_proto_error_proto_goTypes,
273 DependencyIndexes: file_apierror_internal_proto_error_proto_depIdxs,
274 MessageInfos: file_apierror_internal_proto_error_proto_msgTypes,
275 }.Build()
276 File_apierror_internal_proto_error_proto = out.File
277 file_apierror_internal_proto_error_proto_rawDesc = nil
278 file_apierror_internal_proto_error_proto_goTypes = nil
279 file_apierror_internal_proto_error_proto_depIdxs = nil
280 }