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