Reference documentation and code samples for the Google Cloud Model Armor V1beta Client class RaiFilter.
Responsible AI filter.
Generated from protobuf message google.cloud.modelarmor.v1beta.RaiFilterSettings.RaiFilter
Namespace
Google \ Cloud \ ModelArmor \ V1beta \ 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 the filter_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 the filter_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 the filter_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 V1beta Client - Class RaiFilter (0.4.0)\n\nVersion latestkeyboard_arrow_down\n\n- [0.4.0 (latest)](/php/docs/reference/cloud-modelarmor/latest/V1beta.RaiFilterSettings.RaiFilter)\n- [0.3.1](/php/docs/reference/cloud-modelarmor/0.3.1/V1beta.RaiFilterSettings.RaiFilter)\n- [0.2.0](/php/docs/reference/cloud-modelarmor/0.2.0/V1beta.RaiFilterSettings.RaiFilter)\n- [0.1.0](/php/docs/reference/cloud-modelarmor/0.1.0/V1beta.RaiFilterSettings.RaiFilter) \n| **Beta**\n|\n|\n| This library is covered by the [Pre-GA Offerings Terms](/terms/service-terms#1)\n| of the Terms of Service. Pre-GA libraries might have limited support,\n| and changes to pre-GA libraries might not be compatible with other pre-GA versions.\n| For more information, see the\n[launch stage descriptions](/products#product-launch-stages). \nReference documentation and code samples for the Google Cloud Model Armor V1beta Client class RaiFilter.\n\nResponsible AI filter.\n\nGenerated from protobuf message `google.cloud.modelarmor.v1beta.RaiFilterSettings.RaiFilter`\n\nNamespace\n---------\n\nGoogle \\\\ Cloud \\\\ ModelArmor \\\\ V1beta \\\\ 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`."]]