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.boolean
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.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, mergeFrom
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
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.
-
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:
getPort
in 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.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
-
clearLabels
-
removeLabels
The labels associated with the peer.
map<string, string> labels = 6 [json_name = "labels"];
-
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
-
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:
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.
-
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:
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.
-
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.
-