public static final class AttributeContext.Peer extends com.google.protobuf.GeneratedMessageV3 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 | Class and Description |
|---|---|
static class |
AttributeContext.Peer.Builder
This message defines attributes for a node that handles a network request.
|
com.google.protobuf.GeneratedMessageV3.BuilderParent, com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage,BuilderType extends com.google.protobuf.GeneratedMessageV3.ExtendableBuilder<MessageType,BuilderType>>, com.google.protobuf.GeneratedMessageV3.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageV3.ExtendableMessage>, com.google.protobuf.GeneratedMessageV3.FieldAccessorTable, com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter| Modifier and Type | Field and Description |
|---|---|
static int |
IP_FIELD_NUMBER |
static int |
LABELS_FIELD_NUMBER |
static int |
PORT_FIELD_NUMBER |
static int |
PRINCIPAL_FIELD_NUMBER |
static int |
REGION_CODE_FIELD_NUMBER |
| Modifier and Type | Method and Description |
|---|---|
boolean |
containsLabels(String key)
The labels associated with the peer.
|
boolean |
equals(Object obj) |
static AttributeContext.Peer |
getDefaultInstance() |
AttributeContext.Peer |
getDefaultInstanceForType() |
static com.google.protobuf.Descriptors.Descriptor |
getDescriptor() |
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.
|
com.google.protobuf.Parser<AttributeContext.Peer> |
getParserForType() |
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.
|
int |
getSerializedSize() |
com.google.protobuf.UnknownFieldSet |
getUnknownFields() |
int |
hashCode() |
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable |
internalGetFieldAccessorTable() |
protected com.google.protobuf.MapField |
internalGetMapField(int number) |
boolean |
isInitialized() |
static AttributeContext.Peer.Builder |
newBuilder() |
static AttributeContext.Peer.Builder |
newBuilder(AttributeContext.Peer prototype) |
AttributeContext.Peer.Builder |
newBuilderForType() |
protected AttributeContext.Peer.Builder |
newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) |
protected Object |
newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused) |
static AttributeContext.Peer |
parseDelimitedFrom(InputStream input) |
static AttributeContext.Peer |
parseDelimitedFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static AttributeContext.Peer |
parseFrom(byte[] data) |
static AttributeContext.Peer |
parseFrom(byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static AttributeContext.Peer |
parseFrom(ByteBuffer data) |
static AttributeContext.Peer |
parseFrom(ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static AttributeContext.Peer |
parseFrom(com.google.protobuf.ByteString data) |
static AttributeContext.Peer |
parseFrom(com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static AttributeContext.Peer |
parseFrom(com.google.protobuf.CodedInputStream input) |
static AttributeContext.Peer |
parseFrom(com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static AttributeContext.Peer |
parseFrom(InputStream input) |
static AttributeContext.Peer |
parseFrom(InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry) |
static com.google.protobuf.Parser<AttributeContext.Peer> |
parser() |
AttributeContext.Peer.Builder |
toBuilder() |
void |
writeTo(com.google.protobuf.CodedOutputStream output) |
canUseUnsafe, computeStringSize, computeStringSizeNoTag, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, getAllFields, getDescriptorForType, getField, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, hasField, hasOneof, isStringEmpty, makeExtensionsImmutable, mergeFromAndMakeImmutableInternal, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBooleanList, newBuilderForType, newDoubleList, newFloatList, newIntList, newLongList, parseDelimitedWithIOException, parseDelimitedWithIOException, parseUnknownField, parseUnknownFieldProto3, parseWithIOException, parseWithIOException, parseWithIOException, parseWithIOException, serializeBooleanMapTo, serializeIntegerMapTo, serializeLongMapTo, serializeStringMapTo, writeReplace, writeString, writeStringNoTagfindInitializationErrors, getInitializationErrorString, hashBoolean, hashEnum, hashEnumList, hashFields, hashLong, toStringaddAll, addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToclone, finalize, getClass, notify, notifyAll, wait, wait, waitpublic static final int IP_FIELD_NUMBER
public static final int PORT_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER
public static final int PRINCIPAL_FIELD_NUMBER
public static final int REGION_CODE_FIELD_NUMBER
protected Object newInstance(com.google.protobuf.GeneratedMessageV3.UnusedPrivateParameter unused)
newInstance in class com.google.protobuf.GeneratedMessageV3public final com.google.protobuf.UnknownFieldSet getUnknownFields()
getUnknownFields in interface com.google.protobuf.MessageOrBuildergetUnknownFields in class com.google.protobuf.GeneratedMessageV3public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
protected com.google.protobuf.MapField internalGetMapField(int number)
internalGetMapField in class com.google.protobuf.GeneratedMessageV3protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3public 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 long getPort()
The network port of the peer.
int64 port = 2;getPort in interface AttributeContext.PeerOrBuilderpublic 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 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 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 final boolean isInitialized()
isInitialized in interface com.google.protobuf.MessageLiteOrBuilderisInitialized in class com.google.protobuf.GeneratedMessageV3public void writeTo(com.google.protobuf.CodedOutputStream output)
throws IOException
writeTo in interface com.google.protobuf.MessageLitewriteTo in class com.google.protobuf.GeneratedMessageV3IOExceptionpublic int getSerializedSize()
getSerializedSize in interface com.google.protobuf.MessageLitegetSerializedSize in class com.google.protobuf.GeneratedMessageV3public boolean equals(Object obj)
equals in interface com.google.protobuf.Messageequals in class com.google.protobuf.AbstractMessagepublic int hashCode()
hashCode in interface com.google.protobuf.MessagehashCode in class com.google.protobuf.AbstractMessagepublic static AttributeContext.Peer parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static AttributeContext.Peer parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static AttributeContext.Peer parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static AttributeContext.Peer parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static AttributeContext.Peer parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static AttributeContext.Peer parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException
com.google.protobuf.InvalidProtocolBufferExceptionpublic static AttributeContext.Peer parseFrom(InputStream input) throws IOException
IOExceptionpublic static AttributeContext.Peer parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static AttributeContext.Peer parseDelimitedFrom(InputStream input) throws IOException
IOExceptionpublic static AttributeContext.Peer parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic static AttributeContext.Peer parseFrom(com.google.protobuf.CodedInputStream input) throws IOException
IOExceptionpublic static AttributeContext.Peer parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
IOExceptionpublic AttributeContext.Peer.Builder newBuilderForType()
newBuilderForType in interface com.google.protobuf.MessagenewBuilderForType in interface com.google.protobuf.MessageLitepublic static AttributeContext.Peer.Builder newBuilder()
public static AttributeContext.Peer.Builder newBuilder(AttributeContext.Peer prototype)
public AttributeContext.Peer.Builder toBuilder()
toBuilder in interface com.google.protobuf.MessagetoBuilder in interface com.google.protobuf.MessageLiteprotected AttributeContext.Peer.Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
newBuilderForType in class com.google.protobuf.GeneratedMessageV3public static AttributeContext.Peer getDefaultInstance()
public static com.google.protobuf.Parser<AttributeContext.Peer> parser()
public com.google.protobuf.Parser<AttributeContext.Peer> getParserForType()
getParserForType in interface com.google.protobuf.MessagegetParserForType in interface com.google.protobuf.MessageLitegetParserForType in class com.google.protobuf.GeneratedMessageV3public AttributeContext.Peer getDefaultInstanceForType()
getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuildergetDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilderCopyright © 2022 Google LLC. All rights reserved.