Package com.google.rpc.context
Class AttributeContext.Response.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
com.google.rpc.context.AttributeContext.Response.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,AttributeContext.ResponseOrBuilder
,Cloneable
- Enclosing class:
- AttributeContext.Response
public static final class AttributeContext.Response.Builder
extends com.google.protobuf.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
-
Method Summary
Modifier and TypeMethodDescriptionaddRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) build()
clear()
The amount of time it takes the backend service to fully respond to a request.The HTTP response status code, such as `200` and `404`.clearField
(com.google.protobuf.Descriptors.FieldDescriptor field) clearOneof
(com.google.protobuf.Descriptors.OneofDescriptor oneof) The HTTP response size in bytes.The timestamp when the `destination` service sends the last byte of the response.clone()
boolean
containsHeaders
(String key) The HTTP response headers.com.google.protobuf.Duration
The amount of time it takes the backend service to fully respond to a request.com.google.protobuf.Duration.Builder
The amount of time it takes the backend service to fully respond to a request.com.google.protobuf.DurationOrBuilder
The amount of time it takes the backend service to fully respond to a request.long
getCode()
The HTTP response status code, such as `200` and `404`.static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
Deprecated.int
The HTTP response headers.The HTTP response headers.getHeadersOrDefault
(String key, String defaultValue) The HTTP response headers.getHeadersOrThrow
(String key) The HTTP response headers.Deprecated.long
getSize()
The HTTP response size in bytes.com.google.protobuf.Timestamp
getTime()
The timestamp when the `destination` service sends the last byte of the response.com.google.protobuf.Timestamp.Builder
The timestamp when the `destination` service sends the last byte of the response.com.google.protobuf.TimestampOrBuilder
The timestamp when the `destination` service sends the last byte of the response.boolean
The amount of time it takes the backend service to fully respond to a request.boolean
hasTime()
The timestamp when the `destination` service sends the last byte of the response.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
protected com.google.protobuf.MapField
internalGetMapField
(int number) protected com.google.protobuf.MapField
internalGetMutableMapField
(int number) final boolean
mergeBackendLatency
(com.google.protobuf.Duration value) The amount of time it takes the backend service to fully respond to a request.mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) mergeTime
(com.google.protobuf.Timestamp value) The timestamp when the `destination` service sends the last byte of the response.mergeUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) putAllHeaders
(Map<String, String> values) The HTTP response headers.putHeaders
(String key, String value) The HTTP response headers.removeHeaders
(String key) The HTTP response headers.setBackendLatency
(com.google.protobuf.Duration value) The amount of time it takes the backend service to fully respond to a request.setBackendLatency
(com.google.protobuf.Duration.Builder builderForValue) The amount of time it takes the backend service to fully respond to a request.setCode
(long value) The HTTP response status code, such as `200` and `404`.setRepeatedField
(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) setSize
(long value) The HTTP response size in bytes.setTime
(com.google.protobuf.Timestamp value) The timestamp when the `destination` service sends the last byte of the response.setTime
(com.google.protobuf.Timestamp.Builder builderForValue) The timestamp when the `destination` service sends the last byte of the response.setUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, internalGetMapFieldReflection, internalGetMutableMapFieldReflection, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number) - Overrides:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number) - Overrides:
internalGetMutableMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
- Specified by:
clone
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clone
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clone
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
-
setField
public AttributeContext.Response.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
-
clearField
public AttributeContext.Response.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) - Specified by:
clearField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearField
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
-
clearOneof
public AttributeContext.Response.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) - Specified by:
clearOneof
in interfacecom.google.protobuf.Message.Builder
- Overrides:
clearOneof
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
-
setRepeatedField
public AttributeContext.Response.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value) - Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
-
addRepeatedField
public AttributeContext.Response.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value) - Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<AttributeContext.Response.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
-
mergeFrom
public AttributeContext.Response.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<AttributeContext.Response.Builder>
- Throws:
IOException
-
getCode
public long getCode()The HTTP response status code, such as `200` and `404`.
int64 code = 1;
- Specified by:
getCode
in interfaceAttributeContext.ResponseOrBuilder
- Returns:
- The code.
-
setCode
The HTTP response status code, such as `200` and `404`.
int64 code = 1;
- Parameters:
value
- The code to set.- Returns:
- This builder for chaining.
-
clearCode
The HTTP response status code, such as `200` and `404`.
int64 code = 1;
- Returns:
- This builder for chaining.
-
getSize
public long getSize()The HTTP response size in bytes. If unknown, it must be -1.
int64 size = 2;
- Specified by:
getSize
in interfaceAttributeContext.ResponseOrBuilder
- Returns:
- The size.
-
setSize
The HTTP response size in bytes. If unknown, it must be -1.
int64 size = 2;
- Parameters:
value
- The size to set.- Returns:
- This builder for chaining.
-
clearSize
The HTTP response size in bytes. If unknown, it must be -1.
int64 size = 2;
- Returns:
- This builder for chaining.
-
getHeadersCount
public int getHeadersCount()Description copied from interface:AttributeContext.ResponseOrBuilder
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;
- Specified by:
getHeadersCount
in interfaceAttributeContext.ResponseOrBuilder
-
containsHeaders
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;
- Specified by:
containsHeaders
in interfaceAttributeContext.ResponseOrBuilder
-
getHeaders
Deprecated.UsegetHeadersMap()
instead.- Specified by:
getHeaders
in interfaceAttributeContext.ResponseOrBuilder
-
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;
- Specified by:
getHeadersMap
in interfaceAttributeContext.ResponseOrBuilder
-
getHeadersOrDefault
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;
- Specified by:
getHeadersOrDefault
in interfaceAttributeContext.ResponseOrBuilder
-
getHeadersOrThrow
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;
- Specified by:
getHeadersOrThrow
in interfaceAttributeContext.ResponseOrBuilder
-
clearHeaders
-
removeHeaders
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;
-
getMutableHeaders
Deprecated.Use alternate mutation accessors instead. -
putHeaders
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;
-
putAllHeaders
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;
-
hasTime
public boolean hasTime()The timestamp when the `destination` service sends the last byte of the response.
.google.protobuf.Timestamp time = 4;
- Specified by:
hasTime
in interfaceAttributeContext.ResponseOrBuilder
- Returns:
- Whether the time field is set.
-
getTime
public com.google.protobuf.Timestamp getTime()The timestamp when the `destination` service sends the last byte of the response.
.google.protobuf.Timestamp time = 4;
- Specified by:
getTime
in interfaceAttributeContext.ResponseOrBuilder
- Returns:
- The time.
-
setTime
The timestamp when the `destination` service sends the last byte of the response.
.google.protobuf.Timestamp time = 4;
-
setTime
public AttributeContext.Response.Builder setTime(com.google.protobuf.Timestamp.Builder builderForValue) The timestamp when the `destination` service sends the last byte of the response.
.google.protobuf.Timestamp time = 4;
-
mergeTime
The timestamp when the `destination` service sends the last byte of the response.
.google.protobuf.Timestamp time = 4;
-
clearTime
The timestamp when the `destination` service sends the last byte of the response.
.google.protobuf.Timestamp time = 4;
-
getTimeBuilder
public com.google.protobuf.Timestamp.Builder getTimeBuilder()The timestamp when the `destination` service sends the last byte of the response.
.google.protobuf.Timestamp time = 4;
-
getTimeOrBuilder
public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder()The timestamp when the `destination` service sends the last byte of the response.
.google.protobuf.Timestamp time = 4;
- Specified by:
getTimeOrBuilder
in interfaceAttributeContext.ResponseOrBuilder
-
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;
- Specified by:
hasBackendLatency
in interfaceAttributeContext.ResponseOrBuilder
- Returns:
- Whether the backendLatency field is set.
-
getBackendLatency
public com.google.protobuf.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;
- Specified by:
getBackendLatency
in interfaceAttributeContext.ResponseOrBuilder
- Returns:
- The backendLatency.
-
setBackendLatency
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;
-
setBackendLatency
public AttributeContext.Response.Builder setBackendLatency(com.google.protobuf.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;
-
mergeBackendLatency
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;
-
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;
-
getBackendLatencyBuilder
public com.google.protobuf.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;
-
getBackendLatencyOrBuilder
public com.google.protobuf.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;
- Specified by:
getBackendLatencyOrBuilder
in interfaceAttributeContext.ResponseOrBuilder
-
setUnknownFields
public final AttributeContext.Response.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
-
mergeUnknownFields
public final AttributeContext.Response.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Response.Builder>
-