public static final class MetadataFilter.Builder extends GeneratedMessageV3.Builder<MetadataFilter.Builder> implements MetadataFilterOrBuilder
Opaque filter criteria used by loadbalancers to restrict routing configuration to a limited set of loadbalancing proxies. Proxies and sidecars involved in loadbalancing would typically present metadata to the loadbalancers which 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 loadbalancing involves Envoys, they will only 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
public static final Descriptors.Descriptor getDescriptor()
Returns
Methods
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
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
Returns
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
Returns
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
Returns
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
Returns
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
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
Returns
public MetadataFilter.Builder addRepeatedField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
public MetadataFilter build()
Returns
public MetadataFilter buildPartial()
Returns
public MetadataFilter.Builder clear()
Returns
Overrides
public MetadataFilter.Builder clearField(Descriptors.FieldDescriptor field)
Parameter
Returns
Overrides
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
public MetadataFilter.Builder clearFilterMatchCriteria()
Specifies how individual filterLabel matches within the list of filterLabels contribute towards 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
public MetadataFilter.Builder clearOneof(Descriptors.OneofDescriptor oneof)
Parameter
Returns
Overrides
public MetadataFilter.Builder clone()
Returns
Overrides
public MetadataFilter getDefaultInstanceForType()
Returns
public Descriptors.Descriptor getDescriptorForType()
Returns
Overrides
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
Returns
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
Returns
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
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
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
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
Returns
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> | |
public String getFilterMatchCriteria()
Specifies how individual filterLabel matches within the list of filterLabels contribute towards 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.
|
public ByteString getFilterMatchCriteriaBytes()
Specifies how individual filterLabel matches within the list of filterLabels contribute towards 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.
|
public boolean hasFilterMatchCriteria()
Specifies how individual filterLabel matches within the list of filterLabels contribute towards 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.
|
protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Overrides
public final boolean isInitialized()
Returns
Overrides
public MetadataFilter.Builder mergeFrom(MetadataFilter other)
Parameter
Returns
public MetadataFilter.Builder mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Returns
Overrides
Exceptions
public MetadataFilter.Builder mergeFrom(Message other)
Parameter
Returns
Overrides
public final MetadataFilter.Builder mergeUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides
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
Returns
public MetadataFilter.Builder setField(Descriptors.FieldDescriptor field, Object value)
Parameters
Returns
Overrides
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
Returns
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
Returns
public MetadataFilter.Builder setFilterMatchCriteria(String value)
Specifies how individual filterLabel matches within the list of filterLabels contribute towards 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
public MetadataFilter.Builder setFilterMatchCriteriaBytes(ByteString value)
Specifies how individual filterLabel matches within the list of filterLabels contribute towards 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
public MetadataFilter.Builder setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
Parameters
Returns
Overrides
public final MetadataFilter.Builder setUnknownFields(UnknownFieldSet unknownFields)
Parameter
Returns
Overrides