// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/vision/v1p3beta1/image_annotator.proto

package com.google.cloud.vision.v1p3beta1;

/**
 * <pre>
 * An offline file annotation request.
 * </pre>
 *
 * Protobuf type {@code google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest}
 */
public  final class AsyncAnnotateFileRequest extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest)
    AsyncAnnotateFileRequestOrBuilder {
private static final long serialVersionUID = 0L;
  // Use AsyncAnnotateFileRequest.newBuilder() to construct.
  private AsyncAnnotateFileRequest(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private AsyncAnnotateFileRequest() {
    features_ = java.util.Collections.emptyList();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private AsyncAnnotateFileRequest(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    int mutable_bitField0_ = 0;
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10: {
            com.google.cloud.vision.v1p3beta1.InputConfig.Builder subBuilder = null;
            if (inputConfig_ != null) {
              subBuilder = inputConfig_.toBuilder();
            }
            inputConfig_ = input.readMessage(com.google.cloud.vision.v1p3beta1.InputConfig.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(inputConfig_);
              inputConfig_ = subBuilder.buildPartial();
            }

            break;
          }
          case 18: {
            if (!((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
              features_ = new java.util.ArrayList<com.google.cloud.vision.v1p3beta1.Feature>();
              mutable_bitField0_ |= 0x00000002;
            }
            features_.add(
                input.readMessage(com.google.cloud.vision.v1p3beta1.Feature.parser(), extensionRegistry));
            break;
          }
          case 26: {
            com.google.cloud.vision.v1p3beta1.ImageContext.Builder subBuilder = null;
            if (imageContext_ != null) {
              subBuilder = imageContext_.toBuilder();
            }
            imageContext_ = input.readMessage(com.google.cloud.vision.v1p3beta1.ImageContext.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(imageContext_);
              imageContext_ = subBuilder.buildPartial();
            }

            break;
          }
          case 34: {
            com.google.cloud.vision.v1p3beta1.OutputConfig.Builder subBuilder = null;
            if (outputConfig_ != null) {
              subBuilder = outputConfig_.toBuilder();
            }
            outputConfig_ = input.readMessage(com.google.cloud.vision.v1p3beta1.OutputConfig.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(outputConfig_);
              outputConfig_ = subBuilder.buildPartial();
            }

            break;
          }
          default: {
            if (!parseUnknownFieldProto3(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      if (((mutable_bitField0_ & 0x00000002) == 0x00000002)) {
        features_ = java.util.Collections.unmodifiableList(features_);
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.class, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder.class);
  }

  private int bitField0_;
  public static final int INPUT_CONFIG_FIELD_NUMBER = 1;
  private com.google.cloud.vision.v1p3beta1.InputConfig inputConfig_;
  /**
   * <pre>
   * Required. Information about the input file.
   * </pre>
   *
   * <code>.google.cloud.vision.v1p3beta1.InputConfig input_config = 1;</code>
   */
  public boolean hasInputConfig() {
    return inputConfig_ != null;
  }
  /**
   * <pre>
   * Required. Information about the input file.
   * </pre>
   *
   * <code>.google.cloud.vision.v1p3beta1.InputConfig input_config = 1;</code>
   */
  public com.google.cloud.vision.v1p3beta1.InputConfig getInputConfig() {
    return inputConfig_ == null ? com.google.cloud.vision.v1p3beta1.InputConfig.getDefaultInstance() : inputConfig_;
  }
  /**
   * <pre>
   * Required. Information about the input file.
   * </pre>
   *
   * <code>.google.cloud.vision.v1p3beta1.InputConfig input_config = 1;</code>
   */
  public com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder getInputConfigOrBuilder() {
    return getInputConfig();
  }

  public static final int FEATURES_FIELD_NUMBER = 2;
  private java.util.List<com.google.cloud.vision.v1p3beta1.Feature> features_;
  /**
   * <pre>
   * Required. Requested features.
   * </pre>
   *
   * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
   */
  public java.util.List<com.google.cloud.vision.v1p3beta1.Feature> getFeaturesList() {
    return features_;
  }
  /**
   * <pre>
   * Required. Requested features.
   * </pre>
   *
   * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
   */
  public java.util.List<? extends com.google.cloud.vision.v1p3beta1.FeatureOrBuilder> 
      getFeaturesOrBuilderList() {
    return features_;
  }
  /**
   * <pre>
   * Required. Requested features.
   * </pre>
   *
   * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
   */
  public int getFeaturesCount() {
    return features_.size();
  }
  /**
   * <pre>
   * Required. Requested features.
   * </pre>
   *
   * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
   */
  public com.google.cloud.vision.v1p3beta1.Feature getFeatures(int index) {
    return features_.get(index);
  }
  /**
   * <pre>
   * Required. Requested features.
   * </pre>
   *
   * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
   */
  public com.google.cloud.vision.v1p3beta1.FeatureOrBuilder getFeaturesOrBuilder(
      int index) {
    return features_.get(index);
  }

  public static final int IMAGE_CONTEXT_FIELD_NUMBER = 3;
  private com.google.cloud.vision.v1p3beta1.ImageContext imageContext_;
  /**
   * <pre>
   * Additional context that may accompany the image(s) in the file.
   * </pre>
   *
   * <code>.google.cloud.vision.v1p3beta1.ImageContext image_context = 3;</code>
   */
  public boolean hasImageContext() {
    return imageContext_ != null;
  }
  /**
   * <pre>
   * Additional context that may accompany the image(s) in the file.
   * </pre>
   *
   * <code>.google.cloud.vision.v1p3beta1.ImageContext image_context = 3;</code>
   */
  public com.google.cloud.vision.v1p3beta1.ImageContext getImageContext() {
    return imageContext_ == null ? com.google.cloud.vision.v1p3beta1.ImageContext.getDefaultInstance() : imageContext_;
  }
  /**
   * <pre>
   * Additional context that may accompany the image(s) in the file.
   * </pre>
   *
   * <code>.google.cloud.vision.v1p3beta1.ImageContext image_context = 3;</code>
   */
  public com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder getImageContextOrBuilder() {
    return getImageContext();
  }

  public static final int OUTPUT_CONFIG_FIELD_NUMBER = 4;
  private com.google.cloud.vision.v1p3beta1.OutputConfig outputConfig_;
  /**
   * <pre>
   * Required. The desired output location and metadata (e.g. format).
   * </pre>
   *
   * <code>.google.cloud.vision.v1p3beta1.OutputConfig output_config = 4;</code>
   */
  public boolean hasOutputConfig() {
    return outputConfig_ != null;
  }
  /**
   * <pre>
   * Required. The desired output location and metadata (e.g. format).
   * </pre>
   *
   * <code>.google.cloud.vision.v1p3beta1.OutputConfig output_config = 4;</code>
   */
  public com.google.cloud.vision.v1p3beta1.OutputConfig getOutputConfig() {
    return outputConfig_ == null ? com.google.cloud.vision.v1p3beta1.OutputConfig.getDefaultInstance() : outputConfig_;
  }
  /**
   * <pre>
   * Required. The desired output location and metadata (e.g. format).
   * </pre>
   *
   * <code>.google.cloud.vision.v1p3beta1.OutputConfig output_config = 4;</code>
   */
  public com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() {
    return getOutputConfig();
  }

  private byte memoizedIsInitialized = -1;
  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (inputConfig_ != null) {
      output.writeMessage(1, getInputConfig());
    }
    for (int i = 0; i < features_.size(); i++) {
      output.writeMessage(2, features_.get(i));
    }
    if (imageContext_ != null) {
      output.writeMessage(3, getImageContext());
    }
    if (outputConfig_ != null) {
      output.writeMessage(4, getOutputConfig());
    }
    unknownFields.writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (inputConfig_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, getInputConfig());
    }
    for (int i = 0; i < features_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, features_.get(i));
    }
    if (imageContext_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, getImageContext());
    }
    if (outputConfig_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, getOutputConfig());
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest)) {
      return super.equals(obj);
    }
    com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest other = (com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) obj;

    boolean result = true;
    result = result && (hasInputConfig() == other.hasInputConfig());
    if (hasInputConfig()) {
      result = result && getInputConfig()
          .equals(other.getInputConfig());
    }
    result = result && getFeaturesList()
        .equals(other.getFeaturesList());
    result = result && (hasImageContext() == other.hasImageContext());
    if (hasImageContext()) {
      result = result && getImageContext()
          .equals(other.getImageContext());
    }
    result = result && (hasOutputConfig() == other.hasOutputConfig());
    if (hasOutputConfig()) {
      result = result && getOutputConfig()
          .equals(other.getOutputConfig());
    }
    result = result && unknownFields.equals(other.unknownFields);
    return result;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (hasInputConfig()) {
      hash = (37 * hash) + INPUT_CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getInputConfig().hashCode();
    }
    if (getFeaturesCount() > 0) {
      hash = (37 * hash) + FEATURES_FIELD_NUMBER;
      hash = (53 * hash) + getFeaturesList().hashCode();
    }
    if (hasImageContext()) {
      hash = (37 * hash) + IMAGE_CONTEXT_FIELD_NUMBER;
      hash = (53 * hash) + getImageContext().hashCode();
    }
    if (hasOutputConfig()) {
      hash = (37 * hash) + OUTPUT_CONFIG_FIELD_NUMBER;
      hash = (53 * hash) + getOutputConfig().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom(
      com.google.protobuf.ByteString data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }
  public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseDelimitedFrom(
      java.io.InputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
  }
  public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parseFrom(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input, extensionRegistry);
  }

  @java.lang.Override
  public Builder newBuilderForType() { return newBuilder(); }
  public static Builder newBuilder() {
    return DEFAULT_INSTANCE.toBuilder();
  }
  public static Builder newBuilder(com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest prototype) {
    return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
  }
  @java.lang.Override
  public Builder toBuilder() {
    return this == DEFAULT_INSTANCE
        ? new Builder() : new Builder().mergeFrom(this);
  }

  @java.lang.Override
  protected Builder newBuilderForType(
      com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
    Builder builder = new Builder(parent);
    return builder;
  }
  /**
   * <pre>
   * An offline file annotation request.
   * </pre>
   *
   * Protobuf type {@code google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest)
      com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequestOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.class, com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.Builder.class);
    }

    // Construct using com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
        getFeaturesFieldBuilder();
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      if (inputConfigBuilder_ == null) {
        inputConfig_ = null;
      } else {
        inputConfig_ = null;
        inputConfigBuilder_ = null;
      }
      if (featuresBuilder_ == null) {
        features_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
      } else {
        featuresBuilder_.clear();
      }
      if (imageContextBuilder_ == null) {
        imageContext_ = null;
      } else {
        imageContext_ = null;
        imageContextBuilder_ = null;
      }
      if (outputConfigBuilder_ == null) {
        outputConfig_ = null;
      } else {
        outputConfig_ = null;
        outputConfigBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.cloud.vision.v1p3beta1.ImageAnnotatorProto.internal_static_google_cloud_vision_v1p3beta1_AsyncAnnotateFileRequest_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest getDefaultInstanceForType() {
      return com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest build() {
      com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest buildPartial() {
      com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest result = new com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (inputConfigBuilder_ == null) {
        result.inputConfig_ = inputConfig_;
      } else {
        result.inputConfig_ = inputConfigBuilder_.build();
      }
      if (featuresBuilder_ == null) {
        if (((bitField0_ & 0x00000002) == 0x00000002)) {
          features_ = java.util.Collections.unmodifiableList(features_);
          bitField0_ = (bitField0_ & ~0x00000002);
        }
        result.features_ = features_;
      } else {
        result.features_ = featuresBuilder_.build();
      }
      if (imageContextBuilder_ == null) {
        result.imageContext_ = imageContext_;
      } else {
        result.imageContext_ = imageContextBuilder_.build();
      }
      if (outputConfigBuilder_ == null) {
        result.outputConfig_ = outputConfig_;
      } else {
        result.outputConfig_ = outputConfigBuilder_.build();
      }
      result.bitField0_ = to_bitField0_;
      onBuilt();
      return result;
    }

    @java.lang.Override
    public Builder clone() {
      return (Builder) super.clone();
    }
    @java.lang.Override
    public Builder setField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.setField(field, value);
    }
    @java.lang.Override
    public Builder clearField(
        com.google.protobuf.Descriptors.FieldDescriptor field) {
      return (Builder) super.clearField(field);
    }
    @java.lang.Override
    public Builder clearOneof(
        com.google.protobuf.Descriptors.OneofDescriptor oneof) {
      return (Builder) super.clearOneof(oneof);
    }
    @java.lang.Override
    public Builder setRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        int index, java.lang.Object value) {
      return (Builder) super.setRepeatedField(field, index, value);
    }
    @java.lang.Override
    public Builder addRepeatedField(
        com.google.protobuf.Descriptors.FieldDescriptor field,
        java.lang.Object value) {
      return (Builder) super.addRepeatedField(field, value);
    }
    @java.lang.Override
    public Builder mergeFrom(com.google.protobuf.Message other) {
      if (other instanceof com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) {
        return mergeFrom((com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest other) {
      if (other == com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest.getDefaultInstance()) return this;
      if (other.hasInputConfig()) {
        mergeInputConfig(other.getInputConfig());
      }
      if (featuresBuilder_ == null) {
        if (!other.features_.isEmpty()) {
          if (features_.isEmpty()) {
            features_ = other.features_;
            bitField0_ = (bitField0_ & ~0x00000002);
          } else {
            ensureFeaturesIsMutable();
            features_.addAll(other.features_);
          }
          onChanged();
        }
      } else {
        if (!other.features_.isEmpty()) {
          if (featuresBuilder_.isEmpty()) {
            featuresBuilder_.dispose();
            featuresBuilder_ = null;
            features_ = other.features_;
            bitField0_ = (bitField0_ & ~0x00000002);
            featuresBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getFeaturesFieldBuilder() : null;
          } else {
            featuresBuilder_.addAllMessages(other.features_);
          }
        }
      }
      if (other.hasImageContext()) {
        mergeImageContext(other.getImageContext());
      }
      if (other.hasOutputConfig()) {
        mergeOutputConfig(other.getOutputConfig());
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

    @java.lang.Override
    public final boolean isInitialized() {
      return true;
    }

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private com.google.cloud.vision.v1p3beta1.InputConfig inputConfig_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.vision.v1p3beta1.InputConfig, com.google.cloud.vision.v1p3beta1.InputConfig.Builder, com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder> inputConfigBuilder_;
    /**
     * <pre>
     * Required. Information about the input file.
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.InputConfig input_config = 1;</code>
     */
    public boolean hasInputConfig() {
      return inputConfigBuilder_ != null || inputConfig_ != null;
    }
    /**
     * <pre>
     * Required. Information about the input file.
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.InputConfig input_config = 1;</code>
     */
    public com.google.cloud.vision.v1p3beta1.InputConfig getInputConfig() {
      if (inputConfigBuilder_ == null) {
        return inputConfig_ == null ? com.google.cloud.vision.v1p3beta1.InputConfig.getDefaultInstance() : inputConfig_;
      } else {
        return inputConfigBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Required. Information about the input file.
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.InputConfig input_config = 1;</code>
     */
    public Builder setInputConfig(com.google.cloud.vision.v1p3beta1.InputConfig value) {
      if (inputConfigBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        inputConfig_ = value;
        onChanged();
      } else {
        inputConfigBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Required. Information about the input file.
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.InputConfig input_config = 1;</code>
     */
    public Builder setInputConfig(
        com.google.cloud.vision.v1p3beta1.InputConfig.Builder builderForValue) {
      if (inputConfigBuilder_ == null) {
        inputConfig_ = builderForValue.build();
        onChanged();
      } else {
        inputConfigBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Required. Information about the input file.
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.InputConfig input_config = 1;</code>
     */
    public Builder mergeInputConfig(com.google.cloud.vision.v1p3beta1.InputConfig value) {
      if (inputConfigBuilder_ == null) {
        if (inputConfig_ != null) {
          inputConfig_ =
            com.google.cloud.vision.v1p3beta1.InputConfig.newBuilder(inputConfig_).mergeFrom(value).buildPartial();
        } else {
          inputConfig_ = value;
        }
        onChanged();
      } else {
        inputConfigBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Required. Information about the input file.
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.InputConfig input_config = 1;</code>
     */
    public Builder clearInputConfig() {
      if (inputConfigBuilder_ == null) {
        inputConfig_ = null;
        onChanged();
      } else {
        inputConfig_ = null;
        inputConfigBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Required. Information about the input file.
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.InputConfig input_config = 1;</code>
     */
    public com.google.cloud.vision.v1p3beta1.InputConfig.Builder getInputConfigBuilder() {
      
      onChanged();
      return getInputConfigFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Required. Information about the input file.
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.InputConfig input_config = 1;</code>
     */
    public com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder getInputConfigOrBuilder() {
      if (inputConfigBuilder_ != null) {
        return inputConfigBuilder_.getMessageOrBuilder();
      } else {
        return inputConfig_ == null ?
            com.google.cloud.vision.v1p3beta1.InputConfig.getDefaultInstance() : inputConfig_;
      }
    }
    /**
     * <pre>
     * Required. Information about the input file.
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.InputConfig input_config = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.vision.v1p3beta1.InputConfig, com.google.cloud.vision.v1p3beta1.InputConfig.Builder, com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder> 
        getInputConfigFieldBuilder() {
      if (inputConfigBuilder_ == null) {
        inputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.vision.v1p3beta1.InputConfig, com.google.cloud.vision.v1p3beta1.InputConfig.Builder, com.google.cloud.vision.v1p3beta1.InputConfigOrBuilder>(
                getInputConfig(),
                getParentForChildren(),
                isClean());
        inputConfig_ = null;
      }
      return inputConfigBuilder_;
    }

    private java.util.List<com.google.cloud.vision.v1p3beta1.Feature> features_ =
      java.util.Collections.emptyList();
    private void ensureFeaturesIsMutable() {
      if (!((bitField0_ & 0x00000002) == 0x00000002)) {
        features_ = new java.util.ArrayList<com.google.cloud.vision.v1p3beta1.Feature>(features_);
        bitField0_ |= 0x00000002;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.cloud.vision.v1p3beta1.Feature, com.google.cloud.vision.v1p3beta1.Feature.Builder, com.google.cloud.vision.v1p3beta1.FeatureOrBuilder> featuresBuilder_;

    /**
     * <pre>
     * Required. Requested features.
     * </pre>
     *
     * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
     */
    public java.util.List<com.google.cloud.vision.v1p3beta1.Feature> getFeaturesList() {
      if (featuresBuilder_ == null) {
        return java.util.Collections.unmodifiableList(features_);
      } else {
        return featuresBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     * Required. Requested features.
     * </pre>
     *
     * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
     */
    public int getFeaturesCount() {
      if (featuresBuilder_ == null) {
        return features_.size();
      } else {
        return featuresBuilder_.getCount();
      }
    }
    /**
     * <pre>
     * Required. Requested features.
     * </pre>
     *
     * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
     */
    public com.google.cloud.vision.v1p3beta1.Feature getFeatures(int index) {
      if (featuresBuilder_ == null) {
        return features_.get(index);
      } else {
        return featuresBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     * Required. Requested features.
     * </pre>
     *
     * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
     */
    public Builder setFeatures(
        int index, com.google.cloud.vision.v1p3beta1.Feature value) {
      if (featuresBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureFeaturesIsMutable();
        features_.set(index, value);
        onChanged();
      } else {
        featuresBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * Required. Requested features.
     * </pre>
     *
     * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
     */
    public Builder setFeatures(
        int index, com.google.cloud.vision.v1p3beta1.Feature.Builder builderForValue) {
      if (featuresBuilder_ == null) {
        ensureFeaturesIsMutable();
        features_.set(index, builderForValue.build());
        onChanged();
      } else {
        featuresBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Required. Requested features.
     * </pre>
     *
     * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
     */
    public Builder addFeatures(com.google.cloud.vision.v1p3beta1.Feature value) {
      if (featuresBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureFeaturesIsMutable();
        features_.add(value);
        onChanged();
      } else {
        featuresBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     * Required. Requested features.
     * </pre>
     *
     * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
     */
    public Builder addFeatures(
        int index, com.google.cloud.vision.v1p3beta1.Feature value) {
      if (featuresBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureFeaturesIsMutable();
        features_.add(index, value);
        onChanged();
      } else {
        featuresBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * Required. Requested features.
     * </pre>
     *
     * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
     */
    public Builder addFeatures(
        com.google.cloud.vision.v1p3beta1.Feature.Builder builderForValue) {
      if (featuresBuilder_ == null) {
        ensureFeaturesIsMutable();
        features_.add(builderForValue.build());
        onChanged();
      } else {
        featuresBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Required. Requested features.
     * </pre>
     *
     * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
     */
    public Builder addFeatures(
        int index, com.google.cloud.vision.v1p3beta1.Feature.Builder builderForValue) {
      if (featuresBuilder_ == null) {
        ensureFeaturesIsMutable();
        features_.add(index, builderForValue.build());
        onChanged();
      } else {
        featuresBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * Required. Requested features.
     * </pre>
     *
     * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
     */
    public Builder addAllFeatures(
        java.lang.Iterable<? extends com.google.cloud.vision.v1p3beta1.Feature> values) {
      if (featuresBuilder_ == null) {
        ensureFeaturesIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, features_);
        onChanged();
      } else {
        featuresBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     * Required. Requested features.
     * </pre>
     *
     * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
     */
    public Builder clearFeatures() {
      if (featuresBuilder_ == null) {
        features_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000002);
        onChanged();
      } else {
        featuresBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Required. Requested features.
     * </pre>
     *
     * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
     */
    public Builder removeFeatures(int index) {
      if (featuresBuilder_ == null) {
        ensureFeaturesIsMutable();
        features_.remove(index);
        onChanged();
      } else {
        featuresBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     * Required. Requested features.
     * </pre>
     *
     * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
     */
    public com.google.cloud.vision.v1p3beta1.Feature.Builder getFeaturesBuilder(
        int index) {
      return getFeaturesFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     * Required. Requested features.
     * </pre>
     *
     * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
     */
    public com.google.cloud.vision.v1p3beta1.FeatureOrBuilder getFeaturesOrBuilder(
        int index) {
      if (featuresBuilder_ == null) {
        return features_.get(index);  } else {
        return featuresBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     * Required. Requested features.
     * </pre>
     *
     * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
     */
    public java.util.List<? extends com.google.cloud.vision.v1p3beta1.FeatureOrBuilder> 
         getFeaturesOrBuilderList() {
      if (featuresBuilder_ != null) {
        return featuresBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(features_);
      }
    }
    /**
     * <pre>
     * Required. Requested features.
     * </pre>
     *
     * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
     */
    public com.google.cloud.vision.v1p3beta1.Feature.Builder addFeaturesBuilder() {
      return getFeaturesFieldBuilder().addBuilder(
          com.google.cloud.vision.v1p3beta1.Feature.getDefaultInstance());
    }
    /**
     * <pre>
     * Required. Requested features.
     * </pre>
     *
     * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
     */
    public com.google.cloud.vision.v1p3beta1.Feature.Builder addFeaturesBuilder(
        int index) {
      return getFeaturesFieldBuilder().addBuilder(
          index, com.google.cloud.vision.v1p3beta1.Feature.getDefaultInstance());
    }
    /**
     * <pre>
     * Required. Requested features.
     * </pre>
     *
     * <code>repeated .google.cloud.vision.v1p3beta1.Feature features = 2;</code>
     */
    public java.util.List<com.google.cloud.vision.v1p3beta1.Feature.Builder> 
         getFeaturesBuilderList() {
      return getFeaturesFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.cloud.vision.v1p3beta1.Feature, com.google.cloud.vision.v1p3beta1.Feature.Builder, com.google.cloud.vision.v1p3beta1.FeatureOrBuilder> 
        getFeaturesFieldBuilder() {
      if (featuresBuilder_ == null) {
        featuresBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.vision.v1p3beta1.Feature, com.google.cloud.vision.v1p3beta1.Feature.Builder, com.google.cloud.vision.v1p3beta1.FeatureOrBuilder>(
                features_,
                ((bitField0_ & 0x00000002) == 0x00000002),
                getParentForChildren(),
                isClean());
        features_ = null;
      }
      return featuresBuilder_;
    }

    private com.google.cloud.vision.v1p3beta1.ImageContext imageContext_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.vision.v1p3beta1.ImageContext, com.google.cloud.vision.v1p3beta1.ImageContext.Builder, com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder> imageContextBuilder_;
    /**
     * <pre>
     * Additional context that may accompany the image(s) in the file.
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.ImageContext image_context = 3;</code>
     */
    public boolean hasImageContext() {
      return imageContextBuilder_ != null || imageContext_ != null;
    }
    /**
     * <pre>
     * Additional context that may accompany the image(s) in the file.
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.ImageContext image_context = 3;</code>
     */
    public com.google.cloud.vision.v1p3beta1.ImageContext getImageContext() {
      if (imageContextBuilder_ == null) {
        return imageContext_ == null ? com.google.cloud.vision.v1p3beta1.ImageContext.getDefaultInstance() : imageContext_;
      } else {
        return imageContextBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Additional context that may accompany the image(s) in the file.
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.ImageContext image_context = 3;</code>
     */
    public Builder setImageContext(com.google.cloud.vision.v1p3beta1.ImageContext value) {
      if (imageContextBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        imageContext_ = value;
        onChanged();
      } else {
        imageContextBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Additional context that may accompany the image(s) in the file.
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.ImageContext image_context = 3;</code>
     */
    public Builder setImageContext(
        com.google.cloud.vision.v1p3beta1.ImageContext.Builder builderForValue) {
      if (imageContextBuilder_ == null) {
        imageContext_ = builderForValue.build();
        onChanged();
      } else {
        imageContextBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Additional context that may accompany the image(s) in the file.
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.ImageContext image_context = 3;</code>
     */
    public Builder mergeImageContext(com.google.cloud.vision.v1p3beta1.ImageContext value) {
      if (imageContextBuilder_ == null) {
        if (imageContext_ != null) {
          imageContext_ =
            com.google.cloud.vision.v1p3beta1.ImageContext.newBuilder(imageContext_).mergeFrom(value).buildPartial();
        } else {
          imageContext_ = value;
        }
        onChanged();
      } else {
        imageContextBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Additional context that may accompany the image(s) in the file.
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.ImageContext image_context = 3;</code>
     */
    public Builder clearImageContext() {
      if (imageContextBuilder_ == null) {
        imageContext_ = null;
        onChanged();
      } else {
        imageContext_ = null;
        imageContextBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Additional context that may accompany the image(s) in the file.
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.ImageContext image_context = 3;</code>
     */
    public com.google.cloud.vision.v1p3beta1.ImageContext.Builder getImageContextBuilder() {
      
      onChanged();
      return getImageContextFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Additional context that may accompany the image(s) in the file.
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.ImageContext image_context = 3;</code>
     */
    public com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder getImageContextOrBuilder() {
      if (imageContextBuilder_ != null) {
        return imageContextBuilder_.getMessageOrBuilder();
      } else {
        return imageContext_ == null ?
            com.google.cloud.vision.v1p3beta1.ImageContext.getDefaultInstance() : imageContext_;
      }
    }
    /**
     * <pre>
     * Additional context that may accompany the image(s) in the file.
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.ImageContext image_context = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.vision.v1p3beta1.ImageContext, com.google.cloud.vision.v1p3beta1.ImageContext.Builder, com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder> 
        getImageContextFieldBuilder() {
      if (imageContextBuilder_ == null) {
        imageContextBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.vision.v1p3beta1.ImageContext, com.google.cloud.vision.v1p3beta1.ImageContext.Builder, com.google.cloud.vision.v1p3beta1.ImageContextOrBuilder>(
                getImageContext(),
                getParentForChildren(),
                isClean());
        imageContext_ = null;
      }
      return imageContextBuilder_;
    }

    private com.google.cloud.vision.v1p3beta1.OutputConfig outputConfig_ = null;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.vision.v1p3beta1.OutputConfig, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder, com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder> outputConfigBuilder_;
    /**
     * <pre>
     * Required. The desired output location and metadata (e.g. format).
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.OutputConfig output_config = 4;</code>
     */
    public boolean hasOutputConfig() {
      return outputConfigBuilder_ != null || outputConfig_ != null;
    }
    /**
     * <pre>
     * Required. The desired output location and metadata (e.g. format).
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.OutputConfig output_config = 4;</code>
     */
    public com.google.cloud.vision.v1p3beta1.OutputConfig getOutputConfig() {
      if (outputConfigBuilder_ == null) {
        return outputConfig_ == null ? com.google.cloud.vision.v1p3beta1.OutputConfig.getDefaultInstance() : outputConfig_;
      } else {
        return outputConfigBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Required. The desired output location and metadata (e.g. format).
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.OutputConfig output_config = 4;</code>
     */
    public Builder setOutputConfig(com.google.cloud.vision.v1p3beta1.OutputConfig value) {
      if (outputConfigBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        outputConfig_ = value;
        onChanged();
      } else {
        outputConfigBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Required. The desired output location and metadata (e.g. format).
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.OutputConfig output_config = 4;</code>
     */
    public Builder setOutputConfig(
        com.google.cloud.vision.v1p3beta1.OutputConfig.Builder builderForValue) {
      if (outputConfigBuilder_ == null) {
        outputConfig_ = builderForValue.build();
        onChanged();
      } else {
        outputConfigBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Required. The desired output location and metadata (e.g. format).
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.OutputConfig output_config = 4;</code>
     */
    public Builder mergeOutputConfig(com.google.cloud.vision.v1p3beta1.OutputConfig value) {
      if (outputConfigBuilder_ == null) {
        if (outputConfig_ != null) {
          outputConfig_ =
            com.google.cloud.vision.v1p3beta1.OutputConfig.newBuilder(outputConfig_).mergeFrom(value).buildPartial();
        } else {
          outputConfig_ = value;
        }
        onChanged();
      } else {
        outputConfigBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Required. The desired output location and metadata (e.g. format).
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.OutputConfig output_config = 4;</code>
     */
    public Builder clearOutputConfig() {
      if (outputConfigBuilder_ == null) {
        outputConfig_ = null;
        onChanged();
      } else {
        outputConfig_ = null;
        outputConfigBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Required. The desired output location and metadata (e.g. format).
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.OutputConfig output_config = 4;</code>
     */
    public com.google.cloud.vision.v1p3beta1.OutputConfig.Builder getOutputConfigBuilder() {
      
      onChanged();
      return getOutputConfigFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Required. The desired output location and metadata (e.g. format).
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.OutputConfig output_config = 4;</code>
     */
    public com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder getOutputConfigOrBuilder() {
      if (outputConfigBuilder_ != null) {
        return outputConfigBuilder_.getMessageOrBuilder();
      } else {
        return outputConfig_ == null ?
            com.google.cloud.vision.v1p3beta1.OutputConfig.getDefaultInstance() : outputConfig_;
      }
    }
    /**
     * <pre>
     * Required. The desired output location and metadata (e.g. format).
     * </pre>
     *
     * <code>.google.cloud.vision.v1p3beta1.OutputConfig output_config = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.cloud.vision.v1p3beta1.OutputConfig, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder, com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder> 
        getOutputConfigFieldBuilder() {
      if (outputConfigBuilder_ == null) {
        outputConfigBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.vision.v1p3beta1.OutputConfig, com.google.cloud.vision.v1p3beta1.OutputConfig.Builder, com.google.cloud.vision.v1p3beta1.OutputConfigOrBuilder>(
                getOutputConfig(),
                getParentForChildren(),
                isClean());
        outputConfig_ = null;
      }
      return outputConfigBuilder_;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFieldsProto3(unknownFields);
    }

    @java.lang.Override
    public final Builder mergeUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.mergeUnknownFields(unknownFields);
    }


    // @@protoc_insertion_point(builder_scope:google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest)
  private static final com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest();
  }

  public static com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<AsyncAnnotateFileRequest>
      PARSER = new com.google.protobuf.AbstractParser<AsyncAnnotateFileRequest>() {
    @java.lang.Override
    public AsyncAnnotateFileRequest parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      return new AsyncAnnotateFileRequest(input, extensionRegistry);
    }
  };

  public static com.google.protobuf.Parser<AsyncAnnotateFileRequest> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<AsyncAnnotateFileRequest> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.cloud.vision.v1p3beta1.AsyncAnnotateFileRequest getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

