Package com.google.rpc.context
Class AttributeContext.Peer.Builder
java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
com.google.rpc.context.AttributeContext.Peer.Builder
- All Implemented Interfaces:
com.google.protobuf.Message.Builder
,com.google.protobuf.MessageLite.Builder
,com.google.protobuf.MessageLiteOrBuilder
,com.google.protobuf.MessageOrBuilder
,AttributeContext.PeerOrBuilder
,Cloneable
- Enclosing class:
- AttributeContext.Peer
public static final class AttributeContext.Peer.Builder
extends com.google.protobuf.GeneratedMessageV3.Builder<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
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
clear()
clearIp()
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.static final com.google.protobuf.Descriptors.Descriptor
com.google.protobuf.Descriptors.Descriptor
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.Deprecated.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.protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
protected com.google.protobuf.MapField
internalGetMapField
(int number) protected com.google.protobuf.MapField
internalGetMutableMapField
(int number) final boolean
mergeFrom
(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) mergeFrom
(com.google.protobuf.Message other) mergeFrom
(AttributeContext.Peer other) mergeUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) 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.setUnknownFields
(com.google.protobuf.UnknownFieldSet unknownFields) Methods inherited from class com.google.protobuf.GeneratedMessageV3.Builder
addRepeatedField, clearField, clearOneof, clone, getAllFields, getField, getFieldBuilder, getOneofFieldDescriptor, getParentForChildren, getRepeatedField, getRepeatedFieldBuilder, getRepeatedFieldCount, getUnknownFields, getUnknownFieldSetBuilder, hasField, hasOneof, isClean, markClean, mergeUnknownLengthDelimitedField, mergeUnknownVarintField, newBuilderForField, onBuilt, onChanged, parseUnknownField, setField, setRepeatedField, setUnknownFieldSetBuilder, setUnknownFieldsProto3
Methods inherited from class com.google.protobuf.AbstractMessage.Builder
findInitializationErrors, getInitializationErrorString, internalMergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, mergeFrom, newUninitializedMessageException, toString
Methods inherited from class com.google.protobuf.AbstractMessageLite.Builder
addAll, addAll, mergeDelimitedFrom, mergeDelimitedFrom, mergeFrom, newUninitializedMessageException
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.google.protobuf.Message.Builder
mergeDelimitedFrom, mergeDelimitedFrom
Methods inherited from interface com.google.protobuf.MessageLite.Builder
mergeFrom
Methods inherited from interface com.google.protobuf.MessageOrBuilder
findInitializationErrors, getAllFields, getField, getInitializationErrorString, getOneofFieldDescriptor, getRepeatedField, getRepeatedFieldCount, getUnknownFields, hasField, hasOneof
-
Method Details
-
getDescriptor
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() -
internalGetMapField
protected com.google.protobuf.MapField internalGetMapField(int number) - Overrides:
internalGetMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
internalGetMutableMapField
protected com.google.protobuf.MapField internalGetMutableMapField(int number) - Overrides:
internalGetMutableMapField
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
internalGetFieldAccessorTable
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()- Specified by:
internalGetFieldAccessorTable
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
clear
- Specified by:
clear
in interfacecom.google.protobuf.Message.Builder
- Specified by:
clear
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
clear
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
getDescriptorForType
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.Message.Builder
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.MessageOrBuilder
- Overrides:
getDescriptorForType
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
getDefaultInstanceForType
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Specified by:
getDefaultInstanceForType
in interfacecom.google.protobuf.MessageOrBuilder
-
build
- Specified by:
build
in interfacecom.google.protobuf.Message.Builder
- Specified by:
build
in interfacecom.google.protobuf.MessageLite.Builder
-
buildPartial
- Specified by:
buildPartial
in interfacecom.google.protobuf.Message.Builder
- Specified by:
buildPartial
in interfacecom.google.protobuf.MessageLite.Builder
-
mergeFrom
- Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<AttributeContext.Peer.Builder>
-
mergeFrom
-
isInitialized
public final boolean isInitialized()- Specified by:
isInitialized
in interfacecom.google.protobuf.MessageLiteOrBuilder
- Overrides:
isInitialized
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
mergeFrom
public AttributeContext.Peer.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException - Specified by:
mergeFrom
in interfacecom.google.protobuf.Message.Builder
- Specified by:
mergeFrom
in interfacecom.google.protobuf.MessageLite.Builder
- Overrides:
mergeFrom
in classcom.google.protobuf.AbstractMessage.Builder<AttributeContext.Peer.Builder>
- Throws:
IOException
-
getIp
The IP address of the peer.
string ip = 1;
- 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;
- Specified by:
getIpBytes
in interfaceAttributeContext.PeerOrBuilder
- Returns:
- The bytes for ip.
-
setIp
The IP address of the peer.
string ip = 1;
- Parameters:
value
- The ip to set.- Returns:
- This builder for chaining.
-
clearIp
The IP address of the peer.
string ip = 1;
- Returns:
- This builder for chaining.
-
setIpBytes
The IP address of the peer.
string ip = 1;
- 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;
- Specified by:
getPort
in interfaceAttributeContext.PeerOrBuilder
- Returns:
- The port.
-
setPort
The network port of the peer.
int64 port = 2;
- Parameters:
value
- The port to set.- Returns:
- This builder for chaining.
-
clearPort
The network port of the peer.
int64 port = 2;
- 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;
- Specified by:
getLabelsCount
in interfaceAttributeContext.PeerOrBuilder
-
containsLabels
The labels associated with the peer.
map<string, string> labels = 6;
- 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;
- Specified by:
getLabelsMap
in interfaceAttributeContext.PeerOrBuilder
-
getLabelsOrDefault
The labels associated with the peer.
map<string, string> labels = 6;
- Specified by:
getLabelsOrDefault
in interfaceAttributeContext.PeerOrBuilder
-
getLabelsOrThrow
The labels associated with the peer.
map<string, string> labels = 6;
- Specified by:
getLabelsOrThrow
in interfaceAttributeContext.PeerOrBuilder
-
clearLabels
-
removeLabels
The labels associated with the peer.
map<string, string> labels = 6;
-
getMutableLabels
Deprecated.Use alternate mutation accessors instead. -
putLabels
The labels associated with the peer.
map<string, string> labels = 6;
-
putAllLabels
The labels associated with the peer.
map<string, string> labels = 6;
-
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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- 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;
- Parameters:
value
- The bytes for regionCode to set.- Returns:
- This builder for chaining.
-
setUnknownFields
public final AttributeContext.Peer.Builder setUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
setUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
setUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-
mergeUnknownFields
public final AttributeContext.Peer.Builder mergeUnknownFields(com.google.protobuf.UnknownFieldSet unknownFields) - Specified by:
mergeUnknownFields
in interfacecom.google.protobuf.Message.Builder
- Overrides:
mergeUnknownFields
in classcom.google.protobuf.GeneratedMessageV3.Builder<AttributeContext.Peer.Builder>
-