Reference documentation and code samples for the Google Cloud Model Armor V1 Client class RaiFilter.
Responsible AI filter.
Generated from protobuf messagegoogle.cloud.modelarmor.v1.RaiFilterSettings.RaiFilter
Namespace
Google \ Cloud \ ModelArmor \ V1 \ RaiFilterSettings
Methods
__construct
Constructor.
Parameters
Name
Description
data
array
Optional. Data for populating the Message object.
↳ filter_type
int
Required. Type of responsible AI filter.
↳ confidence_level
int
Optional. Confidence level for this RAI filter. During data sanitization, if data is classified under this filter with a confidence level equal to or greater than the specified level, a positive match is reported. If the confidence level is unspecified (i.e., 0), the system will use a reasonable default level based on thefilter_type.
getFilterType
Required. Type of responsible AI filter.
Returns
Type
Description
int
setFilterType
Required. Type of responsible AI filter.
Parameter
Name
Description
var
int
Returns
Type
Description
$this
getConfidenceLevel
Optional. Confidence level for this RAI filter.
During data sanitization, if data is classified under this filter with a
confidence level equal to or greater than the specified level, a positive
match is reported. If the confidence level is unspecified (i.e., 0), the
system will use a reasonable default level based on thefilter_type.
Returns
Type
Description
int
setConfidenceLevel
Optional. Confidence level for this RAI filter.
During data sanitization, if data is classified under this filter with a
confidence level equal to or greater than the specified level, a positive
match is reported. If the confidence level is unspecified (i.e., 0), the
system will use a reasonable default level based on thefilter_type.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Google Cloud Model Armor V1 Client - Class RaiFilter (0.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.4.0 (latest)](/php/docs/reference/cloud-modelarmor/latest/V1.RaiFilterSettings.RaiFilter)\n- [0.3.1](/php/docs/reference/cloud-modelarmor/0.3.1/V1.RaiFilterSettings.RaiFilter)\n- [0.2.0](/php/docs/reference/cloud-modelarmor/0.2.0/V1.RaiFilterSettings.RaiFilter)\n- [0.1.0](/php/docs/reference/cloud-modelarmor/0.1.0/V1.RaiFilterSettings.RaiFilter) \nReference documentation and code samples for the Google Cloud Model Armor V1 Client class RaiFilter.\n\nResponsible AI filter.\n\nGenerated from protobuf message `google.cloud.modelarmor.v1.RaiFilterSettings.RaiFilter`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ ModelArmor \\\\ V1 \\\\ RaiFilterSettings\n\nMethods\n-------\n\n### __construct\n\nConstructor.\n\n### getFilterType\n\nRequired. Type of responsible AI filter.\n\n### setFilterType\n\nRequired. Type of responsible AI filter.\n\n### getConfidenceLevel\n\nOptional. Confidence level for this RAI filter.\n\nDuring data sanitization, if data is classified under this filter with a\nconfidence level equal to or greater than the specified level, a positive\nmatch is reported. If the confidence level is unspecified (i.e., 0), the\nsystem will use a reasonable default level based on the `filter_type`.\n\n### setConfidenceLevel\n\nOptional. Confidence level for this RAI filter.\n\nDuring data sanitization, if data is classified under this filter with a\nconfidence level equal to or greater than the specified level, a positive\nmatch is reported. If the confidence level is unspecified (i.e., 0), the\nsystem will use a reasonable default level based on the `filter_type`."]]