Class SanitizationResult.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<SanitizationResult.Builder>
com.google.cloud.modelarmor.v1beta.SanitizationResult.Builder
All Implemented Interfaces:
SanitizationResultOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
SanitizationResult

public static final class SanitizationResult.Builder extends com.google.protobuf.GeneratedMessage.Builder<SanitizationResult.Builder> implements SanitizationResultOrBuilder
 Sanitization result after applying all the filters on input content.
 
Protobuf type google.cloud.modelarmor.v1beta.SanitizationResult
  • Method Details

    • getDescriptor

      public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
    • internalGetMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
      Overrides:
      internalGetMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<SanitizationResult.Builder>
    • internalGetMutableMapFieldReflection

      protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(int number)
      Overrides:
      internalGetMutableMapFieldReflection in class com.google.protobuf.GeneratedMessage.Builder<SanitizationResult.Builder>
    • internalGetFieldAccessorTable

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<SanitizationResult.Builder>
    • clear

      Specified by:
      clear in interface com.google.protobuf.Message.Builder
      Specified by:
      clear in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      clear in class com.google.protobuf.GeneratedMessage.Builder<SanitizationResult.Builder>
    • getDescriptorForType

      public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
      Specified by:
      getDescriptorForType in interface com.google.protobuf.Message.Builder
      Specified by:
      getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
      Overrides:
      getDescriptorForType in class com.google.protobuf.GeneratedMessage.Builder<SanitizationResult.Builder>
    • getDefaultInstanceForType

      public SanitizationResult getDefaultInstanceForType()
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      public SanitizationResult build()
      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      public SanitizationResult buildPartial()
      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public SanitizationResult.Builder mergeFrom(com.google.protobuf.Message other)
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<SanitizationResult.Builder>
    • mergeFrom

    • isInitialized

      public final boolean isInitialized()
      Specified by:
      isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
      Overrides:
      isInitialized in class com.google.protobuf.GeneratedMessage.Builder<SanitizationResult.Builder>
    • mergeFrom

      public SanitizationResult.Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws IOException
      Specified by:
      mergeFrom in interface com.google.protobuf.Message.Builder
      Specified by:
      mergeFrom in interface com.google.protobuf.MessageLite.Builder
      Overrides:
      mergeFrom in class com.google.protobuf.AbstractMessage.Builder<SanitizationResult.Builder>
      Throws:
      IOException
    • getFilterMatchStateValue

      public int getFilterMatchStateValue()
       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.v1beta.FilterMatchState filter_match_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getFilterMatchStateValue in interface SanitizationResultOrBuilder
      Returns:
      The enum numeric value on the wire for filterMatchState.
    • setFilterMatchStateValue

      public SanitizationResult.Builder setFilterMatchStateValue(int value)
       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.v1beta.FilterMatchState filter_match_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The enum numeric value on the wire for filterMatchState to set.
      Returns:
      This builder for chaining.
    • getFilterMatchState

      public FilterMatchState getFilterMatchState()
       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.v1beta.FilterMatchState filter_match_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getFilterMatchState in interface SanitizationResultOrBuilder
      Returns:
      The filterMatchState.
    • setFilterMatchState

      public SanitizationResult.Builder setFilterMatchState(FilterMatchState value)
       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.v1beta.FilterMatchState filter_match_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The filterMatchState to set.
      Returns:
      This builder for chaining.
    • clearFilterMatchState

      public SanitizationResult.Builder clearFilterMatchState()
       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.v1beta.FilterMatchState filter_match_state = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • getFilterResultsCount

      public int getFilterResultsCount()
      Description copied from interface: SanitizationResultOrBuilder
       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.v1beta.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getFilterResultsCount in interface SanitizationResultOrBuilder
    • containsFilterResults

      public boolean containsFilterResults(String key)
       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.v1beta.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      containsFilterResults in interface SanitizationResultOrBuilder
    • getFilterResults

      @Deprecated public Map<String,FilterResult> getFilterResults()
      Deprecated.
      Specified by:
      getFilterResults in interface SanitizationResultOrBuilder
    • getFilterResultsMap

      public Map<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.v1beta.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getFilterResultsMap in interface SanitizationResultOrBuilder
    • getFilterResultsOrDefault

      public FilterResult getFilterResultsOrDefault(String key, FilterResult defaultValue)
       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.v1beta.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getFilterResultsOrDefault in interface SanitizationResultOrBuilder
    • getFilterResultsOrThrow

      public FilterResult getFilterResultsOrThrow(String key)
       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.v1beta.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getFilterResultsOrThrow in interface SanitizationResultOrBuilder
    • clearFilterResults

      public SanitizationResult.Builder clearFilterResults()
    • removeFilterResults

      public SanitizationResult.Builder removeFilterResults(String key)
       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.v1beta.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getMutableFilterResults

      @Deprecated public Map<String,FilterResult> getMutableFilterResults()
      Deprecated.
      Use alternate mutation accessors instead.
    • putFilterResults

      public SanitizationResult.Builder putFilterResults(String key, FilterResult value)
       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.v1beta.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • putAllFilterResults

      public SanitizationResult.Builder putAllFilterResults(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.v1beta.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • putFilterResultsBuilderIfAbsent

      public FilterResult.Builder putFilterResultsBuilderIfAbsent(String key)
       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.v1beta.FilterResult> filter_results = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getInvocationResultValue

      public int getInvocationResultValue()
       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.v1beta.InvocationResult invocation_result = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getInvocationResultValue in interface SanitizationResultOrBuilder
      Returns:
      The enum numeric value on the wire for invocationResult.
    • setInvocationResultValue

      public SanitizationResult.Builder setInvocationResultValue(int value)
       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.v1beta.InvocationResult invocation_result = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The enum numeric value on the wire for invocationResult to set.
      Returns:
      This builder for chaining.
    • getInvocationResult

      public InvocationResult getInvocationResult()
       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.v1beta.InvocationResult invocation_result = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getInvocationResult in interface SanitizationResultOrBuilder
      Returns:
      The invocationResult.
    • setInvocationResult

      public SanitizationResult.Builder setInvocationResult(InvocationResult value)
       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.v1beta.InvocationResult invocation_result = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Parameters:
      value - The invocationResult to set.
      Returns:
      This builder for chaining.
    • clearInvocationResult

      public SanitizationResult.Builder clearInvocationResult()
       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.v1beta.InvocationResult invocation_result = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Returns:
      This builder for chaining.
    • hasSanitizationMetadata

      public boolean hasSanitizationMetadata()
       Output only. Metadata related to Sanitization.
       
      .google.cloud.modelarmor.v1beta.SanitizationResult.SanitizationMetadata sanitization_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      hasSanitizationMetadata in interface SanitizationResultOrBuilder
      Returns:
      Whether the sanitizationMetadata field is set.
    • getSanitizationMetadata

      public SanitizationResult.SanitizationMetadata getSanitizationMetadata()
       Output only. Metadata related to Sanitization.
       
      .google.cloud.modelarmor.v1beta.SanitizationResult.SanitizationMetadata sanitization_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSanitizationMetadata in interface SanitizationResultOrBuilder
      Returns:
      The sanitizationMetadata.
    • setSanitizationMetadata

       Output only. Metadata related to Sanitization.
       
      .google.cloud.modelarmor.v1beta.SanitizationResult.SanitizationMetadata sanitization_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • setSanitizationMetadata

      public SanitizationResult.Builder setSanitizationMetadata(SanitizationResult.SanitizationMetadata.Builder builderForValue)
       Output only. Metadata related to Sanitization.
       
      .google.cloud.modelarmor.v1beta.SanitizationResult.SanitizationMetadata sanitization_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • mergeSanitizationMetadata

      public SanitizationResult.Builder mergeSanitizationMetadata(SanitizationResult.SanitizationMetadata value)
       Output only. Metadata related to Sanitization.
       
      .google.cloud.modelarmor.v1beta.SanitizationResult.SanitizationMetadata sanitization_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • clearSanitizationMetadata

      public SanitizationResult.Builder clearSanitizationMetadata()
       Output only. Metadata related to Sanitization.
       
      .google.cloud.modelarmor.v1beta.SanitizationResult.SanitizationMetadata sanitization_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getSanitizationMetadataBuilder

      public SanitizationResult.SanitizationMetadata.Builder getSanitizationMetadataBuilder()
       Output only. Metadata related to Sanitization.
       
      .google.cloud.modelarmor.v1beta.SanitizationResult.SanitizationMetadata sanitization_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
    • getSanitizationMetadataOrBuilder

      public SanitizationResult.SanitizationMetadataOrBuilder getSanitizationMetadataOrBuilder()
       Output only. Metadata related to Sanitization.
       
      .google.cloud.modelarmor.v1beta.SanitizationResult.SanitizationMetadata sanitization_metadata = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];
      Specified by:
      getSanitizationMetadataOrBuilder in interface SanitizationResultOrBuilder