gtsocial-umbx

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README | LICENSE

httpbody.pb.go (8455B)


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