Class MetadataFilter.Builder (1.56.0)

public static final class MetadataFilter.Builder extends GeneratedMessageV3.Builder<MetadataFilter.Builder> implements MetadataFilterOrBuilder

Opaque filter criteria used by load balancers to restrict routing configuration to a limited set of load balancing proxies. Proxies and sidecars involved in load balancing would typically present metadata to the load balancers that need to match criteria specified here. If a match takes place, the relevant configuration is made available to those proxies. For each metadataFilter in this list, if its filterMatchCriteria is set to MATCH_ANY, at least one of the filterLabels must match the corresponding label provided in the metadata. If its filterMatchCriteria is set to MATCH_ALL, then all of its filterLabels must match with corresponding labels provided in the metadata. An example for using metadataFilters would be: if load balancing involves Envoys, they receive routing configuration when values in metadataFilters match values supplied in of their XDS requests to loadbalancers.

Protobuf type google.cloud.compute.v1.MetadataFilter

Static Methods

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

Methods

addAllFilterLabels(Iterable<? extends MetadataFilterLabelMatch> values)

public MetadataFilter.Builder addAllFilterLabels(Iterable<? extends MetadataFilterLabelMatch> values)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.

repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;

Parameter
Name Description
values Iterable<? extends com.google.cloud.compute.v1.MetadataFilterLabelMatch>
Returns
Type Description
MetadataFilter.Builder

addFilterLabels(MetadataFilterLabelMatch value)

public MetadataFilter.Builder addFilterLabels(MetadataFilterLabelMatch value)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.

repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;

Parameter
Name Description
value MetadataFilterLabelMatch
Returns
Type Description
MetadataFilter.Builder

addFilterLabels(MetadataFilterLabelMatch.Builder builderForValue)

public MetadataFilter.Builder addFilterLabels(MetadataFilterLabelMatch.Builder builderForValue)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.

repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;

Parameter
Name Description
builderForValue MetadataFilterLabelMatch.Builder
Returns
Type Description
MetadataFilter.Builder

addFilterLabels(int index, MetadataFilterLabelMatch value)

public MetadataFilter.Builder addFilterLabels(int index, MetadataFilterLabelMatch value)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.

repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;

Parameters
Name Description
index int
value MetadataFilterLabelMatch
Returns
Type Description
MetadataFilter.Builder

addFilterLabels(int index, MetadataFilterLabelMatch.Builder builderForValue)

public MetadataFilter.Builder addFilterLabels(int index, MetadataFilterLabelMatch.Builder builderForValue)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.

repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;

Parameters
Name Description
index int
builderForValue MetadataFilterLabelMatch.Builder
Returns
Type Description
MetadataFilter.Builder

addFilterLabelsBuilder()

public MetadataFilterLabelMatch.Builder addFilterLabelsBuilder()

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.

repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;

Returns
Type Description
MetadataFilterLabelMatch.Builder

addFilterLabelsBuilder(int index)

public MetadataFilterLabelMatch.Builder addFilterLabelsBuilder(int index)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.

repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;

Parameter
Name Description
index int
Returns
Type Description
MetadataFilterLabelMatch.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

public MetadataFilter.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
MetadataFilter.Builder
Overrides

build()

public MetadataFilter build()
Returns
Type Description
MetadataFilter

buildPartial()

public MetadataFilter buildPartial()
Returns
Type Description
MetadataFilter

clear()

public MetadataFilter.Builder clear()
Returns
Type Description
MetadataFilter.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public MetadataFilter.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Name Description
field FieldDescriptor
Returns
Type Description
MetadataFilter.Builder
Overrides

clearFilterLabels()

public MetadataFilter.Builder clearFilterLabels()

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.

repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;

Returns
Type Description
MetadataFilter.Builder

clearFilterMatchCriteria()

public MetadataFilter.Builder clearFilterMatchCriteria()

Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter match. Supported values are: - MATCH_ANY: at least one of the filterLabels must have a matching label in the provided metadata. - MATCH_ALL: all filterLabels must have matching labels in the provided metadata. Check the FilterMatchCriteria enum for the list of possible values.

optional string filter_match_criteria = 239970368;

Returns
Type Description
MetadataFilter.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

public MetadataFilter.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Name Description
oneof OneofDescriptor
Returns
Type Description
MetadataFilter.Builder
Overrides

clone()

public MetadataFilter.Builder clone()
Returns
Type Description
MetadataFilter.Builder
Overrides

getDefaultInstanceForType()

public MetadataFilter getDefaultInstanceForType()
Returns
Type Description
MetadataFilter

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
Type Description
Descriptor
Overrides

getFilterLabels(int index)

public MetadataFilterLabelMatch getFilterLabels(int index)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.

repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;

Parameter
Name Description
index int
Returns
Type Description
MetadataFilterLabelMatch

getFilterLabelsBuilder(int index)

public MetadataFilterLabelMatch.Builder getFilterLabelsBuilder(int index)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.

repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;

Parameter
Name Description
index int
Returns
Type Description
MetadataFilterLabelMatch.Builder

getFilterLabelsBuilderList()

public List<MetadataFilterLabelMatch.Builder> getFilterLabelsBuilderList()

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.

repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;

Returns
Type Description
List<Builder>

getFilterLabelsCount()

public int getFilterLabelsCount()

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.

repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;

Returns
Type Description
int

getFilterLabelsList()

public List<MetadataFilterLabelMatch> getFilterLabelsList()

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.

repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;

Returns
Type Description
List<MetadataFilterLabelMatch>

getFilterLabelsOrBuilder(int index)

public MetadataFilterLabelMatchOrBuilder getFilterLabelsOrBuilder(int index)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.

repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;

Parameter
Name Description
index int
Returns
Type Description
MetadataFilterLabelMatchOrBuilder

getFilterLabelsOrBuilderList()

public List<? extends MetadataFilterLabelMatchOrBuilder> getFilterLabelsOrBuilderList()

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.

repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;

Returns
Type Description
List<? extends com.google.cloud.compute.v1.MetadataFilterLabelMatchOrBuilder>

getFilterMatchCriteria()

public String getFilterMatchCriteria()

Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter match. Supported values are: - MATCH_ANY: at least one of the filterLabels must have a matching label in the provided metadata. - MATCH_ALL: all filterLabels must have matching labels in the provided metadata. Check the FilterMatchCriteria enum for the list of possible values.

optional string filter_match_criteria = 239970368;

Returns
Type Description
String

The filterMatchCriteria.

getFilterMatchCriteriaBytes()

public ByteString getFilterMatchCriteriaBytes()

Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter match. Supported values are: - MATCH_ANY: at least one of the filterLabels must have a matching label in the provided metadata. - MATCH_ALL: all filterLabels must have matching labels in the provided metadata. Check the FilterMatchCriteria enum for the list of possible values.

optional string filter_match_criteria = 239970368;

Returns
Type Description
ByteString

The bytes for filterMatchCriteria.

hasFilterMatchCriteria()

public boolean hasFilterMatchCriteria()

Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter match. Supported values are: - MATCH_ANY: at least one of the filterLabels must have a matching label in the provided metadata. - MATCH_ALL: all filterLabels must have matching labels in the provided metadata. Check the FilterMatchCriteria enum for the list of possible values.

optional string filter_match_criteria = 239970368;

Returns
Type Description
boolean

Whether the filterMatchCriteria field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(MetadataFilter other)

public MetadataFilter.Builder mergeFrom(MetadataFilter other)
Parameter
Name Description
other MetadataFilter
Returns
Type Description
MetadataFilter.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public MetadataFilter.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
MetadataFilter.Builder
Overrides
Exceptions
Type Description
IOException

mergeFrom(Message other)

public MetadataFilter.Builder mergeFrom(Message other)
Parameter
Name Description
other Message
Returns
Type Description
MetadataFilter.Builder
Overrides

mergeUnknownFields(UnknownFieldSet unknownFields)

public final MetadataFilter.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
MetadataFilter.Builder
Overrides

removeFilterLabels(int index)

public MetadataFilter.Builder removeFilterLabels(int index)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.

repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;

Parameter
Name Description
index int
Returns
Type Description
MetadataFilter.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public MetadataFilter.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Name Description
field FieldDescriptor
value Object
Returns
Type Description
MetadataFilter.Builder
Overrides

setFilterLabels(int index, MetadataFilterLabelMatch value)

public MetadataFilter.Builder setFilterLabels(int index, MetadataFilterLabelMatch value)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.

repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;

Parameters
Name Description
index int
value MetadataFilterLabelMatch
Returns
Type Description
MetadataFilter.Builder

setFilterLabels(int index, MetadataFilterLabelMatch.Builder builderForValue)

public MetadataFilter.Builder setFilterLabels(int index, MetadataFilterLabelMatch.Builder builderForValue)

The list of label value pairs that must match labels in the provided metadata based on filterMatchCriteria This list must not be empty and can have at the most 64 entries.

repeated .google.cloud.compute.v1.MetadataFilterLabelMatch filter_labels = 307903142;

Parameters
Name Description
index int
builderForValue MetadataFilterLabelMatch.Builder
Returns
Type Description
MetadataFilter.Builder

setFilterMatchCriteria(String value)

public MetadataFilter.Builder setFilterMatchCriteria(String value)

Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter match. Supported values are: - MATCH_ANY: at least one of the filterLabels must have a matching label in the provided metadata. - MATCH_ALL: all filterLabels must have matching labels in the provided metadata. Check the FilterMatchCriteria enum for the list of possible values.

optional string filter_match_criteria = 239970368;

Parameter
Name Description
value String

The filterMatchCriteria to set.

Returns
Type Description
MetadataFilter.Builder

This builder for chaining.

setFilterMatchCriteriaBytes(ByteString value)

public MetadataFilter.Builder setFilterMatchCriteriaBytes(ByteString value)

Specifies how individual filter label matches within the list of filterLabels and contributes toward the overall metadataFilter match. Supported values are: - MATCH_ANY: at least one of the filterLabels must have a matching label in the provided metadata. - MATCH_ALL: all filterLabels must have matching labels in the provided metadata. Check the FilterMatchCriteria enum for the list of possible values.

optional string filter_match_criteria = 239970368;

Parameter
Name Description
value ByteString

The bytes for filterMatchCriteria to set.

Returns
Type Description
MetadataFilter.Builder

This builder for chaining.

setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)

public MetadataFilter.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Name Description
field FieldDescriptor
index int
value Object
Returns
Type Description
MetadataFilter.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

public final MetadataFilter.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Name Description
unknownFields UnknownFieldSet
Returns
Type Description
MetadataFilter.Builder
Overrides