Package com.google.rpc.context
Class AttributeContext.Peer.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder<MessageType,BuilderType>
com.google.protobuf.GeneratedMessageLite.Builder<AttributeContext.Peer,AttributeContext.Peer.Builder>
com.google.rpc.context.AttributeContext.Peer.Builder
- All Implemented Interfaces:
com.google.protobuf.MessageLite.Builder,com.google.protobuf.MessageLiteOrBuilder,AttributeContext.PeerOrBuilder,Cloneable
- Enclosing class:
- AttributeContext.Peer
public static final class AttributeContext.Peer.Builder
extends com.google.protobuf.GeneratedMessageLite.Builder<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-
Field Summary
Fields inherited from class com.google.protobuf.GeneratedMessageLite.Builder
instance -
Method Summary
Modifier and TypeMethodDescriptionclearIp()The IP address of the peer.The network port of the peer.The identity of this peer.The CLDR country/region code associated with the above IP address.booleancontainsLabels(String key) The labels associated with the peer.getIp()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.putAllLabels(Map<String, String> values) The labels associated with the peer.The labels associated with the peer.removeLabels(String key) The labels associated with the peer.The IP address of the peer.setIpBytes(com.google.protobuf.ByteString value) The IP address of the peer.setPort(long value) The network port of the peer.setPrincipal(String value) The identity of this peer.setPrincipalBytes(com.google.protobuf.ByteString value) The identity of this peer.setRegionCode(String value) The CLDR country/region code associated with the above IP address.setRegionCodeBytes(com.google.protobuf.ByteString value) The CLDR country/region code associated with the above IP address.Methods inherited from class com.google.protobuf.GeneratedMessageLite.Builder
build, buildPartial, clear, clone, copyOnWrite, copyOnWriteInternal, getDefaultInstanceForType, internalMergeFrom, isInitialized, mergeFrom, mergeFrom, mergeFrom, mergeFromMethods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageExceptionMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.google.protobuf.MessageLiteOrBuilder
getDefaultInstanceForType, isInitialized
-
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.
-
setIp
The IP address of the peer.
string ip = 1 [json_name = "ip"];- Parameters:
value- The ip to set.- Returns:
- This builder for chaining.
-
clearIp
The IP address of the peer.
string ip = 1 [json_name = "ip"];- Returns:
- This builder for chaining.
-
setIpBytes
The IP address of the peer.
string ip = 1 [json_name = "ip"];- Parameters:
value- The bytes for ip to set.- Returns:
- This builder for chaining.
-
getPort
public long getPort()The network port of the peer.
int64 port = 2 [json_name = "port"];- Specified by:
getPortin interfaceAttributeContext.PeerOrBuilder- Returns:
- The port.
-
setPort
The network port of the peer.
int64 port = 2 [json_name = "port"];- Parameters:
value- The port to set.- Returns:
- This builder for chaining.
-
clearPort
The network port of the peer.
int64 port = 2 [json_name = "port"];- Returns:
- This builder for chaining.
-
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
-
clearLabels
-
removeLabels
The labels associated with the peer.
map<string, string> labels = 6 [json_name = "labels"]; -
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
-
putLabels
The labels associated with the peer.
map<string, string> labels = 6 [json_name = "labels"]; -
putAllLabels
The labels associated with the peer.
map<string, string> labels = 6 [json_name = "labels"]; -
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.
-
setPrincipal
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"];- Parameters:
value- The principal to set.- Returns:
- This builder for chaining.
-
clearPrincipal
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:
- This builder for chaining.
-
setPrincipalBytes
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"];- Parameters:
value- The bytes for principal to set.- Returns:
- This builder for chaining.
-
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.
-
setRegionCode
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"];- Parameters:
value- The regionCode to set.- Returns:
- This builder for chaining.
-
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 [json_name = "regionCode"];- Returns:
- This builder for chaining.
-
setRegionCodeBytes
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"];- Parameters:
value- The bytes for regionCode to set.- Returns:
- This builder for chaining.
-