程序包 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`

- ## 方法概要

  修饰符和类型
  方法
  说明
  `HttpBody.Builder`
  `addAllExtensions​(Iterable<? extends com.google.protobuf.Any> values)`
  Application specific response metadata.
  `HttpBody.Builder`
  `addExtensions​(int index, com.google.protobuf.Any value)`
  Application specific response metadata.
  `HttpBody.Builder`
  `addExtensions​(int index, com.google.protobuf.Any.Builder builderForValue)`
  Application specific response metadata.
  `HttpBody.Builder`
  `addExtensions​(com.google.protobuf.Any value)`
  Application specific response metadata.
  `HttpBody.Builder`
  `addExtensions​(com.google.protobuf.Any.Builder builderForValue)`
  Application specific response metadata.
  `com.google.protobuf.Any.Builder`
  `addExtensionsBuilder()`
  Application specific response metadata.
  `com.google.protobuf.Any.Builder`
  `addExtensionsBuilder​(int index)`
  Application specific response metadata.
  `HttpBody.Builder`
  `addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)`
  `HttpBody`
  `build()`
  `HttpBody`
  `buildPartial()`
  `HttpBody.Builder`
  `clear()`
  `HttpBody.Builder`
  `clearContentType()`
  The HTTP Content-Type header value specifying the content type of the body.
  `HttpBody.Builder`
  `clearData()`
  The HTTP request/response body as raw binary.
  `HttpBody.Builder`
  `clearExtensions()`
  Application specific response metadata.
  `HttpBody.Builder`
  `clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)`
  `HttpBody.Builder`
  `clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)`
  `HttpBody.Builder`
  `clone()`
  `String`
  `getContentType()`
  The HTTP Content-Type header value specifying the content type of the body.
  `com.google.protobuf.ByteString`
  `getContentTypeBytes()`
  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.
  `HttpBody`
  `getDefaultInstanceForType()`
  `static com.google.protobuf.Descriptors.Descriptor`
  `getDescriptor()`
  `com.google.protobuf.Descriptors.Descriptor`
  `getDescriptorForType()`
  `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>`
  `getExtensionsBuilderList()`
  Application specific response metadata.
  `int`
  `getExtensionsCount()`
  Application specific response metadata.
  `List<com.google.protobuf.Any>`
  `getExtensionsList()`
  Application specific response metadata.
  `com.google.protobuf.AnyOrBuilder`
  `getExtensionsOrBuilder​(int index)`
  Application specific response metadata.
  `List<? extends com.google.protobuf.AnyOrBuilder>`
  `getExtensionsOrBuilderList()`
  Application specific response metadata.
  `protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable`
  `internalGetFieldAccessorTable()`
  `boolean`
  `isInitialized()`
  `HttpBody.Builder`
  `mergeFrom​(HttpBody other)`
  `HttpBody.Builder`
  `mergeFrom​(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)`
  `HttpBody.Builder`
  `mergeFrom​(com.google.protobuf.Message other)`
  `HttpBody.Builder`
  `mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)`
  `HttpBody.Builder`
  `removeExtensions​(int index)`
  Application specific response metadata.
  `HttpBody.Builder`
  `setContentType​(String value)`
  The HTTP Content-Type header value specifying the content type of the body.
  `HttpBody.Builder`
  `setContentTypeBytes​(com.google.protobuf.ByteString value)`
  The HTTP Content-Type header value specifying the content type of the body.
  `HttpBody.Builder`
  `setData​(com.google.protobuf.ByteString value)`
  The HTTP request/response body as raw binary.
  `HttpBody.Builder`
  `setExtensions​(int index, com.google.protobuf.Any value)`
  Application specific response metadata.
  `HttpBody.Builder`
  `setExtensions​(int index, com.google.protobuf.Any.Builder builderForValue)`
  Application specific response metadata.
  `HttpBody.Builder`
  `setField​(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)`
  `HttpBody.Builder`
  `setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)`
  `HttpBody.Builder`
  `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`

  ### 从类继承的方法 java.lang.Object

  `equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

  ### 从接口继承的方法 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

    public 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

    public HttpBody getDefaultInstanceForType()
    指定者:
      `getDefaultInstanceForType` 在接口中 `com.google.protobuf.MessageLiteOrBuilder`
    指定者:
      `getDefaultInstanceForType` 在接口中 `com.google.protobuf.MessageOrBuilder`

  - ### build

    public HttpBody build()
    指定者:
      `build` 在接口中 `com.google.protobuf.Message.Builder`
    指定者:
      `build` 在接口中 `com.google.protobuf.MessageLite.Builder`

  - ### buildPartial

    public HttpBody buildPartial()
    指定者:
      `buildPartial` 在接口中 `com.google.protobuf.Message.Builder`
    指定者:
      `buildPartial` 在接口中 `com.google.protobuf.MessageLite.Builder`

  - ### clone

    public HttpBody.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

    public HttpBody.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
    指定者:
      `clearField` 在接口中 `com.google.protobuf.Message.Builder`
    覆盖:
      `clearField` 在类中 `com.google.protobuf.GeneratedMessageV3.Builder<HttpBody.Builder>`

  - ### clearOneof

    public HttpBody.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
    指定者:
      `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

    public HttpBody.Builder mergeFrom​(com.google.protobuf.Message other)
    指定者:
      `mergeFrom` 在接口中 `com.google.protobuf.Message.Builder`
    覆盖:
      `mergeFrom` 在类中 `com.google.protobuf.AbstractMessage.Builder<HttpBody.Builder>`

  - ### mergeFrom

    public HttpBody.Builder mergeFrom​(HttpBody other)

  - ### 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

    public String 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

    public HttpBody.Builder setContentType​(String value)

         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

    public HttpBody.Builder clearContentType()

         The HTTP Content-Type header value specifying the content type of the body.

    `string content_type = 1;`
    返回:
      This builder for chaining.

  - ### setContentTypeBytes

    public HttpBody.Builder setContentTypeBytes​(com.google.protobuf.ByteString value)

         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

    public HttpBody.Builder setData​(com.google.protobuf.ByteString value)

         The HTTP request/response body as raw binary.

    `bytes data = 2;`
    参数:
      `value` - The data to set.
    返回:
      This builder for chaining.

  - ### clearData

    public HttpBody.Builder clearData()

         The HTTP request/response body as raw binary.

    `bytes data = 2;`
    返回:
      This builder for chaining.

  - ### getExtensionsList

    public List<com.google.protobuf.Any> 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

    public HttpBody.Builder setExtensions​(int index, com.google.protobuf.Any value)

         Application specific response metadata. Must be set in the first response
         for streaming APIs.

    `repeated .google.protobuf.Any extensions = 3;`

  - ### setExtensions

    public HttpBody.Builder setExtensions​(int index, com.google.protobuf.Any.Builder builderForValue)

         Application specific response metadata. Must be set in the first response
         for streaming APIs.

    `repeated .google.protobuf.Any extensions = 3;`

  - ### addExtensions

    public HttpBody.Builder addExtensions​(com.google.protobuf.Any value)

         Application specific response metadata. Must be set in the first response
         for streaming APIs.

    `repeated .google.protobuf.Any extensions = 3;`

  - ### addExtensions

    public HttpBody.Builder addExtensions​(int index, com.google.protobuf.Any value)

         Application specific response metadata. Must be set in the first response
         for streaming APIs.

    `repeated .google.protobuf.Any extensions = 3;`

  - ### addExtensions

    public HttpBody.Builder addExtensions​(com.google.protobuf.Any.Builder builderForValue)

         Application specific response metadata. Must be set in the first response
         for streaming APIs.

    `repeated .google.protobuf.Any extensions = 3;`

  - ### addExtensions

    public HttpBody.Builder addExtensions​(int index, com.google.protobuf.Any.Builder builderForValue)

         Application specific response metadata. Must be set in the first response
         for streaming APIs.

    `repeated .google.protobuf.Any extensions = 3;`

  - ### addAllExtensions

    public HttpBody.Builder addAllExtensions​(Iterable<? extends com.google.protobuf.Any> values)

         Application specific response metadata. Must be set in the first response
         for streaming APIs.

    `repeated .google.protobuf.Any extensions = 3;`

  - ### clearExtensions

    public HttpBody.Builder clearExtensions()

         Application specific response metadata. Must be set in the first response
         for streaming APIs.

    `repeated .google.protobuf.Any extensions = 3;`

  - ### removeExtensions

    public HttpBody.Builder removeExtensions​(int index)

         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

    public List<? extends com.google.protobuf.AnyOrBuilder> 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

    public List<com.google.protobuf.Any.Builder> getExtensionsBuilderList()

         Application specific response metadata. Must be set in the first response
         for streaming APIs.

    `repeated .google.protobuf.Any extensions = 3;`

  - ### setUnknownFields

    public final HttpBody.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
    指定者:
      `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>`