Class AttributeContext.Peer.Builder (2.8.4)

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

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
TypeDescription
Descriptor

Methods

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public AttributeContext.Peer.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AttributeContext.Peer.Builder
Overrides

build()

public AttributeContext.Peer build()
Returns
TypeDescription
AttributeContext.Peer

buildPartial()

public AttributeContext.Peer buildPartial()
Returns
TypeDescription
AttributeContext.Peer

clear()

public AttributeContext.Peer.Builder clear()
Returns
TypeDescription
AttributeContext.Peer.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public AttributeContext.Peer.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
AttributeContext.Peer.Builder
Overrides

clearIp()

public AttributeContext.Peer.Builder clearIp()

The IP address of the peer.

string ip = 1;

Returns
TypeDescription
AttributeContext.Peer.Builder

This builder for chaining.

clearLabels()

public AttributeContext.Peer.Builder clearLabels()
Returns
TypeDescription
AttributeContext.Peer.Builder

clearOneof(Descriptors.OneofDescriptor oneof)

public AttributeContext.Peer.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
NameDescription
oneofOneofDescriptor
Returns
TypeDescription
AttributeContext.Peer.Builder
Overrides

clearPort()

public AttributeContext.Peer.Builder clearPort()

The network port of the peer.

int64 port = 2;

Returns
TypeDescription
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;

Returns
TypeDescription
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;

Returns
TypeDescription
AttributeContext.Peer.Builder

This builder for chaining.

clone()

public AttributeContext.Peer.Builder clone()
Returns
TypeDescription
AttributeContext.Peer.Builder
Overrides

containsLabels(String key)

public boolean containsLabels(String key)

The labels associated with the peer.

map<string, string> labels = 6;

Parameter
NameDescription
keyString
Returns
TypeDescription
boolean

getDefaultInstanceForType()

public AttributeContext.Peer getDefaultInstanceForType()
Returns
TypeDescription
AttributeContext.Peer

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
Descriptor
Overrides

getIp()

public String getIp()

The IP address of the peer.

string ip = 1;

Returns
TypeDescription
String

The ip.

getIpBytes()

public ByteString getIpBytes()

The IP address of the peer.

string ip = 1;

Returns
TypeDescription
ByteString

The bytes for ip.

getLabels()

public Map<String,String> getLabels()

Use #getLabelsMap() instead.

Returns
TypeDescription
Map<String,String>

getLabelsCount()

public int getLabelsCount()

The labels associated with the peer.

map<string, string> labels = 6;

Returns
TypeDescription
int

getLabelsMap()

public Map<String,String> getLabelsMap()

The labels associated with the peer.

map<string, string> labels = 6;

Returns
TypeDescription
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;

Parameters
NameDescription
keyString
defaultValueString
Returns
TypeDescription
String

getLabelsOrThrow(String key)

public String getLabelsOrThrow(String key)

The labels associated with the peer.

map<string, string> labels = 6;

Parameter
NameDescription
keyString
Returns
TypeDescription
String

getMutableLabels()

public Map<String,String> getMutableLabels()

Use alternate mutation accessors instead.

Returns
TypeDescription
Map<String,String>

getPort()

public long getPort()

The network port of the peer.

int64 port = 2;

Returns
TypeDescription
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;

Returns
TypeDescription
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;

Returns
TypeDescription
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;

Returns
TypeDescription
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;

Returns
TypeDescription
ByteString

The bytes for regionCode.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

internalGetMapField(int number)

protected MapField internalGetMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

internalGetMutableMapField(int number)

protected MapField internalGetMutableMapField(int number)
Parameter
NameDescription
numberint
Returns
TypeDescription
MapField
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public AttributeContext.Peer.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
NameDescription
inputCodedInputStream
extensionRegistryExtensionRegistryLite
Returns
TypeDescription
AttributeContext.Peer.Builder
Overrides Exceptions
TypeDescription
IOException

mergeFrom(Message other)

public AttributeContext.Peer.Builder mergeFrom(Message other)
Parameter
NameDescription
otherMessage
Returns
TypeDescription
AttributeContext.Peer.Builder
Overrides

mergeFrom(AttributeContext.Peer other)

public AttributeContext.Peer.Builder mergeFrom(AttributeContext.Peer other)
Parameter
NameDescription
otherAttributeContext.Peer
Returns
TypeDescription
AttributeContext.Peer.Builder

mergeUnknownFields(UnknownFieldSet unknownFields)

public final AttributeContext.Peer.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AttributeContext.Peer.Builder
Overrides

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;

Parameter
NameDescription
valuesMap<String,String>
Returns
TypeDescription
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;

Parameters
NameDescription
keyString
valueString
Returns
TypeDescription
AttributeContext.Peer.Builder

removeLabels(String key)

public AttributeContext.Peer.Builder removeLabels(String key)

The labels associated with the peer.

map<string, string> labels = 6;

Parameter
NameDescription
keyString
Returns
TypeDescription
AttributeContext.Peer.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public AttributeContext.Peer.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
AttributeContext.Peer.Builder
Overrides

setIp(String value)

public AttributeContext.Peer.Builder setIp(String value)

The IP address of the peer.

string ip = 1;

Parameter
NameDescription
valueString

The ip to set.

Returns
TypeDescription
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;

Parameter
NameDescription
valueByteString

The bytes for ip to set.

Returns
TypeDescription
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;

Parameter
NameDescription
valuelong

The port to set.

Returns
TypeDescription
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;

Parameter
NameDescription
valueString

The principal to set.

Returns
TypeDescription
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;

Parameter
NameDescription
valueByteString

The bytes for principal to set.

Returns
TypeDescription
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;

Parameter
NameDescription
valueString

The regionCode to set.

Returns
TypeDescription
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;

Parameter
NameDescription
valueByteString

The bytes for regionCode to set.

Returns
TypeDescription
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)
Parameters
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
AttributeContext.Peer.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final AttributeContext.Peer.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
AttributeContext.Peer.Builder
Overrides