// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/ads/googleads/v14/common/offline_user_data.proto

package com.google.ads.googleads.v14.common;

/**
 * <pre>
 * User data holding user identifiers and attributes.
 * </pre>
 *
 * Protobuf type {@code google.ads.googleads.v14.common.UserData}
 */
public final class UserData extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.ads.googleads.v14.common.UserData)
    UserDataOrBuilder {
private static final long serialVersionUID = 0L;
  // Use UserData.newBuilder() to construct.
  private UserData(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private UserData() {
    userIdentifiers_ = java.util.Collections.emptyList();
  }

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

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.ads.googleads.v14.common.OfflineUserDataProto.internal_static_google_ads_googleads_v14_common_UserData_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.ads.googleads.v14.common.OfflineUserDataProto.internal_static_google_ads_googleads_v14_common_UserData_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.ads.googleads.v14.common.UserData.class, com.google.ads.googleads.v14.common.UserData.Builder.class);
  }

  public static final int USER_IDENTIFIERS_FIELD_NUMBER = 1;
  @SuppressWarnings("serial")
  private java.util.List<com.google.ads.googleads.v14.common.UserIdentifier> userIdentifiers_;
  /**
   * <pre>
   * User identification info. Required.
   * </pre>
   *
   * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
   */
  @java.lang.Override
  public java.util.List<com.google.ads.googleads.v14.common.UserIdentifier> getUserIdentifiersList() {
    return userIdentifiers_;
  }
  /**
   * <pre>
   * User identification info. Required.
   * </pre>
   *
   * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
   */
  @java.lang.Override
  public java.util.List<? extends com.google.ads.googleads.v14.common.UserIdentifierOrBuilder> 
      getUserIdentifiersOrBuilderList() {
    return userIdentifiers_;
  }
  /**
   * <pre>
   * User identification info. Required.
   * </pre>
   *
   * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
   */
  @java.lang.Override
  public int getUserIdentifiersCount() {
    return userIdentifiers_.size();
  }
  /**
   * <pre>
   * User identification info. Required.
   * </pre>
   *
   * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
   */
  @java.lang.Override
  public com.google.ads.googleads.v14.common.UserIdentifier getUserIdentifiers(int index) {
    return userIdentifiers_.get(index);
  }
  /**
   * <pre>
   * User identification info. Required.
   * </pre>
   *
   * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
   */
  @java.lang.Override
  public com.google.ads.googleads.v14.common.UserIdentifierOrBuilder getUserIdentifiersOrBuilder(
      int index) {
    return userIdentifiers_.get(index);
  }

  public static final int TRANSACTION_ATTRIBUTE_FIELD_NUMBER = 2;
  private com.google.ads.googleads.v14.common.TransactionAttribute transactionAttribute_;
  /**
   * <pre>
   * Additional transactions/attributes associated with the user.
   * Required when updating store sales data.
   * </pre>
   *
   * <code>.google.ads.googleads.v14.common.TransactionAttribute transaction_attribute = 2;</code>
   * @return Whether the transactionAttribute field is set.
   */
  @java.lang.Override
  public boolean hasTransactionAttribute() {
    return transactionAttribute_ != null;
  }
  /**
   * <pre>
   * Additional transactions/attributes associated with the user.
   * Required when updating store sales data.
   * </pre>
   *
   * <code>.google.ads.googleads.v14.common.TransactionAttribute transaction_attribute = 2;</code>
   * @return The transactionAttribute.
   */
  @java.lang.Override
  public com.google.ads.googleads.v14.common.TransactionAttribute getTransactionAttribute() {
    return transactionAttribute_ == null ? com.google.ads.googleads.v14.common.TransactionAttribute.getDefaultInstance() : transactionAttribute_;
  }
  /**
   * <pre>
   * Additional transactions/attributes associated with the user.
   * Required when updating store sales data.
   * </pre>
   *
   * <code>.google.ads.googleads.v14.common.TransactionAttribute transaction_attribute = 2;</code>
   */
  @java.lang.Override
  public com.google.ads.googleads.v14.common.TransactionAttributeOrBuilder getTransactionAttributeOrBuilder() {
    return transactionAttribute_ == null ? com.google.ads.googleads.v14.common.TransactionAttribute.getDefaultInstance() : transactionAttribute_;
  }

  public static final int USER_ATTRIBUTE_FIELD_NUMBER = 3;
  private com.google.ads.googleads.v14.common.UserAttribute userAttribute_;
  /**
   * <pre>
   * Additional attributes associated with the user. Required when updating
   * customer match attributes. These have an expiration of 540 days.
   * </pre>
   *
   * <code>.google.ads.googleads.v14.common.UserAttribute user_attribute = 3;</code>
   * @return Whether the userAttribute field is set.
   */
  @java.lang.Override
  public boolean hasUserAttribute() {
    return userAttribute_ != null;
  }
  /**
   * <pre>
   * Additional attributes associated with the user. Required when updating
   * customer match attributes. These have an expiration of 540 days.
   * </pre>
   *
   * <code>.google.ads.googleads.v14.common.UserAttribute user_attribute = 3;</code>
   * @return The userAttribute.
   */
  @java.lang.Override
  public com.google.ads.googleads.v14.common.UserAttribute getUserAttribute() {
    return userAttribute_ == null ? com.google.ads.googleads.v14.common.UserAttribute.getDefaultInstance() : userAttribute_;
  }
  /**
   * <pre>
   * Additional attributes associated with the user. Required when updating
   * customer match attributes. These have an expiration of 540 days.
   * </pre>
   *
   * <code>.google.ads.googleads.v14.common.UserAttribute user_attribute = 3;</code>
   */
  @java.lang.Override
  public com.google.ads.googleads.v14.common.UserAttributeOrBuilder getUserAttributeOrBuilder() {
    return userAttribute_ == null ? com.google.ads.googleads.v14.common.UserAttribute.getDefaultInstance() : userAttribute_;
  }

  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 {
    for (int i = 0; i < userIdentifiers_.size(); i++) {
      output.writeMessage(1, userIdentifiers_.get(i));
    }
    if (transactionAttribute_ != null) {
      output.writeMessage(2, getTransactionAttribute());
    }
    if (userAttribute_ != null) {
      output.writeMessage(3, getUserAttribute());
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    for (int i = 0; i < userIdentifiers_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, userIdentifiers_.get(i));
    }
    if (transactionAttribute_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, getTransactionAttribute());
    }
    if (userAttribute_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, getUserAttribute());
    }
    size += getUnknownFields().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.v14.common.UserData)) {
      return super.equals(obj);
    }
    com.google.ads.googleads.v14.common.UserData other = (com.google.ads.googleads.v14.common.UserData) obj;

    if (!getUserIdentifiersList()
        .equals(other.getUserIdentifiersList())) return false;
    if (hasTransactionAttribute() != other.hasTransactionAttribute()) return false;
    if (hasTransactionAttribute()) {
      if (!getTransactionAttribute()
          .equals(other.getTransactionAttribute())) return false;
    }
    if (hasUserAttribute() != other.hasUserAttribute()) return false;
    if (hasUserAttribute()) {
      if (!getUserAttribute()
          .equals(other.getUserAttribute())) return false;
    }
    if (!getUnknownFields().equals(other.getUnknownFields())) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    if (getUserIdentifiersCount() > 0) {
      hash = (37 * hash) + USER_IDENTIFIERS_FIELD_NUMBER;
      hash = (53 * hash) + getUserIdentifiersList().hashCode();
    }
    if (hasTransactionAttribute()) {
      hash = (37 * hash) + TRANSACTION_ATTRIBUTE_FIELD_NUMBER;
      hash = (53 * hash) + getTransactionAttribute().hashCode();
    }
    if (hasUserAttribute()) {
      hash = (37 * hash) + USER_ATTRIBUTE_FIELD_NUMBER;
      hash = (53 * hash) + getUserAttribute().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.ads.googleads.v14.common.UserData parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.ads.googleads.v14.common.UserData 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.v14.common.UserData parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.ads.googleads.v14.common.UserData 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.v14.common.UserData parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.ads.googleads.v14.common.UserData parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.ads.googleads.v14.common.UserData parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.ads.googleads.v14.common.UserData 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.v14.common.UserData parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.ads.googleads.v14.common.UserData 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.v14.common.UserData parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.ads.googleads.v14.common.UserData 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.v14.common.UserData 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>
   * User data holding user identifiers and attributes.
   * </pre>
   *
   * Protobuf type {@code google.ads.googleads.v14.common.UserData}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.ads.googleads.v14.common.UserData)
      com.google.ads.googleads.v14.common.UserDataOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.ads.googleads.v14.common.OfflineUserDataProto.internal_static_google_ads_googleads_v14_common_UserData_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.ads.googleads.v14.common.OfflineUserDataProto.internal_static_google_ads_googleads_v14_common_UserData_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.ads.googleads.v14.common.UserData.class, com.google.ads.googleads.v14.common.UserData.Builder.class);
    }

    // Construct using com.google.ads.googleads.v14.common.UserData.newBuilder()
    private Builder() {

    }

    private Builder(
        com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
      super(parent);

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      if (userIdentifiersBuilder_ == null) {
        userIdentifiers_ = java.util.Collections.emptyList();
      } else {
        userIdentifiers_ = null;
        userIdentifiersBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000001);
      transactionAttribute_ = null;
      if (transactionAttributeBuilder_ != null) {
        transactionAttributeBuilder_.dispose();
        transactionAttributeBuilder_ = null;
      }
      userAttribute_ = null;
      if (userAttributeBuilder_ != null) {
        userAttributeBuilder_.dispose();
        userAttributeBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.ads.googleads.v14.common.OfflineUserDataProto.internal_static_google_ads_googleads_v14_common_UserData_descriptor;
    }

    @java.lang.Override
    public com.google.ads.googleads.v14.common.UserData getDefaultInstanceForType() {
      return com.google.ads.googleads.v14.common.UserData.getDefaultInstance();
    }

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

    @java.lang.Override
    public com.google.ads.googleads.v14.common.UserData buildPartial() {
      com.google.ads.googleads.v14.common.UserData result = new com.google.ads.googleads.v14.common.UserData(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) { buildPartial0(result); }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(com.google.ads.googleads.v14.common.UserData result) {
      if (userIdentifiersBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)) {
          userIdentifiers_ = java.util.Collections.unmodifiableList(userIdentifiers_);
          bitField0_ = (bitField0_ & ~0x00000001);
        }
        result.userIdentifiers_ = userIdentifiers_;
      } else {
        result.userIdentifiers_ = userIdentifiersBuilder_.build();
      }
    }

    private void buildPartial0(com.google.ads.googleads.v14.common.UserData result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.transactionAttribute_ = transactionAttributeBuilder_ == null
            ? transactionAttribute_
            : transactionAttributeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.userAttribute_ = userAttributeBuilder_ == null
            ? userAttribute_
            : userAttributeBuilder_.build();
      }
    }

    @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.v14.common.UserData) {
        return mergeFrom((com.google.ads.googleads.v14.common.UserData)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.ads.googleads.v14.common.UserData other) {
      if (other == com.google.ads.googleads.v14.common.UserData.getDefaultInstance()) return this;
      if (userIdentifiersBuilder_ == null) {
        if (!other.userIdentifiers_.isEmpty()) {
          if (userIdentifiers_.isEmpty()) {
            userIdentifiers_ = other.userIdentifiers_;
            bitField0_ = (bitField0_ & ~0x00000001);
          } else {
            ensureUserIdentifiersIsMutable();
            userIdentifiers_.addAll(other.userIdentifiers_);
          }
          onChanged();
        }
      } else {
        if (!other.userIdentifiers_.isEmpty()) {
          if (userIdentifiersBuilder_.isEmpty()) {
            userIdentifiersBuilder_.dispose();
            userIdentifiersBuilder_ = null;
            userIdentifiers_ = other.userIdentifiers_;
            bitField0_ = (bitField0_ & ~0x00000001);
            userIdentifiersBuilder_ = 
              com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
                 getUserIdentifiersFieldBuilder() : null;
          } else {
            userIdentifiersBuilder_.addAllMessages(other.userIdentifiers_);
          }
        }
      }
      if (other.hasTransactionAttribute()) {
        mergeTransactionAttribute(other.getTransactionAttribute());
      }
      if (other.hasUserAttribute()) {
        mergeUserAttribute(other.getUserAttribute());
      }
      this.mergeUnknownFields(other.getUnknownFields());
      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 {
      if (extensionRegistry == null) {
        throw new java.lang.NullPointerException();
      }
      try {
        boolean done = false;
        while (!done) {
          int tag = input.readTag();
          switch (tag) {
            case 0:
              done = true;
              break;
            case 10: {
              com.google.ads.googleads.v14.common.UserIdentifier m =
                  input.readMessage(
                      com.google.ads.googleads.v14.common.UserIdentifier.parser(),
                      extensionRegistry);
              if (userIdentifiersBuilder_ == null) {
                ensureUserIdentifiersIsMutable();
                userIdentifiers_.add(m);
              } else {
                userIdentifiersBuilder_.addMessage(m);
              }
              break;
            } // case 10
            case 18: {
              input.readMessage(
                  getTransactionAttributeFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000002;
              break;
            } // case 18
            case 26: {
              input.readMessage(
                  getUserAttributeFieldBuilder().getBuilder(),
                  extensionRegistry);
              bitField0_ |= 0x00000004;
              break;
            } // case 26
            default: {
              if (!super.parseUnknownField(input, extensionRegistry, tag)) {
                done = true; // was an endgroup tag
              }
              break;
            } // default:
          } // switch (tag)
        } // while (!done)
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.unwrapIOException();
      } finally {
        onChanged();
      } // finally
      return this;
    }
    private int bitField0_;

    private java.util.List<com.google.ads.googleads.v14.common.UserIdentifier> userIdentifiers_ =
      java.util.Collections.emptyList();
    private void ensureUserIdentifiersIsMutable() {
      if (!((bitField0_ & 0x00000001) != 0)) {
        userIdentifiers_ = new java.util.ArrayList<com.google.ads.googleads.v14.common.UserIdentifier>(userIdentifiers_);
        bitField0_ |= 0x00000001;
       }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.ads.googleads.v14.common.UserIdentifier, com.google.ads.googleads.v14.common.UserIdentifier.Builder, com.google.ads.googleads.v14.common.UserIdentifierOrBuilder> userIdentifiersBuilder_;

    /**
     * <pre>
     * User identification info. Required.
     * </pre>
     *
     * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
     */
    public java.util.List<com.google.ads.googleads.v14.common.UserIdentifier> getUserIdentifiersList() {
      if (userIdentifiersBuilder_ == null) {
        return java.util.Collections.unmodifiableList(userIdentifiers_);
      } else {
        return userIdentifiersBuilder_.getMessageList();
      }
    }
    /**
     * <pre>
     * User identification info. Required.
     * </pre>
     *
     * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
     */
    public int getUserIdentifiersCount() {
      if (userIdentifiersBuilder_ == null) {
        return userIdentifiers_.size();
      } else {
        return userIdentifiersBuilder_.getCount();
      }
    }
    /**
     * <pre>
     * User identification info. Required.
     * </pre>
     *
     * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
     */
    public com.google.ads.googleads.v14.common.UserIdentifier getUserIdentifiers(int index) {
      if (userIdentifiersBuilder_ == null) {
        return userIdentifiers_.get(index);
      } else {
        return userIdentifiersBuilder_.getMessage(index);
      }
    }
    /**
     * <pre>
     * User identification info. Required.
     * </pre>
     *
     * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
     */
    public Builder setUserIdentifiers(
        int index, com.google.ads.googleads.v14.common.UserIdentifier value) {
      if (userIdentifiersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureUserIdentifiersIsMutable();
        userIdentifiers_.set(index, value);
        onChanged();
      } else {
        userIdentifiersBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * User identification info. Required.
     * </pre>
     *
     * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
     */
    public Builder setUserIdentifiers(
        int index, com.google.ads.googleads.v14.common.UserIdentifier.Builder builderForValue) {
      if (userIdentifiersBuilder_ == null) {
        ensureUserIdentifiersIsMutable();
        userIdentifiers_.set(index, builderForValue.build());
        onChanged();
      } else {
        userIdentifiersBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * User identification info. Required.
     * </pre>
     *
     * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
     */
    public Builder addUserIdentifiers(com.google.ads.googleads.v14.common.UserIdentifier value) {
      if (userIdentifiersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureUserIdentifiersIsMutable();
        userIdentifiers_.add(value);
        onChanged();
      } else {
        userIdentifiersBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     * <pre>
     * User identification info. Required.
     * </pre>
     *
     * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
     */
    public Builder addUserIdentifiers(
        int index, com.google.ads.googleads.v14.common.UserIdentifier value) {
      if (userIdentifiersBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureUserIdentifiersIsMutable();
        userIdentifiers_.add(index, value);
        onChanged();
      } else {
        userIdentifiersBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     * <pre>
     * User identification info. Required.
     * </pre>
     *
     * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
     */
    public Builder addUserIdentifiers(
        com.google.ads.googleads.v14.common.UserIdentifier.Builder builderForValue) {
      if (userIdentifiersBuilder_ == null) {
        ensureUserIdentifiersIsMutable();
        userIdentifiers_.add(builderForValue.build());
        onChanged();
      } else {
        userIdentifiersBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * User identification info. Required.
     * </pre>
     *
     * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
     */
    public Builder addUserIdentifiers(
        int index, com.google.ads.googleads.v14.common.UserIdentifier.Builder builderForValue) {
      if (userIdentifiersBuilder_ == null) {
        ensureUserIdentifiersIsMutable();
        userIdentifiers_.add(index, builderForValue.build());
        onChanged();
      } else {
        userIdentifiersBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     * <pre>
     * User identification info. Required.
     * </pre>
     *
     * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
     */
    public Builder addAllUserIdentifiers(
        java.lang.Iterable<? extends com.google.ads.googleads.v14.common.UserIdentifier> values) {
      if (userIdentifiersBuilder_ == null) {
        ensureUserIdentifiersIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(
            values, userIdentifiers_);
        onChanged();
      } else {
        userIdentifiersBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     * <pre>
     * User identification info. Required.
     * </pre>
     *
     * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
     */
    public Builder clearUserIdentifiers() {
      if (userIdentifiersBuilder_ == null) {
        userIdentifiers_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000001);
        onChanged();
      } else {
        userIdentifiersBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * User identification info. Required.
     * </pre>
     *
     * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
     */
    public Builder removeUserIdentifiers(int index) {
      if (userIdentifiersBuilder_ == null) {
        ensureUserIdentifiersIsMutable();
        userIdentifiers_.remove(index);
        onChanged();
      } else {
        userIdentifiersBuilder_.remove(index);
      }
      return this;
    }
    /**
     * <pre>
     * User identification info. Required.
     * </pre>
     *
     * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
     */
    public com.google.ads.googleads.v14.common.UserIdentifier.Builder getUserIdentifiersBuilder(
        int index) {
      return getUserIdentifiersFieldBuilder().getBuilder(index);
    }
    /**
     * <pre>
     * User identification info. Required.
     * </pre>
     *
     * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
     */
    public com.google.ads.googleads.v14.common.UserIdentifierOrBuilder getUserIdentifiersOrBuilder(
        int index) {
      if (userIdentifiersBuilder_ == null) {
        return userIdentifiers_.get(index);  } else {
        return userIdentifiersBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     * <pre>
     * User identification info. Required.
     * </pre>
     *
     * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
     */
    public java.util.List<? extends com.google.ads.googleads.v14.common.UserIdentifierOrBuilder> 
         getUserIdentifiersOrBuilderList() {
      if (userIdentifiersBuilder_ != null) {
        return userIdentifiersBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(userIdentifiers_);
      }
    }
    /**
     * <pre>
     * User identification info. Required.
     * </pre>
     *
     * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
     */
    public com.google.ads.googleads.v14.common.UserIdentifier.Builder addUserIdentifiersBuilder() {
      return getUserIdentifiersFieldBuilder().addBuilder(
          com.google.ads.googleads.v14.common.UserIdentifier.getDefaultInstance());
    }
    /**
     * <pre>
     * User identification info. Required.
     * </pre>
     *
     * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
     */
    public com.google.ads.googleads.v14.common.UserIdentifier.Builder addUserIdentifiersBuilder(
        int index) {
      return getUserIdentifiersFieldBuilder().addBuilder(
          index, com.google.ads.googleads.v14.common.UserIdentifier.getDefaultInstance());
    }
    /**
     * <pre>
     * User identification info. Required.
     * </pre>
     *
     * <code>repeated .google.ads.googleads.v14.common.UserIdentifier user_identifiers = 1;</code>
     */
    public java.util.List<com.google.ads.googleads.v14.common.UserIdentifier.Builder> 
         getUserIdentifiersBuilderList() {
      return getUserIdentifiersFieldBuilder().getBuilderList();
    }
    private com.google.protobuf.RepeatedFieldBuilderV3<
        com.google.ads.googleads.v14.common.UserIdentifier, com.google.ads.googleads.v14.common.UserIdentifier.Builder, com.google.ads.googleads.v14.common.UserIdentifierOrBuilder> 
        getUserIdentifiersFieldBuilder() {
      if (userIdentifiersBuilder_ == null) {
        userIdentifiersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.ads.googleads.v14.common.UserIdentifier, com.google.ads.googleads.v14.common.UserIdentifier.Builder, com.google.ads.googleads.v14.common.UserIdentifierOrBuilder>(
                userIdentifiers_,
                ((bitField0_ & 0x00000001) != 0),
                getParentForChildren(),
                isClean());
        userIdentifiers_ = null;
      }
      return userIdentifiersBuilder_;
    }

    private com.google.ads.googleads.v14.common.TransactionAttribute transactionAttribute_;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v14.common.TransactionAttribute, com.google.ads.googleads.v14.common.TransactionAttribute.Builder, com.google.ads.googleads.v14.common.TransactionAttributeOrBuilder> transactionAttributeBuilder_;
    /**
     * <pre>
     * Additional transactions/attributes associated with the user.
     * Required when updating store sales data.
     * </pre>
     *
     * <code>.google.ads.googleads.v14.common.TransactionAttribute transaction_attribute = 2;</code>
     * @return Whether the transactionAttribute field is set.
     */
    public boolean hasTransactionAttribute() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * <pre>
     * Additional transactions/attributes associated with the user.
     * Required when updating store sales data.
     * </pre>
     *
     * <code>.google.ads.googleads.v14.common.TransactionAttribute transaction_attribute = 2;</code>
     * @return The transactionAttribute.
     */
    public com.google.ads.googleads.v14.common.TransactionAttribute getTransactionAttribute() {
      if (transactionAttributeBuilder_ == null) {
        return transactionAttribute_ == null ? com.google.ads.googleads.v14.common.TransactionAttribute.getDefaultInstance() : transactionAttribute_;
      } else {
        return transactionAttributeBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Additional transactions/attributes associated with the user.
     * Required when updating store sales data.
     * </pre>
     *
     * <code>.google.ads.googleads.v14.common.TransactionAttribute transaction_attribute = 2;</code>
     */
    public Builder setTransactionAttribute(com.google.ads.googleads.v14.common.TransactionAttribute value) {
      if (transactionAttributeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        transactionAttribute_ = value;
      } else {
        transactionAttributeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Additional transactions/attributes associated with the user.
     * Required when updating store sales data.
     * </pre>
     *
     * <code>.google.ads.googleads.v14.common.TransactionAttribute transaction_attribute = 2;</code>
     */
    public Builder setTransactionAttribute(
        com.google.ads.googleads.v14.common.TransactionAttribute.Builder builderForValue) {
      if (transactionAttributeBuilder_ == null) {
        transactionAttribute_ = builderForValue.build();
      } else {
        transactionAttributeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Additional transactions/attributes associated with the user.
     * Required when updating store sales data.
     * </pre>
     *
     * <code>.google.ads.googleads.v14.common.TransactionAttribute transaction_attribute = 2;</code>
     */
    public Builder mergeTransactionAttribute(com.google.ads.googleads.v14.common.TransactionAttribute value) {
      if (transactionAttributeBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0) &&
          transactionAttribute_ != null &&
          transactionAttribute_ != com.google.ads.googleads.v14.common.TransactionAttribute.getDefaultInstance()) {
          getTransactionAttributeBuilder().mergeFrom(value);
        } else {
          transactionAttribute_ = value;
        }
      } else {
        transactionAttributeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Additional transactions/attributes associated with the user.
     * Required when updating store sales data.
     * </pre>
     *
     * <code>.google.ads.googleads.v14.common.TransactionAttribute transaction_attribute = 2;</code>
     */
    public Builder clearTransactionAttribute() {
      bitField0_ = (bitField0_ & ~0x00000002);
      transactionAttribute_ = null;
      if (transactionAttributeBuilder_ != null) {
        transactionAttributeBuilder_.dispose();
        transactionAttributeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Additional transactions/attributes associated with the user.
     * Required when updating store sales data.
     * </pre>
     *
     * <code>.google.ads.googleads.v14.common.TransactionAttribute transaction_attribute = 2;</code>
     */
    public com.google.ads.googleads.v14.common.TransactionAttribute.Builder getTransactionAttributeBuilder() {
      bitField0_ |= 0x00000002;
      onChanged();
      return getTransactionAttributeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Additional transactions/attributes associated with the user.
     * Required when updating store sales data.
     * </pre>
     *
     * <code>.google.ads.googleads.v14.common.TransactionAttribute transaction_attribute = 2;</code>
     */
    public com.google.ads.googleads.v14.common.TransactionAttributeOrBuilder getTransactionAttributeOrBuilder() {
      if (transactionAttributeBuilder_ != null) {
        return transactionAttributeBuilder_.getMessageOrBuilder();
      } else {
        return transactionAttribute_ == null ?
            com.google.ads.googleads.v14.common.TransactionAttribute.getDefaultInstance() : transactionAttribute_;
      }
    }
    /**
     * <pre>
     * Additional transactions/attributes associated with the user.
     * Required when updating store sales data.
     * </pre>
     *
     * <code>.google.ads.googleads.v14.common.TransactionAttribute transaction_attribute = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v14.common.TransactionAttribute, com.google.ads.googleads.v14.common.TransactionAttribute.Builder, com.google.ads.googleads.v14.common.TransactionAttributeOrBuilder> 
        getTransactionAttributeFieldBuilder() {
      if (transactionAttributeBuilder_ == null) {
        transactionAttributeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.ads.googleads.v14.common.TransactionAttribute, com.google.ads.googleads.v14.common.TransactionAttribute.Builder, com.google.ads.googleads.v14.common.TransactionAttributeOrBuilder>(
                getTransactionAttribute(),
                getParentForChildren(),
                isClean());
        transactionAttribute_ = null;
      }
      return transactionAttributeBuilder_;
    }

    private com.google.ads.googleads.v14.common.UserAttribute userAttribute_;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v14.common.UserAttribute, com.google.ads.googleads.v14.common.UserAttribute.Builder, com.google.ads.googleads.v14.common.UserAttributeOrBuilder> userAttributeBuilder_;
    /**
     * <pre>
     * Additional attributes associated with the user. Required when updating
     * customer match attributes. These have an expiration of 540 days.
     * </pre>
     *
     * <code>.google.ads.googleads.v14.common.UserAttribute user_attribute = 3;</code>
     * @return Whether the userAttribute field is set.
     */
    public boolean hasUserAttribute() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     * <pre>
     * Additional attributes associated with the user. Required when updating
     * customer match attributes. These have an expiration of 540 days.
     * </pre>
     *
     * <code>.google.ads.googleads.v14.common.UserAttribute user_attribute = 3;</code>
     * @return The userAttribute.
     */
    public com.google.ads.googleads.v14.common.UserAttribute getUserAttribute() {
      if (userAttributeBuilder_ == null) {
        return userAttribute_ == null ? com.google.ads.googleads.v14.common.UserAttribute.getDefaultInstance() : userAttribute_;
      } else {
        return userAttributeBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Additional attributes associated with the user. Required when updating
     * customer match attributes. These have an expiration of 540 days.
     * </pre>
     *
     * <code>.google.ads.googleads.v14.common.UserAttribute user_attribute = 3;</code>
     */
    public Builder setUserAttribute(com.google.ads.googleads.v14.common.UserAttribute value) {
      if (userAttributeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        userAttribute_ = value;
      } else {
        userAttributeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Additional attributes associated with the user. Required when updating
     * customer match attributes. These have an expiration of 540 days.
     * </pre>
     *
     * <code>.google.ads.googleads.v14.common.UserAttribute user_attribute = 3;</code>
     */
    public Builder setUserAttribute(
        com.google.ads.googleads.v14.common.UserAttribute.Builder builderForValue) {
      if (userAttributeBuilder_ == null) {
        userAttribute_ = builderForValue.build();
      } else {
        userAttributeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Additional attributes associated with the user. Required when updating
     * customer match attributes. These have an expiration of 540 days.
     * </pre>
     *
     * <code>.google.ads.googleads.v14.common.UserAttribute user_attribute = 3;</code>
     */
    public Builder mergeUserAttribute(com.google.ads.googleads.v14.common.UserAttribute value) {
      if (userAttributeBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0) &&
          userAttribute_ != null &&
          userAttribute_ != com.google.ads.googleads.v14.common.UserAttribute.getDefaultInstance()) {
          getUserAttributeBuilder().mergeFrom(value);
        } else {
          userAttribute_ = value;
        }
      } else {
        userAttributeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Additional attributes associated with the user. Required when updating
     * customer match attributes. These have an expiration of 540 days.
     * </pre>
     *
     * <code>.google.ads.googleads.v14.common.UserAttribute user_attribute = 3;</code>
     */
    public Builder clearUserAttribute() {
      bitField0_ = (bitField0_ & ~0x00000004);
      userAttribute_ = null;
      if (userAttributeBuilder_ != null) {
        userAttributeBuilder_.dispose();
        userAttributeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Additional attributes associated with the user. Required when updating
     * customer match attributes. These have an expiration of 540 days.
     * </pre>
     *
     * <code>.google.ads.googleads.v14.common.UserAttribute user_attribute = 3;</code>
     */
    public com.google.ads.googleads.v14.common.UserAttribute.Builder getUserAttributeBuilder() {
      bitField0_ |= 0x00000004;
      onChanged();
      return getUserAttributeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Additional attributes associated with the user. Required when updating
     * customer match attributes. These have an expiration of 540 days.
     * </pre>
     *
     * <code>.google.ads.googleads.v14.common.UserAttribute user_attribute = 3;</code>
     */
    public com.google.ads.googleads.v14.common.UserAttributeOrBuilder getUserAttributeOrBuilder() {
      if (userAttributeBuilder_ != null) {
        return userAttributeBuilder_.getMessageOrBuilder();
      } else {
        return userAttribute_ == null ?
            com.google.ads.googleads.v14.common.UserAttribute.getDefaultInstance() : userAttribute_;
      }
    }
    /**
     * <pre>
     * Additional attributes associated with the user. Required when updating
     * customer match attributes. These have an expiration of 540 days.
     * </pre>
     *
     * <code>.google.ads.googleads.v14.common.UserAttribute user_attribute = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v14.common.UserAttribute, com.google.ads.googleads.v14.common.UserAttribute.Builder, com.google.ads.googleads.v14.common.UserAttributeOrBuilder> 
        getUserAttributeFieldBuilder() {
      if (userAttributeBuilder_ == null) {
        userAttributeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.ads.googleads.v14.common.UserAttribute, com.google.ads.googleads.v14.common.UserAttribute.Builder, com.google.ads.googleads.v14.common.UserAttributeOrBuilder>(
                getUserAttribute(),
                getParentForChildren(),
                isClean());
        userAttribute_ = null;
      }
      return userAttributeBuilder_;
    }
    @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.v14.common.UserData)
  }

  // @@protoc_insertion_point(class_scope:google.ads.googleads.v14.common.UserData)
  private static final com.google.ads.googleads.v14.common.UserData DEFAULT_INSTANCE;
  static {
    DEFAULT_INSTANCE = new com.google.ads.googleads.v14.common.UserData();
  }

  public static com.google.ads.googleads.v14.common.UserData getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<UserData>
      PARSER = new com.google.protobuf.AbstractParser<UserData>() {
    @java.lang.Override
    public UserData parsePartialFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws com.google.protobuf.InvalidProtocolBufferException {
      Builder builder = newBuilder();
      try {
        builder.mergeFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        throw e.setUnfinishedMessage(builder.buildPartial());
      } catch (com.google.protobuf.UninitializedMessageException e) {
        throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
      } catch (java.io.IOException e) {
        throw new com.google.protobuf.InvalidProtocolBufferException(e)
            .setUnfinishedMessage(builder.buildPartial());
      }
      return builder.buildPartial();
    }
  };

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

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

  @java.lang.Override
  public com.google.ads.googleads.v14.common.UserData getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }

}

