Package com.google.rpc.context
Class AttributeContext.Peer
java.lang.Object
com.google.protobuf.AbstractMessageLite<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite<AttributeContext.Peer,AttributeContext.Peer.Builder>
com.google.rpc.context.AttributeContext.Peer
- All Implemented Interfaces:
com.google.protobuf.MessageLite,com.google.protobuf.MessageLiteOrBuilder,AttributeContext.PeerOrBuilder
- Enclosing class:
- AttributeContext
public static final class AttributeContext.Peer
extends com.google.protobuf.GeneratedMessageLite<AttributeContext.Peer,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-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classThis message defines attributes for a node that handles a network request.Nested classes/interfaces inherited from class com.google.protobuf.GeneratedMessageLite
com.google.protobuf.GeneratedMessageLite.DefaultInstanceBasedParser<T extends com.google.protobuf.GeneratedMessageLite<T,?>>, com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.ExtendableMessageOrBuilder<MessageType extends com.google.protobuf.GeneratedMessageLite.ExtendableMessage<MessageType, BuilderType>, BuilderType extends com.google.protobuf.GeneratedMessageLite.ExtendableBuilder<MessageType, BuilderType>>, com.google.protobuf.GeneratedMessageLite.GeneratedExtension<ContainingType extends com.google.protobuf.MessageLite, Type extends Object>, com.google.protobuf.GeneratedMessageLite.MethodToInvoke, com.google.protobuf.GeneratedMessageLite.SerializedForm Nested classes/interfaces inherited from class com.google.protobuf.AbstractMessageLite
com.google.protobuf.AbstractMessageLite.InternalOneOfEnum -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final intstatic final intstatic final intstatic final intFields inherited from class com.google.protobuf.GeneratedMessageLite
unknownFieldsFields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode -
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsLabels(String key) The labels associated with the peer.protected final ObjectdynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) static AttributeContext.PeergetIp()The IP address of the peer.com.google.protobuf.ByteStringThe IP address of the peer.Deprecated.intThe labels associated with the peer.The labels associated with the peer.getLabelsOrDefault(String key, String defaultValue) The labels associated with the peer.getLabelsOrThrow(String key) The labels associated with the peer.longgetPort()The network port of the peer.The identity of this peer.com.google.protobuf.ByteStringThe identity of this peer.The CLDR country/region code associated with the above IP address.com.google.protobuf.ByteStringThe CLDR country/region code associated with the above IP address.newBuilder(AttributeContext.Peer prototype) static AttributeContext.PeerparseDelimitedFrom(InputStream input) static AttributeContext.PeerparseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttributeContext.PeerparseFrom(byte[] data) static AttributeContext.PeerparseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttributeContext.PeerparseFrom(com.google.protobuf.ByteString data) static AttributeContext.PeerparseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttributeContext.PeerparseFrom(com.google.protobuf.CodedInputStream input) static AttributeContext.PeerparseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttributeContext.PeerparseFrom(InputStream input) static AttributeContext.PeerparseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static AttributeContext.PeerparseFrom(ByteBuffer data) static AttributeContext.PeerparseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) static com.google.protobuf.Parser<AttributeContext.Peer>parser()Methods inherited from class com.google.protobuf.GeneratedMessageLite
createBuilder, createBuilder, dynamicMethod, dynamicMethod, emptyBooleanList, emptyDoubleList, emptyFloatList, emptyIntList, emptyLongList, emptyProtobufList, equals, getDefaultInstanceForType, getParserForType, getSerializedSize, hashCode, isInitialized, isInitialized, makeImmutable, mergeLengthDelimitedField, mergeUnknownFields, mergeVarintField, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, mutableCopy, newBuilderForType, newMessageInfo, newRepeatedGeneratedExtension, newSingularGeneratedExtension, parseDelimitedFrom, parseDelimitedFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parseFrom, parsePartialFrom, parseUnknownField, registerDefaultInstance, toBuilder, toString, writeToMethods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeToMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Field Details
-
IP_FIELD_NUMBER
public static final int IP_FIELD_NUMBER- See Also:
-
PORT_FIELD_NUMBER
public static final int PORT_FIELD_NUMBER- See Also:
-
LABELS_FIELD_NUMBER
public static final int LABELS_FIELD_NUMBER- See Also:
-
PRINCIPAL_FIELD_NUMBER
public static final int PRINCIPAL_FIELD_NUMBER- See Also:
-
REGION_CODE_FIELD_NUMBER
public static final int REGION_CODE_FIELD_NUMBER- See Also:
-
-
Method Details
-
getIp
The IP address of the peer.
string ip = 1 [json_name = "ip"];- Specified by:
getIpin interfaceAttributeContext.PeerOrBuilder- Returns:
- The ip.
-
getIpBytes
public com.google.protobuf.ByteString getIpBytes()The IP address of the peer.
string ip = 1 [json_name = "ip"];- Specified by:
getIpBytesin interfaceAttributeContext.PeerOrBuilder- Returns:
- The bytes for ip.
-
getPort
public long getPort()The network port of the peer.
int64 port = 2 [json_name = "port"];- Specified by:
getPortin interfaceAttributeContext.PeerOrBuilder- Returns:
- The port.
-
getLabelsCount
public int getLabelsCount()Description copied from interface:AttributeContext.PeerOrBuilderThe labels associated with the peer.
map<string, string> labels = 6 [json_name = "labels"];- Specified by:
getLabelsCountin interfaceAttributeContext.PeerOrBuilder
-
containsLabels
The labels associated with the peer.
map<string, string> labels = 6 [json_name = "labels"];- Specified by:
containsLabelsin interfaceAttributeContext.PeerOrBuilder
-
getLabels
Deprecated.UsegetLabelsMap()instead.- Specified by:
getLabelsin interfaceAttributeContext.PeerOrBuilder
-
getLabelsMap
The labels associated with the peer.
map<string, string> labels = 6 [json_name = "labels"];- Specified by:
getLabelsMapin interfaceAttributeContext.PeerOrBuilder
-
getLabelsOrDefault
The labels associated with the peer.
map<string, string> labels = 6 [json_name = "labels"];- Specified by:
getLabelsOrDefaultin interfaceAttributeContext.PeerOrBuilder
-
getLabelsOrThrow
The labels associated with the peer.
map<string, string> labels = 6 [json_name = "labels"];- Specified by:
getLabelsOrThrowin interfaceAttributeContext.PeerOrBuilder
-
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 [json_name = "principal"];- 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 [json_name = "principal"];- Specified by:
getPrincipalBytesin interfaceAttributeContext.PeerOrBuilder- Returns:
- The bytes for principal.
-
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 [json_name = "regionCode"];- 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 [json_name = "regionCode"];- Specified by:
getRegionCodeBytesin interfaceAttributeContext.PeerOrBuilder- Returns:
- The bytes for regionCode.
-
parseFrom
public static AttributeContext.Peer parseFrom(ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static AttributeContext.Peer parseFrom(ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static AttributeContext.Peer parseFrom(com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static AttributeContext.Peer parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static AttributeContext.Peer parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
public static AttributeContext.Peer parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException - Throws:
com.google.protobuf.InvalidProtocolBufferException
-
parseFrom
- Throws:
IOException
-
parseFrom
public static AttributeContext.Peer parseFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseDelimitedFrom
- Throws:
IOException
-
parseDelimitedFrom
public static AttributeContext.Peer parseDelimitedFrom(InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
parseFrom
public static AttributeContext.Peer parseFrom(com.google.protobuf.CodedInputStream input) throws IOException - Throws:
IOException
-
parseFrom
public static AttributeContext.Peer parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Throws:
IOException
-
newBuilder
-
newBuilder
-
dynamicMethod
protected final Object dynamicMethod(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) - Specified by:
dynamicMethodin classcom.google.protobuf.GeneratedMessageLite<AttributeContext.Peer,AttributeContext.Peer.Builder>
-
getDefaultInstance
-
parser
-