Package com.google.rpc.context
Interface AttributeContext.PeerOrBuilder
- All Superinterfaces:
com.google.protobuf.MessageLiteOrBuilder
- All Known Implementing Classes:
AttributeContext.Peer
,AttributeContext.Peer.Builder
- Enclosing class:
- AttributeContext
public static interface AttributeContext.PeerOrBuilder
extends com.google.protobuf.MessageLiteOrBuilder
-
Method Summary
Modifier and TypeMethodDescriptionboolean
containsLabels
(String key) The labels associated with the 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.Methods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
Method Details
-
getIp
String getIp()The IP address of the peer.
string ip = 1 [json_name = "ip"];
- Returns:
- The ip.
-
getIpBytes
com.google.protobuf.ByteString getIpBytes()The IP address of the peer.
string ip = 1 [json_name = "ip"];
- Returns:
- The bytes for ip.
-
getPort
long getPort()The network port of the peer.
int64 port = 2 [json_name = "port"];
- Returns:
- The port.
-
getLabelsCount
int getLabelsCount()The labels associated with the peer.
map<string, string> labels = 6 [json_name = "labels"];
-
containsLabels
The labels associated with the peer.
map<string, string> labels = 6 [json_name = "labels"];
-
getLabels
Deprecated.UsegetLabelsMap()
instead. -
getLabelsMap
The labels associated with the peer.
map<string, string> labels = 6 [json_name = "labels"];
-
getLabelsOrDefault
The labels associated with the peer.
map<string, string> labels = 6 [json_name = "labels"];
-
getLabelsOrThrow
The labels associated with the peer.
map<string, string> labels = 6 [json_name = "labels"];
-
getPrincipal
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 [json_name = "principal"];
- Returns:
- The principal.
-
getPrincipalBytes
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"];
- Returns:
- The bytes for principal.
-
getRegionCode
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 [json_name = "regionCode"];
- Returns:
- The regionCode.
-
getRegionCodeBytes
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"];
- Returns:
- The bytes for regionCode.
-