Class AnnotateFileResponse.Builder

java.lang.Object
com.google.protobuf.AbstractMessageLite.Builder
com.google.protobuf.AbstractMessage.Builder<BuilderT>
com.google.protobuf.GeneratedMessage.Builder<AnnotateFileResponse.Builder>
com.google.cloud.vision.v1.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.GeneratedMessage.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 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<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.GeneratedMessage.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.GeneratedMessage.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
    • mergeFrom

      public AnnotateFileResponse.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<AnnotateFileResponse.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<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;
    • setInputConfig

      public AnnotateFileResponse.Builder setInputConfig(InputConfig.Builder builderForValue)
       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;
    • getInputConfigOrBuilder

      public InputConfigOrBuilder getInputConfigOrBuilder()
       Information about the file for which this response is generated.
       
      .google.cloud.vision.v1.InputConfig input_config = 1;
      Specified by:
      getInputConfigOrBuilder in interface AnnotateFileResponseOrBuilder
    • getResponsesList

      public List<AnnotateImageResponse> getResponsesList()
       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:
      getResponsesList in interface AnnotateFileResponseOrBuilder
    • 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

       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;
    • getResponsesOrBuilder

      public AnnotateImageResponseOrBuilder getResponsesOrBuilder(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:
      getResponsesOrBuilder in interface AnnotateFileResponseOrBuilder
    • getResponsesOrBuilderList

      public List<? extends AnnotateImageResponseOrBuilder> getResponsesOrBuilderList()
       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:
      getResponsesOrBuilderList in interface AnnotateFileResponseOrBuilder
    • 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 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(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(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(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 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 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