public static final class HttpResponse.Builder extends GeneratedMessage.Builder<HttpResponse.Builder> implements HttpResponseOrBuilderRepresents an HTTP response.
Protobuf type google.rpc.HttpResponse
Inheritance
java.lang.Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessage.Builder > HttpResponse.BuilderImplements
HttpResponseOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addAllHeaders(Iterable<? extends HttpHeader> values)
public HttpResponse.Builder addAllHeaders(Iterable<? extends HttpHeader> values)The HTTP response headers. The ordering of the headers is significant. Multiple headers with the same key may present for the response.
repeated .google.rpc.HttpHeader headers = 3;
| Parameter | |
|---|---|
| Name | Description |
values |
Iterable<? extends com.google.rpc.HttpHeader> |
| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
|
addHeaders(HttpHeader value)
public HttpResponse.Builder addHeaders(HttpHeader value)The HTTP response headers. The ordering of the headers is significant. Multiple headers with the same key may present for the response.
repeated .google.rpc.HttpHeader headers = 3;
| Parameter | |
|---|---|
| Name | Description |
value |
HttpHeader |
| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
|
addHeaders(HttpHeader.Builder builderForValue)
public HttpResponse.Builder addHeaders(HttpHeader.Builder builderForValue)The HTTP response headers. The ordering of the headers is significant. Multiple headers with the same key may present for the response.
repeated .google.rpc.HttpHeader headers = 3;
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
HttpHeader.Builder |
| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
|
addHeaders(int index, HttpHeader value)
public HttpResponse.Builder addHeaders(int index, HttpHeader value)The HTTP response headers. The ordering of the headers is significant. Multiple headers with the same key may present for the response.
repeated .google.rpc.HttpHeader headers = 3;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
HttpHeader |
| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
|
addHeaders(int index, HttpHeader.Builder builderForValue)
public HttpResponse.Builder addHeaders(int index, HttpHeader.Builder builderForValue)The HTTP response headers. The ordering of the headers is significant. Multiple headers with the same key may present for the response.
repeated .google.rpc.HttpHeader headers = 3;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
HttpHeader.Builder |
| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
|
addHeadersBuilder()
public HttpHeader.Builder addHeadersBuilder()The HTTP response headers. The ordering of the headers is significant. Multiple headers with the same key may present for the response.
repeated .google.rpc.HttpHeader headers = 3;
| Returns | |
|---|---|
| Type | Description |
HttpHeader.Builder |
|
addHeadersBuilder(int index)
public HttpHeader.Builder addHeadersBuilder(int index)The HTTP response headers. The ordering of the headers is significant. Multiple headers with the same key may present for the response.
repeated .google.rpc.HttpHeader headers = 3;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
HttpHeader.Builder |
|
build()
public HttpResponse build()| Returns | |
|---|---|
| Type | Description |
HttpResponse |
|
buildPartial()
public HttpResponse buildPartial()| Returns | |
|---|---|
| Type | Description |
HttpResponse |
|
clear()
public HttpResponse.Builder clear()| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
|
clearBody()
public HttpResponse.Builder clearBody()The HTTP response body. If the body is not expected, it should be empty.
bytes body = 4;
| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
This builder for chaining. |
clearHeaders()
public HttpResponse.Builder clearHeaders()The HTTP response headers. The ordering of the headers is significant. Multiple headers with the same key may present for the response.
repeated .google.rpc.HttpHeader headers = 3;
| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
|
clearReason()
public HttpResponse.Builder clearReason()The HTTP reason phrase, such as "OK" or "Not Found".
string reason = 2;
| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
This builder for chaining. |
clearStatus()
public HttpResponse.Builder clearStatus()The HTTP status code, such as 200 or 404.
int32 status = 1;
| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
This builder for chaining. |
getBody()
public ByteString getBody()The HTTP response body. If the body is not expected, it should be empty.
bytes body = 4;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The body. |
getDefaultInstanceForType()
public HttpResponse getDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
HttpResponse |
|
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getHeaders(int index)
public HttpHeader getHeaders(int index)The HTTP response headers. The ordering of the headers is significant. Multiple headers with the same key may present for the response.
repeated .google.rpc.HttpHeader headers = 3;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
HttpHeader |
|
getHeadersBuilder(int index)
public HttpHeader.Builder getHeadersBuilder(int index)The HTTP response headers. The ordering of the headers is significant. Multiple headers with the same key may present for the response.
repeated .google.rpc.HttpHeader headers = 3;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
HttpHeader.Builder |
|
getHeadersBuilderList()
public List<HttpHeader.Builder> getHeadersBuilderList()The HTTP response headers. The ordering of the headers is significant. Multiple headers with the same key may present for the response.
repeated .google.rpc.HttpHeader headers = 3;
| Returns | |
|---|---|
| Type | Description |
List<Builder> |
|
getHeadersCount()
public int getHeadersCount()The HTTP response headers. The ordering of the headers is significant. Multiple headers with the same key may present for the response.
repeated .google.rpc.HttpHeader headers = 3;
| Returns | |
|---|---|
| Type | Description |
int |
|
getHeadersList()
public List<HttpHeader> getHeadersList()The HTTP response headers. The ordering of the headers is significant. Multiple headers with the same key may present for the response.
repeated .google.rpc.HttpHeader headers = 3;
| Returns | |
|---|---|
| Type | Description |
List<HttpHeader> |
|
getHeadersOrBuilder(int index)
public HttpHeaderOrBuilder getHeadersOrBuilder(int index)The HTTP response headers. The ordering of the headers is significant. Multiple headers with the same key may present for the response.
repeated .google.rpc.HttpHeader headers = 3;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
HttpHeaderOrBuilder |
|
getHeadersOrBuilderList()
public List<? extends HttpHeaderOrBuilder> getHeadersOrBuilderList()The HTTP response headers. The ordering of the headers is significant. Multiple headers with the same key may present for the response.
repeated .google.rpc.HttpHeader headers = 3;
| Returns | |
|---|---|
| Type | Description |
List<? extends com.google.rpc.HttpHeaderOrBuilder> |
|
getReason()
public String getReason()The HTTP reason phrase, such as "OK" or "Not Found".
string reason = 2;
| Returns | |
|---|---|
| Type | Description |
String |
The reason. |
getReasonBytes()
public ByteString getReasonBytes()The HTTP reason phrase, such as "OK" or "Not Found".
string reason = 2;
| Returns | |
|---|---|
| Type | Description |
ByteString |
The bytes for reason. |
getStatus()
public int getStatus()The HTTP status code, such as 200 or 404.
int32 status = 1;
| Returns | |
|---|---|
| Type | Description |
int |
The status. |
internalGetFieldAccessorTable()
protected GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
isInitialized()
public final boolean isInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public HttpResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
public HttpResponse.Builder mergeFrom(Message other)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
|
mergeFrom(HttpResponse other)
public HttpResponse.Builder mergeFrom(HttpResponse other)| Parameter | |
|---|---|
| Name | Description |
other |
HttpResponse |
| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
|
removeHeaders(int index)
public HttpResponse.Builder removeHeaders(int index)The HTTP response headers. The ordering of the headers is significant. Multiple headers with the same key may present for the response.
repeated .google.rpc.HttpHeader headers = 3;
| Parameter | |
|---|---|
| Name | Description |
index |
int |
| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
|
setBody(ByteString value)
public HttpResponse.Builder setBody(ByteString value)The HTTP response body. If the body is not expected, it should be empty.
bytes body = 4;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe body to set. |
| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
This builder for chaining. |
setHeaders(int index, HttpHeader value)
public HttpResponse.Builder setHeaders(int index, HttpHeader value)The HTTP response headers. The ordering of the headers is significant. Multiple headers with the same key may present for the response.
repeated .google.rpc.HttpHeader headers = 3;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
value |
HttpHeader |
| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
|
setHeaders(int index, HttpHeader.Builder builderForValue)
public HttpResponse.Builder setHeaders(int index, HttpHeader.Builder builderForValue)The HTTP response headers. The ordering of the headers is significant. Multiple headers with the same key may present for the response.
repeated .google.rpc.HttpHeader headers = 3;
| Parameters | |
|---|---|
| Name | Description |
index |
int |
builderForValue |
HttpHeader.Builder |
| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
|
setReason(String value)
public HttpResponse.Builder setReason(String value)The HTTP reason phrase, such as "OK" or "Not Found".
string reason = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
StringThe reason to set. |
| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
This builder for chaining. |
setReasonBytes(ByteString value)
public HttpResponse.Builder setReasonBytes(ByteString value)The HTTP reason phrase, such as "OK" or "Not Found".
string reason = 2;
| Parameter | |
|---|---|
| Name | Description |
value |
ByteStringThe bytes for reason to set. |
| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
This builder for chaining. |
setStatus(int value)
public HttpResponse.Builder setStatus(int value)The HTTP status code, such as 200 or 404.
int32 status = 1;
| Parameter | |
|---|---|
| Name | Description |
value |
intThe status to set. |
| Returns | |
|---|---|
| Type | Description |
HttpResponse.Builder |
This builder for chaining. |