Class NearestNeighborQuery.Parameters.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<NearestNeighborQuery.Parameters.Builder>
com.google.cloud.aiplatform.v1.NearestNeighborQuery.Parameters.Builder
All Implemented Interfaces:
NearestNeighborQuery.ParametersOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
NearestNeighborQuery.Parameters

public static final class NearestNeighborQuery.Parameters.Builder extends com.google.protobuf.GeneratedMessage.Builder<NearestNeighborQuery.Parameters.Builder> implements NearestNeighborQuery.ParametersOrBuilder
 Parameters that can be overrided in each query to tune query latency and
 recall.
 
Protobuf type google.cloud.aiplatform.v1.NearestNeighborQuery.Parameters
  • 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<NearestNeighborQuery.Parameters.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<NearestNeighborQuery.Parameters.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<NearestNeighborQuery.Parameters.Builder>
    • getDefaultInstanceForType

      public NearestNeighborQuery.Parameters 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

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

      public NearestNeighborQuery.Parameters.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<NearestNeighborQuery.Parameters.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<NearestNeighborQuery.Parameters.Builder>
    • mergeFrom

      public NearestNeighborQuery.Parameters.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<NearestNeighborQuery.Parameters.Builder>
      Throws:
      IOException
    • getApproximateNeighborCandidates

      public int getApproximateNeighborCandidates()
       Optional. The number of neighbors to find via approximate search before
       exact reordering is performed; if set, this value must be >
       neighbor_count.
       
      int32 approximate_neighbor_candidates = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getApproximateNeighborCandidates in interface NearestNeighborQuery.ParametersOrBuilder
      Returns:
      The approximateNeighborCandidates.
    • setApproximateNeighborCandidates

      public NearestNeighborQuery.Parameters.Builder setApproximateNeighborCandidates(int value)
       Optional. The number of neighbors to find via approximate search before
       exact reordering is performed; if set, this value must be >
       neighbor_count.
       
      int32 approximate_neighbor_candidates = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The approximateNeighborCandidates to set.
      Returns:
      This builder for chaining.
    • clearApproximateNeighborCandidates

      public NearestNeighborQuery.Parameters.Builder clearApproximateNeighborCandidates()
       Optional. The number of neighbors to find via approximate search before
       exact reordering is performed; if set, this value must be >
       neighbor_count.
       
      int32 approximate_neighbor_candidates = 1 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getLeafNodesSearchFraction

      public double getLeafNodesSearchFraction()
       Optional. The fraction of the number of leaves to search, set at query
       time allows user to tune search performance. This value increase result
       in both search accuracy and latency increase. The value should be between
       0.0 and 1.0.
       
      double leaf_nodes_search_fraction = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getLeafNodesSearchFraction in interface NearestNeighborQuery.ParametersOrBuilder
      Returns:
      The leafNodesSearchFraction.
    • setLeafNodesSearchFraction

      public NearestNeighborQuery.Parameters.Builder setLeafNodesSearchFraction(double value)
       Optional. The fraction of the number of leaves to search, set at query
       time allows user to tune search performance. This value increase result
       in both search accuracy and latency increase. The value should be between
       0.0 and 1.0.
       
      double leaf_nodes_search_fraction = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The leafNodesSearchFraction to set.
      Returns:
      This builder for chaining.
    • clearLeafNodesSearchFraction

      public NearestNeighborQuery.Parameters.Builder clearLeafNodesSearchFraction()
       Optional. The fraction of the number of leaves to search, set at query
       time allows user to tune search performance. This value increase result
       in both search accuracy and latency increase. The value should be between
       0.0 and 1.0.
       
      double leaf_nodes_search_fraction = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.