Class MetadataFilter.Builder (1.18.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
TypeDescription
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
NameDescription
valuesIterable<? extends com.google.cloud.compute.v1.MetadataFilterLabelMatch>
Returns
TypeDescription
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
NameDescription
valueMetadataFilterLabelMatch
Returns
TypeDescription
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
NameDescription
builderForValueMetadataFilterLabelMatch.Builder
Returns
TypeDescription
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
NameDescription
indexint
valueMetadataFilterLabelMatch
Returns
TypeDescription
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
NameDescription
indexint
builderForValueMetadataFilterLabelMatch.Builder
Returns
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
MetadataFilterLabelMatch.Builder

addRepeatedField(Descriptors.FieldDescriptor field, Object value)

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

build()

public MetadataFilter build()
Returns
TypeDescription
MetadataFilter

buildPartial()

public MetadataFilter buildPartial()
Returns
TypeDescription
MetadataFilter

clear()

public MetadataFilter.Builder clear()
Returns
TypeDescription
MetadataFilter.Builder
Overrides

clearField(Descriptors.FieldDescriptor field)

public MetadataFilter.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
NameDescription
fieldFieldDescriptor
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
MetadataFilter.Builder

This builder for chaining.

clearOneof(Descriptors.OneofDescriptor oneof)

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

clone()

public MetadataFilter.Builder clone()
Returns
TypeDescription
MetadataFilter.Builder
Overrides

getDefaultInstanceForType()

public MetadataFilter getDefaultInstanceForType()
Returns
TypeDescription
MetadataFilter

getDescriptorForType()

public Descriptors.Descriptor getDescriptorForType()
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
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
TypeDescription
boolean

Whether the filterMatchCriteria field is set.

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
TypeDescription
FieldAccessorTable
Overrides

isInitialized()

public final boolean isInitialized()
Returns
TypeDescription
boolean
Overrides

mergeFrom(MetadataFilter other)

public MetadataFilter.Builder mergeFrom(MetadataFilter other)
Parameter
NameDescription
otherMetadataFilter
Returns
TypeDescription
MetadataFilter.Builder

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

mergeUnknownFields(UnknownFieldSet unknownFields)

public final MetadataFilter.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
NameDescription
unknownFieldsUnknownFieldSet
Returns
TypeDescription
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
NameDescription
indexint
Returns
TypeDescription
MetadataFilter.Builder

setField(Descriptors.FieldDescriptor field, Object value)

public MetadataFilter.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
NameDescription
fieldFieldDescriptor
valueObject
Returns
TypeDescription
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
NameDescription
indexint
valueMetadataFilterLabelMatch
Returns
TypeDescription
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
NameDescription
indexint
builderForValueMetadataFilterLabelMatch.Builder
Returns
TypeDescription
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
NameDescription
valueString

The filterMatchCriteria to set.

Returns
TypeDescription
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
NameDescription
valueByteString

The bytes for filterMatchCriteria to set.

Returns
TypeDescription
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
NameDescription
fieldFieldDescriptor
indexint
valueObject
Returns
TypeDescription
MetadataFilter.Builder
Overrides

setUnknownFields(UnknownFieldSet unknownFields)

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