public static final class AttributeContext.Peer.Builder extends 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
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > AttributeContext.Peer.BuilderImplements
AttributeContext.PeerOrBuilderStatic Methods
getDescriptor()
public static final Descriptors.Descriptor getDescriptor()
Type | Description |
Descriptor |
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
public AttributeContext.Peer.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
AttributeContext.Peer.Builder |
build()
public AttributeContext.Peer build()
Type | Description |
AttributeContext.Peer |
buildPartial()
public AttributeContext.Peer buildPartial()
Type | Description |
AttributeContext.Peer |
clear()
public AttributeContext.Peer.Builder clear()
Type | Description |
AttributeContext.Peer.Builder |
clearField(Descriptors.FieldDescriptor field)
public AttributeContext.Peer.Builder clearField(Descriptors.FieldDescriptor field)
Name | Description |
field | FieldDescriptor |
Type | Description |
AttributeContext.Peer.Builder |
clearIp()
public AttributeContext.Peer.Builder clearIp()
The IP address of the peer.
string ip = 1;
Type | Description |
AttributeContext.Peer.Builder | This builder for chaining. |
clearLabels()
public AttributeContext.Peer.Builder clearLabels()
Type | Description |
AttributeContext.Peer.Builder |
clearOneof(Descriptors.OneofDescriptor oneof)
public AttributeContext.Peer.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Name | Description |
oneof | OneofDescriptor |
Type | Description |
AttributeContext.Peer.Builder |
clearPort()
public AttributeContext.Peer.Builder clearPort()
The network port of the peer.
int64 port = 2;
Type | Description |
AttributeContext.Peer.Builder | This builder for chaining. |
clearPrincipal()
public AttributeContext.Peer.Builder clearPrincipal()
The identity of this peer. Similar to Request.auth.principal
, but
relative to the peer instead of the request. For example, the
idenity associated with a load balancer that forwared the request.
string principal = 7;
Type | Description |
AttributeContext.Peer.Builder | This builder for chaining. |
clearRegionCode()
public AttributeContext.Peer.Builder 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;
Type | Description |
AttributeContext.Peer.Builder | This builder for chaining. |
clone()
public AttributeContext.Peer.Builder clone()
Type | Description |
AttributeContext.Peer.Builder |
containsLabels(String key)
public boolean containsLabels(String key)
The labels associated with the peer.
map<string, string> labels = 6;
Name | Description |
key | String |
Type | Description |
boolean |
getDefaultInstanceForType()
public AttributeContext.Peer getDefaultInstanceForType()
Type | Description |
AttributeContext.Peer |
getDescriptorForType()
public Descriptors.Descriptor getDescriptorForType()
Type | Description |
Descriptor |
getIp()
public String getIp()
The IP address of the peer.
string ip = 1;
Type | Description |
String | The ip. |
getIpBytes()
public ByteString getIpBytes()
The IP address of the peer.
string ip = 1;
Type | Description |
ByteString | The bytes for ip. |
getLabels()
public Map<String,String> getLabels()
Use #getLabelsMap() instead.
Type | Description |
Map<String,String> |
getLabelsCount()
public int getLabelsCount()
The labels associated with the peer.
map<string, string> labels = 6;
Type | Description |
int |
getLabelsMap()
public Map<String,String> getLabelsMap()
The labels associated with the peer.
map<string, string> labels = 6;
Type | Description |
Map<String,String> |
getLabelsOrDefault(String key, String defaultValue)
public String getLabelsOrDefault(String key, String defaultValue)
The labels associated with the peer.
map<string, string> labels = 6;
Name | Description |
key | String |
defaultValue | String |
Type | Description |
String |
getLabelsOrThrow(String key)
public String getLabelsOrThrow(String key)
The labels associated with the peer.
map<string, string> labels = 6;
Name | Description |
key | String |
Type | Description |
String |
getMutableLabels()
public Map<String,String> getMutableLabels()
Use alternate mutation accessors instead.
Type | Description |
Map<String,String> |
getPort()
public long getPort()
The network port of the peer.
int64 port = 2;
Type | Description |
long | The port. |
getPrincipal()
public String getPrincipal()
The identity of this peer. Similar to Request.auth.principal
, but
relative to the peer instead of the request. For example, the
idenity associated with a load balancer that forwared the request.
string principal = 7;
Type | Description |
String | The principal. |
getPrincipalBytes()
public ByteString getPrincipalBytes()
The identity of this peer. Similar to Request.auth.principal
, but
relative to the peer instead of the request. For example, the
idenity associated with a load balancer that forwared the request.
string principal = 7;
Type | Description |
ByteString | The bytes for principal. |
getRegionCode()
public 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;
Type | Description |
String | The regionCode. |
getRegionCodeBytes()
public 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;
Type | Description |
ByteString | The bytes for regionCode. |
internalGetFieldAccessorTable()
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Type | Description |
FieldAccessorTable |
internalGetMapField(int number)
protected MapField internalGetMapField(int number)
Name | Description |
number | int |
Type | Description |
MapField |
internalGetMutableMapField(int number)
protected MapField internalGetMutableMapField(int number)
Name | Description |
number | int |
Type | Description |
MapField |
isInitialized()
public final boolean isInitialized()
Type | Description |
boolean |
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
public AttributeContext.Peer.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Name | Description |
input | CodedInputStream |
extensionRegistry | ExtensionRegistryLite |
Type | Description |
AttributeContext.Peer.Builder |
Type | Description |
IOException |
mergeFrom(Message other)
public AttributeContext.Peer.Builder mergeFrom(Message other)
Name | Description |
other | Message |
Type | Description |
AttributeContext.Peer.Builder |
mergeFrom(AttributeContext.Peer other)
public AttributeContext.Peer.Builder mergeFrom(AttributeContext.Peer other)
Name | Description |
other | AttributeContext.Peer |
Type | Description |
AttributeContext.Peer.Builder |
mergeUnknownFields(UnknownFieldSet unknownFields)
public final AttributeContext.Peer.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
AttributeContext.Peer.Builder |
putAllLabels(Map<String,String> values)
public AttributeContext.Peer.Builder putAllLabels(Map<String,String> values)
The labels associated with the peer.
map<string, string> labels = 6;
Name | Description |
values | Map<String,String> |
Type | Description |
AttributeContext.Peer.Builder |
putLabels(String key, String value)
public AttributeContext.Peer.Builder putLabels(String key, String value)
The labels associated with the peer.
map<string, string> labels = 6;
Name | Description |
key | String |
value | String |
Type | Description |
AttributeContext.Peer.Builder |
removeLabels(String key)
public AttributeContext.Peer.Builder removeLabels(String key)
The labels associated with the peer.
map<string, string> labels = 6;
Name | Description |
key | String |
Type | Description |
AttributeContext.Peer.Builder |
setField(Descriptors.FieldDescriptor field, Object value)
public AttributeContext.Peer.Builder setField(Descriptors.FieldDescriptor field, Object value)
Name | Description |
field | FieldDescriptor |
value | Object |
Type | Description |
AttributeContext.Peer.Builder |
setIp(String value)
public AttributeContext.Peer.Builder setIp(String value)
The IP address of the peer.
string ip = 1;
Name | Description |
value | String The ip to set. |
Type | Description |
AttributeContext.Peer.Builder | This builder for chaining. |
setIpBytes(ByteString value)
public AttributeContext.Peer.Builder setIpBytes(ByteString value)
The IP address of the peer.
string ip = 1;
Name | Description |
value | ByteString The bytes for ip to set. |
Type | Description |
AttributeContext.Peer.Builder | This builder for chaining. |
setPort(long value)
public AttributeContext.Peer.Builder setPort(long value)
The network port of the peer.
int64 port = 2;
Name | Description |
value | long The port to set. |
Type | Description |
AttributeContext.Peer.Builder | This builder for chaining. |
setPrincipal(String value)
public AttributeContext.Peer.Builder setPrincipal(String value)
The identity of this peer. Similar to Request.auth.principal
, but
relative to the peer instead of the request. For example, the
idenity associated with a load balancer that forwared the request.
string principal = 7;
Name | Description |
value | String The principal to set. |
Type | Description |
AttributeContext.Peer.Builder | This builder for chaining. |
setPrincipalBytes(ByteString value)
public AttributeContext.Peer.Builder setPrincipalBytes(ByteString value)
The identity of this peer. Similar to Request.auth.principal
, but
relative to the peer instead of the request. For example, the
idenity associated with a load balancer that forwared the request.
string principal = 7;
Name | Description |
value | ByteString The bytes for principal to set. |
Type | Description |
AttributeContext.Peer.Builder | This builder for chaining. |
setRegionCode(String value)
public AttributeContext.Peer.Builder setRegionCode(String value)
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;
Name | Description |
value | String The regionCode to set. |
Type | Description |
AttributeContext.Peer.Builder | This builder for chaining. |
setRegionCodeBytes(ByteString value)
public AttributeContext.Peer.Builder setRegionCodeBytes(ByteString value)
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;
Name | Description |
value | ByteString The bytes for regionCode to set. |
Type | Description |
AttributeContext.Peer.Builder | This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
public AttributeContext.Peer.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Name | Description |
field | FieldDescriptor |
index | int |
value | Object |
Type | Description |
AttributeContext.Peer.Builder |
setUnknownFields(UnknownFieldSet unknownFields)
public final AttributeContext.Peer.Builder setUnknownFields(UnknownFieldSet unknownFields)
Name | Description |
unknownFields | UnknownFieldSet |
Type | Description |
AttributeContext.Peer.Builder |