khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 1 | // 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 | |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 15 | // Code generated by protoc-gen-go. DO NOT EDIT. |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 16 | // versions: |
| 17 | // protoc-gen-go v1.26.0 |
| 18 | // protoc v3.12.2 |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 19 | // source: google/api/httpbody.proto |
| 20 | |
| 21 | package httpbody |
| 22 | |
| 23 | import ( |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 24 | reflect "reflect" |
| 25 | sync "sync" |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 26 | |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 27 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" |
| 28 | protoimpl "google.golang.org/protobuf/runtime/protoimpl" |
| 29 | anypb "google.golang.org/protobuf/types/known/anypb" |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 30 | ) |
| 31 | |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 32 | const ( |
| 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 | ) |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 38 | |
| 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; |
| 59 | // } |
| 60 | // |
| 61 | // service ResourceService { |
| 62 | // rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); |
| 63 | // rpc UpdateResource(google.api.HttpBody) returns |
| 64 | // (google.protobuf.Empty); |
| 65 | // } |
| 66 | // |
| 67 | // Example with streaming methods: |
| 68 | // |
| 69 | // service CaldavService { |
| 70 | // rpc GetCalendar(stream google.api.HttpBody) |
| 71 | // returns (stream google.api.HttpBody); |
| 72 | // rpc UpdateCalendar(stream google.api.HttpBody) |
| 73 | // returns (stream google.api.HttpBody); |
| 74 | // } |
| 75 | // |
| 76 | // Use of this type only changes how the request and response bodies are |
| 77 | // handled, all other features will continue to work unchanged. |
| 78 | type HttpBody struct { |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 79 | state protoimpl.MessageState |
| 80 | sizeCache protoimpl.SizeCache |
| 81 | unknownFields protoimpl.UnknownFields |
| 82 | |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 83 | // The HTTP Content-Type header value specifying the content type of the body. |
| 84 | ContentType string `protobuf:"bytes,1,opt,name=content_type,json=contentType,proto3" json:"content_type,omitempty"` |
| 85 | // The HTTP request/response body as raw binary. |
| 86 | Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` |
| 87 | // Application specific response metadata. Must be set in the first response |
| 88 | // for streaming APIs. |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 89 | Extensions []*anypb.Any `protobuf:"bytes,3,rep,name=extensions,proto3" json:"extensions,omitempty"` |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 90 | } |
| 91 | |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 92 | func (x *HttpBody) Reset() { |
| 93 | *x = HttpBody{} |
| 94 | if protoimpl.UnsafeEnabled { |
| 95 | mi := &file_google_api_httpbody_proto_msgTypes[0] |
| 96 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 97 | ms.StoreMessageInfo(mi) |
| 98 | } |
| 99 | } |
| 100 | |
| 101 | func (x *HttpBody) String() string { |
| 102 | return protoimpl.X.MessageStringOf(x) |
| 103 | } |
| 104 | |
| 105 | func (*HttpBody) ProtoMessage() {} |
| 106 | |
| 107 | func (x *HttpBody) ProtoReflect() protoreflect.Message { |
| 108 | mi := &file_google_api_httpbody_proto_msgTypes[0] |
| 109 | if protoimpl.UnsafeEnabled && x != nil { |
| 110 | ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) |
| 111 | if ms.LoadMessageInfo() == nil { |
| 112 | ms.StoreMessageInfo(mi) |
| 113 | } |
| 114 | return ms |
| 115 | } |
| 116 | return mi.MessageOf(x) |
| 117 | } |
| 118 | |
| 119 | // Deprecated: Use HttpBody.ProtoReflect.Descriptor instead. |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 120 | func (*HttpBody) Descriptor() ([]byte, []int) { |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 121 | return file_google_api_httpbody_proto_rawDescGZIP(), []int{0} |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 122 | } |
| 123 | |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 124 | func (x *HttpBody) GetContentType() string { |
| 125 | if x != nil { |
| 126 | return x.ContentType |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 127 | } |
| 128 | return "" |
| 129 | } |
| 130 | |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 131 | func (x *HttpBody) GetData() []byte { |
| 132 | if x != nil { |
| 133 | return x.Data |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 134 | } |
| 135 | return nil |
| 136 | } |
| 137 | |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 138 | func (x *HttpBody) GetExtensions() []*anypb.Any { |
| 139 | if x != nil { |
| 140 | return x.Extensions |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 141 | } |
| 142 | return nil |
| 143 | } |
| 144 | |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 145 | var File_google_api_httpbody_proto protoreflect.FileDescriptor |
| 146 | |
| 147 | var file_google_api_httpbody_proto_rawDesc = []byte{ |
| 148 | 0x0a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, |
| 149 | 0x70, 0x62, 0x6f, 0x64, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0a, 0x67, 0x6f, 0x6f, |
| 150 | 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, |
| 151 | 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x6e, 0x79, 0x2e, 0x70, 0x72, 0x6f, |
| 152 | 0x74, 0x6f, 0x22, 0x77, 0x0a, 0x08, 0x48, 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x12, 0x21, |
| 153 | 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, |
| 154 | 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x54, 0x79, 0x70, |
| 155 | 0x65, 0x12, 0x12, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0c, 0x52, |
| 156 | 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x34, 0x0a, 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, |
| 157 | 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x67, 0x6f, 0x6f, 0x67, |
| 158 | 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x41, 0x6e, 0x79, 0x52, |
| 159 | 0x0a, 0x65, 0x78, 0x74, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x68, 0x0a, 0x0e, 0x63, |
| 160 | 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x69, 0x42, 0x0d, 0x48, |
| 161 | 0x74, 0x74, 0x70, 0x42, 0x6f, 0x64, 0x79, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x3b, |
| 162 | 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, |
| 163 | 0x67, 0x2f, 0x67, 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, |
| 164 | 0x65, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x68, 0x74, 0x74, 0x70, 0x62, 0x6f, |
| 165 | 0x64, 0x79, 0x3b, 0x68, 0x74, 0x74, 0x70, 0x62, 0x6f, 0x64, 0x79, 0xf8, 0x01, 0x01, 0xa2, 0x02, |
| 166 | 0x04, 0x47, 0x41, 0x50, 0x49, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 167 | } |
| 168 | |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 169 | var ( |
| 170 | file_google_api_httpbody_proto_rawDescOnce sync.Once |
| 171 | file_google_api_httpbody_proto_rawDescData = file_google_api_httpbody_proto_rawDesc |
| 172 | ) |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 173 | |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 174 | func file_google_api_httpbody_proto_rawDescGZIP() []byte { |
| 175 | file_google_api_httpbody_proto_rawDescOnce.Do(func() { |
| 176 | file_google_api_httpbody_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_api_httpbody_proto_rawDescData) |
| 177 | }) |
| 178 | return file_google_api_httpbody_proto_rawDescData |
| 179 | } |
| 180 | |
| 181 | var file_google_api_httpbody_proto_msgTypes = make([]protoimpl.MessageInfo, 1) |
| 182 | var file_google_api_httpbody_proto_goTypes = []interface{}{ |
| 183 | (*HttpBody)(nil), // 0: google.api.HttpBody |
| 184 | (*anypb.Any)(nil), // 1: google.protobuf.Any |
| 185 | } |
| 186 | var file_google_api_httpbody_proto_depIdxs = []int32{ |
| 187 | 1, // 0: google.api.HttpBody.extensions:type_name -> google.protobuf.Any |
| 188 | 1, // [1:1] is the sub-list for method output_type |
| 189 | 1, // [1:1] is the sub-list for method input_type |
| 190 | 1, // [1:1] is the sub-list for extension type_name |
| 191 | 1, // [1:1] is the sub-list for extension extendee |
| 192 | 0, // [0:1] is the sub-list for field type_name |
| 193 | } |
| 194 | |
| 195 | func init() { file_google_api_httpbody_proto_init() } |
| 196 | func file_google_api_httpbody_proto_init() { |
| 197 | if File_google_api_httpbody_proto != nil { |
| 198 | return |
| 199 | } |
| 200 | if !protoimpl.UnsafeEnabled { |
| 201 | file_google_api_httpbody_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { |
| 202 | switch v := v.(*HttpBody); i { |
| 203 | case 0: |
| 204 | return &v.state |
| 205 | case 1: |
| 206 | return &v.sizeCache |
| 207 | case 2: |
| 208 | return &v.unknownFields |
| 209 | default: |
| 210 | return nil |
| 211 | } |
| 212 | } |
| 213 | } |
| 214 | type x struct{} |
| 215 | out := protoimpl.TypeBuilder{ |
| 216 | File: protoimpl.DescBuilder{ |
| 217 | GoPackagePath: reflect.TypeOf(x{}).PkgPath(), |
| 218 | RawDescriptor: file_google_api_httpbody_proto_rawDesc, |
| 219 | NumEnums: 0, |
| 220 | NumMessages: 1, |
| 221 | NumExtensions: 0, |
| 222 | NumServices: 0, |
| 223 | }, |
| 224 | GoTypes: file_google_api_httpbody_proto_goTypes, |
| 225 | DependencyIndexes: file_google_api_httpbody_proto_depIdxs, |
| 226 | MessageInfos: file_google_api_httpbody_proto_msgTypes, |
| 227 | }.Build() |
| 228 | File_google_api_httpbody_proto = out.File |
| 229 | file_google_api_httpbody_proto_rawDesc = nil |
| 230 | file_google_api_httpbody_proto_goTypes = nil |
| 231 | file_google_api_httpbody_proto_depIdxs = nil |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 232 | } |