Class FilterRuleSet.Builder (0.44.0)

public static final class FilterRuleSet.Builder extends GeneratedMessage.Builder<FilterRuleSet.Builder> implements FilterRuleSetOrBuilder

A set of rules that modifies the behavior of specific filters based on the rules defined within the set.

Protobuf type google.cloud.modelarmor.v1.FilterRuleSet

Static Methods

getDescriptor()

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

Methods

addAllFilterTypes(Iterable<? extends RuleFilterType> values)

public FilterRuleSet.Builder addAllFilterTypes(Iterable<? extends RuleFilterType> values)

Required. List of filters this rule set is applied to.

repeated .google.cloud.modelarmor.v1.RuleFilterType filter_types = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<? extends com.google.cloud.modelarmor.v1.RuleFilterType>

The filterTypes to add.

Returns
Type Description
FilterRuleSet.Builder

This builder for chaining.

addAllFilterTypesValue(Iterable<Integer> values)

public FilterRuleSet.Builder addAllFilterTypesValue(Iterable<Integer> values)

Required. List of filters this rule set is applied to.

repeated .google.cloud.modelarmor.v1.RuleFilterType filter_types = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<Integer>

The enum numeric values on the wire for filterTypes to add.

Returns
Type Description
FilterRuleSet.Builder

This builder for chaining.

addAllRules(Iterable<? extends FilterRule> values)

public FilterRuleSet.Builder addAllRules(Iterable<? extends FilterRule> values)

Required. Set of rules to be applied to filterTypes.

repeated .google.cloud.modelarmor.v1.FilterRule rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
values Iterable<? extends com.google.cloud.modelarmor.v1.FilterRule>
Returns
Type Description
FilterRuleSet.Builder

addFilterTypes(RuleFilterType value)

public FilterRuleSet.Builder addFilterTypes(RuleFilterType value)

Required. List of filters this rule set is applied to.

repeated .google.cloud.modelarmor.v1.RuleFilterType filter_types = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value RuleFilterType

The filterTypes to add.

Returns
Type Description
FilterRuleSet.Builder

This builder for chaining.

addFilterTypesValue(int value)

public FilterRuleSet.Builder addFilterTypesValue(int value)

Required. List of filters this rule set is applied to.

repeated .google.cloud.modelarmor.v1.RuleFilterType filter_types = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value int

The enum numeric value on the wire for filterTypes to add.

Returns
Type Description
FilterRuleSet.Builder

This builder for chaining.

addRules(FilterRule value)

public FilterRuleSet.Builder addRules(FilterRule value)

Required. Set of rules to be applied to filterTypes.

repeated .google.cloud.modelarmor.v1.FilterRule rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
value FilterRule
Returns
Type Description
FilterRuleSet.Builder

addRules(FilterRule.Builder builderForValue)

public FilterRuleSet.Builder addRules(FilterRule.Builder builderForValue)

Required. Set of rules to be applied to filterTypes.

repeated .google.cloud.modelarmor.v1.FilterRule rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
builderForValue FilterRule.Builder
Returns
Type Description
FilterRuleSet.Builder

addRules(int index, FilterRule value)

public FilterRuleSet.Builder addRules(int index, FilterRule value)

Required. Set of rules to be applied to filterTypes.

repeated .google.cloud.modelarmor.v1.FilterRule rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
value FilterRule
Returns
Type Description
FilterRuleSet.Builder

addRules(int index, FilterRule.Builder builderForValue)

public FilterRuleSet.Builder addRules(int index, FilterRule.Builder builderForValue)

Required. Set of rules to be applied to filterTypes.

repeated .google.cloud.modelarmor.v1.FilterRule rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
builderForValue FilterRule.Builder
Returns
Type Description
FilterRuleSet.Builder

addRulesBuilder()

public FilterRule.Builder addRulesBuilder()

Required. Set of rules to be applied to filterTypes.

repeated .google.cloud.modelarmor.v1.FilterRule rules = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
FilterRule.Builder

addRulesBuilder(int index)

public FilterRule.Builder addRulesBuilder(int index)

Required. Set of rules to be applied to filterTypes.

repeated .google.cloud.modelarmor.v1.FilterRule rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
FilterRule.Builder

build()

public FilterRuleSet build()
Returns
Type Description
FilterRuleSet

buildPartial()

public FilterRuleSet buildPartial()
Returns
Type Description
FilterRuleSet

clear()

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

clearFilterTypes()

public FilterRuleSet.Builder clearFilterTypes()

Required. List of filters this rule set is applied to.

repeated .google.cloud.modelarmor.v1.RuleFilterType filter_types = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
FilterRuleSet.Builder

This builder for chaining.

clearRules()

public FilterRuleSet.Builder clearRules()

Required. Set of rules to be applied to filterTypes.

repeated .google.cloud.modelarmor.v1.FilterRule rules = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
FilterRuleSet.Builder

getDefaultInstanceForType()

public FilterRuleSet getDefaultInstanceForType()
Returns
Type Description
FilterRuleSet

getDescriptorForType()

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

getFilterTypes(int index)

public RuleFilterType getFilterTypes(int index)

Required. List of filters this rule set is applied to.

repeated .google.cloud.modelarmor.v1.RuleFilterType filter_types = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
RuleFilterType

The filterTypes at the given index.

getFilterTypesCount()

public int getFilterTypesCount()

Required. List of filters this rule set is applied to.

repeated .google.cloud.modelarmor.v1.RuleFilterType filter_types = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

The count of filterTypes.

getFilterTypesList()

public List<RuleFilterType> getFilterTypesList()

Required. List of filters this rule set is applied to.

repeated .google.cloud.modelarmor.v1.RuleFilterType filter_types = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<RuleFilterType>

A list containing the filterTypes.

getFilterTypesValue(int index)

public int getFilterTypesValue(int index)

Required. List of filters this rule set is applied to.

repeated .google.cloud.modelarmor.v1.RuleFilterType filter_types = 1 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
int

The enum numeric value on the wire of filterTypes at the given index.

getFilterTypesValueList()

public List<Integer> getFilterTypesValueList()

Required. List of filters this rule set is applied to.

repeated .google.cloud.modelarmor.v1.RuleFilterType filter_types = 1 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Integer>

A list containing the enum numeric values on the wire for filterTypes.

getRules(int index)

public FilterRule getRules(int index)

Required. Set of rules to be applied to filterTypes.

repeated .google.cloud.modelarmor.v1.FilterRule rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
FilterRule

getRulesBuilder(int index)

public FilterRule.Builder getRulesBuilder(int index)

Required. Set of rules to be applied to filterTypes.

repeated .google.cloud.modelarmor.v1.FilterRule rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
FilterRule.Builder

getRulesBuilderList()

public List<FilterRule.Builder> getRulesBuilderList()

Required. Set of rules to be applied to filterTypes.

repeated .google.cloud.modelarmor.v1.FilterRule rules = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<Builder>

getRulesCount()

public int getRulesCount()

Required. Set of rules to be applied to filterTypes.

repeated .google.cloud.modelarmor.v1.FilterRule rules = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
int

getRulesList()

public List<FilterRule> getRulesList()

Required. Set of rules to be applied to filterTypes.

repeated .google.cloud.modelarmor.v1.FilterRule rules = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<FilterRule>

getRulesOrBuilder(int index)

public FilterRuleOrBuilder getRulesOrBuilder(int index)

Required. Set of rules to be applied to filterTypes.

repeated .google.cloud.modelarmor.v1.FilterRule rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
FilterRuleOrBuilder

getRulesOrBuilderList()

public List<? extends FilterRuleOrBuilder> getRulesOrBuilderList()

Required. Set of rules to be applied to filterTypes.

repeated .google.cloud.modelarmor.v1.FilterRule rules = 2 [(.google.api.field_behavior) = REQUIRED];

Returns
Type Description
List<? extends com.google.cloud.modelarmor.v1.FilterRuleOrBuilder>

internalGetFieldAccessorTable()

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

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

mergeFrom(FilterRuleSet other)

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

mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

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

mergeFrom(Message other)

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

removeRules(int index)

public FilterRuleSet.Builder removeRules(int index)

Required. Set of rules to be applied to filterTypes.

repeated .google.cloud.modelarmor.v1.FilterRule rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameter
Name Description
index int
Returns
Type Description
FilterRuleSet.Builder

setFilterTypes(int index, RuleFilterType value)

public FilterRuleSet.Builder setFilterTypes(int index, RuleFilterType value)

Required. List of filters this rule set is applied to.

repeated .google.cloud.modelarmor.v1.RuleFilterType filter_types = 1 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int

The index to set the value at.

value RuleFilterType

The filterTypes to set.

Returns
Type Description
FilterRuleSet.Builder

This builder for chaining.

setFilterTypesValue(int index, int value)

public FilterRuleSet.Builder setFilterTypesValue(int index, int value)

Required. List of filters this rule set is applied to.

repeated .google.cloud.modelarmor.v1.RuleFilterType filter_types = 1 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int

The index to set the value at.

value int

The enum numeric value on the wire for filterTypes to set.

Returns
Type Description
FilterRuleSet.Builder

This builder for chaining.

setRules(int index, FilterRule value)

public FilterRuleSet.Builder setRules(int index, FilterRule value)

Required. Set of rules to be applied to filterTypes.

repeated .google.cloud.modelarmor.v1.FilterRule rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
value FilterRule
Returns
Type Description
FilterRuleSet.Builder

setRules(int index, FilterRule.Builder builderForValue)

public FilterRuleSet.Builder setRules(int index, FilterRule.Builder builderForValue)

Required. Set of rules to be applied to filterTypes.

repeated .google.cloud.modelarmor.v1.FilterRule rules = 2 [(.google.api.field_behavior) = REQUIRED];

Parameters
Name Description
index int
builderForValue FilterRule.Builder
Returns
Type Description
FilterRuleSet.Builder