// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/ads/googleads/v10/resources/feed_item.proto

package com.google.ads.googleads.v10.resources;

/**
 * <pre>
 * Stores a validation error and the set of offending feed attributes which
 * together are responsible for causing a feed item validation error.
 * </pre>
 *
 * Protobuf type {@code google.ads.googleads.v10.resources.FeedItemValidationError}
 */
public final class FeedItemValidationError extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.ads.googleads.v10.resources.FeedItemValidationError)
    FeedItemValidationErrorOrBuilder {
private static final long serialVersionUID = 0L;
  // Use FeedItemValidationError.newBuilder() to construct.
  private FeedItemValidationError(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private FeedItemValidationError() {
    validationError_ = 0;
    description_ = "";
    feedAttributeIds_ = emptyLongList();
    extraInfo_ = "";
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(
      UnusedPrivateParameter unused) {
    return new FeedItemValidationError();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private FeedItemValidationError(
      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 8: {
            int rawValue = input.readEnum();

            validationError_ = rawValue;
            break;
          }
          case 50: {
            java.lang.String s = input.readStringRequireUtf8();
            bitField0_ |= 0x00000001;
            description_ = s;
            break;
          }
          case 56: {
            if (!((mutable_bitField0_ & 0x00000002) != 0)) {
              feedAttributeIds_ = newLongList();
              mutable_bitField0_ |= 0x00000002;
            }
            feedAttributeIds_.addLong(input.readInt64());
            break;
          }
          case 58: {
            int length = input.readRawVarint32();
            int limit = input.pushLimit(length);
            if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
              feedAttributeIds_ = newLongList();
              mutable_bitField0_ |= 0x00000002;
            }
            while (input.getBytesUntilLimit() > 0) {
              feedAttributeIds_.addLong(input.readInt64());
            }
            input.popLimit(limit);
            break;
          }
          case 66: {
            java.lang.String s = input.readStringRequireUtf8();
            bitField0_ |= 0x00000002;
            extraInfo_ = s;
            break;
          }
          default: {
            if (!parseUnknownField(
                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) != 0)) {
        feedAttributeIds_.makeImmutable(); // C
      }
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.ads.googleads.v10.resources.FeedItemProto.internal_static_google_ads_googleads_v10_resources_FeedItemValidationError_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.ads.googleads.v10.resources.FeedItemProto.internal_static_google_ads_googleads_v10_resources_FeedItemValidationError_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.ads.googleads.v10.resources.FeedItemValidationError.class, com.google.ads.googleads.v10.resources.FeedItemValidationError.Builder.class);
  }

  private int bitField0_;
  public static final int VALIDATION_ERROR_FIELD_NUMBER = 1;
  private int validationError_;
  /**
   * <pre>
   * Output only. Error code indicating what validation error was triggered. The description
   * of the error can be found in the 'description' field.
   * </pre>
   *
   * <code>.google.ads.googleads.v10.errors.FeedItemValidationErrorEnum.FeedItemValidationError validation_error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   * @return The enum numeric value on the wire for validationError.
   */
  @java.lang.Override public int getValidationErrorValue() {
    return validationError_;
  }
  /**
   * <pre>
   * Output only. Error code indicating what validation error was triggered. The description
   * of the error can be found in the 'description' field.
   * </pre>
   *
   * <code>.google.ads.googleads.v10.errors.FeedItemValidationErrorEnum.FeedItemValidationError validation_error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   * @return The validationError.
   */
  @java.lang.Override public com.google.ads.googleads.v10.errors.FeedItemValidationErrorEnum.FeedItemValidationError getValidationError() {
    @SuppressWarnings("deprecation")
    com.google.ads.googleads.v10.errors.FeedItemValidationErrorEnum.FeedItemValidationError result = com.google.ads.googleads.v10.errors.FeedItemValidationErrorEnum.FeedItemValidationError.valueOf(validationError_);
    return result == null ? com.google.ads.googleads.v10.errors.FeedItemValidationErrorEnum.FeedItemValidationError.UNRECOGNIZED : result;
  }

  public static final int DESCRIPTION_FIELD_NUMBER = 6;
  private volatile java.lang.Object description_;
  /**
   * <pre>
   * Output only. The description of the validation error.
   * </pre>
   *
   * <code>optional string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   * @return Whether the description field is set.
   */
  @java.lang.Override
  public boolean hasDescription() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * <pre>
   * Output only. The description of the validation error.
   * </pre>
   *
   * <code>optional string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   * @return The description.
   */
  @java.lang.Override
  public java.lang.String getDescription() {
    java.lang.Object ref = description_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      description_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Output only. The description of the validation error.
   * </pre>
   *
   * <code>optional string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   * @return The bytes for description.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getDescriptionBytes() {
    java.lang.Object ref = description_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      description_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int FEED_ATTRIBUTE_IDS_FIELD_NUMBER = 7;
  private com.google.protobuf.Internal.LongList feedAttributeIds_;
  /**
   * <pre>
   * Output only. Set of feed attributes in the feed item flagged during validation. If
   * empty, no specific feed attributes can be associated with the error
   * (e.g. error across the entire feed item).
   * </pre>
   *
   * <code>repeated int64 feed_attribute_ids = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   * @return A list containing the feedAttributeIds.
   */
  @java.lang.Override
  public java.util.List<java.lang.Long>
      getFeedAttributeIdsList() {
    return feedAttributeIds_;
  }
  /**
   * <pre>
   * Output only. Set of feed attributes in the feed item flagged during validation. If
   * empty, no specific feed attributes can be associated with the error
   * (e.g. error across the entire feed item).
   * </pre>
   *
   * <code>repeated int64 feed_attribute_ids = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   * @return The count of feedAttributeIds.
   */
  public int getFeedAttributeIdsCount() {
    return feedAttributeIds_.size();
  }
  /**
   * <pre>
   * Output only. Set of feed attributes in the feed item flagged during validation. If
   * empty, no specific feed attributes can be associated with the error
   * (e.g. error across the entire feed item).
   * </pre>
   *
   * <code>repeated int64 feed_attribute_ids = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   * @param index The index of the element to return.
   * @return The feedAttributeIds at the given index.
   */
  public long getFeedAttributeIds(int index) {
    return feedAttributeIds_.getLong(index);
  }
  private int feedAttributeIdsMemoizedSerializedSize = -1;

  public static final int EXTRA_INFO_FIELD_NUMBER = 8;
  private volatile java.lang.Object extraInfo_;
  /**
   * <pre>
   * Output only. Any extra information related to this error which is not captured by
   * validation_error and feed_attribute_id (e.g. placeholder field IDs when
   * feed_attribute_id is not mapped). Note that extra_info is not localized.
   * </pre>
   *
   * <code>optional string extra_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   * @return Whether the extraInfo field is set.
   */
  @java.lang.Override
  public boolean hasExtraInfo() {
    return ((bitField0_ & 0x00000002) != 0);
  }
  /**
   * <pre>
   * Output only. Any extra information related to this error which is not captured by
   * validation_error and feed_attribute_id (e.g. placeholder field IDs when
   * feed_attribute_id is not mapped). Note that extra_info is not localized.
   * </pre>
   *
   * <code>optional string extra_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   * @return The extraInfo.
   */
  @java.lang.Override
  public java.lang.String getExtraInfo() {
    java.lang.Object ref = extraInfo_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      extraInfo_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Output only. Any extra information related to this error which is not captured by
   * validation_error and feed_attribute_id (e.g. placeholder field IDs when
   * feed_attribute_id is not mapped). Note that extra_info is not localized.
   * </pre>
   *
   * <code>optional string extra_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   * @return The bytes for extraInfo.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getExtraInfoBytes() {
    java.lang.Object ref = extraInfo_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      extraInfo_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  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 {
    getSerializedSize();
    if (validationError_ != com.google.ads.googleads.v10.errors.FeedItemValidationErrorEnum.FeedItemValidationError.UNSPECIFIED.getNumber()) {
      output.writeEnum(1, validationError_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, description_);
    }
    if (getFeedAttributeIdsList().size() > 0) {
      output.writeUInt32NoTag(58);
      output.writeUInt32NoTag(feedAttributeIdsMemoizedSerializedSize);
    }
    for (int i = 0; i < feedAttributeIds_.size(); i++) {
      output.writeInt64NoTag(feedAttributeIds_.getLong(i));
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, extraInfo_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (validationError_ != com.google.ads.googleads.v10.errors.FeedItemValidationErrorEnum.FeedItemValidationError.UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(1, validationError_);
    }
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, description_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < feedAttributeIds_.size(); i++) {
        dataSize += com.google.protobuf.CodedOutputStream
          .computeInt64SizeNoTag(feedAttributeIds_.getLong(i));
      }
      size += dataSize;
      if (!getFeedAttributeIdsList().isEmpty()) {
        size += 1;
        size += com.google.protobuf.CodedOutputStream
            .computeInt32SizeNoTag(dataSize);
      }
      feedAttributeIdsMemoizedSerializedSize = dataSize;
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, extraInfo_);
    }
    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.ads.googleads.v10.resources.FeedItemValidationError)) {
      return super.equals(obj);
    }
    com.google.ads.googleads.v10.resources.FeedItemValidationError other = (com.google.ads.googleads.v10.resources.FeedItemValidationError) obj;

    if (validationError_ != other.validationError_) return false;
    if (hasDescription() != other.hasDescription()) return false;
    if (hasDescription()) {
      if (!getDescription()
          .equals(other.getDescription())) return false;
    }
    if (!getFeedAttributeIdsList()
        .equals(other.getFeedAttributeIdsList())) return false;
    if (hasExtraInfo() != other.hasExtraInfo()) return false;
    if (hasExtraInfo()) {
      if (!getExtraInfo()
          .equals(other.getExtraInfo())) return false;
    }
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + VALIDATION_ERROR_FIELD_NUMBER;
    hash = (53 * hash) + validationError_;
    if (hasDescription()) {
      hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
      hash = (53 * hash) + getDescription().hashCode();
    }
    if (getFeedAttributeIdsCount() > 0) {
      hash = (37 * hash) + FEED_ATTRIBUTE_IDS_FIELD_NUMBER;
      hash = (53 * hash) + getFeedAttributeIdsList().hashCode();
    }
    if (hasExtraInfo()) {
      hash = (37 * hash) + EXTRA_INFO_FIELD_NUMBER;
      hash = (53 * hash) + getExtraInfo().hashCode();
    }
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.ads.googleads.v10.resources.FeedItemValidationError parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.ads.googleads.v10.resources.FeedItemValidationError parseFrom(
      java.nio.ByteBuffer data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.ads.googleads.v10.resources.FeedItemValidationError parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.ads.googleads.v10.resources.FeedItemValidationError 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.ads.googleads.v10.resources.FeedItemValidationError parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.ads.googleads.v10.resources.FeedItemValidationError parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.ads.googleads.v10.resources.FeedItemValidationError parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.ads.googleads.v10.resources.FeedItemValidationError 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.ads.googleads.v10.resources.FeedItemValidationError parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.google.ads.googleads.v10.resources.FeedItemValidationError 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.ads.googleads.v10.resources.FeedItemValidationError parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.ads.googleads.v10.resources.FeedItemValidationError 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.ads.googleads.v10.resources.FeedItemValidationError 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>
   * Stores a validation error and the set of offending feed attributes which
   * together are responsible for causing a feed item validation error.
   * </pre>
   *
   * Protobuf type {@code google.ads.googleads.v10.resources.FeedItemValidationError}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.ads.googleads.v10.resources.FeedItemValidationError)
      com.google.ads.googleads.v10.resources.FeedItemValidationErrorOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.ads.googleads.v10.resources.FeedItemProto.internal_static_google_ads_googleads_v10_resources_FeedItemValidationError_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.ads.googleads.v10.resources.FeedItemProto.internal_static_google_ads_googleads_v10_resources_FeedItemValidationError_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.ads.googleads.v10.resources.FeedItemValidationError.class, com.google.ads.googleads.v10.resources.FeedItemValidationError.Builder.class);
    }

    // Construct using com.google.ads.googleads.v10.resources.FeedItemValidationError.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);
      maybeForceBuilderInitialization();
    }
    private void maybeForceBuilderInitialization() {
      if (com.google.protobuf.GeneratedMessageV3
              .alwaysUseFieldBuilders) {
      }
    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      validationError_ = 0;

      description_ = "";
      bitField0_ = (bitField0_ & ~0x00000001);
      feedAttributeIds_ = emptyLongList();
      bitField0_ = (bitField0_ & ~0x00000002);
      extraInfo_ = "";
      bitField0_ = (bitField0_ & ~0x00000004);
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.ads.googleads.v10.resources.FeedItemProto.internal_static_google_ads_googleads_v10_resources_FeedItemValidationError_descriptor;
    }

    @java.lang.Override
    public com.google.ads.googleads.v10.resources.FeedItemValidationError getDefaultInstanceForType() {
      return com.google.ads.googleads.v10.resources.FeedItemValidationError.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.ads.googleads.v10.resources.FeedItemValidationError build() {
      com.google.ads.googleads.v10.resources.FeedItemValidationError result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.ads.googleads.v10.resources.FeedItemValidationError buildPartial() {
      com.google.ads.googleads.v10.resources.FeedItemValidationError result = new com.google.ads.googleads.v10.resources.FeedItemValidationError(this);
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      result.validationError_ = validationError_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        to_bitField0_ |= 0x00000001;
      }
      result.description_ = description_;
      if (((bitField0_ & 0x00000002) != 0)) {
        feedAttributeIds_.makeImmutable();
        bitField0_ = (bitField0_ & ~0x00000002);
      }
      result.feedAttributeIds_ = feedAttributeIds_;
      if (((from_bitField0_ & 0x00000004) != 0)) {
        to_bitField0_ |= 0x00000002;
      }
      result.extraInfo_ = extraInfo_;
      result.bitField0_ = to_bitField0_;
      onBuilt();
      return result;
    }

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

    public Builder mergeFrom(com.google.ads.googleads.v10.resources.FeedItemValidationError other) {
      if (other == com.google.ads.googleads.v10.resources.FeedItemValidationError.getDefaultInstance()) return this;
      if (other.validationError_ != 0) {
        setValidationErrorValue(other.getValidationErrorValue());
      }
      if (other.hasDescription()) {
        bitField0_ |= 0x00000001;
        description_ = other.description_;
        onChanged();
      }
      if (!other.feedAttributeIds_.isEmpty()) {
        if (feedAttributeIds_.isEmpty()) {
          feedAttributeIds_ = other.feedAttributeIds_;
          bitField0_ = (bitField0_ & ~0x00000002);
        } else {
          ensureFeedAttributeIdsIsMutable();
          feedAttributeIds_.addAll(other.feedAttributeIds_);
        }
        onChanged();
      }
      if (other.hasExtraInfo()) {
        bitField0_ |= 0x00000004;
        extraInfo_ = other.extraInfo_;
        onChanged();
      }
      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.ads.googleads.v10.resources.FeedItemValidationError parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.ads.googleads.v10.resources.FeedItemValidationError) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }
    private int bitField0_;

    private int validationError_ = 0;
    /**
     * <pre>
     * Output only. Error code indicating what validation error was triggered. The description
     * of the error can be found in the 'description' field.
     * </pre>
     *
     * <code>.google.ads.googleads.v10.errors.FeedItemValidationErrorEnum.FeedItemValidationError validation_error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return The enum numeric value on the wire for validationError.
     */
    @java.lang.Override public int getValidationErrorValue() {
      return validationError_;
    }
    /**
     * <pre>
     * Output only. Error code indicating what validation error was triggered. The description
     * of the error can be found in the 'description' field.
     * </pre>
     *
     * <code>.google.ads.googleads.v10.errors.FeedItemValidationErrorEnum.FeedItemValidationError validation_error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param value The enum numeric value on the wire for validationError to set.
     * @return This builder for chaining.
     */
    public Builder setValidationErrorValue(int value) {
      
      validationError_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output only. Error code indicating what validation error was triggered. The description
     * of the error can be found in the 'description' field.
     * </pre>
     *
     * <code>.google.ads.googleads.v10.errors.FeedItemValidationErrorEnum.FeedItemValidationError validation_error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return The validationError.
     */
    @java.lang.Override
    public com.google.ads.googleads.v10.errors.FeedItemValidationErrorEnum.FeedItemValidationError getValidationError() {
      @SuppressWarnings("deprecation")
      com.google.ads.googleads.v10.errors.FeedItemValidationErrorEnum.FeedItemValidationError result = com.google.ads.googleads.v10.errors.FeedItemValidationErrorEnum.FeedItemValidationError.valueOf(validationError_);
      return result == null ? com.google.ads.googleads.v10.errors.FeedItemValidationErrorEnum.FeedItemValidationError.UNRECOGNIZED : result;
    }
    /**
     * <pre>
     * Output only. Error code indicating what validation error was triggered. The description
     * of the error can be found in the 'description' field.
     * </pre>
     *
     * <code>.google.ads.googleads.v10.errors.FeedItemValidationErrorEnum.FeedItemValidationError validation_error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param value The validationError to set.
     * @return This builder for chaining.
     */
    public Builder setValidationError(com.google.ads.googleads.v10.errors.FeedItemValidationErrorEnum.FeedItemValidationError value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      validationError_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output only. Error code indicating what validation error was triggered. The description
     * of the error can be found in the 'description' field.
     * </pre>
     *
     * <code>.google.ads.googleads.v10.errors.FeedItemValidationErrorEnum.FeedItemValidationError validation_error = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return This builder for chaining.
     */
    public Builder clearValidationError() {
      
      validationError_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object description_ = "";
    /**
     * <pre>
     * Output only. The description of the validation error.
     * </pre>
     *
     * <code>optional string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return Whether the description field is set.
     */
    public boolean hasDescription() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <pre>
     * Output only. The description of the validation error.
     * </pre>
     *
     * <code>optional string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return The description.
     */
    public java.lang.String getDescription() {
      java.lang.Object ref = description_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        description_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Output only. The description of the validation error.
     * </pre>
     *
     * <code>optional string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return The bytes for description.
     */
    public com.google.protobuf.ByteString
        getDescriptionBytes() {
      java.lang.Object ref = description_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        description_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Output only. The description of the validation error.
     * </pre>
     *
     * <code>optional string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param value The description to set.
     * @return This builder for chaining.
     */
    public Builder setDescription(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000001;
      description_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output only. The description of the validation error.
     * </pre>
     *
     * <code>optional string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return This builder for chaining.
     */
    public Builder clearDescription() {
      bitField0_ = (bitField0_ & ~0x00000001);
      description_ = getDefaultInstance().getDescription();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output only. The description of the validation error.
     * </pre>
     *
     * <code>optional string description = 6 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param value The bytes for description to set.
     * @return This builder for chaining.
     */
    public Builder setDescriptionBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      bitField0_ |= 0x00000001;
      description_ = value;
      onChanged();
      return this;
    }

    private com.google.protobuf.Internal.LongList feedAttributeIds_ = emptyLongList();
    private void ensureFeedAttributeIdsIsMutable() {
      if (!((bitField0_ & 0x00000002) != 0)) {
        feedAttributeIds_ = mutableCopy(feedAttributeIds_);
        bitField0_ |= 0x00000002;
       }
    }
    /**
     * <pre>
     * Output only. Set of feed attributes in the feed item flagged during validation. If
     * empty, no specific feed attributes can be associated with the error
     * (e.g. error across the entire feed item).
     * </pre>
     *
     * <code>repeated int64 feed_attribute_ids = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return A list containing the feedAttributeIds.
     */
    public java.util.List<java.lang.Long>
        getFeedAttributeIdsList() {
      return ((bitField0_ & 0x00000002) != 0) ?
               java.util.Collections.unmodifiableList(feedAttributeIds_) : feedAttributeIds_;
    }
    /**
     * <pre>
     * Output only. Set of feed attributes in the feed item flagged during validation. If
     * empty, no specific feed attributes can be associated with the error
     * (e.g. error across the entire feed item).
     * </pre>
     *
     * <code>repeated int64 feed_attribute_ids = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return The count of feedAttributeIds.
     */
    public int getFeedAttributeIdsCount() {
      return feedAttributeIds_.size();
    }
    /**
     * <pre>
     * Output only. Set of feed attributes in the feed item flagged during validation. If
     * empty, no specific feed attributes can be associated with the error
     * (e.g. error across the entire feed item).
     * </pre>
     *
     * <code>repeated int64 feed_attribute_ids = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param index The index of the element to return.
     * @return The feedAttributeIds at the given index.
     */
    public long getFeedAttributeIds(int index) {
      return feedAttributeIds_.getLong(index);
    }
    /**
     * <pre>
     * Output only. Set of feed attributes in the feed item flagged during validation. If
     * empty, no specific feed attributes can be associated with the error
     * (e.g. error across the entire feed item).
     * </pre>
     *
     * <code>repeated int64 feed_attribute_ids = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param index The index to set the value at.
     * @param value The feedAttributeIds to set.
     * @return This builder for chaining.
     */
    public Builder setFeedAttributeIds(
        int index, long value) {
      ensureFeedAttributeIdsIsMutable();
      feedAttributeIds_.setLong(index, value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output only. Set of feed attributes in the feed item flagged during validation. If
     * empty, no specific feed attributes can be associated with the error
     * (e.g. error across the entire feed item).
     * </pre>
     *
     * <code>repeated int64 feed_attribute_ids = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param value The feedAttributeIds to add.
     * @return This builder for chaining.
     */
    public Builder addFeedAttributeIds(long value) {
      ensureFeedAttributeIdsIsMutable();
      feedAttributeIds_.addLong(value);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output only. Set of feed attributes in the feed item flagged during validation. If
     * empty, no specific feed attributes can be associated with the error
     * (e.g. error across the entire feed item).
     * </pre>
     *
     * <code>repeated int64 feed_attribute_ids = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param values The feedAttributeIds to add.
     * @return This builder for chaining.
     */
    public Builder addAllFeedAttributeIds(
        java.lang.Iterable<? extends java.lang.Long> values) {
      ensureFeedAttributeIdsIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(
          values, feedAttributeIds_);
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output only. Set of feed attributes in the feed item flagged during validation. If
     * empty, no specific feed attributes can be associated with the error
     * (e.g. error across the entire feed item).
     * </pre>
     *
     * <code>repeated int64 feed_attribute_ids = 7 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return This builder for chaining.
     */
    public Builder clearFeedAttributeIds() {
      feedAttributeIds_ = emptyLongList();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }

    private java.lang.Object extraInfo_ = "";
    /**
     * <pre>
     * Output only. Any extra information related to this error which is not captured by
     * validation_error and feed_attribute_id (e.g. placeholder field IDs when
     * feed_attribute_id is not mapped). Note that extra_info is not localized.
     * </pre>
     *
     * <code>optional string extra_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return Whether the extraInfo field is set.
     */
    public boolean hasExtraInfo() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     * <pre>
     * Output only. Any extra information related to this error which is not captured by
     * validation_error and feed_attribute_id (e.g. placeholder field IDs when
     * feed_attribute_id is not mapped). Note that extra_info is not localized.
     * </pre>
     *
     * <code>optional string extra_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return The extraInfo.
     */
    public java.lang.String getExtraInfo() {
      java.lang.Object ref = extraInfo_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        extraInfo_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Output only. Any extra information related to this error which is not captured by
     * validation_error and feed_attribute_id (e.g. placeholder field IDs when
     * feed_attribute_id is not mapped). Note that extra_info is not localized.
     * </pre>
     *
     * <code>optional string extra_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return The bytes for extraInfo.
     */
    public com.google.protobuf.ByteString
        getExtraInfoBytes() {
      java.lang.Object ref = extraInfo_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        extraInfo_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Output only. Any extra information related to this error which is not captured by
     * validation_error and feed_attribute_id (e.g. placeholder field IDs when
     * feed_attribute_id is not mapped). Note that extra_info is not localized.
     * </pre>
     *
     * <code>optional string extra_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param value The extraInfo to set.
     * @return This builder for chaining.
     */
    public Builder setExtraInfo(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  bitField0_ |= 0x00000004;
      extraInfo_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output only. Any extra information related to this error which is not captured by
     * validation_error and feed_attribute_id (e.g. placeholder field IDs when
     * feed_attribute_id is not mapped). Note that extra_info is not localized.
     * </pre>
     *
     * <code>optional string extra_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return This builder for chaining.
     */
    public Builder clearExtraInfo() {
      bitField0_ = (bitField0_ & ~0x00000004);
      extraInfo_ = getDefaultInstance().getExtraInfo();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Output only. Any extra information related to this error which is not captured by
     * validation_error and feed_attribute_id (e.g. placeholder field IDs when
     * feed_attribute_id is not mapped). Note that extra_info is not localized.
     * </pre>
     *
     * <code>optional string extra_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param value The bytes for extraInfo to set.
     * @return This builder for chaining.
     */
    public Builder setExtraInfoBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      bitField0_ |= 0x00000004;
      extraInfo_ = value;
      onChanged();
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:google.ads.googleads.v10.resources.FeedItemValidationError)
  }

  // @@protoc_insertion_point(class_scope:google.ads.googleads.v10.resources.FeedItemValidationError)
  private static final com.google.ads.googleads.v10.resources.FeedItemValidationError DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.google.ads.googleads.v10.resources.FeedItemValidationError();
  }

  public static com.google.ads.googleads.v10.resources.FeedItemValidationError getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

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

  @java.lang.Override
  public com.google.ads.googleads.v10.resources.FeedItemValidationError getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

