Class AnnotateFileResponse.Builder

  • All Implemented Interfaces:
    AnnotateFileResponseOrBuilder, com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Cloneable
    Enclosing class:
    AnnotateFileResponse

    public static final class AnnotateFileResponse.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<AnnotateFileResponse.Builder>
    implements AnnotateFileResponseOrBuilder
     Response to a single file annotation request. A file may contain one or more
     images, which individually have their own responses.
     
    Protobuf type google.cloud.vision.v1.AnnotateFileResponse
    • 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<AnnotateFileResponse.Builder>
      • clear

        public AnnotateFileResponse.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<AnnotateFileResponse.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<AnnotateFileResponse.Builder>
      • getDefaultInstanceForType

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

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

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

        public AnnotateFileResponse.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<AnnotateFileResponse.Builder>
      • setField

        public AnnotateFileResponse.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<AnnotateFileResponse.Builder>
      • clearField

        public AnnotateFileResponse.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<AnnotateFileResponse.Builder>
      • clearOneof

        public AnnotateFileResponse.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<AnnotateFileResponse.Builder>
      • setRepeatedField

        public AnnotateFileResponse.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<AnnotateFileResponse.Builder>
      • addRepeatedField

        public AnnotateFileResponse.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<AnnotateFileResponse.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<AnnotateFileResponse.Builder>
      • mergeFrom

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

        public boolean hasInputConfig()
         Information about the file for which this response is generated.
         
        .google.cloud.vision.v1.InputConfig input_config = 1;
        Specified by:
        hasInputConfig in interface AnnotateFileResponseOrBuilder
        Returns:
        Whether the inputConfig field is set.
      • getInputConfig

        public InputConfig getInputConfig()
         Information about the file for which this response is generated.
         
        .google.cloud.vision.v1.InputConfig input_config = 1;
        Specified by:
        getInputConfig in interface AnnotateFileResponseOrBuilder
        Returns:
        The inputConfig.
      • setInputConfig

        public AnnotateFileResponse.Builder setInputConfig​(InputConfig value)
         Information about the file for which this response is generated.
         
        .google.cloud.vision.v1.InputConfig input_config = 1;
      • mergeInputConfig

        public AnnotateFileResponse.Builder mergeInputConfig​(InputConfig value)
         Information about the file for which this response is generated.
         
        .google.cloud.vision.v1.InputConfig input_config = 1;
      • clearInputConfig

        public AnnotateFileResponse.Builder clearInputConfig()
         Information about the file for which this response is generated.
         
        .google.cloud.vision.v1.InputConfig input_config = 1;
      • getInputConfigBuilder

        public InputConfig.Builder getInputConfigBuilder()
         Information about the file for which this response is generated.
         
        .google.cloud.vision.v1.InputConfig input_config = 1;
      • getResponsesCount

        public int getResponsesCount()
         Individual responses to images found within the file. This field will be
         empty if the `error` field is set.
         
        repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;
        Specified by:
        getResponsesCount in interface AnnotateFileResponseOrBuilder
      • getResponses

        public AnnotateImageResponse getResponses​(int index)
         Individual responses to images found within the file. This field will be
         empty if the `error` field is set.
         
        repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;
        Specified by:
        getResponses in interface AnnotateFileResponseOrBuilder
      • setResponses

        public AnnotateFileResponse.Builder setResponses​(int index,
                                                         AnnotateImageResponse value)
         Individual responses to images found within the file. This field will be
         empty if the `error` field is set.
         
        repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;
      • setResponses

        public AnnotateFileResponse.Builder setResponses​(int index,
                                                         AnnotateImageResponse.Builder builderForValue)
         Individual responses to images found within the file. This field will be
         empty if the `error` field is set.
         
        repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;
      • addResponses

        public AnnotateFileResponse.Builder addResponses​(AnnotateImageResponse value)
         Individual responses to images found within the file. This field will be
         empty if the `error` field is set.
         
        repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;
      • addResponses

        public AnnotateFileResponse.Builder addResponses​(int index,
                                                         AnnotateImageResponse value)
         Individual responses to images found within the file. This field will be
         empty if the `error` field is set.
         
        repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;
      • addResponses

        public AnnotateFileResponse.Builder addResponses​(AnnotateImageResponse.Builder builderForValue)
         Individual responses to images found within the file. This field will be
         empty if the `error` field is set.
         
        repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;
      • addResponses

        public AnnotateFileResponse.Builder addResponses​(int index,
                                                         AnnotateImageResponse.Builder builderForValue)
         Individual responses to images found within the file. This field will be
         empty if the `error` field is set.
         
        repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;
      • addAllResponses

        public AnnotateFileResponse.Builder addAllResponses​(Iterable<? extends AnnotateImageResponse> values)
         Individual responses to images found within the file. This field will be
         empty if the `error` field is set.
         
        repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;
      • clearResponses

        public AnnotateFileResponse.Builder clearResponses()
         Individual responses to images found within the file. This field will be
         empty if the `error` field is set.
         
        repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;
      • removeResponses

        public AnnotateFileResponse.Builder removeResponses​(int index)
         Individual responses to images found within the file. This field will be
         empty if the `error` field is set.
         
        repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;
      • getResponsesBuilder

        public AnnotateImageResponse.Builder getResponsesBuilder​(int index)
         Individual responses to images found within the file. This field will be
         empty if the `error` field is set.
         
        repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;
      • addResponsesBuilder

        public AnnotateImageResponse.Builder addResponsesBuilder()
         Individual responses to images found within the file. This field will be
         empty if the `error` field is set.
         
        repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;
      • addResponsesBuilder

        public AnnotateImageResponse.Builder addResponsesBuilder​(int index)
         Individual responses to images found within the file. This field will be
         empty if the `error` field is set.
         
        repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;
      • getResponsesBuilderList

        public List<AnnotateImageResponse.Builder> getResponsesBuilderList()
         Individual responses to images found within the file. This field will be
         empty if the `error` field is set.
         
        repeated .google.cloud.vision.v1.AnnotateImageResponse responses = 2;
      • getTotalPages

        public int getTotalPages()
         This field gives the total number of pages in the file.
         
        int32 total_pages = 3;
        Specified by:
        getTotalPages in interface AnnotateFileResponseOrBuilder
        Returns:
        The totalPages.
      • setTotalPages

        public AnnotateFileResponse.Builder setTotalPages​(int value)
         This field gives the total number of pages in the file.
         
        int32 total_pages = 3;
        Parameters:
        value - The totalPages to set.
        Returns:
        This builder for chaining.
      • clearTotalPages

        public AnnotateFileResponse.Builder clearTotalPages()
         This field gives the total number of pages in the file.
         
        int32 total_pages = 3;
        Returns:
        This builder for chaining.
      • hasError

        public boolean hasError()
         If set, represents the error message for the failed request. The
         `responses` field will not be set in this case.
         
        .google.rpc.Status error = 4;
        Specified by:
        hasError in interface AnnotateFileResponseOrBuilder
        Returns:
        Whether the error field is set.
      • getError

        public com.google.rpc.Status getError()
         If set, represents the error message for the failed request. The
         `responses` field will not be set in this case.
         
        .google.rpc.Status error = 4;
        Specified by:
        getError in interface AnnotateFileResponseOrBuilder
        Returns:
        The error.
      • setError

        public AnnotateFileResponse.Builder setError​(com.google.rpc.Status value)
         If set, represents the error message for the failed request. The
         `responses` field will not be set in this case.
         
        .google.rpc.Status error = 4;
      • setError

        public AnnotateFileResponse.Builder setError​(com.google.rpc.Status.Builder builderForValue)
         If set, represents the error message for the failed request. The
         `responses` field will not be set in this case.
         
        .google.rpc.Status error = 4;
      • mergeError

        public AnnotateFileResponse.Builder mergeError​(com.google.rpc.Status value)
         If set, represents the error message for the failed request. The
         `responses` field will not be set in this case.
         
        .google.rpc.Status error = 4;
      • clearError

        public AnnotateFileResponse.Builder clearError()
         If set, represents the error message for the failed request. The
         `responses` field will not be set in this case.
         
        .google.rpc.Status error = 4;
      • getErrorBuilder

        public com.google.rpc.Status.Builder getErrorBuilder()
         If set, represents the error message for the failed request. The
         `responses` field will not be set in this case.
         
        .google.rpc.Status error = 4;
      • getErrorOrBuilder

        public com.google.rpc.StatusOrBuilder getErrorOrBuilder()
         If set, represents the error message for the failed request. The
         `responses` field will not be set in this case.
         
        .google.rpc.Status error = 4;
        Specified by:
        getErrorOrBuilder in interface AnnotateFileResponseOrBuilder
      • setUnknownFields

        public final AnnotateFileResponse.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<AnnotateFileResponse.Builder>
      • mergeUnknownFields

        public final AnnotateFileResponse.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<AnnotateFileResponse.Builder>