Package com.google.rpc.context
Class AttributeContext.Peer.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessage.Builder<BuilderT>
-
- com.google.protobuf.GeneratedMessage.ExtendableBuilder<com.google.protobuf.GeneratedMessageV3,BuilderT>
-
- com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
- com.google.rpc.context.AttributeContext.Peer.Builder
-
- All Implemented Interfaces:
com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
,com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,AttributeContext.PeerOrBuilder
,java.lang.Cloneable
- Enclosing class:
- AttributeContext.Peer
public static final class AttributeContext.Peer.Builder extends com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder> implements AttributeContext.PeerOrBuilder
This message defines attributes for a node that handles a network request. The node can be either a service or an application that sends, forwards, or receives the request. Service peers should fill in `principal` and `labels` as appropriate.
Protobuf typegoogle.rpc.context.AttributeContext.Peer
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description AttributeContext.Peer.Builder
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
AttributeContext.Peer
build()
AttributeContext.Peer
buildPartial()
AttributeContext.Peer.Builder
clear()
AttributeContext.Peer.Builder
clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
AttributeContext.Peer.Builder
clearIp()
The IP address of the peer.AttributeContext.Peer.Builder
clearLabels()
AttributeContext.Peer.Builder
clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
AttributeContext.Peer.Builder
clearPort()
The network port of the peer.AttributeContext.Peer.Builder
clearPrincipal()
The identity of this peer.AttributeContext.Peer.Builder
clearRegionCode()
The CLDR country/region code associated with the above IP address.AttributeContext.Peer.Builder
clone()
boolean
containsLabels(java.lang.String key)
The labels associated with the peer.AttributeContext.Peer
getDefaultInstanceForType()
static com.google.protobuf.Descriptors.Descriptor
getDescriptor()
com.google.protobuf.Descriptors.Descriptor
getDescriptorForType()
java.lang.String
getIp()
The IP address of the peer.com.google.protobuf.ByteString
getIpBytes()
The IP address of the peer.java.util.Map<java.lang.String,java.lang.String>
getLabels()
Deprecated.int
getLabelsCount()
The labels associated with the peer.java.util.Map<java.lang.String,java.lang.String>
getLabelsMap()
The labels associated with the peer.java.lang.String
getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue)
The labels associated with the peer.java.lang.String
getLabelsOrThrow(java.lang.String key)
The labels associated with the peer.java.util.Map<java.lang.String,java.lang.String>
getMutableLabels()
Deprecated.long
getPort()
The network port of the peer.java.lang.String
getPrincipal()
The identity of this peer.com.google.protobuf.ByteString
getPrincipalBytes()
The identity of this peer.java.lang.String
getRegionCode()
The CLDR country/region code associated with the above IP address.com.google.protobuf.ByteString
getRegionCodeBytes()
The CLDR country/region code associated with the above IP address.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable()
protected com.google.protobuf.MapFieldReflectionAccessor
internalGetMapFieldReflection(int number)
protected com.google.protobuf.MapFieldReflectionAccessor
internalGetMutableMapFieldReflection(int number)
boolean
isInitialized()
AttributeContext.Peer.Builder
mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
AttributeContext.Peer.Builder
mergeFrom(com.google.protobuf.Message other)
AttributeContext.Peer.Builder
mergeFrom(AttributeContext.Peer other)
AttributeContext.Peer.Builder
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
AttributeContext.Peer.Builder
putAllLabels(java.util.Map<java.lang.String,java.lang.String> values)
The labels associated with the peer.AttributeContext.Peer.Builder
putLabels(java.lang.String key, java.lang.String value)
The labels associated with the peer.AttributeContext.Peer.Builder
removeLabels(java.lang.String key)
The labels associated with the peer.AttributeContext.Peer.Builder
setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
AttributeContext.Peer.Builder
setIp(java.lang.String value)
The IP address of the peer.AttributeContext.Peer.Builder
setIpBytes(com.google.protobuf.ByteString value)
The IP address of the peer.AttributeContext.Peer.Builder
setPort(long value)
The network port of the peer.AttributeContext.Peer.Builder
setPrincipal(java.lang.String value)
The identity of this peer.AttributeContext.Peer.Builder
setPrincipalBytes(com.google.protobuf.ByteString value)
The identity of this peer.AttributeContext.Peer.Builder
setRegionCode(java.lang.String value)
The CLDR country/region code associated with the above IP address.AttributeContext.Peer.Builder
setRegionCodeBytes(com.google.protobuf.ByteString value)
The CLDR country/region code associated with the above IP address.AttributeContext.Peer.Builder
setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
AttributeContext.Peer.Builder
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
-
Methods inherited from class com.google.protobuf.GeneratedMessage.ExtendableBuilder
addExtension, clearExtension, extensionsAreInitialized, getAllFields, getExtension, getExtension, getExtensionCount, getField, getFieldBuilder, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, hasExtension, hasField, mergeExtensionFields, newBuilderForField, parseUnknownField, setExtension, setExtension
-
Methods inherited from class com.google.protobuf.GeneratedMessage.Builder
getOneofFieldDescriptor, getUnknownFields, getUnknownFieldSetBuilder, hasOneof, internalGetMapField, internalGetMutableMapField, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, onBuilt, onChanged, 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
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
- Overrides:
internalGetMapFieldReflection
in classcom.google.protobuf.GeneratedMessage.Builder<AttributeContext.Peer.Builder>
-
internalGetMutableMapFieldReflection
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
- Overrides:
internalGetMutableMapFieldReflection
in classcom.google.protobuf.GeneratedMessage.Builder<AttributeContext.Peer.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Overrides:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
clear
public AttributeContext.Peer.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.Peer.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.GeneratedMessage.Builder<AttributeContext.Peer.Builder>
-
getDefaultInstanceForType
public AttributeContext.Peer getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder<com.google.protobuf.GeneratedMessageV3>
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
public AttributeContext.Peer build()
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public AttributeContext.Peer buildPartial()
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
clone
public AttributeContext.Peer.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.Peer.Builder>
-
setField
public AttributeContext.Peer.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
setField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setField
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
clearField
public AttributeContext.Peer.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.Peer.Builder>
-
clearOneof
public AttributeContext.Peer.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.Peer.Builder>
-
setRepeatedField
public AttributeContext.Peer.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
- Specified by:
setRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
addRepeatedField
public AttributeContext.Peer.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
- Specified by:
addRepeatedField
in interfacecom.google.protobuf.Message.Builder
- Overrides:
addRepeatedField
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
mergeFrom
public AttributeContext.Peer.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<AttributeContext.Peer.Builder>
-
mergeFrom
public AttributeContext.Peer.Builder mergeFrom(AttributeContext.Peer other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessage.ExtendableBuilder<com.google.protobuf.GeneratedMessageV3,AttributeContext.Peer.Builder>
-
mergeFrom
public AttributeContext.Peer.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.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.Peer.Builder>
- Throws:
java.io.IOException
-
getIp
public java.lang.String getIp()
The IP address of the peer.
string ip = 1;
- Specified by:
getIp
in interfaceAttributeContext.PeerOrBuilder
- Returns:
- The ip.
-
getIpBytes
public com.google.protobuf.ByteString getIpBytes()
The IP address of the peer.
string ip = 1;
- Specified by:
getIpBytes
in interfaceAttributeContext.PeerOrBuilder
- Returns:
- The bytes for ip.
-
setIp
public AttributeContext.Peer.Builder setIp(java.lang.String value)
The IP address of the peer.
string ip = 1;
- Parameters:
value
- The ip to set.- Returns:
- This builder for chaining.
-
clearIp
public AttributeContext.Peer.Builder clearIp()
The IP address of the peer.
string ip = 1;
- Returns:
- This builder for chaining.
-
setIpBytes
public AttributeContext.Peer.Builder setIpBytes(com.google.protobuf.ByteString value)
The IP address of the peer.
string ip = 1;
- Parameters:
value
- The bytes for ip to set.- Returns:
- This builder for chaining.
-
getPort
public long getPort()
The network port of the peer.
int64 port = 2;
- Specified by:
getPort
in interfaceAttributeContext.PeerOrBuilder
- Returns:
- The port.
-
setPort
public AttributeContext.Peer.Builder setPort(long value)
The network port of the peer.
int64 port = 2;
- Parameters:
value
- The port to set.- Returns:
- This builder for chaining.
-
clearPort
public AttributeContext.Peer.Builder clearPort()
The network port of the peer.
int64 port = 2;
- Returns:
- This builder for chaining.
-
getLabelsCount
public int getLabelsCount()
Description copied from interface:AttributeContext.PeerOrBuilder
The labels associated with the peer.
map<string, string> labels = 6;
- Specified by:
getLabelsCount
in interfaceAttributeContext.PeerOrBuilder
-
containsLabels
public boolean containsLabels(java.lang.String key)
The labels associated with the peer.
map<string, string> labels = 6;
- Specified by:
containsLabels
in interfaceAttributeContext.PeerOrBuilder
-
getLabels
@Deprecated public java.util.Map<java.lang.String,java.lang.String> getLabels()
Deprecated.UsegetLabelsMap()
instead.- Specified by:
getLabels
in interfaceAttributeContext.PeerOrBuilder
-
getLabelsMap
public java.util.Map<java.lang.String,java.lang.String> getLabelsMap()
The labels associated with the peer.
map<string, string> labels = 6;
- Specified by:
getLabelsMap
in interfaceAttributeContext.PeerOrBuilder
-
getLabelsOrDefault
public java.lang.String getLabelsOrDefault(java.lang.String key, java.lang.String defaultValue)
The labels associated with the peer.
map<string, string> labels = 6;
- Specified by:
getLabelsOrDefault
in interfaceAttributeContext.PeerOrBuilder
-
getLabelsOrThrow
public java.lang.String getLabelsOrThrow(java.lang.String key)
The labels associated with the peer.
map<string, string> labels = 6;
- Specified by:
getLabelsOrThrow
in interfaceAttributeContext.PeerOrBuilder
-
clearLabels
public AttributeContext.Peer.Builder clearLabels()
-
removeLabels
public AttributeContext.Peer.Builder removeLabels(java.lang.String key)
The labels associated with the peer.
map<string, string> labels = 6;
-
getMutableLabels
@Deprecated public java.util.Map<java.lang.String,java.lang.String> getMutableLabels()
Deprecated.Use alternate mutation accessors instead.
-
putLabels
public AttributeContext.Peer.Builder putLabels(java.lang.String key, java.lang.String value)
The labels associated with the peer.
map<string, string> labels = 6;
-
putAllLabels
public AttributeContext.Peer.Builder putAllLabels(java.util.Map<java.lang.String,java.lang.String> values)
The labels associated with the peer.
map<string, string> labels = 6;
-
getPrincipal
public java.lang.String getPrincipal()
The identity of this peer. Similar to `Request.auth.principal`, but relative to the peer instead of the request. For example, the identity associated with a load balancer that forwarded the request.
string principal = 7;
- Specified by:
getPrincipal
in interfaceAttributeContext.PeerOrBuilder
- Returns:
- The principal.
-
getPrincipalBytes
public com.google.protobuf.ByteString getPrincipalBytes()
The identity of this peer. Similar to `Request.auth.principal`, but relative to the peer instead of the request. For example, the identity associated with a load balancer that forwarded the request.
string principal = 7;
- Specified by:
getPrincipalBytes
in interfaceAttributeContext.PeerOrBuilder
- Returns:
- The bytes for principal.
-
setPrincipal
public AttributeContext.Peer.Builder setPrincipal(java.lang.String value)
The identity of this peer. Similar to `Request.auth.principal`, but relative to the peer instead of the request. For example, the identity associated with a load balancer that forwarded the request.
string principal = 7;
- Parameters:
value
- The principal to set.- Returns:
- This builder for chaining.
-
clearPrincipal
public AttributeContext.Peer.Builder clearPrincipal()
The identity of this peer. Similar to `Request.auth.principal`, but relative to the peer instead of the request. For example, the identity associated with a load balancer that forwarded the request.
string principal = 7;
- Returns:
- This builder for chaining.
-
setPrincipalBytes
public AttributeContext.Peer.Builder setPrincipalBytes(com.google.protobuf.ByteString value)
The identity of this peer. Similar to `Request.auth.principal`, but relative to the peer instead of the request. For example, the identity associated with a load balancer that forwarded the request.
string principal = 7;
- Parameters:
value
- The bytes for principal to set.- Returns:
- This builder for chaining.
-
getRegionCode
public java.lang.String getRegionCode()
The CLDR country/region code associated with the above IP address. If the IP address is private, the `region_code` should reflect the physical location where this peer is running.
string region_code = 8;
- Specified by:
getRegionCode
in interfaceAttributeContext.PeerOrBuilder
- Returns:
- The regionCode.
-
getRegionCodeBytes
public com.google.protobuf.ByteString getRegionCodeBytes()
The CLDR country/region code associated with the above IP address. If the IP address is private, the `region_code` should reflect the physical location where this peer is running.
string region_code = 8;
- Specified by:
getRegionCodeBytes
in interfaceAttributeContext.PeerOrBuilder
- Returns:
- The bytes for regionCode.
-
setRegionCode
public AttributeContext.Peer.Builder setRegionCode(java.lang.String value)
The CLDR country/region code associated with the above IP address. If the IP address is private, the `region_code` should reflect the physical location where this peer is running.
string region_code = 8;
- Parameters:
value
- The regionCode to set.- Returns:
- This builder for chaining.
-
clearRegionCode
public AttributeContext.Peer.Builder clearRegionCode()
The CLDR country/region code associated with the above IP address. If the IP address is private, the `region_code` should reflect the physical location where this peer is running.
string region_code = 8;
- Returns:
- This builder for chaining.
-
setRegionCodeBytes
public AttributeContext.Peer.Builder setRegionCodeBytes(com.google.protobuf.ByteString value)
The CLDR country/region code associated with the above IP address. If the IP address is private, the `region_code` should reflect the physical location where this peer is running.
string region_code = 8;
- Parameters:
value
- The bytes for regionCode to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final AttributeContext.Peer.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.Peer.Builder>
-
mergeUnknownFields
public final AttributeContext.Peer.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.Peer.Builder>
-
-