Class HttpResponse.Builder (2.54.0)

public static final class HttpResponse.Builder extends GeneratedMessageV3.Builder<HttpResponse.Builder> implements HttpResponseOrBuilder

The proto definition of http response.

Protobuf type google.cloud.apigeeconnect.v1.HttpResponse

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllHeaders(Iterable<? extends Header> values)

public HttpResponse.Builder addAllHeaders(Iterable<? extends Header> values)

The HTTP response headers.

repeated .google.cloud.apigeeconnect.v1.Header headers = 5;

Parameter
Name Description
values Iterable<? extends com.google.cloud.apigeeconnect.v1.Header>
Returns
Type Description
HttpResponse.Builder

addHeaders(Header value)

public HttpResponse.Builder addHeaders(Header value)

The HTTP response headers.

repeated .google.cloud.apigeeconnect.v1.Header headers = 5;

Parameter
Name Description
value Header
Returns
Type Description
HttpResponse.Builder

addHeaders(Header.Builder builderForValue)

public HttpResponse.Builder addHeaders(Header.Builder builderForValue)

The HTTP response headers.

repeated .google.cloud.apigeeconnect.v1.Header headers = 5;

Parameter
Name Description
builderForValue Header.Builder
Returns
Type Description
HttpResponse.Builder

addHeaders(int index, Header value)

public HttpResponse.Builder addHeaders(int index, Header value)

The HTTP response headers.

repeated .google.cloud.apigeeconnect.v1.Header headers = 5;

Parameters
Name Description
index int
value Header
Returns
Type Description
HttpResponse.Builder

addHeaders(int index, Header.Builder builderForValue)

public HttpResponse.Builder addHeaders(int index, Header.Builder builderForValue)

The HTTP response headers.

repeated .google.cloud.apigeeconnect.v1.Header headers = 5;

Parameters
Name Description
index int
builderForValue Header.Builder
Returns
Type Description
HttpResponse.Builder

addHeadersBuilder()

public Header.Builder addHeadersBuilder()

The HTTP response headers.

repeated .google.cloud.apigeeconnect.v1.Header headers = 5;

Returns
Type Description
Header.Builder

addHeadersBuilder(int index)

public Header.Builder addHeadersBuilder(int index)

The HTTP response headers.

repeated .google.cloud.apigeeconnect.v1.Header headers = 5;

Parameter
Name Description
index int
Returns
Type Description
Header.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public HttpResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
HttpResponse.Builder
Overrides

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
Overrides

clearBody()

public HttpResponse.Builder clearBody()

The HTTP 1.1 response body.

bytes body = 4;

Returns
Type Description
HttpResponse.Builder

This builder for chaining.

clearContentLength()

public HttpResponse.Builder clearContentLength()

Content length records the length of the associated content. The value -1 indicates that the length is unknown. Unless http method is "HEAD", values >= 0 indicate that the given number of bytes may be read from Body.

int64 content_length = 6;

Returns
Type Description
HttpResponse.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public HttpResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
HttpResponse.Builder
Overrides

clearHeaders()

public HttpResponse.Builder clearHeaders()

The HTTP response headers.

repeated .google.cloud.apigeeconnect.v1.Header headers = 5;

Returns
Type Description
HttpResponse.Builder

clearId()

public HttpResponse.Builder clearId()

A unique identifier that matches the request ID.

string id = 1;

Returns
Type Description
HttpResponse.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public HttpResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
HttpResponse.Builder
Overrides

clearStatus()

public HttpResponse.Builder clearStatus()

Status of http response, e.g. "200 OK".

string status = 2;

Returns
Type Description
HttpResponse.Builder

This builder for chaining.

clearStatusCode()

public HttpResponse.Builder clearStatusCode()

Status code of http response, e.g. 200.

int32 status_code = 3;

Returns
Type Description
HttpResponse.Builder

This builder for chaining.

clone()

public HttpResponse.Builder clone()
Returns
Type Description
HttpResponse.Builder
Overrides

getBody()

public ByteString getBody()

The HTTP 1.1 response body.

bytes body = 4;

Returns
Type Description
ByteString

The body.

getContentLength()

public long getContentLength()

Content length records the length of the associated content. The value -1 indicates that the length is unknown. Unless http method is "HEAD", values >= 0 indicate that the given number of bytes may be read from Body.

int64 content_length = 6;

Returns
Type Description
long

The contentLength.

getDefaultInstanceForType()

public HttpResponse getDefaultInstanceForType()
Returns
Type Description
HttpResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getHeaders(int index)

public Header getHeaders(int index)

The HTTP response headers.

repeated .google.cloud.apigeeconnect.v1.Header headers = 5;

Parameter
Name Description
index int
Returns
Type Description
Header

getHeadersBuilder(int index)

public Header.Builder getHeadersBuilder(int index)

The HTTP response headers.

repeated .google.cloud.apigeeconnect.v1.Header headers = 5;

Parameter
Name Description
index int
Returns
Type Description
Header.Builder

getHeadersBuilderList()

public List<Header.Builder> getHeadersBuilderList()

The HTTP response headers.

repeated .google.cloud.apigeeconnect.v1.Header headers = 5;

Returns
Type Description
List<Builder>

getHeadersCount()

public int getHeadersCount()

The HTTP response headers.

repeated .google.cloud.apigeeconnect.v1.Header headers = 5;

Returns
Type Description
int

getHeadersList()

public List<Header> getHeadersList()

The HTTP response headers.

repeated .google.cloud.apigeeconnect.v1.Header headers = 5;

Returns
Type Description
List<Header>

getHeadersOrBuilder(int index)

public HeaderOrBuilder getHeadersOrBuilder(int index)

The HTTP response headers.

repeated .google.cloud.apigeeconnect.v1.Header headers = 5;

Parameter
Name Description
index int
Returns
Type Description
HeaderOrBuilder

getHeadersOrBuilderList()

public List<? extends HeaderOrBuilder> getHeadersOrBuilderList()

The HTTP response headers.

repeated .google.cloud.apigeeconnect.v1.Header headers = 5;

Returns
Type Description
List<? extends com.google.cloud.apigeeconnect.v1.HeaderOrBuilder>

getId()

public String getId()

A unique identifier that matches the request ID.

string id = 1;

Returns
Type Description
String

The id.

getIdBytes()

public ByteString getIdBytes()

A unique identifier that matches the request ID.

string id = 1;

Returns
Type Description
ByteString

The bytes for id.

getStatus()

public String getStatus()

Status of http response, e.g. "200 OK".

string status = 2;

Returns
Type Description
String

The status.

getStatusBytes()

public ByteString getStatusBytes()

Status of http response, e.g. "200 OK".

string status = 2;

Returns
Type Description
ByteString

The bytes for status.

getStatusCode()

public int getStatusCode()

Status code of http response, e.g. 200.

int32 status_code = 3;

Returns
Type Description
int

The statusCode.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(HttpResponse other)

public HttpResponse.Builder mergeFrom(HttpResponse other)
Parameter
Name Description
other HttpResponse
Returns
Type Description
HttpResponse.Builder

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
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public HttpResponse.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
HttpResponse.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final HttpResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
HttpResponse.Builder
Overrides

removeHeaders(int index)

public HttpResponse.Builder removeHeaders(int index)

The HTTP response headers.

repeated .google.cloud.apigeeconnect.v1.Header headers = 5;

Parameter
Name Description
index int
Returns
Type Description
HttpResponse.Builder

setBody(ByteString value)

public HttpResponse.Builder setBody(ByteString value)

The HTTP 1.1 response body.

bytes body = 4;

Parameter
Name Description
value ByteString

The body to set.

Returns
Type Description
HttpResponse.Builder

This builder for chaining.

setContentLength(long value)

public HttpResponse.Builder setContentLength(long value)

Content length records the length of the associated content. The value -1 indicates that the length is unknown. Unless http method is "HEAD", values >= 0 indicate that the given number of bytes may be read from Body.

int64 content_length = 6;

Parameter
Name Description
value long

The contentLength to set.

Returns
Type Description
HttpResponse.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public HttpResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
HttpResponse.Builder
Overrides

setHeaders(int index, Header value)

public HttpResponse.Builder setHeaders(int index, Header value)

The HTTP response headers.

repeated .google.cloud.apigeeconnect.v1.Header headers = 5;

Parameters
Name Description
index int
value Header
Returns
Type Description
HttpResponse.Builder

setHeaders(int index, Header.Builder builderForValue)

public HttpResponse.Builder setHeaders(int index, Header.Builder builderForValue)

The HTTP response headers.

repeated .google.cloud.apigeeconnect.v1.Header headers = 5;

Parameters
Name Description
index int
builderForValue Header.Builder
Returns
Type Description
HttpResponse.Builder

setId(String value)

public HttpResponse.Builder setId(String value)

A unique identifier that matches the request ID.

string id = 1;

Parameter
Name Description
value String

The id to set.

Returns
Type Description
HttpResponse.Builder

This builder for chaining.

setIdBytes(ByteString value)

public HttpResponse.Builder setIdBytes(ByteString value)

A unique identifier that matches the request ID.

string id = 1;

Parameter
Name Description
value ByteString

The bytes for id to set.

Returns
Type Description
HttpResponse.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public HttpResponse.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
HttpResponse.Builder
Overrides

setStatus(String value)

public HttpResponse.Builder setStatus(String value)

Status of http response, e.g. "200 OK".

string status = 2;

Parameter
Name Description
value String

The status to set.

Returns
Type Description
HttpResponse.Builder

This builder for chaining.

setStatusBytes(ByteString value)

public HttpResponse.Builder setStatusBytes(ByteString value)

Status of http response, e.g. "200 OK".

string status = 2;

Parameter
Name Description
value ByteString

The bytes for status to set.

Returns
Type Description
HttpResponse.Builder

This builder for chaining.

setStatusCode(int value)

public HttpResponse.Builder setStatusCode(int value)

Status code of http response, e.g. 200.

int32 status_code = 3;

Parameter
Name Description
value int

The statusCode to set.

Returns
Type Description
HttpResponse.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final HttpResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
HttpResponse.Builder
Overrides