Class AttributeContext.Response.Builder (2.38.0)

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
Type Description
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public AttributeContext.Response build()
Returns
Type Description
AttributeContext.Response

buildPartial()

public AttributeContext.Response buildPartial()
Returns
Type Description
AttributeContext.Response

clear()

public AttributeContext.Response.Builder clear()
Returns
Type Description
AttributeContext.Response.Builder
Overrides

clearBackendLatency()

public AttributeContext.Response.Builder clearBackendLatency()

The amount 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
Type Description
AttributeContext.Response.Builder

clearCode()

public AttributeContext.Response.Builder clearCode()

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

int64 code = 1;

Returns
Type Description
AttributeContext.Response.Builder

This builder for chaining.

clearField(Descriptors.FieldDescriptor field)

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

clearHeaders()

public AttributeContext.Response.Builder clearHeaders()
Returns
Type Description
AttributeContext.Response.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public AttributeContext.Response.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
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
Type Description
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
Type Description
AttributeContext.Response.Builder

clone()

public AttributeContext.Response.Builder clone()
Returns
Type Description
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
Name Description
key String
Returns
Type Description
boolean

getBackendLatency()

public Duration getBackendLatency()

The amount 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
Type Description
Duration

The backendLatency.

getBackendLatencyBuilder()

public Duration.Builder getBackendLatencyBuilder()

The amount 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
Type Description
Builder

getBackendLatencyOrBuilder()

public DurationOrBuilder getBackendLatencyOrBuilder()

The amount 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
Type Description
DurationOrBuilder

getCode()

public long getCode()

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

int64 code = 1;

Returns
Type Description
long

The code.

getDefaultInstanceForType()

public AttributeContext.Response getDefaultInstanceForType()
Returns
Type Description
AttributeContext.Response

getDescriptorForType()

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

getHeaders() (deprecated)

public Map<String,String> getHeaders()

Use #getHeadersMap() instead.

Returns
Type Description
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
Type Description
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
Type Description
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
Name Description
key String
defaultValue String
Returns
Type Description
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
Name Description
key String
Returns
Type Description
String

getMutableHeaders() (deprecated)

public Map<String,String> getMutableHeaders()

Use alternate mutation accessors instead.

Returns
Type Description
Map<String,String>

getSize()

public long getSize()

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

int64 size = 2;

Returns
Type Description
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
Type Description
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
Type Description
Builder

getTimeOrBuilder()

public TimestampOrBuilder getTimeOrBuilder()

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

.google.protobuf.Timestamp time = 4;

Returns
Type Description
TimestampOrBuilder

hasBackendLatency()

public boolean hasBackendLatency()

The amount 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
Type Description
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
Type Description
boolean

Whether the time field is set.

internalGetFieldAccessorTable()

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

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMapFieldReflection(int)

internalGetMutableMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.Builder.internalGetMutableMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeBackendLatency(Duration value)

public AttributeContext.Response.Builder mergeBackendLatency(Duration value)

The amount 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
Name Description
value Duration
Returns
Type Description
AttributeContext.Response.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AttributeContext.Response.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
AttributeContext.Response.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

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

mergeFrom(AttributeContext.Response other)

public AttributeContext.Response.Builder mergeFrom(AttributeContext.Response other)
Parameter
Name Description
other AttributeContext.Response
Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
AttributeContext.Response.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AttributeContext.Response.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
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
Name Description
values Map<String,String>
Returns
Type Description
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
Name Description
key String
value String
Returns
Type Description
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
Name Description
key String
Returns
Type Description
AttributeContext.Response.Builder

setBackendLatency(Duration value)

public AttributeContext.Response.Builder setBackendLatency(Duration value)

The amount 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
Name Description
value Duration
Returns
Type Description
AttributeContext.Response.Builder

setBackendLatency(Duration.Builder builderForValue)

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

The amount 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
Name Description
builderForValue Builder
Returns
Type Description
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
Name Description
value long

The code to set.

Returns
Type Description
AttributeContext.Response.Builder

This builder for chaining.

setField(Descriptors.FieldDescriptor field, Object value)

public AttributeContext.Response.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
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
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
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
Name Description
value long

The size to set.

Returns
Type Description
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
Name Description
value Timestamp
Returns
Type Description
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
Name Description
builderForValue Builder
Returns
Type Description
AttributeContext.Response.Builder

setUnknownFields(UnknownFieldSet unknownFields)

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