Class SanitizationResult.Builder (0.14.0)
Stay organized with collections
Save and categorize content based on your preferences.
publicstaticfinalclass SanitizationResult.BuilderextendsGeneratedMessageV3.Builder<SanitizationResult.Builder>implementsSanitizationResultOrBuilderSanitization result after applying all the filters on input content.
Protobuf type google.cloud.modelarmor.v1.SanitizationResult
Inheritance
Object > AbstractMessageLite.Builder<MessageType,BuilderType> > AbstractMessage.Builder<BuilderType> > GeneratedMessageV3.Builder > SanitizationResult.BuilderImplements
SanitizationResultOrBuilderInherited Members
Static Methods
getDescriptor()
publicstaticfinalDescriptors.DescriptorgetDescriptor()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
Methods
addRepeatedField(Descriptors.FieldDescriptor field, Object value)
publicSanitizationResult.BuilderaddRepeatedField(Descriptors.FieldDescriptorfield,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|
build()
publicSanitizationResultbuild()| Returns | |
|---|---|
| Type | Description |
SanitizationResult |
|
buildPartial()
publicSanitizationResultbuildPartial()| Returns | |
|---|---|
| Type | Description |
SanitizationResult |
|
clear()
publicSanitizationResult.Builderclear()| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|
clearField(Descriptors.FieldDescriptor field)
publicSanitizationResult.BuilderclearField(Descriptors.FieldDescriptorfield)| Parameter | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|
clearFilterMatchState()
publicSanitizationResult.BuilderclearFilterMatchState()Output only. Overall filter match state for Sanitization. The state can have below two values.
1) NO_MATCH_FOUND: No filters in configuration satisfy matching criteria. In other words, input passed all filters.
2) MATCH_FOUND: At least one filter in configuration satisfies matching. In other words, input did not pass one or more filters.
.google.cloud.modelarmor.v1.FilterMatchState filter_match_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
This builder for chaining. |
clearFilterResults()
publicSanitizationResult.BuilderclearFilterResults()| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|
clearInvocationResult()
publicSanitizationResult.BuilderclearInvocationResult()Output only. A field indicating the outcome of the invocation, irrespective of match status. It can have the following three values: SUCCESS: All filters were executed successfully. PARTIAL: Some filters were skipped or failed execution. FAILURE: All filters were skipped or failed execution.
.google.cloud.modelarmor.v1.InvocationResult invocation_result = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
This builder for chaining. |
clearOneof(Descriptors.OneofDescriptor oneof)
publicSanitizationResult.BuilderclearOneof(Descriptors.OneofDescriptoroneof)| Parameter | |
|---|---|
| Name | Description |
oneof |
OneofDescriptor |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|
clearSanitizationMetadata()
publicSanitizationResult.BuilderclearSanitizationMetadata()Output only. Metadata related to Sanitization.
.google.cloud.modelarmor.v1.SanitizationResult.SanitizationMetadata sanitization_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|
clone()
publicSanitizationResult.Builderclone()| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|
containsFilterResults(String key)
publicbooleancontainsFilterResults(Stringkey)Output only. Results for all filters where the key is the filter name - either of "csam", "malicious_uris", "rai", "pi_and_jailbreak" ,"sdp".
map<string, .google.cloud.modelarmor.v1.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
boolean |
|
getDefaultInstanceForType()
publicSanitizationResultgetDefaultInstanceForType()| Returns | |
|---|---|
| Type | Description |
SanitizationResult |
|
getDescriptorForType()
publicDescriptors.DescriptorgetDescriptorForType()| Returns | |
|---|---|
| Type | Description |
Descriptor |
|
getFilterMatchState()
publicFilterMatchStategetFilterMatchState()Output only. Overall filter match state for Sanitization. The state can have below two values.
1) NO_MATCH_FOUND: No filters in configuration satisfy matching criteria. In other words, input passed all filters.
2) MATCH_FOUND: At least one filter in configuration satisfies matching. In other words, input did not pass one or more filters.
.google.cloud.modelarmor.v1.FilterMatchState filter_match_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
FilterMatchState |
The filterMatchState. |
getFilterMatchStateValue()
publicintgetFilterMatchStateValue()Output only. Overall filter match state for Sanitization. The state can have below two values.
1) NO_MATCH_FOUND: No filters in configuration satisfy matching criteria. In other words, input passed all filters.
2) MATCH_FOUND: At least one filter in configuration satisfies matching. In other words, input did not pass one or more filters.
.google.cloud.modelarmor.v1.FilterMatchState filter_match_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire for filterMatchState. |
getFilterResults() (deprecated)
publicMap<String,FilterResult>getFilterResults()Use #getFilterResultsMap() instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,FilterResult> |
|
getFilterResultsCount()
publicintgetFilterResultsCount()Output only. Results for all filters where the key is the filter name - either of "csam", "malicious_uris", "rai", "pi_and_jailbreak" ,"sdp".
map<string, .google.cloud.modelarmor.v1.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
int |
|
getFilterResultsMap()
publicMap<String,FilterResult>getFilterResultsMap()Output only. Results for all filters where the key is the filter name - either of "csam", "malicious_uris", "rai", "pi_and_jailbreak" ,"sdp".
map<string, .google.cloud.modelarmor.v1.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
Map<String,FilterResult> |
|
getFilterResultsOrDefault(String key, FilterResult defaultValue)
publicFilterResultgetFilterResultsOrDefault(Stringkey,FilterResultdefaultValue)Output only. Results for all filters where the key is the filter name - either of "csam", "malicious_uris", "rai", "pi_and_jailbreak" ,"sdp".
map<string, .google.cloud.modelarmor.v1.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameters | |
|---|---|
| Name | Description |
key |
String |
defaultValue |
FilterResult |
| Returns | |
|---|---|
| Type | Description |
FilterResult |
|
getFilterResultsOrThrow(String key)
publicFilterResultgetFilterResultsOrThrow(Stringkey)Output only. Results for all filters where the key is the filter name - either of "csam", "malicious_uris", "rai", "pi_and_jailbreak" ,"sdp".
map<string, .google.cloud.modelarmor.v1.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
FilterResult |
|
getInvocationResult()
publicInvocationResultgetInvocationResult()Output only. A field indicating the outcome of the invocation, irrespective of match status. It can have the following three values: SUCCESS: All filters were executed successfully. PARTIAL: Some filters were skipped or failed execution. FAILURE: All filters were skipped or failed execution.
.google.cloud.modelarmor.v1.InvocationResult invocation_result = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
InvocationResult |
The invocationResult. |
getInvocationResultValue()
publicintgetInvocationResultValue()Output only. A field indicating the outcome of the invocation, irrespective of match status. It can have the following three values: SUCCESS: All filters were executed successfully. PARTIAL: Some filters were skipped or failed execution. FAILURE: All filters were skipped or failed execution.
.google.cloud.modelarmor.v1.InvocationResult invocation_result = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
int |
The enum numeric value on the wire for invocationResult. |
getMutableFilterResults() (deprecated)
publicMap<String,FilterResult>getMutableFilterResults()Use alternate mutation accessors instead.
| Returns | |
|---|---|
| Type | Description |
Map<String,FilterResult> |
|
getSanitizationMetadata()
publicSanitizationResult.SanitizationMetadatagetSanitizationMetadata()Output only. Metadata related to Sanitization.
.google.cloud.modelarmor.v1.SanitizationResult.SanitizationMetadata sanitization_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.SanitizationMetadata |
The sanitizationMetadata. |
getSanitizationMetadataBuilder()
publicSanitizationResult.SanitizationMetadata.BuildergetSanitizationMetadataBuilder()Output only. Metadata related to Sanitization.
.google.cloud.modelarmor.v1.SanitizationResult.SanitizationMetadata sanitization_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.SanitizationMetadata.Builder |
|
getSanitizationMetadataOrBuilder()
publicSanitizationResult.SanitizationMetadataOrBuildergetSanitizationMetadataOrBuilder()Output only. Metadata related to Sanitization.
.google.cloud.modelarmor.v1.SanitizationResult.SanitizationMetadata sanitization_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.SanitizationMetadataOrBuilder |
|
hasSanitizationMetadata()
publicbooleanhasSanitizationMetadata()Output only. Metadata related to Sanitization.
.google.cloud.modelarmor.v1.SanitizationResult.SanitizationMetadata sanitization_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Returns | |
|---|---|
| Type | Description |
boolean |
Whether the sanitizationMetadata field is set. |
internalGetFieldAccessorTable()
protectedGeneratedMessageV3.FieldAccessorTableinternalGetFieldAccessorTable()| Returns | |
|---|---|
| Type | Description |
FieldAccessorTable |
|
internalGetMapFieldReflection(int number)
protectedMapFieldReflectionAccessorinternalGetMapFieldReflection(intnumber)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
internalGetMutableMapFieldReflection(int number)
protectedMapFieldReflectionAccessorinternalGetMutableMapFieldReflection(intnumber)| Parameter | |
|---|---|
| Name | Description |
number |
int |
| Returns | |
|---|---|
| Type | Description |
com.google.protobuf.MapFieldReflectionAccessor |
|
isInitialized()
publicfinalbooleanisInitialized()| Returns | |
|---|---|
| Type | Description |
boolean |
|
mergeFrom(SanitizationResult other)
publicSanitizationResult.BuildermergeFrom(SanitizationResultother)| Parameter | |
|---|---|
| Name | Description |
other |
SanitizationResult |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|
mergeFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
publicSanitizationResult.BuildermergeFrom(CodedInputStreaminput,ExtensionRegistryLiteextensionRegistry)| Parameters | |
|---|---|
| Name | Description |
input |
CodedInputStream |
extensionRegistry |
ExtensionRegistryLite |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|
| Exceptions | |
|---|---|
| Type | Description |
IOException |
|
mergeFrom(Message other)
publicSanitizationResult.BuildermergeFrom(Messageother)| Parameter | |
|---|---|
| Name | Description |
other |
Message |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|
mergeSanitizationMetadata(SanitizationResult.SanitizationMetadata value)
publicSanitizationResult.BuildermergeSanitizationMetadata(SanitizationResult.SanitizationMetadatavalue)Output only. Metadata related to Sanitization.
.google.cloud.modelarmor.v1.SanitizationResult.SanitizationMetadata sanitization_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
SanitizationResult.SanitizationMetadata |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|
mergeUnknownFields(UnknownFieldSet unknownFields)
publicfinalSanitizationResult.BuildermergeUnknownFields(UnknownFieldSetunknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|
putAllFilterResults(Map<String,FilterResult> values)
publicSanitizationResult.BuilderputAllFilterResults(Map<String,FilterResult>values)Output only. Results for all filters where the key is the filter name - either of "csam", "malicious_uris", "rai", "pi_and_jailbreak" ,"sdp".
map<string, .google.cloud.modelarmor.v1.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
values |
Map<String,FilterResult> |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|
putFilterResults(String key, FilterResult value)
publicSanitizationResult.BuilderputFilterResults(Stringkey,FilterResultvalue)Output only. Results for all filters where the key is the filter name - either of "csam", "malicious_uris", "rai", "pi_and_jailbreak" ,"sdp".
map<string, .google.cloud.modelarmor.v1.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameters | |
|---|---|
| Name | Description |
key |
String |
value |
FilterResult |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|
putFilterResultsBuilderIfAbsent(String key)
publicFilterResult.BuilderputFilterResultsBuilderIfAbsent(Stringkey)Output only. Results for all filters where the key is the filter name - either of "csam", "malicious_uris", "rai", "pi_and_jailbreak" ,"sdp".
map<string, .google.cloud.modelarmor.v1.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
FilterResult.Builder |
|
removeFilterResults(String key)
publicSanitizationResult.BuilderremoveFilterResults(Stringkey)Output only. Results for all filters where the key is the filter name - either of "csam", "malicious_uris", "rai", "pi_and_jailbreak" ,"sdp".
map<string, .google.cloud.modelarmor.v1.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
key |
String |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|
setField(Descriptors.FieldDescriptor field, Object value)
publicSanitizationResult.BuildersetField(Descriptors.FieldDescriptorfield,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|
setFilterMatchState(FilterMatchState value)
publicSanitizationResult.BuildersetFilterMatchState(FilterMatchStatevalue)Output only. Overall filter match state for Sanitization. The state can have below two values.
1) NO_MATCH_FOUND: No filters in configuration satisfy matching criteria. In other words, input passed all filters.
2) MATCH_FOUND: At least one filter in configuration satisfies matching. In other words, input did not pass one or more filters.
.google.cloud.modelarmor.v1.FilterMatchState filter_match_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
FilterMatchState The filterMatchState to set. |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
This builder for chaining. |
setFilterMatchStateValue(int value)
publicSanitizationResult.BuildersetFilterMatchStateValue(intvalue)Output only. Overall filter match state for Sanitization. The state can have below two values.
1) NO_MATCH_FOUND: No filters in configuration satisfy matching criteria. In other words, input passed all filters.
2) MATCH_FOUND: At least one filter in configuration satisfies matching. In other words, input did not pass one or more filters.
.google.cloud.modelarmor.v1.FilterMatchState filter_match_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
int The enum numeric value on the wire for filterMatchState to set. |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
This builder for chaining. |
setInvocationResult(InvocationResult value)
publicSanitizationResult.BuildersetInvocationResult(InvocationResultvalue)Output only. A field indicating the outcome of the invocation, irrespective of match status. It can have the following three values: SUCCESS: All filters were executed successfully. PARTIAL: Some filters were skipped or failed execution. FAILURE: All filters were skipped or failed execution.
.google.cloud.modelarmor.v1.InvocationResult invocation_result = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
InvocationResult The invocationResult to set. |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
This builder for chaining. |
setInvocationResultValue(int value)
publicSanitizationResult.BuildersetInvocationResultValue(intvalue)Output only. A field indicating the outcome of the invocation, irrespective of match status. It can have the following three values: SUCCESS: All filters were executed successfully. PARTIAL: Some filters were skipped or failed execution. FAILURE: All filters were skipped or failed execution.
.google.cloud.modelarmor.v1.InvocationResult invocation_result = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
int The enum numeric value on the wire for invocationResult to set. |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
This builder for chaining. |
setRepeatedField(Descriptors.FieldDescriptor field, int index, Object value)
publicSanitizationResult.BuildersetRepeatedField(Descriptors.FieldDescriptorfield,intindex,Objectvalue)| Parameters | |
|---|---|
| Name | Description |
field |
FieldDescriptor |
index |
int |
value |
Object |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|
setSanitizationMetadata(SanitizationResult.SanitizationMetadata value)
publicSanitizationResult.BuildersetSanitizationMetadata(SanitizationResult.SanitizationMetadatavalue)Output only. Metadata related to Sanitization.
.google.cloud.modelarmor.v1.SanitizationResult.SanitizationMetadata sanitization_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
value |
SanitizationResult.SanitizationMetadata |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|
setSanitizationMetadata(SanitizationResult.SanitizationMetadata.Builder builderForValue)
publicSanitizationResult.BuildersetSanitizationMetadata(SanitizationResult.SanitizationMetadata.BuilderbuilderForValue)Output only. Metadata related to Sanitization.
.google.cloud.modelarmor.v1.SanitizationResult.SanitizationMetadata sanitization_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
| Parameter | |
|---|---|
| Name | Description |
builderForValue |
SanitizationResult.SanitizationMetadata.Builder |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|
setUnknownFields(UnknownFieldSet unknownFields)
publicfinalSanitizationResult.BuildersetUnknownFields(UnknownFieldSetunknownFields)| Parameter | |
|---|---|
| Name | Description |
unknownFields |
UnknownFieldSet |
| Returns | |
|---|---|
| Type | Description |
SanitizationResult.Builder |
|