Class AnnotateFileRequest.Builder

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

public static final class AnnotateFileRequest.Builder extends com.google.protobuf.GeneratedMessage.Builder<AnnotateFileRequest.Builder> implements AnnotateFileRequestOrBuilder
 A request to annotate one single file, e.g. a PDF, TIFF or GIF file.
 
Protobuf type google.cloud.vision.v1.AnnotateFileRequest
  • 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<AnnotateFileRequest.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<AnnotateFileRequest.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<AnnotateFileRequest.Builder>
    • getDefaultInstanceForType

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

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

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

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

      public AnnotateFileRequest.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<AnnotateFileRequest.Builder>
      Throws:
      IOException
    • hasInputConfig

      public boolean hasInputConfig()
       Required. Information about the input file.
       
      .google.cloud.vision.v1.InputConfig input_config = 1;
      Specified by:
      hasInputConfig in interface AnnotateFileRequestOrBuilder
      Returns:
      Whether the inputConfig field is set.
    • getInputConfig

      public InputConfig getInputConfig()
       Required. Information about the input file.
       
      .google.cloud.vision.v1.InputConfig input_config = 1;
      Specified by:
      getInputConfig in interface AnnotateFileRequestOrBuilder
      Returns:
      The inputConfig.
    • setInputConfig

      public AnnotateFileRequest.Builder setInputConfig(InputConfig value)
       Required. Information about the input file.
       
      .google.cloud.vision.v1.InputConfig input_config = 1;
    • setInputConfig

      public AnnotateFileRequest.Builder setInputConfig(InputConfig.Builder builderForValue)
       Required. Information about the input file.
       
      .google.cloud.vision.v1.InputConfig input_config = 1;
    • mergeInputConfig

      public AnnotateFileRequest.Builder mergeInputConfig(InputConfig value)
       Required. Information about the input file.
       
      .google.cloud.vision.v1.InputConfig input_config = 1;
    • clearInputConfig

      public AnnotateFileRequest.Builder clearInputConfig()
       Required. Information about the input file.
       
      .google.cloud.vision.v1.InputConfig input_config = 1;
    • getInputConfigBuilder

      public InputConfig.Builder getInputConfigBuilder()
       Required. Information about the input file.
       
      .google.cloud.vision.v1.InputConfig input_config = 1;
    • getInputConfigOrBuilder

      public InputConfigOrBuilder getInputConfigOrBuilder()
       Required. Information about the input file.
       
      .google.cloud.vision.v1.InputConfig input_config = 1;
      Specified by:
      getInputConfigOrBuilder in interface AnnotateFileRequestOrBuilder
    • getFeaturesList

      public List<Feature> getFeaturesList()
       Required. Requested features.
       
      repeated .google.cloud.vision.v1.Feature features = 2;
      Specified by:
      getFeaturesList in interface AnnotateFileRequestOrBuilder
    • getFeaturesCount

      public int getFeaturesCount()
       Required. Requested features.
       
      repeated .google.cloud.vision.v1.Feature features = 2;
      Specified by:
      getFeaturesCount in interface AnnotateFileRequestOrBuilder
    • getFeatures

      public Feature getFeatures(int index)
       Required. Requested features.
       
      repeated .google.cloud.vision.v1.Feature features = 2;
      Specified by:
      getFeatures in interface AnnotateFileRequestOrBuilder
    • setFeatures

      public AnnotateFileRequest.Builder setFeatures(int index, Feature value)
       Required. Requested features.
       
      repeated .google.cloud.vision.v1.Feature features = 2;
    • setFeatures

      public AnnotateFileRequest.Builder setFeatures(int index, Feature.Builder builderForValue)
       Required. Requested features.
       
      repeated .google.cloud.vision.v1.Feature features = 2;
    • addFeatures

      public AnnotateFileRequest.Builder addFeatures(Feature value)
       Required. Requested features.
       
      repeated .google.cloud.vision.v1.Feature features = 2;
    • addFeatures

      public AnnotateFileRequest.Builder addFeatures(int index, Feature value)
       Required. Requested features.
       
      repeated .google.cloud.vision.v1.Feature features = 2;
    • addFeatures

      public AnnotateFileRequest.Builder addFeatures(Feature.Builder builderForValue)
       Required. Requested features.
       
      repeated .google.cloud.vision.v1.Feature features = 2;
    • addFeatures

      public AnnotateFileRequest.Builder addFeatures(int index, Feature.Builder builderForValue)
       Required. Requested features.
       
      repeated .google.cloud.vision.v1.Feature features = 2;
    • addAllFeatures

      public AnnotateFileRequest.Builder addAllFeatures(Iterable<? extends Feature> values)
       Required. Requested features.
       
      repeated .google.cloud.vision.v1.Feature features = 2;
    • clearFeatures

      public AnnotateFileRequest.Builder clearFeatures()
       Required. Requested features.
       
      repeated .google.cloud.vision.v1.Feature features = 2;
    • removeFeatures

      public AnnotateFileRequest.Builder removeFeatures(int index)
       Required. Requested features.
       
      repeated .google.cloud.vision.v1.Feature features = 2;
    • getFeaturesBuilder

      public Feature.Builder getFeaturesBuilder(int index)
       Required. Requested features.
       
      repeated .google.cloud.vision.v1.Feature features = 2;
    • getFeaturesOrBuilder

      public FeatureOrBuilder getFeaturesOrBuilder(int index)
       Required. Requested features.
       
      repeated .google.cloud.vision.v1.Feature features = 2;
      Specified by:
      getFeaturesOrBuilder in interface AnnotateFileRequestOrBuilder
    • getFeaturesOrBuilderList

      public List<? extends FeatureOrBuilder> getFeaturesOrBuilderList()
       Required. Requested features.
       
      repeated .google.cloud.vision.v1.Feature features = 2;
      Specified by:
      getFeaturesOrBuilderList in interface AnnotateFileRequestOrBuilder
    • addFeaturesBuilder

      public Feature.Builder addFeaturesBuilder()
       Required. Requested features.
       
      repeated .google.cloud.vision.v1.Feature features = 2;
    • addFeaturesBuilder

      public Feature.Builder addFeaturesBuilder(int index)
       Required. Requested features.
       
      repeated .google.cloud.vision.v1.Feature features = 2;
    • getFeaturesBuilderList

      public List<Feature.Builder> getFeaturesBuilderList()
       Required. Requested features.
       
      repeated .google.cloud.vision.v1.Feature features = 2;
    • hasImageContext

      public boolean hasImageContext()
       Additional context that may accompany the image(s) in the file.
       
      .google.cloud.vision.v1.ImageContext image_context = 3;
      Specified by:
      hasImageContext in interface AnnotateFileRequestOrBuilder
      Returns:
      Whether the imageContext field is set.
    • getImageContext

      public ImageContext getImageContext()
       Additional context that may accompany the image(s) in the file.
       
      .google.cloud.vision.v1.ImageContext image_context = 3;
      Specified by:
      getImageContext in interface AnnotateFileRequestOrBuilder
      Returns:
      The imageContext.
    • setImageContext

      public AnnotateFileRequest.Builder setImageContext(ImageContext value)
       Additional context that may accompany the image(s) in the file.
       
      .google.cloud.vision.v1.ImageContext image_context = 3;
    • setImageContext

      public AnnotateFileRequest.Builder setImageContext(ImageContext.Builder builderForValue)
       Additional context that may accompany the image(s) in the file.
       
      .google.cloud.vision.v1.ImageContext image_context = 3;
    • mergeImageContext

      public AnnotateFileRequest.Builder mergeImageContext(ImageContext value)
       Additional context that may accompany the image(s) in the file.
       
      .google.cloud.vision.v1.ImageContext image_context = 3;
    • clearImageContext

      public AnnotateFileRequest.Builder clearImageContext()
       Additional context that may accompany the image(s) in the file.
       
      .google.cloud.vision.v1.ImageContext image_context = 3;
    • getImageContextBuilder

      public ImageContext.Builder getImageContextBuilder()
       Additional context that may accompany the image(s) in the file.
       
      .google.cloud.vision.v1.ImageContext image_context = 3;
    • getImageContextOrBuilder

      public ImageContextOrBuilder getImageContextOrBuilder()
       Additional context that may accompany the image(s) in the file.
       
      .google.cloud.vision.v1.ImageContext image_context = 3;
      Specified by:
      getImageContextOrBuilder in interface AnnotateFileRequestOrBuilder
    • getPagesList

      public List<Integer> getPagesList()
       Pages of the file to perform image annotation.
      
       Pages starts from 1, we assume the first page of the file is page 1.
       At most 5 pages are supported per request. Pages can be negative.
      
       Page 1 means the first page.
       Page 2 means the second page.
       Page -1 means the last page.
       Page -2 means the second to the last page.
      
       If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
      
       If this field is empty, by default the service performs image annotation
       for the first 5 pages of the file.
       
      repeated int32 pages = 4;
      Specified by:
      getPagesList in interface AnnotateFileRequestOrBuilder
      Returns:
      A list containing the pages.
    • getPagesCount

      public int getPagesCount()
       Pages of the file to perform image annotation.
      
       Pages starts from 1, we assume the first page of the file is page 1.
       At most 5 pages are supported per request. Pages can be negative.
      
       Page 1 means the first page.
       Page 2 means the second page.
       Page -1 means the last page.
       Page -2 means the second to the last page.
      
       If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
      
       If this field is empty, by default the service performs image annotation
       for the first 5 pages of the file.
       
      repeated int32 pages = 4;
      Specified by:
      getPagesCount in interface AnnotateFileRequestOrBuilder
      Returns:
      The count of pages.
    • getPages

      public int getPages(int index)
       Pages of the file to perform image annotation.
      
       Pages starts from 1, we assume the first page of the file is page 1.
       At most 5 pages are supported per request. Pages can be negative.
      
       Page 1 means the first page.
       Page 2 means the second page.
       Page -1 means the last page.
       Page -2 means the second to the last page.
      
       If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
      
       If this field is empty, by default the service performs image annotation
       for the first 5 pages of the file.
       
      repeated int32 pages = 4;
      Specified by:
      getPages in interface AnnotateFileRequestOrBuilder
      Parameters:
      index - The index of the element to return.
      Returns:
      The pages at the given index.
    • setPages

      public AnnotateFileRequest.Builder setPages(int index, int value)
       Pages of the file to perform image annotation.
      
       Pages starts from 1, we assume the first page of the file is page 1.
       At most 5 pages are supported per request. Pages can be negative.
      
       Page 1 means the first page.
       Page 2 means the second page.
       Page -1 means the last page.
       Page -2 means the second to the last page.
      
       If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
      
       If this field is empty, by default the service performs image annotation
       for the first 5 pages of the file.
       
      repeated int32 pages = 4;
      Parameters:
      index - The index to set the value at.
      value - The pages to set.
      Returns:
      This builder for chaining.
    • addPages

      public AnnotateFileRequest.Builder addPages(int value)
       Pages of the file to perform image annotation.
      
       Pages starts from 1, we assume the first page of the file is page 1.
       At most 5 pages are supported per request. Pages can be negative.
      
       Page 1 means the first page.
       Page 2 means the second page.
       Page -1 means the last page.
       Page -2 means the second to the last page.
      
       If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
      
       If this field is empty, by default the service performs image annotation
       for the first 5 pages of the file.
       
      repeated int32 pages = 4;
      Parameters:
      value - The pages to add.
      Returns:
      This builder for chaining.
    • addAllPages

      public AnnotateFileRequest.Builder addAllPages(Iterable<? extends Integer> values)
       Pages of the file to perform image annotation.
      
       Pages starts from 1, we assume the first page of the file is page 1.
       At most 5 pages are supported per request. Pages can be negative.
      
       Page 1 means the first page.
       Page 2 means the second page.
       Page -1 means the last page.
       Page -2 means the second to the last page.
      
       If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
      
       If this field is empty, by default the service performs image annotation
       for the first 5 pages of the file.
       
      repeated int32 pages = 4;
      Parameters:
      values - The pages to add.
      Returns:
      This builder for chaining.
    • clearPages

      public AnnotateFileRequest.Builder clearPages()
       Pages of the file to perform image annotation.
      
       Pages starts from 1, we assume the first page of the file is page 1.
       At most 5 pages are supported per request. Pages can be negative.
      
       Page 1 means the first page.
       Page 2 means the second page.
       Page -1 means the last page.
       Page -2 means the second to the last page.
      
       If the file is GIF instead of PDF or TIFF, page refers to GIF frames.
      
       If this field is empty, by default the service performs image annotation
       for the first 5 pages of the file.
       
      repeated int32 pages = 4;
      Returns:
      This builder for chaining.