Class ProcessOptions.LayoutConfig.ChunkingConfig.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<ProcessOptions.LayoutConfig.ChunkingConfig.Builder>
com.google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig.Builder
All Implemented Interfaces:
ProcessOptions.LayoutConfig.ChunkingConfigOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
Enclosing class:
ProcessOptions.LayoutConfig.ChunkingConfig

public static final class ProcessOptions.LayoutConfig.ChunkingConfig.Builder extends com.google.protobuf.GeneratedMessage.Builder<ProcessOptions.LayoutConfig.ChunkingConfig.Builder> implements ProcessOptions.LayoutConfig.ChunkingConfigOrBuilder
 Serving config for chunking.
 
Protobuf type google.cloud.documentai.v1beta3.ProcessOptions.LayoutConfig.ChunkingConfig
  • 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<ProcessOptions.LayoutConfig.ChunkingConfig.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<ProcessOptions.LayoutConfig.ChunkingConfig.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<ProcessOptions.LayoutConfig.ChunkingConfig.Builder>
    • getDefaultInstanceForType

      public ProcessOptions.LayoutConfig.ChunkingConfig 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 ProcessOptions.LayoutConfig.ChunkingConfig.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<ProcessOptions.LayoutConfig.ChunkingConfig.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<ProcessOptions.LayoutConfig.ChunkingConfig.Builder>
    • mergeFrom

      public ProcessOptions.LayoutConfig.ChunkingConfig.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<ProcessOptions.LayoutConfig.ChunkingConfig.Builder>
      Throws:
      IOException
    • getChunkSize

      public int getChunkSize()
       Optional. The chunk sizes to use when splitting documents, in order of
       level.
       
      int32 chunk_size = 1 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getChunkSize in interface ProcessOptions.LayoutConfig.ChunkingConfigOrBuilder
      Returns:
      The chunkSize.
    • setChunkSize

      public ProcessOptions.LayoutConfig.ChunkingConfig.Builder setChunkSize(int value)
       Optional. The chunk sizes to use when splitting documents, in order of
       level.
       
      int32 chunk_size = 1 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The chunkSize to set.
      Returns:
      This builder for chaining.
    • clearChunkSize

       Optional. The chunk sizes to use when splitting documents, in order of
       level.
       
      int32 chunk_size = 1 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getIncludeAncestorHeadings

      public boolean getIncludeAncestorHeadings()
       Optional. Whether or not to include ancestor headings when splitting.
       
      bool include_ancestor_headings = 2 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getIncludeAncestorHeadings in interface ProcessOptions.LayoutConfig.ChunkingConfigOrBuilder
      Returns:
      The includeAncestorHeadings.
    • setIncludeAncestorHeadings

      public ProcessOptions.LayoutConfig.ChunkingConfig.Builder setIncludeAncestorHeadings(boolean value)
       Optional. Whether or not to include ancestor headings when splitting.
       
      bool include_ancestor_headings = 2 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The includeAncestorHeadings to set.
      Returns:
      This builder for chaining.
    • clearIncludeAncestorHeadings

      public ProcessOptions.LayoutConfig.ChunkingConfig.Builder clearIncludeAncestorHeadings()
       Optional. Whether or not to include ancestor headings when splitting.
       
      bool include_ancestor_headings = 2 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getSemanticChunkingGroupSize

      public boolean getSemanticChunkingGroupSize()
       Optional. The number of tokens to group together when evaluating
       semantic similarity.
       **Note:** This field is not yet used.
       
      bool semantic_chunking_group_size = 3 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getSemanticChunkingGroupSize in interface ProcessOptions.LayoutConfig.ChunkingConfigOrBuilder
      Returns:
      The semanticChunkingGroupSize.
    • setSemanticChunkingGroupSize

      public ProcessOptions.LayoutConfig.ChunkingConfig.Builder setSemanticChunkingGroupSize(boolean value)
       Optional. The number of tokens to group together when evaluating
       semantic similarity.
       **Note:** This field is not yet used.
       
      bool semantic_chunking_group_size = 3 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The semanticChunkingGroupSize to set.
      Returns:
      This builder for chaining.
    • clearSemanticChunkingGroupSize

      public ProcessOptions.LayoutConfig.ChunkingConfig.Builder clearSemanticChunkingGroupSize()
       Optional. The number of tokens to group together when evaluating
       semantic similarity.
       **Note:** This field is not yet used.
       
      bool semantic_chunking_group_size = 3 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.
    • getBreakpointPercentileThreshold

      public int getBreakpointPercentileThreshold()
       Optional. The percentile of cosine dissimilarity that must be exceeded
       between a group of tokens and the next. The smaller this number is, the
       more chunks will be generated.
       **Note:** This field is not yet used.
       
      int32 breakpoint_percentile_threshold = 4 [(.google.api.field_behavior) = OPTIONAL];
      Specified by:
      getBreakpointPercentileThreshold in interface ProcessOptions.LayoutConfig.ChunkingConfigOrBuilder
      Returns:
      The breakpointPercentileThreshold.
    • setBreakpointPercentileThreshold

      public ProcessOptions.LayoutConfig.ChunkingConfig.Builder setBreakpointPercentileThreshold(int value)
       Optional. The percentile of cosine dissimilarity that must be exceeded
       between a group of tokens and the next. The smaller this number is, the
       more chunks will be generated.
       **Note:** This field is not yet used.
       
      int32 breakpoint_percentile_threshold = 4 [(.google.api.field_behavior) = OPTIONAL];
      Parameters:
      value - The breakpointPercentileThreshold to set.
      Returns:
      This builder for chaining.
    • clearBreakpointPercentileThreshold

      public ProcessOptions.LayoutConfig.ChunkingConfig.Builder clearBreakpointPercentileThreshold()
       Optional. The percentile of cosine dissimilarity that must be exceeded
       between a group of tokens and the next. The smaller this number is, the
       more chunks will be generated.
       **Note:** This field is not yet used.
       
      int32 breakpoint_percentile_threshold = 4 [(.google.api.field_behavior) = OPTIONAL];
      Returns:
      This builder for chaining.