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
Modifier and TypeClassDescriptionstatic final class
This 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
Modifier and TypeFieldDescriptionstatic final int
static final int
static final int
static final int
static final int
Fields inherited from class com.google.protobuf.GeneratedMessageLite
unknownFields
Fields inherited from class com.google.protobuf.AbstractMessageLite
memoizedHashCode
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsLabels
(String key) The labels associated with the peer.protected final Object
dynamicMethod
(com.google.protobuf.GeneratedMessageLite.MethodToInvoke method, Object arg0, Object arg1) static AttributeContext.Peer
getIp()
The IP address of the peer.com.google.protobuf.ByteString
The IP address of the peer.Deprecated.int
The 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.long
getPort()
The network port of the peer.The identity of this peer.com.google.protobuf.ByteString
The identity of this peer.The CLDR country/region code associated with the above IP address.com.google.protobuf.ByteString
The CLDR country/region code associated with the above IP address.newBuilder
(AttributeContext.Peer prototype) 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
(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 AttributeContext.Peer
parseFrom
(ByteBuffer data) static AttributeContext.Peer
parseFrom
(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, writeTo
Methods inherited from class com.google.protobuf.AbstractMessageLite
addAll, checkByteStringIsUtf8, toByteArray, toByteString, writeDelimitedTo, writeTo
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods 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:
getIp
in 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:
getIpBytes
in 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:
getPort
in interfaceAttributeContext.PeerOrBuilder
- Returns:
- The port.
-
getLabelsCount
public int getLabelsCount()Description copied from interface:AttributeContext.PeerOrBuilder
The labels associated with the peer.
map<string, string> labels = 6 [json_name = "labels"];
- Specified by:
getLabelsCount
in interfaceAttributeContext.PeerOrBuilder
-
containsLabels
The labels associated with the peer.
map<string, string> labels = 6 [json_name = "labels"];
- Specified by:
containsLabels
in interfaceAttributeContext.PeerOrBuilder
-
getLabels
Deprecated.UsegetLabelsMap()
instead.- Specified by:
getLabels
in interfaceAttributeContext.PeerOrBuilder
-
getLabelsMap
The labels associated with the peer.
map<string, string> labels = 6 [json_name = "labels"];
- Specified by:
getLabelsMap
in interfaceAttributeContext.PeerOrBuilder
-
getLabelsOrDefault
The labels associated with the peer.
map<string, string> labels = 6 [json_name = "labels"];
- Specified by:
getLabelsOrDefault
in interfaceAttributeContext.PeerOrBuilder
-
getLabelsOrThrow
The labels associated with the peer.
map<string, string> labels = 6 [json_name = "labels"];
- Specified by:
getLabelsOrThrow
in 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:
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 [json_name = "principal"];
- Specified by:
getPrincipalBytes
in 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:
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 [json_name = "regionCode"];
- Specified by:
getRegionCodeBytes
in 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:
dynamicMethod
in classcom.google.protobuf.GeneratedMessageLite<AttributeContext.Peer,
AttributeContext.Peer.Builder>
-
getDefaultInstance
-
parser
-