Class DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig.Builder>
com.google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig.Builder
All Implemented Interfaces:
DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig

public static final class DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig.Builder> implements DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfigOrBuilder
 Filter on the confidence score. Only adds to index if the confidence
 score is higher than the threshold.
 Example data schema:
 key: "name-confidence-pair"
 type: CUSTOMIZED_STRUCT
 granularity: GRANULARITY_PARTITION_LEVEL
 customized_struct_config {
 field_schemas {
 key: "name"
 type: STRING
 granularity: GRANULARITY_PARTITION_LEVEL
 search_strategy {
 search_strategy_type: SMART_SEARCH
 confidence_score_index_config {
 field_path: "name-confidence-pair.score"
 threshold: 0.6
 }
 }
 }
 field_schemas {
 key: "score"
 type: FLOAT
 granularity: GRANULARITY_PARTITION_LEVEL
 }
 }
 This means only "name" with score > 0.6 will be indexed.
 
Protobuf type google.cloud.visionai.v1.DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig
  • Method Details

    • getDescriptor

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

      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
      Specified by:
      internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessage.Builder<DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig.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<DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig.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<DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig.Builder>
    • getDefaultInstanceForType

      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
      Specified by:
      getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
    • build

      Specified by:
      build in interface com.google.protobuf.Message.Builder
      Specified by:
      build in interface com.google.protobuf.MessageLite.Builder
    • buildPartial

      Specified by:
      buildPartial in interface com.google.protobuf.Message.Builder
      Specified by:
      buildPartial in interface com.google.protobuf.MessageLite.Builder
    • mergeFrom

      public DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig.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<DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig.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<DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig.Builder>
    • mergeFrom

      public DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig.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<DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig.Builder>
      Throws:
      IOException
    • getFieldPath

      public String getFieldPath()
       Required. The path to the confidence score field. It is a string that
       concatenates all the data schema keys along the path. See the example
       above. If the data schema contains LIST, use '_ENTRIES' to concatenate.
       Example data schema contains a list:
       "key": "list-name-score",
       "schemaDetails": {
       "type": "LIST",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       "listConfig": {
       "valueSchema": {
       "type": "CUSTOMIZED_STRUCT",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       "customizedStructConfig": {
       "fieldSchemas": {
       "name": {
       "type": "STRING",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       "searchStrategy": {
       "searchStrategyType": "SMART_SEARCH"
       "confidence_score_index_config": {
       "field_path": "list-name-score._ENTRIES.score",
       "threshold": "0.9",
       }
       }
       },
       "score": {
       "type": "FLOAT",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       }
       }
       }
       }
       }
       }
       
      string field_path = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getFieldPath in interface DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfigOrBuilder
      Returns:
      The fieldPath.
    • getFieldPathBytes

      public com.google.protobuf.ByteString getFieldPathBytes()
       Required. The path to the confidence score field. It is a string that
       concatenates all the data schema keys along the path. See the example
       above. If the data schema contains LIST, use '_ENTRIES' to concatenate.
       Example data schema contains a list:
       "key": "list-name-score",
       "schemaDetails": {
       "type": "LIST",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       "listConfig": {
       "valueSchema": {
       "type": "CUSTOMIZED_STRUCT",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       "customizedStructConfig": {
       "fieldSchemas": {
       "name": {
       "type": "STRING",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       "searchStrategy": {
       "searchStrategyType": "SMART_SEARCH"
       "confidence_score_index_config": {
       "field_path": "list-name-score._ENTRIES.score",
       "threshold": "0.9",
       }
       }
       },
       "score": {
       "type": "FLOAT",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       }
       }
       }
       }
       }
       }
       
      string field_path = 1 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getFieldPathBytes in interface DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfigOrBuilder
      Returns:
      The bytes for fieldPath.
    • setFieldPath

       Required. The path to the confidence score field. It is a string that
       concatenates all the data schema keys along the path. See the example
       above. If the data schema contains LIST, use '_ENTRIES' to concatenate.
       Example data schema contains a list:
       "key": "list-name-score",
       "schemaDetails": {
       "type": "LIST",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       "listConfig": {
       "valueSchema": {
       "type": "CUSTOMIZED_STRUCT",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       "customizedStructConfig": {
       "fieldSchemas": {
       "name": {
       "type": "STRING",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       "searchStrategy": {
       "searchStrategyType": "SMART_SEARCH"
       "confidence_score_index_config": {
       "field_path": "list-name-score._ENTRIES.score",
       "threshold": "0.9",
       }
       }
       },
       "score": {
       "type": "FLOAT",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       }
       }
       }
       }
       }
       }
       
      string field_path = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The fieldPath to set.
      Returns:
      This builder for chaining.
    • clearFieldPath

       Required. The path to the confidence score field. It is a string that
       concatenates all the data schema keys along the path. See the example
       above. If the data schema contains LIST, use '_ENTRIES' to concatenate.
       Example data schema contains a list:
       "key": "list-name-score",
       "schemaDetails": {
       "type": "LIST",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       "listConfig": {
       "valueSchema": {
       "type": "CUSTOMIZED_STRUCT",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       "customizedStructConfig": {
       "fieldSchemas": {
       "name": {
       "type": "STRING",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       "searchStrategy": {
       "searchStrategyType": "SMART_SEARCH"
       "confidence_score_index_config": {
       "field_path": "list-name-score._ENTRIES.score",
       "threshold": "0.9",
       }
       }
       },
       "score": {
       "type": "FLOAT",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       }
       }
       }
       }
       }
       }
       
      string field_path = 1 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.
    • setFieldPathBytes

      public DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfig.Builder setFieldPathBytes(com.google.protobuf.ByteString value)
       Required. The path to the confidence score field. It is a string that
       concatenates all the data schema keys along the path. See the example
       above. If the data schema contains LIST, use '_ENTRIES' to concatenate.
       Example data schema contains a list:
       "key": "list-name-score",
       "schemaDetails": {
       "type": "LIST",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       "listConfig": {
       "valueSchema": {
       "type": "CUSTOMIZED_STRUCT",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       "customizedStructConfig": {
       "fieldSchemas": {
       "name": {
       "type": "STRING",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       "searchStrategy": {
       "searchStrategyType": "SMART_SEARCH"
       "confidence_score_index_config": {
       "field_path": "list-name-score._ENTRIES.score",
       "threshold": "0.9",
       }
       }
       },
       "score": {
       "type": "FLOAT",
       "granularity": "GRANULARITY_PARTITION_LEVEL",
       }
       }
       }
       }
       }
       }
       
      string field_path = 1 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The bytes for fieldPath to set.
      Returns:
      This builder for chaining.
    • getThreshold

      public float getThreshold()
       Required. The threshold.
       
      float threshold = 2 [(.google.api.field_behavior) = REQUIRED];
      Specified by:
      getThreshold in interface DataSchemaDetails.SearchStrategy.ConfidenceScoreIndexConfigOrBuilder
      Returns:
      The threshold.
    • setThreshold

       Required. The threshold.
       
      float threshold = 2 [(.google.api.field_behavior) = REQUIRED];
      Parameters:
      value - The threshold to set.
      Returns:
      This builder for chaining.
    • clearThreshold

       Required. The threshold.
       
      float threshold = 2 [(.google.api.field_behavior) = REQUIRED];
      Returns:
      This builder for chaining.