Class AttributeContext.Response.Builder (2.8.4)

public static final class AttributeContext.Response.Builder extends GeneratedMessageV3.Builder<AttributeContext.Response.Builder> implements AttributeContext.ResponseOrBuilder

This message defines attributes for a typical network response. It generally models semantics of an HTTP response.

Protobuf type google.rpc.context.AttributeContext.Response

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AttributeContext.Response build()
Returns
TypeDescription
AttributeContext.Response

buildPartial()

public AttributeContext.Response buildPartial()
Returns
TypeDescription
AttributeContext.Response

clear()

public AttributeContext.Response.Builder clear()
Returns
TypeDescription
AttributeContext.Response.Builder
Overrides

clearBackendLatency()

public AttributeContext.Response.Builder clearBackendLatency()

The length of time it takes the backend service to fully respond to a request. Measured from when the destination service starts to send the request to the backend until when the destination service receives the complete response from the backend.

.google.protobuf.Duration backend_latency = 5;

Returns
TypeDescription
AttributeContext.Response.Builder

clearCode()

public AttributeContext.Response.Builder clearCode()

The HTTP response status code, such as 200 and 404.

int64 code = 1;

Returns
TypeDescription
AttributeContext.Response.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearHeaders()

public AttributeContext.Response.Builder clearHeaders()
Returns
TypeDescription
AttributeContext.Response.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

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

clearSize()

public AttributeContext.Response.Builder clearSize()

The HTTP response size in bytes. If unknown, it must be -1.

int64 size = 2;

Returns
TypeDescription
AttributeContext.Response.Builder

This builder for chaining.

clearTime()

public AttributeContext.Response.Builder clearTime()

The timestamp when the destination service sends the last byte of the response.

.google.protobuf.Timestamp time = 4;

Returns
TypeDescription
AttributeContext.Response.Builder

clone()

public AttributeContext.Response.Builder clone()
Returns
TypeDescription
AttributeContext.Response.Builder
Overrides

containsHeaders(String key)

public boolean containsHeaders(String key)

The HTTP response headers. If multiple headers share the same key, they must be merged according to HTTP spec. All header keys must be lowercased, because HTTP header keys are case-insensitive.

map<string, string> headers = 3;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getBackendLatency()

public Duration getBackendLatency()

The length of time it takes the backend service to fully respond to a request. Measured from when the destination service starts to send the request to the backend until when the destination service receives the complete response from the backend.

.google.protobuf.Duration backend_latency = 5;

Returns
TypeDescription
Duration

The backendLatency.

getBackendLatencyBuilder()

public Duration.Builder getBackendLatencyBuilder()

The length of time it takes the backend service to fully respond to a request. Measured from when the destination service starts to send the request to the backend until when the destination service receives the complete response from the backend.

.google.protobuf.Duration backend_latency = 5;

Returns
TypeDescription
Builder

getBackendLatencyOrBuilder()

public DurationOrBuilder getBackendLatencyOrBuilder()

The length of time it takes the backend service to fully respond to a request. Measured from when the destination service starts to send the request to the backend until when the destination service receives the complete response from the backend.

.google.protobuf.Duration backend_latency = 5;

Returns
TypeDescription
DurationOrBuilder

getCode()

public long getCode()

The HTTP response status code, such as 200 and 404.

int64 code = 1;

Returns
TypeDescription
long

The code.

getDefaultInstanceForType()

public AttributeContext.Response getDefaultInstanceForType()
Returns
TypeDescription
AttributeContext.Response

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getHeaders()

public Map<String,String> getHeaders()

Use #getHeadersMap() instead.

Returns
TypeDescription
Map<String,String>

getHeadersCount()

public int getHeadersCount()

The HTTP response headers. If multiple headers share the same key, they must be merged according to HTTP spec. All header keys must be lowercased, because HTTP header keys are case-insensitive.

map<string, string> headers = 3;

Returns
TypeDescription
int

getHeadersMap()

public Map<String,String> getHeadersMap()

The HTTP response headers. If multiple headers share the same key, they must be merged according to HTTP spec. All header keys must be lowercased, because HTTP header keys are case-insensitive.

map<string, string> headers = 3;

Returns
TypeDescription
Map<String,String>

getHeadersOrDefault(String key, String defaultValue)

public String getHeadersOrDefault(String key, String defaultValue)

The HTTP response headers. If multiple headers share the same key, they must be merged according to HTTP spec. All header keys must be lowercased, because HTTP header keys are case-insensitive.

map<string, string> headers = 3;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getHeadersOrThrow(String key)

public String getHeadersOrThrow(String key)

The HTTP response headers. If multiple headers share the same key, they must be merged according to HTTP spec. All header keys must be lowercased, because HTTP header keys are case-insensitive.

map<string, string> headers = 3;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMutableHeaders()

public Map<String,String> getMutableHeaders()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getSize()

public long getSize()

The HTTP response size in bytes. If unknown, it must be -1.

int64 size = 2;

Returns
TypeDescription
long

The size.

getTime()

public Timestamp getTime()

The timestamp when the destination service sends the last byte of the response.

.google.protobuf.Timestamp time = 4;

Returns
TypeDescription
Timestamp

The time.

getTimeBuilder()

public Timestamp.Builder getTimeBuilder()

The timestamp when the destination service sends the last byte of the response.

.google.protobuf.Timestamp time = 4;

Returns
TypeDescription
Builder

getTimeOrBuilder()

public TimestampOrBuilder getTimeOrBuilder()

The timestamp when the destination service sends the last byte of the response.

.google.protobuf.Timestamp time = 4;

Returns
TypeDescription
TimestampOrBuilder

hasBackendLatency()

public boolean hasBackendLatency()

The length of time it takes the backend service to fully respond to a request. Measured from when the destination service starts to send the request to the backend until when the destination service receives the complete response from the backend.

.google.protobuf.Duration backend_latency = 5;

Returns
TypeDescription
boolean

Whether the backendLatency field is set.

hasTime()

public boolean hasTime()

The timestamp when the destination service sends the last byte of the response.

.google.protobuf.Timestamp time = 4;

Returns
TypeDescription
boolean

Whether the time field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeBackendLatency(Duration value)

public AttributeContext.Response.Builder mergeBackendLatency(Duration value)

The length of time it takes the backend service to fully respond to a request. Measured from when the destination service starts to send the request to the backend until when the destination service receives the complete response from the backend.

.google.protobuf.Duration backend_latency = 5;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
AttributeContext.Response.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeFrom(AttributeContext.Response other)

public AttributeContext.Response.Builder mergeFrom(AttributeContext.Response other)
Parameter
NameDescription
otherAttributeContext.Response
Returns
TypeDescription
AttributeContext.Response.Builder

mergeTime(Timestamp value)

public AttributeContext.Response.Builder mergeTime(Timestamp value)

The timestamp when the destination service sends the last byte of the response.

.google.protobuf.Timestamp time = 4;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
AttributeContext.Response.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AttributeContext.Response.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AttributeContext.Response.Builder
Overrides

putAllHeaders(Map<String,String> values)

public AttributeContext.Response.Builder putAllHeaders(Map<String,String> values)

The HTTP response headers. If multiple headers share the same key, they must be merged according to HTTP spec. All header keys must be lowercased, because HTTP header keys are case-insensitive.

map<string, string> headers = 3;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
AttributeContext.Response.Builder

putHeaders(String key, String value)

public AttributeContext.Response.Builder putHeaders(String key, String value)

The HTTP response headers. If multiple headers share the same key, they must be merged according to HTTP spec. All header keys must be lowercased, because HTTP header keys are case-insensitive.

map<string, string> headers = 3;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
AttributeContext.Response.Builder

removeHeaders(String key)

public AttributeContext.Response.Builder removeHeaders(String key)

The HTTP response headers. If multiple headers share the same key, they must be merged according to HTTP spec. All header keys must be lowercased, because HTTP header keys are case-insensitive.

map<string, string> headers = 3;

Parameter
NameDescription
keyString
Returns
TypeDescription
AttributeContext.Response.Builder

setBackendLatency(Duration value)

public AttributeContext.Response.Builder setBackendLatency(Duration value)

The length of time it takes the backend service to fully respond to a request. Measured from when the destination service starts to send the request to the backend until when the destination service receives the complete response from the backend.

.google.protobuf.Duration backend_latency = 5;

Parameter
NameDescription
valueDuration
Returns
TypeDescription
AttributeContext.Response.Builder

setBackendLatency(Duration.Builder builderForValue)

public AttributeContext.Response.Builder setBackendLatency(Duration.Builder builderForValue)

The length of time it takes the backend service to fully respond to a request. Measured from when the destination service starts to send the request to the backend until when the destination service receives the complete response from the backend.

.google.protobuf.Duration backend_latency = 5;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
AttributeContext.Response.Builder

setCode(long value)

public AttributeContext.Response.Builder setCode(long value)

The HTTP response status code, such as 200 and 404.

int64 code = 1;

Parameter
NameDescription
valuelong

The code to set.

Returns
TypeDescription
AttributeContext.Response.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public AttributeContext.Response.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AttributeContext.Response.Builder
Overrides

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

public AttributeContext.Response.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
AttributeContext.Response.Builder
Overrides

setSize(long value)

public AttributeContext.Response.Builder setSize(long value)

The HTTP response size in bytes. If unknown, it must be -1.

int64 size = 2;

Parameter
NameDescription
valuelong

The size to set.

Returns
TypeDescription
AttributeContext.Response.Builder

This builder for chaining.

setTime(Timestamp value)

public AttributeContext.Response.Builder setTime(Timestamp value)

The timestamp when the destination service sends the last byte of the response.

.google.protobuf.Timestamp time = 4;

Parameter
NameDescription
valueTimestamp
Returns
TypeDescription
AttributeContext.Response.Builder

setTime(Timestamp.Builder builderForValue)

public AttributeContext.Response.Builder setTime(Timestamp.Builder builderForValue)

The timestamp when the destination service sends the last byte of the response.

.google.protobuf.Timestamp time = 4;

Parameter
NameDescription
builderForValueBuilder
Returns
TypeDescription
AttributeContext.Response.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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