1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21 package http
22
23 import (
24 reflect "reflect"
25 sync "sync"
26
27 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
28 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
29 )
30
31 const (
32
33 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
34
35 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
36 )
37
38
39 type HttpRequest struct {
40 state protoimpl.MessageState
41 sizeCache protoimpl.SizeCache
42 unknownFields protoimpl.UnknownFields
43
44
45 Method string `protobuf:"bytes,1,opt,name=method,proto3" json:"method,omitempty"`
46
47 Uri string `protobuf:"bytes,2,opt,name=uri,proto3" json:"uri,omitempty"`
48
49
50 Headers []*HttpHeader `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"`
51
52 Body []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
53 }
54
55 func (x *HttpRequest) Reset() {
56 *x = HttpRequest{}
57 if protoimpl.UnsafeEnabled {
58 mi := &file_google_rpc_http_proto_msgTypes[0]
59 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
60 ms.StoreMessageInfo(mi)
61 }
62 }
63
64 func (x *HttpRequest) String() string {
65 return protoimpl.X.MessageStringOf(x)
66 }
67
68 func (*HttpRequest) ProtoMessage() {}
69
70 func (x *HttpRequest) ProtoReflect() protoreflect.Message {
71 mi := &file_google_rpc_http_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
83 func (*HttpRequest) Descriptor() ([]byte, []int) {
84 return file_google_rpc_http_proto_rawDescGZIP(), []int{0}
85 }
86
87 func (x *HttpRequest) GetMethod() string {
88 if x != nil {
89 return x.Method
90 }
91 return ""
92 }
93
94 func (x *HttpRequest) GetUri() string {
95 if x != nil {
96 return x.Uri
97 }
98 return ""
99 }
100
101 func (x *HttpRequest) GetHeaders() []*HttpHeader {
102 if x != nil {
103 return x.Headers
104 }
105 return nil
106 }
107
108 func (x *HttpRequest) GetBody() []byte {
109 if x != nil {
110 return x.Body
111 }
112 return nil
113 }
114
115
116 type HttpResponse struct {
117 state protoimpl.MessageState
118 sizeCache protoimpl.SizeCache
119 unknownFields protoimpl.UnknownFields
120
121
122 Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
123
124 Reason string `protobuf:"bytes,2,opt,name=reason,proto3" json:"reason,omitempty"`
125
126
127 Headers []*HttpHeader `protobuf:"bytes,3,rep,name=headers,proto3" json:"headers,omitempty"`
128
129 Body []byte `protobuf:"bytes,4,opt,name=body,proto3" json:"body,omitempty"`
130 }
131
132 func (x *HttpResponse) Reset() {
133 *x = HttpResponse{}
134 if protoimpl.UnsafeEnabled {
135 mi := &file_google_rpc_http_proto_msgTypes[1]
136 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
137 ms.StoreMessageInfo(mi)
138 }
139 }
140
141 func (x *HttpResponse) String() string {
142 return protoimpl.X.MessageStringOf(x)
143 }
144
145 func (*HttpResponse) ProtoMessage() {}
146
147 func (x *HttpResponse) ProtoReflect() protoreflect.Message {
148 mi := &file_google_rpc_http_proto_msgTypes[1]
149 if protoimpl.UnsafeEnabled && x != nil {
150 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
151 if ms.LoadMessageInfo() == nil {
152 ms.StoreMessageInfo(mi)
153 }
154 return ms
155 }
156 return mi.MessageOf(x)
157 }
158
159
160 func (*HttpResponse) Descriptor() ([]byte, []int) {
161 return file_google_rpc_http_proto_rawDescGZIP(), []int{1}
162 }
163
164 func (x *HttpResponse) GetStatus() int32 {
165 if x != nil {
166 return x.Status
167 }
168 return 0
169 }
170
171 func (x *HttpResponse) GetReason() string {
172 if x != nil {
173 return x.Reason
174 }
175 return ""
176 }
177
178 func (x *HttpResponse) GetHeaders() []*HttpHeader {
179 if x != nil {
180 return x.Headers
181 }
182 return nil
183 }
184
185 func (x *HttpResponse) GetBody() []byte {
186 if x != nil {
187 return x.Body
188 }
189 return nil
190 }
191
192
193 type HttpHeader struct {
194 state protoimpl.MessageState
195 sizeCache protoimpl.SizeCache
196 unknownFields protoimpl.UnknownFields
197
198
199 Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
200
201 Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
202 }
203
204 func (x *HttpHeader) Reset() {
205 *x = HttpHeader{}
206 if protoimpl.UnsafeEnabled {
207 mi := &file_google_rpc_http_proto_msgTypes[2]
208 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
209 ms.StoreMessageInfo(mi)
210 }
211 }
212
213 func (x *HttpHeader) String() string {
214 return protoimpl.X.MessageStringOf(x)
215 }
216
217 func (*HttpHeader) ProtoMessage() {}
218
219 func (x *HttpHeader) ProtoReflect() protoreflect.Message {
220 mi := &file_google_rpc_http_proto_msgTypes[2]
221 if protoimpl.UnsafeEnabled && x != nil {
222 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
223 if ms.LoadMessageInfo() == nil {
224 ms.StoreMessageInfo(mi)
225 }
226 return ms
227 }
228 return mi.MessageOf(x)
229 }
230
231
232 func (*HttpHeader) Descriptor() ([]byte, []int) {
233 return file_google_rpc_http_proto_rawDescGZIP(), []int{2}
234 }
235
236 func (x *HttpHeader) GetKey() string {
237 if x != nil {
238 return x.Key
239 }
240 return ""
241 }
242
243 func (x *HttpHeader) GetValue() string {
244 if x != nil {
245 return x.Value
246 }
247 return ""
248 }
249
250 var File_google_rpc_http_proto protoreflect.FileDescriptor
251
252 var file_google_rpc_http_proto_rawDesc = []byte{
253 0x0a, 0x15, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x68, 0x74, 0x74,
254 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
255 0x72, 0x70, 0x63, 0x22, 0x7d, 0x0a, 0x0b, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x71, 0x75, 0x65,
256 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x01, 0x20, 0x01,
257 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72,
258 0x69, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x69, 0x12, 0x30, 0x0a, 0x07,
259 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e,
260 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70, 0x63, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48,
261 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x12,
262 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f,
263 0x64, 0x79, 0x22, 0x84, 0x01, 0x0a, 0x0c, 0x48, 0x74, 0x74, 0x70, 0x52, 0x65, 0x73, 0x70, 0x6f,
264 0x6e, 0x73, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x01, 0x20,
265 0x01, 0x28, 0x05, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x72,
266 0x65, 0x61, 0x73, 0x6f, 0x6e, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x72, 0x65, 0x61,
267 0x73, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x03,
268 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70,
269 0x63, 0x2e, 0x48, 0x74, 0x74, 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x52, 0x07, 0x68, 0x65,
270 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x04, 0x20,
271 0x01, 0x28, 0x0c, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x34, 0x0a, 0x0a, 0x48, 0x74, 0x74,
272 0x70, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01,
273 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c,
274 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x42,
275 0x58, 0x0a, 0x0e, 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x72, 0x70,
276 0x63, 0x42, 0x09, 0x48, 0x74, 0x74, 0x70, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x33,
277 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72,
278 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
279 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x72, 0x70, 0x63, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x3b, 0x68,
280 0x74, 0x74, 0x70, 0xa2, 0x02, 0x03, 0x52, 0x50, 0x43, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
281 0x33,
282 }
283
284 var (
285 file_google_rpc_http_proto_rawDescOnce sync.Once
286 file_google_rpc_http_proto_rawDescData = file_google_rpc_http_proto_rawDesc
287 )
288
289 func file_google_rpc_http_proto_rawDescGZIP() []byte {
290 file_google_rpc_http_proto_rawDescOnce.Do(func() {
291 file_google_rpc_http_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_rpc_http_proto_rawDescData)
292 })
293 return file_google_rpc_http_proto_rawDescData
294 }
295
296 var file_google_rpc_http_proto_msgTypes = make([]protoimpl.MessageInfo, 3)
297 var file_google_rpc_http_proto_goTypes = []interface{}{
298 (*HttpRequest)(nil),
299 (*HttpResponse)(nil),
300 (*HttpHeader)(nil),
301 }
302 var file_google_rpc_http_proto_depIdxs = []int32{
303 2,
304 2,
305 2,
306 2,
307 2,
308 2,
309 0,
310 }
311
312 func init() { file_google_rpc_http_proto_init() }
313 func file_google_rpc_http_proto_init() {
314 if File_google_rpc_http_proto != nil {
315 return
316 }
317 if !protoimpl.UnsafeEnabled {
318 file_google_rpc_http_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
319 switch v := v.(*HttpRequest); i {
320 case 0:
321 return &v.state
322 case 1:
323 return &v.sizeCache
324 case 2:
325 return &v.unknownFields
326 default:
327 return nil
328 }
329 }
330 file_google_rpc_http_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
331 switch v := v.(*HttpResponse); i {
332 case 0:
333 return &v.state
334 case 1:
335 return &v.sizeCache
336 case 2:
337 return &v.unknownFields
338 default:
339 return nil
340 }
341 }
342 file_google_rpc_http_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
343 switch v := v.(*HttpHeader); i {
344 case 0:
345 return &v.state
346 case 1:
347 return &v.sizeCache
348 case 2:
349 return &v.unknownFields
350 default:
351 return nil
352 }
353 }
354 }
355 type x struct{}
356 out := protoimpl.TypeBuilder{
357 File: protoimpl.DescBuilder{
358 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
359 RawDescriptor: file_google_rpc_http_proto_rawDesc,
360 NumEnums: 0,
361 NumMessages: 3,
362 NumExtensions: 0,
363 NumServices: 0,
364 },
365 GoTypes: file_google_rpc_http_proto_goTypes,
366 DependencyIndexes: file_google_rpc_http_proto_depIdxs,
367 MessageInfos: file_google_rpc_http_proto_msgTypes,
368 }.Build()
369 File_google_rpc_http_proto = out.File
370 file_google_rpc_http_proto_rawDesc = nil
371 file_google_rpc_http_proto_goTypes = nil
372 file_google_rpc_http_proto_depIdxs = nil
373 }
374
View as plain text