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 type
google.rpc.context.AttributeContext.Peer| Modifier and Type | Method and Description |
|---|---|
AttributeContext.Peer.Builder |
addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field,
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(String key)
The labels associated with the peer.
|
AttributeContext.Peer |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
com.google.protobuf.Descriptors.Descriptor |
getDescriptorForType() |
String |
getIp()
The IP address of the peer.
|
com.google.protobuf.ByteString |
getIpBytes()
The IP address of the peer.
|
Map<String,String> |
getLabels()
Deprecated.
|
int |
getLabelsCount()
The labels associated with the peer.
|
Map<String,String> |
getLabelsMap()
The labels associated with the peer.
|
String |
getLabelsOrDefault(String key,
String defaultValue)
The labels associated with the peer.
|
String |
getLabelsOrThrow(String key)
The labels associated with the peer.
|
Map<String,String> |
getMutableLabels()
Deprecated.
|
long |
getPort()
The network port of the peer.
|
String |
getPrincipal()
The identity of this peer.
|
com.google.protobuf.ByteString |
getPrincipalBytes()
The identity of this peer.
|
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.MapField |
internalGetMapField(int number) |
protected com.google.protobuf.MapField |
internalGetMutableMapField(int number) |
boolean |
isInitialized() |
AttributeContext.Peer.Builder |
mergeFrom(AttributeContext.Peer other) |
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 |
mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
AttributeContext.Peer.Builder |
putAllLabels(Map<String,String> values)
The labels associated with the peer.
|
AttributeContext.Peer.Builder |
putLabels(String key,
String value)
The labels associated with the peer.
|
AttributeContext.Peer.Builder |
removeLabels(String key)
The labels associated with the peer.
|
AttributeContext.Peer.Builder |
setField(com.google.protobuf.Descriptors.FieldDescriptor field,
Object value) |
AttributeContext.Peer.Builder |
setIp(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(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(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,
Object value) |
AttributeContext.Peer.Builder |
setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) |
getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setUnknownFieldSetBuilder, setUnknownFieldsProto3findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toStringaddAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageExceptionequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitfindInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneofpublic static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapField internalGetMapField(int number)
internalGetMapField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>protected com.google.protobuf.MapField internalGetMutableMapField(int number)
internalGetMutableMapField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>public AttributeContext.Peer.Builder clear()
clear in interface com.google.protobuf.Message.Builderclear in interface com.google.protobuf.MessageLite.Builderclear in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.Message.BuildergetDescriptorForType in interface com.google.protobuf.MessageOrBuildergetDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>public AttributeContext.Peer getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderpublic AttributeContext.Peer build()
build in interface com.google.protobuf.Message.Builderbuild in interface com.google.protobuf.MessageLite.Builderpublic AttributeContext.Peer buildPartial()
buildPartial in interface com.google.protobuf.Message.BuilderbuildPartial in interface com.google.protobuf.MessageLite.Builderpublic AttributeContext.Peer.Builder clone()
clone in interface com.google.protobuf.Message.Builderclone in interface com.google.protobuf.MessageLite.Builderclone in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>public AttributeContext.Peer.Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
setField in interface com.google.protobuf.Message.BuildersetField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>public AttributeContext.Peer.Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
clearField in interface com.google.protobuf.Message.BuilderclearField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>public AttributeContext.Peer.Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
clearOneof in interface com.google.protobuf.Message.BuilderclearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>public AttributeContext.Peer.Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, Object value)
setRepeatedField in interface com.google.protobuf.Message.BuildersetRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>public AttributeContext.Peer.Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, Object value)
addRepeatedField in interface com.google.protobuf.Message.BuilderaddRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>public AttributeContext.Peer.Builder mergeFrom(com.google.protobuf.Message other)
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<AttributeContext.Peer.Builder>public AttributeContext.Peer.Builder mergeFrom(AttributeContext.Peer other)
public final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>public AttributeContext.Peer.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
mergeFrom in interface com.google.protobuf.Message.BuildermergeFrom in interface com.google.protobuf.MessageLite.BuildermergeFrom in class com.google.protobuf.AbstractMessage.Builder<AttributeContext.Peer.Builder>IOExceptionpublic String getIp()
The IP address of the peer.
string ip = 1;getIp in interface AttributeContext.PeerOrBuilderpublic com.google.protobuf.ByteString getIpBytes()
The IP address of the peer.
string ip = 1;getIpBytes in interface AttributeContext.PeerOrBuilderpublic AttributeContext.Peer.Builder setIp(String value)
The IP address of the peer.
string ip = 1;value - The ip to set.public AttributeContext.Peer.Builder clearIp()
The IP address of the peer.
string ip = 1;public AttributeContext.Peer.Builder setIpBytes(com.google.protobuf.ByteString value)
The IP address of the peer.
string ip = 1;value - The bytes for ip to set.public long getPort()
The network port of the peer.
int64 port = 2;getPort in interface AttributeContext.PeerOrBuilderpublic AttributeContext.Peer.Builder setPort(long value)
The network port of the peer.
int64 port = 2;value - The port to set.public AttributeContext.Peer.Builder clearPort()
The network port of the peer.
int64 port = 2;public int getLabelsCount()
AttributeContext.PeerOrBuilderThe labels associated with the peer.
map<string, string> labels = 6;getLabelsCount in interface AttributeContext.PeerOrBuilderpublic boolean containsLabels(String key)
The labels associated with the peer.
map<string, string> labels = 6;containsLabels in interface AttributeContext.PeerOrBuilder@Deprecated public Map<String,String> getLabels()
getLabelsMap() instead.getLabels in interface AttributeContext.PeerOrBuilderpublic Map<String,String> getLabelsMap()
The labels associated with the peer.
map<string, string> labels = 6;getLabelsMap in interface AttributeContext.PeerOrBuilderpublic String getLabelsOrDefault(String key, String defaultValue)
The labels associated with the peer.
map<string, string> labels = 6;getLabelsOrDefault in interface AttributeContext.PeerOrBuilderpublic String getLabelsOrThrow(String key)
The labels associated with the peer.
map<string, string> labels = 6;getLabelsOrThrow in interface AttributeContext.PeerOrBuilderpublic AttributeContext.Peer.Builder clearLabels()
public AttributeContext.Peer.Builder removeLabels(String key)
The labels associated with the peer.
map<string, string> labels = 6;@Deprecated public Map<String,String> getMutableLabels()
public AttributeContext.Peer.Builder putLabels(String key, String value)
The labels associated with the peer.
map<string, string> labels = 6;public AttributeContext.Peer.Builder putAllLabels(Map<String,String> values)
The labels associated with the peer.
map<string, string> labels = 6;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 idenity associated with a load balancer that forwared the request.
string principal = 7;getPrincipal in interface AttributeContext.PeerOrBuilderpublic 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 idenity associated with a load balancer that forwared the request.
string principal = 7;getPrincipalBytes in interface AttributeContext.PeerOrBuilderpublic 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 idenity associated with a load balancer that forwared the request.
string principal = 7;value - The principal to set.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 idenity associated with a load balancer that forwared the request.
string principal = 7;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 idenity associated with a load balancer that forwared the request.
string principal = 7;value - The bytes for principal to set.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;getRegionCode in interface AttributeContext.PeerOrBuilderpublic 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;getRegionCodeBytes in interface AttributeContext.PeerOrBuilderpublic 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;value - The regionCode to set.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;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;value - The bytes for regionCode to set.public final AttributeContext.Peer.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
setUnknownFields in interface com.google.protobuf.Message.BuildersetUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>public final AttributeContext.Peer.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields)
mergeUnknownFields in interface com.google.protobuf.Message.BuildermergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>Copyright © 2022 Google LLC. All rights reserved.