httpbody.pb.go 8.6 KB

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