Class 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.GeneratedMessageV3.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 Detail

      • getDescriptor

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

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

        public 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.GeneratedMessageV3.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.GeneratedMessageV3.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
      • clone

        public AnnotateFileRequest.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<AnnotateFileRequest.Builder>
      • setField

        public AnnotateFileRequest.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                    Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<AnnotateFileRequest.Builder>
      • clearField

        public AnnotateFileRequest.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<AnnotateFileRequest.Builder>
      • clearOneof

        public AnnotateFileRequest.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<AnnotateFileRequest.Builder>
      • setRepeatedField

        public AnnotateFileRequest.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                            int index,
                                                            Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AnnotateFileRequest.Builder>
      • addRepeatedField

        public AnnotateFileRequest.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                            Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<AnnotateFileRequest.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>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.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.
      • 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;
      • setFeatures

        public AnnotateFileRequest.Builder setFeatures​(int index,
                                                       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;
      • 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;
      • 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;
      • 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;
      • 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.
      • setUnknownFields

        public final AnnotateFileRequest.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AnnotateFileRequest.Builder>
      • mergeUnknownFields

        public final AnnotateFileRequest.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<AnnotateFileRequest.Builder>