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; |
khenaidoo | a5feb8e | 2021-10-19 17:29:22 -0400 | [diff] [blame] | 59 | // |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 60 | // } |
| 61 | // |
| 62 | // service ResourceService { |
khenaidoo | a5feb8e | 2021-10-19 17:29:22 -0400 | [diff] [blame] | 63 | // rpc GetResource(GetResourceRequest) |
| 64 | // returns (google.api.HttpBody); |
| 65 | // rpc UpdateResource(google.api.HttpBody) |
| 66 | // returns (google.protobuf.Empty); |
| 67 | // |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 68 | // } |
| 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); |
khenaidoo | a5feb8e | 2021-10-19 17:29:22 -0400 | [diff] [blame] | 77 | // |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 78 | // } |
| 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. |
| 82 | type HttpBody struct { |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 83 | state protoimpl.MessageState |
| 84 | sizeCache protoimpl.SizeCache |
| 85 | unknownFields protoimpl.UnknownFields |
| 86 | |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 87 | // 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. |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 93 | Extensions []*anypb.Any `protobuf:"bytes,3,rep,name=extensions,proto3" json:"extensions,omitempty"` |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 94 | } |
| 95 | |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 96 | func (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 | |
| 105 | func (x *HttpBody) String() string { |
| 106 | return protoimpl.X.MessageStringOf(x) |
| 107 | } |
| 108 | |
| 109 | func (*HttpBody) ProtoMessage() {} |
| 110 | |
| 111 | func (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. |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 124 | func (*HttpBody) Descriptor() ([]byte, []int) { |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 125 | return file_google_api_httpbody_proto_rawDescGZIP(), []int{0} |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 126 | } |
| 127 | |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 128 | func (x *HttpBody) GetContentType() string { |
| 129 | if x != nil { |
| 130 | return x.ContentType |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 131 | } |
| 132 | return "" |
| 133 | } |
| 134 | |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 135 | func (x *HttpBody) GetData() []byte { |
| 136 | if x != nil { |
| 137 | return x.Data |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 138 | } |
| 139 | return nil |
| 140 | } |
| 141 | |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 142 | func (x *HttpBody) GetExtensions() []*anypb.Any { |
| 143 | if x != nil { |
| 144 | return x.Extensions |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 145 | } |
| 146 | return nil |
| 147 | } |
| 148 | |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 149 | var File_google_api_httpbody_proto protoreflect.FileDescriptor |
| 150 | |
| 151 | var 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, |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 171 | } |
| 172 | |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 173 | var ( |
| 174 | file_google_api_httpbody_proto_rawDescOnce sync.Once |
| 175 | file_google_api_httpbody_proto_rawDescData = file_google_api_httpbody_proto_rawDesc |
| 176 | ) |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 177 | |
khenaidoo | 2672188 | 2021-08-11 17:42:52 -0400 | [diff] [blame] | 178 | func 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 | |
| 185 | var file_google_api_httpbody_proto_msgTypes = make([]protoimpl.MessageInfo, 1) |
| 186 | var file_google_api_httpbody_proto_goTypes = []interface{}{ |
| 187 | (*HttpBody)(nil), // 0: google.api.HttpBody |
| 188 | (*anypb.Any)(nil), // 1: google.protobuf.Any |
| 189 | } |
| 190 | var 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 | |
| 199 | func init() { file_google_api_httpbody_proto_init() } |
| 200 | func 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 |
khenaidoo | 59ce9dd | 2019-11-11 13:05:32 -0500 | [diff] [blame] | 236 | } |