Package com.google.rpc.context
Class AttributeContext.Peer.Builder
- java.lang.Object
-
- com.google.protobuf.AbstractMessageLite.Builder
-
- com.google.protobuf.AbstractMessage.Builder<BuilderType>
-
- com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
- com.google.rpc.context.AttributeContext.Peer.Builder
-
- All Implemented Interfaces:
com.google.protobuf.Message.Builder,com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,com.google.protobuf.MessageOrBuilder,AttributeContext.PeerOrBuilder,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.BuilderaddRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)AttributeContext.Peerbuild()AttributeContext.PeerbuildPartial()AttributeContext.Peer.Builderclear()AttributeContext.Peer.BuilderclearField(com.google.protobuf.Descriptors.FieldDescriptor field)AttributeContext.Peer.BuilderclearIp()The IP address of the peer.AttributeContext.Peer.BuilderclearLabels()AttributeContext.Peer.BuilderclearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)AttributeContext.Peer.BuilderclearPort()The network port of the peer.AttributeContext.Peer.BuilderclearPrincipal()The identity of this peer.AttributeContext.Peer.BuilderclearRegionCode()The CLDR country/region code associated with the above IP address.AttributeContext.Peer.Builderclone()booleancontainsLabels(String key)The labels associated with the peer.AttributeContext.PeergetDefaultInstanceForType()static com.google.protobuf.Descriptors.DescriptorgetDescriptor()com.google.protobuf.Descriptors.DescriptorgetDescriptorForType()StringgetIp()The IP address of the peer.com.google.protobuf.ByteStringgetIpBytes()The IP address of the peer.Map<String,String>getLabels()Deprecated.intgetLabelsCount()The labels associated with the peer.Map<String,String>getLabelsMap()The labels associated with the peer.StringgetLabelsOrDefault(String key, String defaultValue)The labels associated with the peer.StringgetLabelsOrThrow(String key)The labels associated with the peer.Map<String,String>getMutableLabels()Deprecated.longgetPort()The network port of the peer.StringgetPrincipal()The identity of this peer.com.google.protobuf.ByteStringgetPrincipalBytes()The identity of this peer.StringgetRegionCode()The CLDR country/region code associated with the above IP address.com.google.protobuf.ByteStringgetRegionCodeBytes()The CLDR country/region code associated with the above IP address.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()protected com.google.protobuf.MapFieldinternalGetMapField(int number)protected com.google.protobuf.MapFieldinternalGetMutableMapField(int number)booleanisInitialized()AttributeContext.Peer.BuildermergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)AttributeContext.Peer.BuildermergeFrom(com.google.protobuf.Message other)AttributeContext.Peer.BuildermergeFrom(AttributeContext.Peer other)AttributeContext.Peer.BuildermergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)AttributeContext.Peer.BuilderputAllLabels(Map<String,String> values)The labels associated with the peer.AttributeContext.Peer.BuilderputLabels(String key, String value)The labels associated with the peer.AttributeContext.Peer.BuilderremoveLabels(String key)The labels associated with the peer.AttributeContext.Peer.BuildersetField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)AttributeContext.Peer.BuildersetIp(String value)The IP address of the peer.AttributeContext.Peer.BuildersetIpBytes(com.google.protobuf.ByteString value)The IP address of the peer.AttributeContext.Peer.BuildersetPort(long value)The network port of the peer.AttributeContext.Peer.BuildersetPrincipal(String value)The identity of this peer.AttributeContext.Peer.BuildersetPrincipalBytes(com.google.protobuf.ByteString value)The identity of this peer.AttributeContext.Peer.BuildersetRegionCode(String value)The CLDR country/region code associated with the above IP address.AttributeContext.Peer.BuildersetRegionCodeBytes(com.google.protobuf.ByteString value)The CLDR country/region code associated with the above IP address.AttributeContext.Peer.BuildersetRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)AttributeContext.Peer.BuildersetUnknownFields(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, 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
-
-
-
-
Method Detail
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
-
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number)
- Overrides:
internalGetMapFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number)
- Overrides:
internalGetMutableMapFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
- Specified by:
internalGetFieldAccessorTablein classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
clear
public AttributeContext.Peer.Builder clear()
- Specified by:
clearin interfacecom.google.protobuf.Message.Builder- Specified by:
clearin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clearin classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.Message.Builder- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.MessageOrBuilder- Overrides:
getDescriptorForTypein classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
getDefaultInstanceForType
public AttributeContext.Peer getDefaultInstanceForType()
- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageLiteOrBuilder- Specified by:
getDefaultInstanceForTypein interfacecom.google.protobuf.MessageOrBuilder
-
build
public AttributeContext.Peer build()
- Specified by:
buildin interfacecom.google.protobuf.Message.Builder- Specified by:
buildin interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
public AttributeContext.Peer buildPartial()
- Specified by:
buildPartialin interfacecom.google.protobuf.Message.Builder- Specified by:
buildPartialin interfacecom.google.protobuf.MessageLite.Builder
-
clone
public AttributeContext.Peer.Builder clone()
- Specified by:
clonein interfacecom.google.protobuf.Message.Builder- Specified by:
clonein interfacecom.google.protobuf.MessageLite.Builder- Overrides:
clonein classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
setField
public AttributeContext.Peer.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
setFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
clearField
public AttributeContext.Peer.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
- Specified by:
clearFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
clearFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
clearOneof
public AttributeContext.Peer.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
- Specified by:
clearOneofin interfacecom.google.protobuf.Message.Builder- Overrides:
clearOneofin classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
setRepeatedField
public AttributeContext.Peer.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
- Specified by:
setRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
setRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
addRepeatedField
public AttributeContext.Peer.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
- Specified by:
addRepeatedFieldin interfacecom.google.protobuf.Message.Builder- Overrides:
addRepeatedFieldin classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
mergeFrom
public AttributeContext.Peer.Builder mergeFrom(com.google.protobuf.Message other)
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<AttributeContext.Peer.Builder>
-
mergeFrom
public AttributeContext.Peer.Builder mergeFrom(AttributeContext.Peer other)
-
isInitialized
public final boolean isInitialized()
- Specified by:
isInitializedin interfacecom.google.protobuf.MessageLiteOrBuilder- Overrides:
isInitializedin classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
mergeFrom
public AttributeContext.Peer.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
- Specified by:
mergeFromin interfacecom.google.protobuf.Message.Builder- Specified by:
mergeFromin interfacecom.google.protobuf.MessageLite.Builder- Overrides:
mergeFromin classcom.google.protobuf.AbstractMessage.Builder<AttributeContext.Peer.Builder>- Throws:
IOException
-
getIp
public String getIp()
The IP address of the peer.
string ip = 1;- Specified by:
getIpin interfaceAttributeContext.PeerOrBuilder- Returns:
- The ip.
-
getIpBytes
public com.google.protobuf.ByteString getIpBytes()
The IP address of the peer.
string ip = 1;- Specified by:
getIpBytesin interfaceAttributeContext.PeerOrBuilder- Returns:
- The bytes for ip.
-
setIp
public AttributeContext.Peer.Builder setIp(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:
getPortin 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.PeerOrBuilderThe labels associated with the peer.
map<string, string> labels = 6;- Specified by:
getLabelsCountin interfaceAttributeContext.PeerOrBuilder
-
containsLabels
public boolean containsLabels(String key)
The labels associated with the peer.
map<string, string> labels = 6;- Specified by:
containsLabelsin interfaceAttributeContext.PeerOrBuilder
-
getLabels
@Deprecated public Map<String,String> getLabels()
Deprecated.UsegetLabelsMap()instead.- Specified by:
getLabelsin interfaceAttributeContext.PeerOrBuilder
-
getLabelsMap
public Map<String,String> getLabelsMap()
The labels associated with the peer.
map<string, string> labels = 6;- Specified by:
getLabelsMapin interfaceAttributeContext.PeerOrBuilder
-
getLabelsOrDefault
public String getLabelsOrDefault(String key, String defaultValue)
The labels associated with the peer.
map<string, string> labels = 6;- Specified by:
getLabelsOrDefaultin interfaceAttributeContext.PeerOrBuilder
-
getLabelsOrThrow
public String getLabelsOrThrow(String key)
The labels associated with the peer.
map<string, string> labels = 6;- Specified by:
getLabelsOrThrowin interfaceAttributeContext.PeerOrBuilder
-
clearLabels
public AttributeContext.Peer.Builder clearLabels()
-
removeLabels
public AttributeContext.Peer.Builder removeLabels(String key)
The labels associated with the peer.
map<string, string> labels = 6;
-
getMutableLabels
@Deprecated public Map<String,String> getMutableLabels()
Deprecated.Use alternate mutation accessors instead.
-
putLabels
public AttributeContext.Peer.Builder putLabels(String key, String value)
The labels associated with the peer.
map<string, string> labels = 6;
-
putAllLabels
public AttributeContext.Peer.Builder putAllLabels(Map<String,String> values)
The labels associated with the peer.
map<string, string> labels = 6;
-
getPrincipal
public 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:
getPrincipalin 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:
getPrincipalBytesin interfaceAttributeContext.PeerOrBuilder- Returns:
- The bytes for principal.
-
setPrincipal
public AttributeContext.Peer.Builder setPrincipal(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 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:
getRegionCodein 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:
getRegionCodeBytesin interfaceAttributeContext.PeerOrBuilder- Returns:
- The bytes for regionCode.
-
setRegionCode
public AttributeContext.Peer.Builder setRegionCode(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:
setUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
setUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
mergeUnknownFields
public final AttributeContext.Peer.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
- Specified by:
mergeUnknownFieldsin interfacecom.google.protobuf.Message.Builder- Overrides:
mergeUnknownFieldsin classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
-