程序包 com.google.api
类 HttpBody.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderType>
com.google.protobuf.GeneratedMessageV3.Builder<HttpBody.Builder>
com.google.api.HttpBody.Builder
- 所有已实现的接口:
HttpBodyOrBuilder
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,Cloneable
- 封闭类:
- HttpBody
public static final class HttpBody.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<HttpBody.Builder>
implements HttpBodyOrBuilder
Message that represents an arbitrary HTTP body. It should only be used for payload formats that can't be represented as JSON, such as raw binary or an HTML page. This message can be used both in streaming and non-streaming API methods in the request as well as the response. It can be used as a top-level request field, which is convenient if one wants to extract parameters from either the URL or HTTP template into the request fields and also want access to the raw HTTP body. Example: message GetResourceRequest { // A unique request id. string request_id = 1; // The raw HTTP body is bound to this field. google.api.HttpBody http_body = 2; } service ResourceService { rpc GetResource(GetResourceRequest) returns (google.api.HttpBody); rpc UpdateResource(google.api.HttpBody) returns (google.protobuf.Empty); } Example with streaming methods: service CaldavService { rpc GetCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); rpc UpdateCalendar(stream google.api.HttpBody) returns (stream google.api.HttpBody); } Use of this type only changes how the request and response bodies are handled, all other features will continue to work unchanged.Protobuf type
google.api.HttpBody
-
方法概要
修饰符和类型方法说明addAllExtensions(Iterable<? extends com.google.protobuf.Any> values)
Application specific response metadata.addExtensions(int index, com.google.protobuf.Any value)
Application specific response metadata.addExtensions(int index, com.google.protobuf.Any.Builder builderForValue)
Application specific response metadata.addExtensions(com.google.protobuf.Any value)
Application specific response metadata.addExtensions(com.google.protobuf.Any.Builder builderForValue)
Application specific response metadata.com.google.protobuf.Any.Builder
Application specific response metadata.com.google.protobuf.Any.Builder
addExtensionsBuilder(int index)
Application specific response metadata.addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
build()
clear()
The HTTP Content-Type header value specifying the content type of the body.The HTTP request/response body as raw binary.Application specific response metadata.clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clone()
The HTTP Content-Type header value specifying the content type of the body.com.google.protobuf.ByteString
The HTTP Content-Type header value specifying the content type of the body.com.google.protobuf.ByteString
getData()
The HTTP request/response body as raw binary.static com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Any
getExtensions(int index)
Application specific response metadata.com.google.protobuf.Any.Builder
getExtensionsBuilder(int index)
Application specific response metadata.List<com.google.protobuf.Any.Builder>
Application specific response metadata.int
Application specific response metadata.List<com.google.protobuf.Any>
Application specific response metadata.com.google.protobuf.AnyOrBuilder
getExtensionsOrBuilder(int index)
Application specific response metadata.List<? extends com.google.protobuf.AnyOrBuilder>
Application specific response metadata.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
boolean
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
mergeFrom(com.google.protobuf.Message other)
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
removeExtensions(int index)
Application specific response metadata.setContentType(String value)
The HTTP Content-Type header value specifying the content type of the body.setContentTypeBytes(com.google.protobuf.ByteString value)
The HTTP Content-Type header value specifying the content type of the body.setData(com.google.protobuf.ByteString value)
The HTTP request/response body as raw binary.setExtensions(int index, com.google.protobuf.Any value)
Application specific response metadata.setExtensions(int index, com.google.protobuf.Any.Builder builderForValue)
Application specific response metadata.setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
从类继承的方法 com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, newBuilderForField, onBuilt, onChanged, setUnknownFieldsProto3
从类继承的方法 com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
从类继承的方法 com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeFrom, newUninitializedMessageException
从接口继承的方法 com.google.protobuf.MessageLite.Builder
mergeFrom
从接口继承的方法 com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
方法详细资料
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- 指定者:
internalGetFieldAccessorTable
在类中com.google.protobuf.GeneratedMessageV3.Builder<HttpBody.Builder>
-
clear
- 指定者:
clear
在接口中com.google.protobuf.Message.Builder
- 指定者:
clear
在接口中com.google.protobuf.MessageLite.Builder
- 覆盖:
clear
在类中com.google.protobuf.GeneratedMessageV3.Builder<HttpBody.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- 指定者:
getDescriptorForType
在接口中com.google.protobuf.Message.Builder
- 指定者:
getDescriptorForType
在接口中com.google.protobuf.MessageOrBuilder
- 覆盖:
getDescriptorForType
在类中com.google.protobuf.GeneratedMessageV3.Builder<HttpBody.Builder>
-
getDefaultInstanceForType
- 指定者:
getDefaultInstanceForType
在接口中com.google.protobuf.MessageLiteOrBuilder
- 指定者:
getDefaultInstanceForType
在接口中com.google.protobuf.MessageOrBuilder
-
build
- 指定者:
build
在接口中com.google.protobuf.Message.Builder
- 指定者:
build
在接口中com.google.protobuf.MessageLite.Builder
-
buildPartial
- 指定者:
buildPartial
在接口中com.google.protobuf.Message.Builder
- 指定者:
buildPartial
在接口中com.google.protobuf.MessageLite.Builder
-
clone
- 指定者:
clone
在接口中com.google.protobuf.Message.Builder
- 指定者:
clone
在接口中com.google.protobuf.MessageLite.Builder
- 覆盖:
clone
在类中com.google.protobuf.GeneratedMessageV3.Builder<HttpBody.Builder>
-
setField
public HttpBody.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)- 指定者:
setField
在接口中com.google.protobuf.Message.Builder
- 覆盖:
setField
在类中com.google.protobuf.GeneratedMessageV3.Builder<HttpBody.Builder>
-
clearField
- 指定者:
clearField
在接口中com.google.protobuf.Message.Builder
- 覆盖:
clearField
在类中com.google.protobuf.GeneratedMessageV3.Builder<HttpBody.Builder>
-
clearOneof
- 指定者:
clearOneof
在接口中com.google.protobuf.Message.Builder
- 覆盖:
clearOneof
在类中com.google.protobuf.GeneratedMessageV3.Builder<HttpBody.Builder>
-
setRepeatedField
public HttpBody.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)- 指定者:
setRepeatedField
在接口中com.google.protobuf.Message.Builder
- 覆盖:
setRepeatedField
在类中com.google.protobuf.GeneratedMessageV3.Builder<HttpBody.Builder>
-
addRepeatedField
public HttpBody.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)- 指定者:
addRepeatedField
在接口中com.google.protobuf.Message.Builder
- 覆盖:
addRepeatedField
在类中com.google.protobuf.GeneratedMessageV3.Builder<HttpBody.Builder>
-
mergeFrom
- 指定者:
mergeFrom
在接口中com.google.protobuf.Message.Builder
- 覆盖:
mergeFrom
在类中com.google.protobuf.AbstractMessage.Builder<HttpBody.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- 指定者:
isInitialized
在接口中com.google.protobuf.MessageLiteOrBuilder
- 覆盖:
isInitialized
在类中com.google.protobuf.GeneratedMessageV3.Builder<HttpBody.Builder>
-
mergeFrom
public HttpBody.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException- 指定者:
mergeFrom
在接口中com.google.protobuf.Message.Builder
- 指定者:
mergeFrom
在接口中com.google.protobuf.MessageLite.Builder
- 覆盖:
mergeFrom
在类中com.google.protobuf.AbstractMessage.Builder<HttpBody.Builder>
- 抛出:
IOException
-
getContentType
The HTTP Content-Type header value specifying the content type of the body.
string content_type = 1;
- 指定者:
getContentType
在接口中HttpBodyOrBuilder
- 返回:
- The contentType.
-
getContentTypeBytes
public com.google.protobuf.ByteString getContentTypeBytes()The HTTP Content-Type header value specifying the content type of the body.
string content_type = 1;
- 指定者:
getContentTypeBytes
在接口中HttpBodyOrBuilder
- 返回:
- The bytes for contentType.
-
setContentType
The HTTP Content-Type header value specifying the content type of the body.
string content_type = 1;
- 参数:
value
- The contentType to set.- 返回:
- This builder for chaining.
-
clearContentType
The HTTP Content-Type header value specifying the content type of the body.
string content_type = 1;
- 返回:
- This builder for chaining.
-
setContentTypeBytes
The HTTP Content-Type header value specifying the content type of the body.
string content_type = 1;
- 参数:
value
- The bytes for contentType to set.- 返回:
- This builder for chaining.
-
getData
public com.google.protobuf.ByteString getData()The HTTP request/response body as raw binary.
bytes data = 2;
- 指定者:
getData
在接口中HttpBodyOrBuilder
- 返回:
- The data.
-
setData
The HTTP request/response body as raw binary.
bytes data = 2;
- 参数:
value
- The data to set.- 返回:
- This builder for chaining.
-
clearData
The HTTP request/response body as raw binary.
bytes data = 2;
- 返回:
- This builder for chaining.
-
getExtensionsList
Application specific response metadata. Must be set in the first response for streaming APIs.
repeated .google.protobuf.Any extensions = 3;
- 指定者:
getExtensionsList
在接口中HttpBodyOrBuilder
-
getExtensionsCount
public int getExtensionsCount()Application specific response metadata. Must be set in the first response for streaming APIs.
repeated .google.protobuf.Any extensions = 3;
- 指定者:
getExtensionsCount
在接口中HttpBodyOrBuilder
-
getExtensions
public com.google.protobuf.Any getExtensions(int index)Application specific response metadata. Must be set in the first response for streaming APIs.
repeated .google.protobuf.Any extensions = 3;
- 指定者:
getExtensions
在接口中HttpBodyOrBuilder
-
setExtensions
Application specific response metadata. Must be set in the first response for streaming APIs.
repeated .google.protobuf.Any extensions = 3;
-
setExtensions
Application specific response metadata. Must be set in the first response for streaming APIs.
repeated .google.protobuf.Any extensions = 3;
-
addExtensions
Application specific response metadata. Must be set in the first response for streaming APIs.
repeated .google.protobuf.Any extensions = 3;
-
addExtensions
Application specific response metadata. Must be set in the first response for streaming APIs.
repeated .google.protobuf.Any extensions = 3;
-
addExtensions
Application specific response metadata. Must be set in the first response for streaming APIs.
repeated .google.protobuf.Any extensions = 3;
-
addExtensions
Application specific response metadata. Must be set in the first response for streaming APIs.
repeated .google.protobuf.Any extensions = 3;
-
addAllExtensions
Application specific response metadata. Must be set in the first response for streaming APIs.
repeated .google.protobuf.Any extensions = 3;
-
clearExtensions
Application specific response metadata. Must be set in the first response for streaming APIs.
repeated .google.protobuf.Any extensions = 3;
-
removeExtensions
Application specific response metadata. Must be set in the first response for streaming APIs.
repeated .google.protobuf.Any extensions = 3;
-
getExtensionsBuilder
public com.google.protobuf.Any.Builder getExtensionsBuilder(int index)Application specific response metadata. Must be set in the first response for streaming APIs.
repeated .google.protobuf.Any extensions = 3;
-
getExtensionsOrBuilder
public com.google.protobuf.AnyOrBuilder getExtensionsOrBuilder(int index)Application specific response metadata. Must be set in the first response for streaming APIs.
repeated .google.protobuf.Any extensions = 3;
- 指定者:
getExtensionsOrBuilder
在接口中HttpBodyOrBuilder
-
getExtensionsOrBuilderList
Application specific response metadata. Must be set in the first response for streaming APIs.
repeated .google.protobuf.Any extensions = 3;
- 指定者:
getExtensionsOrBuilderList
在接口中HttpBodyOrBuilder
-
addExtensionsBuilder
public com.google.protobuf.Any.Builder addExtensionsBuilder()Application specific response metadata. Must be set in the first response for streaming APIs.
repeated .google.protobuf.Any extensions = 3;
-
addExtensionsBuilder
public com.google.protobuf.Any.Builder addExtensionsBuilder(int index)Application specific response metadata. Must be set in the first response for streaming APIs.
repeated .google.protobuf.Any extensions = 3;
-
getExtensionsBuilderList
Application specific response metadata. Must be set in the first response for streaming APIs.
repeated .google.protobuf.Any extensions = 3;
-
setUnknownFields
- 指定者:
setUnknownFields
在接口中com.google.protobuf.Message.Builder
- 覆盖:
setUnknownFields
在类中com.google.protobuf.GeneratedMessageV3.Builder<HttpBody.Builder>
-
mergeUnknownFields
public final HttpBody.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)- 指定者:
mergeUnknownFields
在接口中com.google.protobuf.Message.Builder
- 覆盖:
mergeUnknownFields
在类中com.google.protobuf.GeneratedMessageV3.Builder<HttpBody.Builder>
-