blob: 7ea5ced87e0f208d04a64e1914c46310c926988a [file] [log] [blame]
khenaidood948f772021-08-11 17:49:24 -04001// Copyright 2015 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
khenaidooab1f7bd2019-11-14 14:00:27 -050015// Code generated by protoc-gen-go. DO NOT EDIT.
khenaidood948f772021-08-11 17:49:24 -040016// versions:
17// protoc-gen-go v1.26.0
18// protoc v3.12.2
khenaidooab1f7bd2019-11-14 14:00:27 -050019// source: google/api/httpbody.proto
20
21package httpbody
22
23import (
khenaidood948f772021-08-11 17:49:24 -040024 reflect "reflect"
25 sync "sync"
khenaidooab1f7bd2019-11-14 14:00:27 -050026
khenaidood948f772021-08-11 17:49:24 -040027 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
28 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
29 anypb "google.golang.org/protobuf/types/known/anypb"
khenaidooab1f7bd2019-11-14 14:00:27 -050030)
31
khenaidood948f772021-08-11 17:49:24 -040032const (
33 // Verify that this generated code is sufficiently up-to-date.
34 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
35 // Verify that runtime/protoimpl is sufficiently up-to-date.
36 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
37)
khenaidooab1f7bd2019-11-14 14:00:27 -050038
39// Message that represents an arbitrary HTTP body. It should only be used for
40// payload formats that can't be represented as JSON, such as raw binary or
41// an HTML page.
42//
43//
44// This message can be used both in streaming and non-streaming API methods in
45// the request as well as the response.
46//
47// It can be used as a top-level request field, which is convenient if one
48// wants to extract parameters from either the URL or HTTP template into the
49// request fields and also want access to the raw HTTP body.
50//
51// Example:
52//
53// message GetResourceRequest {
54// // A unique request id.
55// string request_id = 1;
56//
57// // The raw HTTP body is bound to this field.
58// google.api.HttpBody http_body = 2;
khenaidoo9beaaf12021-10-19 17:32:01 -040059//
khenaidooab1f7bd2019-11-14 14:00:27 -050060// }
61//
62// service ResourceService {
khenaidoo9beaaf12021-10-19 17:32:01 -040063// rpc GetResource(GetResourceRequest)
64// returns (google.api.HttpBody);
65// rpc UpdateResource(google.api.HttpBody)
66// returns (google.protobuf.Empty);
67//
khenaidooab1f7bd2019-11-14 14:00:27 -050068// }
69//
70// Example with streaming methods:
71//
72// service CaldavService {
73// rpc GetCalendar(stream google.api.HttpBody)
74// returns (stream google.api.HttpBody);
75// rpc UpdateCalendar(stream google.api.HttpBody)
76// returns (stream google.api.HttpBody);
khenaidoo9beaaf12021-10-19 17:32:01 -040077//
khenaidooab1f7bd2019-11-14 14:00:27 -050078// }
79//
80// Use of this type only changes how the request and response bodies are
81// handled, all other features will continue to work unchanged.
82type HttpBody struct {
khenaidood948f772021-08-11 17:49:24 -040083 state protoimpl.MessageState
84 sizeCache protoimpl.SizeCache
85 unknownFields protoimpl.UnknownFields
86
khenaidooab1f7bd2019-11-14 14:00:27 -050087 // The HTTP Content-Type header value specifying the content type of the body.
88 ContentType string `protobuf:"bytes,1,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"`
89 // The HTTP request/response body as raw binary.
90 Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
91 // Application specific response metadata. Must be set in the first response
92 // for streaming APIs.
khenaidood948f772021-08-11 17:49:24 -040093 Extensions []*anypb.Any `protobuf:"bytes,3,rep,name=extensions,proto3" json:"extensions,omitempty"`
khenaidooab1f7bd2019-11-14 14:00:27 -050094}
95
khenaidood948f772021-08-11 17:49:24 -040096func (x *HttpBody) Reset() {
97 *x = HttpBody{}
98 if protoimpl.UnsafeEnabled {
99 mi := &file_google_api_httpbody_proto_msgTypes[0]
100 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
101 ms.StoreMessageInfo(mi)
102 }
103}
104
105func (x *HttpBody) String() string {
106 return protoimpl.X.MessageStringOf(x)
107}
108
109func (*HttpBody) ProtoMessage() {}
110
111func (x *HttpBody) ProtoReflect() protoreflect.Message {
112 mi := &file_google_api_httpbody_proto_msgTypes[0]
113 if protoimpl.UnsafeEnabled && x != nil {
114 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
115 if ms.LoadMessageInfo() == nil {
116 ms.StoreMessageInfo(mi)
117 }
118 return ms
119 }
120 return mi.MessageOf(x)
121}
122
123// Deprecated: Use HttpBody.ProtoReflect.Descriptor instead.
khenaidooab1f7bd2019-11-14 14:00:27 -0500124func (*HttpBody) Descriptor() ([]byte, []int) {
khenaidood948f772021-08-11 17:49:24 -0400125 return file_google_api_httpbody_proto_rawDescGZIP(), []int{0}
khenaidooab1f7bd2019-11-14 14:00:27 -0500126}
127
khenaidood948f772021-08-11 17:49:24 -0400128func (x *HttpBody) GetContentType() string {
129 if x != nil {
130 return x.ContentType
khenaidooab1f7bd2019-11-14 14:00:27 -0500131 }
132 return ""
133}
134
khenaidood948f772021-08-11 17:49:24 -0400135func (x *HttpBody) GetData() []byte {
136 if x != nil {
137 return x.Data
khenaidooab1f7bd2019-11-14 14:00:27 -0500138 }
139 return nil
140}
141
khenaidood948f772021-08-11 17:49:24 -0400142func (x *HttpBody) GetExtensions() []*anypb.Any {
143 if x != nil {
144 return x.Extensions
khenaidooab1f7bd2019-11-14 14:00:27 -0500145 }
146 return nil
147}
148
khenaidood948f772021-08-11 17:49:24 -0400149var File_google_api_httpbody_proto protoreflect.FileDescriptor
150
151var file_google_api_httpbody_proto_rawDesc = []byte{
152 0x0a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74,
153 0x70, 0x62, 0x6f, 0x64, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f,
154 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f,
155 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f,
156 0x74, 0x6f, 0x22, 0x77, 0x0a, 0x08, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21,
157 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01,
158 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70,
159 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52,
160 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69,
161 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67,
162 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52,
163 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x68, 0x0a, 0x0e, 0x63,
164 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0d, 0x48,
165 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b,
166 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72,
167 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
168 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x62, 0x6f,
169 0x64, 0x79, 0x3b, 0x68, 0x74, 0x74, 0x70, 0x62, 0x6f, 0x64, 0x79, 0xf8, 0x01, 0x01, 0xa2, 0x02,
170 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
khenaidooab1f7bd2019-11-14 14:00:27 -0500171}
172
khenaidood948f772021-08-11 17:49:24 -0400173var (
174 file_google_api_httpbody_proto_rawDescOnce sync.Once
175 file_google_api_httpbody_proto_rawDescData = file_google_api_httpbody_proto_rawDesc
176)
khenaidooab1f7bd2019-11-14 14:00:27 -0500177
khenaidood948f772021-08-11 17:49:24 -0400178func file_google_api_httpbody_proto_rawDescGZIP() []byte {
179 file_google_api_httpbody_proto_rawDescOnce.Do(func() {
180 file_google_api_httpbody_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_httpbody_proto_rawDescData)
181 })
182 return file_google_api_httpbody_proto_rawDescData
183}
184
185var file_google_api_httpbody_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
186var file_google_api_httpbody_proto_goTypes = []interface{}{
187 (*HttpBody)(nil), // 0: google.api.HttpBody
188 (*anypb.Any)(nil), // 1: google.protobuf.Any
189}
190var file_google_api_httpbody_proto_depIdxs = []int32{
191 1, // 0: google.api.HttpBody.extensions:type_name -> google.protobuf.Any
192 1, // [1:1] is the sub-list for method output_type
193 1, // [1:1] is the sub-list for method input_type
194 1, // [1:1] is the sub-list for extension type_name
195 1, // [1:1] is the sub-list for extension extendee
196 0, // [0:1] is the sub-list for field type_name
197}
198
199func init() { file_google_api_httpbody_proto_init() }
200func file_google_api_httpbody_proto_init() {
201 if File_google_api_httpbody_proto != nil {
202 return
203 }
204 if !protoimpl.UnsafeEnabled {
205 file_google_api_httpbody_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
206 switch v := v.(*HttpBody); i {
207 case 0:
208 return &v.state
209 case 1:
210 return &v.sizeCache
211 case 2:
212 return &v.unknownFields
213 default:
214 return nil
215 }
216 }
217 }
218 type x struct{}
219 out := protoimpl.TypeBuilder{
220 File: protoimpl.DescBuilder{
221 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
222 RawDescriptor: file_google_api_httpbody_proto_rawDesc,
223 NumEnums: 0,
224 NumMessages: 1,
225 NumExtensions: 0,
226 NumServices: 0,
227 },
228 GoTypes: file_google_api_httpbody_proto_goTypes,
229 DependencyIndexes: file_google_api_httpbody_proto_depIdxs,
230 MessageInfos: file_google_api_httpbody_proto_msgTypes,
231 }.Build()
232 File_google_api_httpbody_proto = out.File
233 file_google_api_httpbody_proto_rawDesc = nil
234 file_google_api_httpbody_proto_goTypes = nil
235 file_google_api_httpbody_proto_depIdxs = nil
khenaidooab1f7bd2019-11-14 14:00:27 -0500236}