Class HttpResponse.Builder (2.37.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.apigeeconnect.v1.Header>
Returns
TypeDescription
HttpResponse.Builder

addHeaders(Header value)

public HttpResponse.Builder addHeaders(Header value)

The HTTP response headers.

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

Parameter
NameDescription
valueHeader
Returns
TypeDescription
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
NameDescription
builderForValueHeader.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueHeader
Returns
TypeDescription
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
NameDescription
indexint
builderForValueHeader.Builder
Returns
TypeDescription
HttpResponse.Builder

addHeadersBuilder()

public Header.Builder addHeadersBuilder()

The HTTP response headers.

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

Returns
TypeDescription
Header.Builder

addHeadersBuilder(int index)

public Header.Builder addHeadersBuilder(int index)

The HTTP response headers.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
Header.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public HttpResponse.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
HttpResponse.Builder
Overrides

build()

public HttpResponse build()
Returns
TypeDescription
HttpResponse

buildPartial()

public HttpResponse buildPartial()
Returns
TypeDescription
HttpResponse

clear()

public HttpResponse.Builder clear()
Returns
TypeDescription
HttpResponse.Builder
Overrides

clearBody()

public HttpResponse.Builder clearBody()

The HTTP 1.1 response body.

bytes body = 4;

Returns
TypeDescription
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
TypeDescription
HttpResponse.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

public HttpResponse.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
HttpResponse.Builder
Overrides

clearHeaders()

public HttpResponse.Builder clearHeaders()

The HTTP response headers.

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

Returns
TypeDescription
HttpResponse.Builder

clearId()

public HttpResponse.Builder clearId()

A unique identifier that matches the request ID.

string id = 1;

Returns
TypeDescription
HttpResponse.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public HttpResponse.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
HttpResponse.Builder
Overrides

clearStatus()

public HttpResponse.Builder clearStatus()

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

string status = 2;

Returns
TypeDescription
HttpResponse.Builder

This builder for chaining.

clearStatusCode()

public HttpResponse.Builder clearStatusCode()

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

int32 status_code = 3;

Returns
TypeDescription
HttpResponse.Builder

This builder for chaining.

clone()

public HttpResponse.Builder clone()
Returns
TypeDescription
HttpResponse.Builder
Overrides

getBody()

public ByteString getBody()

The HTTP 1.1 response body.

bytes body = 4;

Returns
TypeDescription
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
TypeDescription
long

The contentLength.

getDefaultInstanceForType()

public HttpResponse getDefaultInstanceForType()
Returns
TypeDescription
HttpResponse

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getHeaders(int index)

public Header getHeaders(int index)

The HTTP response headers.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
Header

getHeadersBuilder(int index)

public Header.Builder getHeadersBuilder(int index)

The HTTP response headers.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
Header.Builder

getHeadersBuilderList()

public List<Header.Builder> getHeadersBuilderList()

The HTTP response headers.

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

Returns
TypeDescription
List<Builder>

getHeadersCount()

public int getHeadersCount()

The HTTP response headers.

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

Returns
TypeDescription
int

getHeadersList()

public List<Header> getHeadersList()

The HTTP response headers.

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

Returns
TypeDescription
List<Header>

getHeadersOrBuilder(int index)

public HeaderOrBuilder getHeadersOrBuilder(int index)

The HTTP response headers.

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

Parameter
NameDescription
indexint
Returns
TypeDescription
HeaderOrBuilder

getHeadersOrBuilderList()

public List<? extends HeaderOrBuilder> getHeadersOrBuilderList()

The HTTP response headers.

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

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

getId()

public String getId()

A unique identifier that matches the request ID.

string id = 1;

Returns
TypeDescription
String

The id.

getIdBytes()

public ByteString getIdBytes()

A unique identifier that matches the request ID.

string id = 1;

Returns
TypeDescription
ByteString

The bytes for id.

getStatus()

public String getStatus()

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

string status = 2;

Returns
TypeDescription
String

The status.

getStatusBytes()

public ByteString getStatusBytes()

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

string status = 2;

Returns
TypeDescription
ByteString

The bytes for status.

getStatusCode()

public int getStatusCode()

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

int32 status_code = 3;

Returns
TypeDescription
int

The statusCode.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(HttpResponse other)

public HttpResponse.Builder mergeFrom(HttpResponse other)
Parameter
NameDescription
otherHttpResponse
Returns
TypeDescription
HttpResponse.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public HttpResponse.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
HttpResponse.Builder
Overrides
Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public HttpResponse.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
HttpResponse.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final HttpResponse.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
HttpResponse.Builder

setBody(ByteString value)

public HttpResponse.Builder setBody(ByteString value)

The HTTP 1.1 response body.

bytes body = 4;

Parameter
NameDescription
valueByteString

The body to set.

Returns
TypeDescription
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
NameDescription
valuelong

The contentLength to set.

Returns
TypeDescription
HttpResponse.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public HttpResponse.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint
valueHeader
Returns
TypeDescription
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
NameDescription
indexint
builderForValueHeader.Builder
Returns
TypeDescription
HttpResponse.Builder

setId(String value)

public HttpResponse.Builder setId(String value)

A unique identifier that matches the request ID.

string id = 1;

Parameter
NameDescription
valueString

The id to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for id to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
HttpResponse.Builder
Overrides

setStatus(String value)

public HttpResponse.Builder setStatus(String value)

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

string status = 2;

Parameter
NameDescription
valueString

The status to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for status to set.

Returns
TypeDescription
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
NameDescription
valueint

The statusCode to set.

Returns
TypeDescription
HttpResponse.Builder

This builder for chaining.

setUnknownFields(UnknownFieldSet unknownFields)

public final HttpResponse.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
HttpResponse.Builder
Overrides