httpbody.pb.go 8.3 KB

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