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

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

/**
 * <pre>
 * Positive dimension specifying user's audience.
 * </pre>
 *
 * Protobuf type {@code google.ads.googleads.v13.common.AudienceDimension}
 */
public final class AudienceDimension extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.ads.googleads.v13.common.AudienceDimension)
    AudienceDimensionOrBuilder {
private static final long serialVersionUID = 0L;
  // Use AudienceDimension.newBuilder() to construct.
  private AudienceDimension(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private AudienceDimension() {
  }

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

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.ads.googleads.v13.common.AudiencesProto.internal_static_google_ads_googleads_v13_common_AudienceDimension_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.ads.googleads.v13.common.AudiencesProto.internal_static_google_ads_googleads_v13_common_AudienceDimension_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.ads.googleads.v13.common.AudienceDimension.class, com.google.ads.googleads.v13.common.AudienceDimension.Builder.class);
  }

  private int dimensionCase_ = 0;
  @SuppressWarnings("serial")
  private java.lang.Object dimension_;
  public enum DimensionCase
      implements com.google.protobuf.Internal.EnumLite,
          com.google.protobuf.AbstractMessage.InternalOneOfEnum {
    AGE(1),
    GENDER(2),
    HOUSEHOLD_INCOME(3),
    PARENTAL_STATUS(4),
    AUDIENCE_SEGMENTS(5),
    DIMENSION_NOT_SET(0);
    private final int value;
    private DimensionCase(int value) {
      this.value = value;
    }
    /**
     * @param value The number of the enum to look for.
     * @return The enum associated with the given number.
     * @deprecated Use {@link #forNumber(int)} instead.
     */
    @java.lang.Deprecated
    public static DimensionCase valueOf(int value) {
      return forNumber(value);
    }

    public static DimensionCase forNumber(int value) {
      switch (value) {
        case 1: return AGE;
        case 2: return GENDER;
        case 3: return HOUSEHOLD_INCOME;
        case 4: return PARENTAL_STATUS;
        case 5: return AUDIENCE_SEGMENTS;
        case 0: return DIMENSION_NOT_SET;
        default: return null;
      }
    }
    public int getNumber() {
      return this.value;
    }
  };

  public DimensionCase
  getDimensionCase() {
    return DimensionCase.forNumber(
        dimensionCase_);
  }

  public static final int AGE_FIELD_NUMBER = 1;
  /**
   * <pre>
   * Dimension specifying users by their age.
   * </pre>
   *
   * <code>.google.ads.googleads.v13.common.AgeDimension age = 1;</code>
   * @return Whether the age field is set.
   */
  @java.lang.Override
  public boolean hasAge() {
    return dimensionCase_ == 1;
  }
  /**
   * <pre>
   * Dimension specifying users by their age.
   * </pre>
   *
   * <code>.google.ads.googleads.v13.common.AgeDimension age = 1;</code>
   * @return The age.
   */
  @java.lang.Override
  public com.google.ads.googleads.v13.common.AgeDimension getAge() {
    if (dimensionCase_ == 1) {
       return (com.google.ads.googleads.v13.common.AgeDimension) dimension_;
    }
    return com.google.ads.googleads.v13.common.AgeDimension.getDefaultInstance();
  }
  /**
   * <pre>
   * Dimension specifying users by their age.
   * </pre>
   *
   * <code>.google.ads.googleads.v13.common.AgeDimension age = 1;</code>
   */
  @java.lang.Override
  public com.google.ads.googleads.v13.common.AgeDimensionOrBuilder getAgeOrBuilder() {
    if (dimensionCase_ == 1) {
       return (com.google.ads.googleads.v13.common.AgeDimension) dimension_;
    }
    return com.google.ads.googleads.v13.common.AgeDimension.getDefaultInstance();
  }

  public static final int GENDER_FIELD_NUMBER = 2;
  /**
   * <pre>
   * Dimension specifying users by their gender.
   * </pre>
   *
   * <code>.google.ads.googleads.v13.common.GenderDimension gender = 2;</code>
   * @return Whether the gender field is set.
   */
  @java.lang.Override
  public boolean hasGender() {
    return dimensionCase_ == 2;
  }
  /**
   * <pre>
   * Dimension specifying users by their gender.
   * </pre>
   *
   * <code>.google.ads.googleads.v13.common.GenderDimension gender = 2;</code>
   * @return The gender.
   */
  @java.lang.Override
  public com.google.ads.googleads.v13.common.GenderDimension getGender() {
    if (dimensionCase_ == 2) {
       return (com.google.ads.googleads.v13.common.GenderDimension) dimension_;
    }
    return com.google.ads.googleads.v13.common.GenderDimension.getDefaultInstance();
  }
  /**
   * <pre>
   * Dimension specifying users by their gender.
   * </pre>
   *
   * <code>.google.ads.googleads.v13.common.GenderDimension gender = 2;</code>
   */
  @java.lang.Override
  public com.google.ads.googleads.v13.common.GenderDimensionOrBuilder getGenderOrBuilder() {
    if (dimensionCase_ == 2) {
       return (com.google.ads.googleads.v13.common.GenderDimension) dimension_;
    }
    return com.google.ads.googleads.v13.common.GenderDimension.getDefaultInstance();
  }

  public static final int HOUSEHOLD_INCOME_FIELD_NUMBER = 3;
  /**
   * <pre>
   * Dimension specifying users by their household income.
   * </pre>
   *
   * <code>.google.ads.googleads.v13.common.HouseholdIncomeDimension household_income = 3;</code>
   * @return Whether the householdIncome field is set.
   */
  @java.lang.Override
  public boolean hasHouseholdIncome() {
    return dimensionCase_ == 3;
  }
  /**
   * <pre>
   * Dimension specifying users by their household income.
   * </pre>
   *
   * <code>.google.ads.googleads.v13.common.HouseholdIncomeDimension household_income = 3;</code>
   * @return The householdIncome.
   */
  @java.lang.Override
  public com.google.ads.googleads.v13.common.HouseholdIncomeDimension getHouseholdIncome() {
    if (dimensionCase_ == 3) {
       return (com.google.ads.googleads.v13.common.HouseholdIncomeDimension) dimension_;
    }
    return com.google.ads.googleads.v13.common.HouseholdIncomeDimension.getDefaultInstance();
  }
  /**
   * <pre>
   * Dimension specifying users by their household income.
   * </pre>
   *
   * <code>.google.ads.googleads.v13.common.HouseholdIncomeDimension household_income = 3;</code>
   */
  @java.lang.Override
  public com.google.ads.googleads.v13.common.HouseholdIncomeDimensionOrBuilder getHouseholdIncomeOrBuilder() {
    if (dimensionCase_ == 3) {
       return (com.google.ads.googleads.v13.common.HouseholdIncomeDimension) dimension_;
    }
    return com.google.ads.googleads.v13.common.HouseholdIncomeDimension.getDefaultInstance();
  }

  public static final int PARENTAL_STATUS_FIELD_NUMBER = 4;
  /**
   * <pre>
   * Dimension specifying users by their parental status.
   * </pre>
   *
   * <code>.google.ads.googleads.v13.common.ParentalStatusDimension parental_status = 4;</code>
   * @return Whether the parentalStatus field is set.
   */
  @java.lang.Override
  public boolean hasParentalStatus() {
    return dimensionCase_ == 4;
  }
  /**
   * <pre>
   * Dimension specifying users by their parental status.
   * </pre>
   *
   * <code>.google.ads.googleads.v13.common.ParentalStatusDimension parental_status = 4;</code>
   * @return The parentalStatus.
   */
  @java.lang.Override
  public com.google.ads.googleads.v13.common.ParentalStatusDimension getParentalStatus() {
    if (dimensionCase_ == 4) {
       return (com.google.ads.googleads.v13.common.ParentalStatusDimension) dimension_;
    }
    return com.google.ads.googleads.v13.common.ParentalStatusDimension.getDefaultInstance();
  }
  /**
   * <pre>
   * Dimension specifying users by their parental status.
   * </pre>
   *
   * <code>.google.ads.googleads.v13.common.ParentalStatusDimension parental_status = 4;</code>
   */
  @java.lang.Override
  public com.google.ads.googleads.v13.common.ParentalStatusDimensionOrBuilder getParentalStatusOrBuilder() {
    if (dimensionCase_ == 4) {
       return (com.google.ads.googleads.v13.common.ParentalStatusDimension) dimension_;
    }
    return com.google.ads.googleads.v13.common.ParentalStatusDimension.getDefaultInstance();
  }

  public static final int AUDIENCE_SEGMENTS_FIELD_NUMBER = 5;
  /**
   * <pre>
   * Dimension specifying users by their membership in other audience
   * segments.
   * </pre>
   *
   * <code>.google.ads.googleads.v13.common.AudienceSegmentDimension audience_segments = 5;</code>
   * @return Whether the audienceSegments field is set.
   */
  @java.lang.Override
  public boolean hasAudienceSegments() {
    return dimensionCase_ == 5;
  }
  /**
   * <pre>
   * Dimension specifying users by their membership in other audience
   * segments.
   * </pre>
   *
   * <code>.google.ads.googleads.v13.common.AudienceSegmentDimension audience_segments = 5;</code>
   * @return The audienceSegments.
   */
  @java.lang.Override
  public com.google.ads.googleads.v13.common.AudienceSegmentDimension getAudienceSegments() {
    if (dimensionCase_ == 5) {
       return (com.google.ads.googleads.v13.common.AudienceSegmentDimension) dimension_;
    }
    return com.google.ads.googleads.v13.common.AudienceSegmentDimension.getDefaultInstance();
  }
  /**
   * <pre>
   * Dimension specifying users by their membership in other audience
   * segments.
   * </pre>
   *
   * <code>.google.ads.googleads.v13.common.AudienceSegmentDimension audience_segments = 5;</code>
   */
  @java.lang.Override
  public com.google.ads.googleads.v13.common.AudienceSegmentDimensionOrBuilder getAudienceSegmentsOrBuilder() {
    if (dimensionCase_ == 5) {
       return (com.google.ads.googleads.v13.common.AudienceSegmentDimension) dimension_;
    }
    return com.google.ads.googleads.v13.common.AudienceSegmentDimension.getDefaultInstance();
  }

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (dimensionCase_ == 1) {
      output.writeMessage(1, (com.google.ads.googleads.v13.common.AgeDimension) dimension_);
    }
    if (dimensionCase_ == 2) {
      output.writeMessage(2, (com.google.ads.googleads.v13.common.GenderDimension) dimension_);
    }
    if (dimensionCase_ == 3) {
      output.writeMessage(3, (com.google.ads.googleads.v13.common.HouseholdIncomeDimension) dimension_);
    }
    if (dimensionCase_ == 4) {
      output.writeMessage(4, (com.google.ads.googleads.v13.common.ParentalStatusDimension) dimension_);
    }
    if (dimensionCase_ == 5) {
      output.writeMessage(5, (com.google.ads.googleads.v13.common.AudienceSegmentDimension) dimension_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (dimensionCase_ == 1) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(1, (com.google.ads.googleads.v13.common.AgeDimension) dimension_);
    }
    if (dimensionCase_ == 2) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(2, (com.google.ads.googleads.v13.common.GenderDimension) dimension_);
    }
    if (dimensionCase_ == 3) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, (com.google.ads.googleads.v13.common.HouseholdIncomeDimension) dimension_);
    }
    if (dimensionCase_ == 4) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(4, (com.google.ads.googleads.v13.common.ParentalStatusDimension) dimension_);
    }
    if (dimensionCase_ == 5) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(5, (com.google.ads.googleads.v13.common.AudienceSegmentDimension) dimension_);
    }
    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.v13.common.AudienceDimension)) {
      return super.equals(obj);
    }
    com.google.ads.googleads.v13.common.AudienceDimension other = (com.google.ads.googleads.v13.common.AudienceDimension) obj;

    if (!getDimensionCase().equals(other.getDimensionCase())) return false;
    switch (dimensionCase_) {
      case 1:
        if (!getAge()
            .equals(other.getAge())) return false;
        break;
      case 2:
        if (!getGender()
            .equals(other.getGender())) return false;
        break;
      case 3:
        if (!getHouseholdIncome()
            .equals(other.getHouseholdIncome())) return false;
        break;
      case 4:
        if (!getParentalStatus()
            .equals(other.getParentalStatus())) return false;
        break;
      case 5:
        if (!getAudienceSegments()
            .equals(other.getAudienceSegments())) return false;
        break;
      case 0:
      default:
    }
    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();
    switch (dimensionCase_) {
      case 1:
        hash = (37 * hash) + AGE_FIELD_NUMBER;
        hash = (53 * hash) + getAge().hashCode();
        break;
      case 2:
        hash = (37 * hash) + GENDER_FIELD_NUMBER;
        hash = (53 * hash) + getGender().hashCode();
        break;
      case 3:
        hash = (37 * hash) + HOUSEHOLD_INCOME_FIELD_NUMBER;
        hash = (53 * hash) + getHouseholdIncome().hashCode();
        break;
      case 4:
        hash = (37 * hash) + PARENTAL_STATUS_FIELD_NUMBER;
        hash = (53 * hash) + getParentalStatus().hashCode();
        break;
      case 5:
        hash = (37 * hash) + AUDIENCE_SEGMENTS_FIELD_NUMBER;
        hash = (53 * hash) + getAudienceSegments().hashCode();
        break;
      case 0:
      default:
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  public static com.google.ads.googleads.v13.common.AudienceDimension 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.v13.common.AudienceDimension parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.ads.googleads.v13.common.AudienceDimension 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.v13.common.AudienceDimension 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>
   * Positive dimension specifying user's audience.
   * </pre>
   *
   * Protobuf type {@code google.ads.googleads.v13.common.AudienceDimension}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.ads.googleads.v13.common.AudienceDimension)
      com.google.ads.googleads.v13.common.AudienceDimensionOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.ads.googleads.v13.common.AudiencesProto.internal_static_google_ads_googleads_v13_common_AudienceDimension_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.ads.googleads.v13.common.AudiencesProto.internal_static_google_ads_googleads_v13_common_AudienceDimension_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.ads.googleads.v13.common.AudienceDimension.class, com.google.ads.googleads.v13.common.AudienceDimension.Builder.class);
    }

    // Construct using com.google.ads.googleads.v13.common.AudienceDimension.newBuilder()
    private Builder() {

    }

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

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      if (ageBuilder_ != null) {
        ageBuilder_.clear();
      }
      if (genderBuilder_ != null) {
        genderBuilder_.clear();
      }
      if (householdIncomeBuilder_ != null) {
        householdIncomeBuilder_.clear();
      }
      if (parentalStatusBuilder_ != null) {
        parentalStatusBuilder_.clear();
      }
      if (audienceSegmentsBuilder_ != null) {
        audienceSegmentsBuilder_.clear();
      }
      dimensionCase_ = 0;
      dimension_ = null;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.ads.googleads.v13.common.AudiencesProto.internal_static_google_ads_googleads_v13_common_AudienceDimension_descriptor;
    }

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

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

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

    private void buildPartial0(com.google.ads.googleads.v13.common.AudienceDimension result) {
      int from_bitField0_ = bitField0_;
    }

    private void buildPartialOneofs(com.google.ads.googleads.v13.common.AudienceDimension result) {
      result.dimensionCase_ = dimensionCase_;
      result.dimension_ = this.dimension_;
      if (dimensionCase_ == 1 &&
          ageBuilder_ != null) {
        result.dimension_ = ageBuilder_.build();
      }
      if (dimensionCase_ == 2 &&
          genderBuilder_ != null) {
        result.dimension_ = genderBuilder_.build();
      }
      if (dimensionCase_ == 3 &&
          householdIncomeBuilder_ != null) {
        result.dimension_ = householdIncomeBuilder_.build();
      }
      if (dimensionCase_ == 4 &&
          parentalStatusBuilder_ != null) {
        result.dimension_ = parentalStatusBuilder_.build();
      }
      if (dimensionCase_ == 5 &&
          audienceSegmentsBuilder_ != null) {
        result.dimension_ = audienceSegmentsBuilder_.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.v13.common.AudienceDimension) {
        return mergeFrom((com.google.ads.googleads.v13.common.AudienceDimension)other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.ads.googleads.v13.common.AudienceDimension other) {
      if (other == com.google.ads.googleads.v13.common.AudienceDimension.getDefaultInstance()) return this;
      switch (other.getDimensionCase()) {
        case AGE: {
          mergeAge(other.getAge());
          break;
        }
        case GENDER: {
          mergeGender(other.getGender());
          break;
        }
        case HOUSEHOLD_INCOME: {
          mergeHouseholdIncome(other.getHouseholdIncome());
          break;
        }
        case PARENTAL_STATUS: {
          mergeParentalStatus(other.getParentalStatus());
          break;
        }
        case AUDIENCE_SEGMENTS: {
          mergeAudienceSegments(other.getAudienceSegments());
          break;
        }
        case DIMENSION_NOT_SET: {
          break;
        }
      }
      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: {
              input.readMessage(
                  getAgeFieldBuilder().getBuilder(),
                  extensionRegistry);
              dimensionCase_ = 1;
              break;
            } // case 10
            case 18: {
              input.readMessage(
                  getGenderFieldBuilder().getBuilder(),
                  extensionRegistry);
              dimensionCase_ = 2;
              break;
            } // case 18
            case 26: {
              input.readMessage(
                  getHouseholdIncomeFieldBuilder().getBuilder(),
                  extensionRegistry);
              dimensionCase_ = 3;
              break;
            } // case 26
            case 34: {
              input.readMessage(
                  getParentalStatusFieldBuilder().getBuilder(),
                  extensionRegistry);
              dimensionCase_ = 4;
              break;
            } // case 34
            case 42: {
              input.readMessage(
                  getAudienceSegmentsFieldBuilder().getBuilder(),
                  extensionRegistry);
              dimensionCase_ = 5;
              break;
            } // case 42
            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 dimensionCase_ = 0;
    private java.lang.Object dimension_;
    public DimensionCase
        getDimensionCase() {
      return DimensionCase.forNumber(
          dimensionCase_);
    }

    public Builder clearDimension() {
      dimensionCase_ = 0;
      dimension_ = null;
      onChanged();
      return this;
    }

    private int bitField0_;

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v13.common.AgeDimension, com.google.ads.googleads.v13.common.AgeDimension.Builder, com.google.ads.googleads.v13.common.AgeDimensionOrBuilder> ageBuilder_;
    /**
     * <pre>
     * Dimension specifying users by their age.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.AgeDimension age = 1;</code>
     * @return Whether the age field is set.
     */
    @java.lang.Override
    public boolean hasAge() {
      return dimensionCase_ == 1;
    }
    /**
     * <pre>
     * Dimension specifying users by their age.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.AgeDimension age = 1;</code>
     * @return The age.
     */
    @java.lang.Override
    public com.google.ads.googleads.v13.common.AgeDimension getAge() {
      if (ageBuilder_ == null) {
        if (dimensionCase_ == 1) {
          return (com.google.ads.googleads.v13.common.AgeDimension) dimension_;
        }
        return com.google.ads.googleads.v13.common.AgeDimension.getDefaultInstance();
      } else {
        if (dimensionCase_ == 1) {
          return ageBuilder_.getMessage();
        }
        return com.google.ads.googleads.v13.common.AgeDimension.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Dimension specifying users by their age.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.AgeDimension age = 1;</code>
     */
    public Builder setAge(com.google.ads.googleads.v13.common.AgeDimension value) {
      if (ageBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        dimension_ = value;
        onChanged();
      } else {
        ageBuilder_.setMessage(value);
      }
      dimensionCase_ = 1;
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their age.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.AgeDimension age = 1;</code>
     */
    public Builder setAge(
        com.google.ads.googleads.v13.common.AgeDimension.Builder builderForValue) {
      if (ageBuilder_ == null) {
        dimension_ = builderForValue.build();
        onChanged();
      } else {
        ageBuilder_.setMessage(builderForValue.build());
      }
      dimensionCase_ = 1;
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their age.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.AgeDimension age = 1;</code>
     */
    public Builder mergeAge(com.google.ads.googleads.v13.common.AgeDimension value) {
      if (ageBuilder_ == null) {
        if (dimensionCase_ == 1 &&
            dimension_ != com.google.ads.googleads.v13.common.AgeDimension.getDefaultInstance()) {
          dimension_ = com.google.ads.googleads.v13.common.AgeDimension.newBuilder((com.google.ads.googleads.v13.common.AgeDimension) dimension_)
              .mergeFrom(value).buildPartial();
        } else {
          dimension_ = value;
        }
        onChanged();
      } else {
        if (dimensionCase_ == 1) {
          ageBuilder_.mergeFrom(value);
        } else {
          ageBuilder_.setMessage(value);
        }
      }
      dimensionCase_ = 1;
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their age.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.AgeDimension age = 1;</code>
     */
    public Builder clearAge() {
      if (ageBuilder_ == null) {
        if (dimensionCase_ == 1) {
          dimensionCase_ = 0;
          dimension_ = null;
          onChanged();
        }
      } else {
        if (dimensionCase_ == 1) {
          dimensionCase_ = 0;
          dimension_ = null;
        }
        ageBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their age.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.AgeDimension age = 1;</code>
     */
    public com.google.ads.googleads.v13.common.AgeDimension.Builder getAgeBuilder() {
      return getAgeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Dimension specifying users by their age.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.AgeDimension age = 1;</code>
     */
    @java.lang.Override
    public com.google.ads.googleads.v13.common.AgeDimensionOrBuilder getAgeOrBuilder() {
      if ((dimensionCase_ == 1) && (ageBuilder_ != null)) {
        return ageBuilder_.getMessageOrBuilder();
      } else {
        if (dimensionCase_ == 1) {
          return (com.google.ads.googleads.v13.common.AgeDimension) dimension_;
        }
        return com.google.ads.googleads.v13.common.AgeDimension.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Dimension specifying users by their age.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.AgeDimension age = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v13.common.AgeDimension, com.google.ads.googleads.v13.common.AgeDimension.Builder, com.google.ads.googleads.v13.common.AgeDimensionOrBuilder> 
        getAgeFieldBuilder() {
      if (ageBuilder_ == null) {
        if (!(dimensionCase_ == 1)) {
          dimension_ = com.google.ads.googleads.v13.common.AgeDimension.getDefaultInstance();
        }
        ageBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.ads.googleads.v13.common.AgeDimension, com.google.ads.googleads.v13.common.AgeDimension.Builder, com.google.ads.googleads.v13.common.AgeDimensionOrBuilder>(
                (com.google.ads.googleads.v13.common.AgeDimension) dimension_,
                getParentForChildren(),
                isClean());
        dimension_ = null;
      }
      dimensionCase_ = 1;
      onChanged();
      return ageBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v13.common.GenderDimension, com.google.ads.googleads.v13.common.GenderDimension.Builder, com.google.ads.googleads.v13.common.GenderDimensionOrBuilder> genderBuilder_;
    /**
     * <pre>
     * Dimension specifying users by their gender.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.GenderDimension gender = 2;</code>
     * @return Whether the gender field is set.
     */
    @java.lang.Override
    public boolean hasGender() {
      return dimensionCase_ == 2;
    }
    /**
     * <pre>
     * Dimension specifying users by their gender.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.GenderDimension gender = 2;</code>
     * @return The gender.
     */
    @java.lang.Override
    public com.google.ads.googleads.v13.common.GenderDimension getGender() {
      if (genderBuilder_ == null) {
        if (dimensionCase_ == 2) {
          return (com.google.ads.googleads.v13.common.GenderDimension) dimension_;
        }
        return com.google.ads.googleads.v13.common.GenderDimension.getDefaultInstance();
      } else {
        if (dimensionCase_ == 2) {
          return genderBuilder_.getMessage();
        }
        return com.google.ads.googleads.v13.common.GenderDimension.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Dimension specifying users by their gender.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.GenderDimension gender = 2;</code>
     */
    public Builder setGender(com.google.ads.googleads.v13.common.GenderDimension value) {
      if (genderBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        dimension_ = value;
        onChanged();
      } else {
        genderBuilder_.setMessage(value);
      }
      dimensionCase_ = 2;
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their gender.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.GenderDimension gender = 2;</code>
     */
    public Builder setGender(
        com.google.ads.googleads.v13.common.GenderDimension.Builder builderForValue) {
      if (genderBuilder_ == null) {
        dimension_ = builderForValue.build();
        onChanged();
      } else {
        genderBuilder_.setMessage(builderForValue.build());
      }
      dimensionCase_ = 2;
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their gender.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.GenderDimension gender = 2;</code>
     */
    public Builder mergeGender(com.google.ads.googleads.v13.common.GenderDimension value) {
      if (genderBuilder_ == null) {
        if (dimensionCase_ == 2 &&
            dimension_ != com.google.ads.googleads.v13.common.GenderDimension.getDefaultInstance()) {
          dimension_ = com.google.ads.googleads.v13.common.GenderDimension.newBuilder((com.google.ads.googleads.v13.common.GenderDimension) dimension_)
              .mergeFrom(value).buildPartial();
        } else {
          dimension_ = value;
        }
        onChanged();
      } else {
        if (dimensionCase_ == 2) {
          genderBuilder_.mergeFrom(value);
        } else {
          genderBuilder_.setMessage(value);
        }
      }
      dimensionCase_ = 2;
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their gender.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.GenderDimension gender = 2;</code>
     */
    public Builder clearGender() {
      if (genderBuilder_ == null) {
        if (dimensionCase_ == 2) {
          dimensionCase_ = 0;
          dimension_ = null;
          onChanged();
        }
      } else {
        if (dimensionCase_ == 2) {
          dimensionCase_ = 0;
          dimension_ = null;
        }
        genderBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their gender.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.GenderDimension gender = 2;</code>
     */
    public com.google.ads.googleads.v13.common.GenderDimension.Builder getGenderBuilder() {
      return getGenderFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Dimension specifying users by their gender.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.GenderDimension gender = 2;</code>
     */
    @java.lang.Override
    public com.google.ads.googleads.v13.common.GenderDimensionOrBuilder getGenderOrBuilder() {
      if ((dimensionCase_ == 2) && (genderBuilder_ != null)) {
        return genderBuilder_.getMessageOrBuilder();
      } else {
        if (dimensionCase_ == 2) {
          return (com.google.ads.googleads.v13.common.GenderDimension) dimension_;
        }
        return com.google.ads.googleads.v13.common.GenderDimension.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Dimension specifying users by their gender.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.GenderDimension gender = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v13.common.GenderDimension, com.google.ads.googleads.v13.common.GenderDimension.Builder, com.google.ads.googleads.v13.common.GenderDimensionOrBuilder> 
        getGenderFieldBuilder() {
      if (genderBuilder_ == null) {
        if (!(dimensionCase_ == 2)) {
          dimension_ = com.google.ads.googleads.v13.common.GenderDimension.getDefaultInstance();
        }
        genderBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.ads.googleads.v13.common.GenderDimension, com.google.ads.googleads.v13.common.GenderDimension.Builder, com.google.ads.googleads.v13.common.GenderDimensionOrBuilder>(
                (com.google.ads.googleads.v13.common.GenderDimension) dimension_,
                getParentForChildren(),
                isClean());
        dimension_ = null;
      }
      dimensionCase_ = 2;
      onChanged();
      return genderBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v13.common.HouseholdIncomeDimension, com.google.ads.googleads.v13.common.HouseholdIncomeDimension.Builder, com.google.ads.googleads.v13.common.HouseholdIncomeDimensionOrBuilder> householdIncomeBuilder_;
    /**
     * <pre>
     * Dimension specifying users by their household income.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.HouseholdIncomeDimension household_income = 3;</code>
     * @return Whether the householdIncome field is set.
     */
    @java.lang.Override
    public boolean hasHouseholdIncome() {
      return dimensionCase_ == 3;
    }
    /**
     * <pre>
     * Dimension specifying users by their household income.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.HouseholdIncomeDimension household_income = 3;</code>
     * @return The householdIncome.
     */
    @java.lang.Override
    public com.google.ads.googleads.v13.common.HouseholdIncomeDimension getHouseholdIncome() {
      if (householdIncomeBuilder_ == null) {
        if (dimensionCase_ == 3) {
          return (com.google.ads.googleads.v13.common.HouseholdIncomeDimension) dimension_;
        }
        return com.google.ads.googleads.v13.common.HouseholdIncomeDimension.getDefaultInstance();
      } else {
        if (dimensionCase_ == 3) {
          return householdIncomeBuilder_.getMessage();
        }
        return com.google.ads.googleads.v13.common.HouseholdIncomeDimension.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Dimension specifying users by their household income.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.HouseholdIncomeDimension household_income = 3;</code>
     */
    public Builder setHouseholdIncome(com.google.ads.googleads.v13.common.HouseholdIncomeDimension value) {
      if (householdIncomeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        dimension_ = value;
        onChanged();
      } else {
        householdIncomeBuilder_.setMessage(value);
      }
      dimensionCase_ = 3;
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their household income.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.HouseholdIncomeDimension household_income = 3;</code>
     */
    public Builder setHouseholdIncome(
        com.google.ads.googleads.v13.common.HouseholdIncomeDimension.Builder builderForValue) {
      if (householdIncomeBuilder_ == null) {
        dimension_ = builderForValue.build();
        onChanged();
      } else {
        householdIncomeBuilder_.setMessage(builderForValue.build());
      }
      dimensionCase_ = 3;
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their household income.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.HouseholdIncomeDimension household_income = 3;</code>
     */
    public Builder mergeHouseholdIncome(com.google.ads.googleads.v13.common.HouseholdIncomeDimension value) {
      if (householdIncomeBuilder_ == null) {
        if (dimensionCase_ == 3 &&
            dimension_ != com.google.ads.googleads.v13.common.HouseholdIncomeDimension.getDefaultInstance()) {
          dimension_ = com.google.ads.googleads.v13.common.HouseholdIncomeDimension.newBuilder((com.google.ads.googleads.v13.common.HouseholdIncomeDimension) dimension_)
              .mergeFrom(value).buildPartial();
        } else {
          dimension_ = value;
        }
        onChanged();
      } else {
        if (dimensionCase_ == 3) {
          householdIncomeBuilder_.mergeFrom(value);
        } else {
          householdIncomeBuilder_.setMessage(value);
        }
      }
      dimensionCase_ = 3;
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their household income.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.HouseholdIncomeDimension household_income = 3;</code>
     */
    public Builder clearHouseholdIncome() {
      if (householdIncomeBuilder_ == null) {
        if (dimensionCase_ == 3) {
          dimensionCase_ = 0;
          dimension_ = null;
          onChanged();
        }
      } else {
        if (dimensionCase_ == 3) {
          dimensionCase_ = 0;
          dimension_ = null;
        }
        householdIncomeBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their household income.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.HouseholdIncomeDimension household_income = 3;</code>
     */
    public com.google.ads.googleads.v13.common.HouseholdIncomeDimension.Builder getHouseholdIncomeBuilder() {
      return getHouseholdIncomeFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Dimension specifying users by their household income.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.HouseholdIncomeDimension household_income = 3;</code>
     */
    @java.lang.Override
    public com.google.ads.googleads.v13.common.HouseholdIncomeDimensionOrBuilder getHouseholdIncomeOrBuilder() {
      if ((dimensionCase_ == 3) && (householdIncomeBuilder_ != null)) {
        return householdIncomeBuilder_.getMessageOrBuilder();
      } else {
        if (dimensionCase_ == 3) {
          return (com.google.ads.googleads.v13.common.HouseholdIncomeDimension) dimension_;
        }
        return com.google.ads.googleads.v13.common.HouseholdIncomeDimension.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Dimension specifying users by their household income.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.HouseholdIncomeDimension household_income = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v13.common.HouseholdIncomeDimension, com.google.ads.googleads.v13.common.HouseholdIncomeDimension.Builder, com.google.ads.googleads.v13.common.HouseholdIncomeDimensionOrBuilder> 
        getHouseholdIncomeFieldBuilder() {
      if (householdIncomeBuilder_ == null) {
        if (!(dimensionCase_ == 3)) {
          dimension_ = com.google.ads.googleads.v13.common.HouseholdIncomeDimension.getDefaultInstance();
        }
        householdIncomeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.ads.googleads.v13.common.HouseholdIncomeDimension, com.google.ads.googleads.v13.common.HouseholdIncomeDimension.Builder, com.google.ads.googleads.v13.common.HouseholdIncomeDimensionOrBuilder>(
                (com.google.ads.googleads.v13.common.HouseholdIncomeDimension) dimension_,
                getParentForChildren(),
                isClean());
        dimension_ = null;
      }
      dimensionCase_ = 3;
      onChanged();
      return householdIncomeBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v13.common.ParentalStatusDimension, com.google.ads.googleads.v13.common.ParentalStatusDimension.Builder, com.google.ads.googleads.v13.common.ParentalStatusDimensionOrBuilder> parentalStatusBuilder_;
    /**
     * <pre>
     * Dimension specifying users by their parental status.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.ParentalStatusDimension parental_status = 4;</code>
     * @return Whether the parentalStatus field is set.
     */
    @java.lang.Override
    public boolean hasParentalStatus() {
      return dimensionCase_ == 4;
    }
    /**
     * <pre>
     * Dimension specifying users by their parental status.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.ParentalStatusDimension parental_status = 4;</code>
     * @return The parentalStatus.
     */
    @java.lang.Override
    public com.google.ads.googleads.v13.common.ParentalStatusDimension getParentalStatus() {
      if (parentalStatusBuilder_ == null) {
        if (dimensionCase_ == 4) {
          return (com.google.ads.googleads.v13.common.ParentalStatusDimension) dimension_;
        }
        return com.google.ads.googleads.v13.common.ParentalStatusDimension.getDefaultInstance();
      } else {
        if (dimensionCase_ == 4) {
          return parentalStatusBuilder_.getMessage();
        }
        return com.google.ads.googleads.v13.common.ParentalStatusDimension.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Dimension specifying users by their parental status.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.ParentalStatusDimension parental_status = 4;</code>
     */
    public Builder setParentalStatus(com.google.ads.googleads.v13.common.ParentalStatusDimension value) {
      if (parentalStatusBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        dimension_ = value;
        onChanged();
      } else {
        parentalStatusBuilder_.setMessage(value);
      }
      dimensionCase_ = 4;
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their parental status.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.ParentalStatusDimension parental_status = 4;</code>
     */
    public Builder setParentalStatus(
        com.google.ads.googleads.v13.common.ParentalStatusDimension.Builder builderForValue) {
      if (parentalStatusBuilder_ == null) {
        dimension_ = builderForValue.build();
        onChanged();
      } else {
        parentalStatusBuilder_.setMessage(builderForValue.build());
      }
      dimensionCase_ = 4;
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their parental status.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.ParentalStatusDimension parental_status = 4;</code>
     */
    public Builder mergeParentalStatus(com.google.ads.googleads.v13.common.ParentalStatusDimension value) {
      if (parentalStatusBuilder_ == null) {
        if (dimensionCase_ == 4 &&
            dimension_ != com.google.ads.googleads.v13.common.ParentalStatusDimension.getDefaultInstance()) {
          dimension_ = com.google.ads.googleads.v13.common.ParentalStatusDimension.newBuilder((com.google.ads.googleads.v13.common.ParentalStatusDimension) dimension_)
              .mergeFrom(value).buildPartial();
        } else {
          dimension_ = value;
        }
        onChanged();
      } else {
        if (dimensionCase_ == 4) {
          parentalStatusBuilder_.mergeFrom(value);
        } else {
          parentalStatusBuilder_.setMessage(value);
        }
      }
      dimensionCase_ = 4;
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their parental status.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.ParentalStatusDimension parental_status = 4;</code>
     */
    public Builder clearParentalStatus() {
      if (parentalStatusBuilder_ == null) {
        if (dimensionCase_ == 4) {
          dimensionCase_ = 0;
          dimension_ = null;
          onChanged();
        }
      } else {
        if (dimensionCase_ == 4) {
          dimensionCase_ = 0;
          dimension_ = null;
        }
        parentalStatusBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their parental status.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.ParentalStatusDimension parental_status = 4;</code>
     */
    public com.google.ads.googleads.v13.common.ParentalStatusDimension.Builder getParentalStatusBuilder() {
      return getParentalStatusFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Dimension specifying users by their parental status.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.ParentalStatusDimension parental_status = 4;</code>
     */
    @java.lang.Override
    public com.google.ads.googleads.v13.common.ParentalStatusDimensionOrBuilder getParentalStatusOrBuilder() {
      if ((dimensionCase_ == 4) && (parentalStatusBuilder_ != null)) {
        return parentalStatusBuilder_.getMessageOrBuilder();
      } else {
        if (dimensionCase_ == 4) {
          return (com.google.ads.googleads.v13.common.ParentalStatusDimension) dimension_;
        }
        return com.google.ads.googleads.v13.common.ParentalStatusDimension.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Dimension specifying users by their parental status.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.ParentalStatusDimension parental_status = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v13.common.ParentalStatusDimension, com.google.ads.googleads.v13.common.ParentalStatusDimension.Builder, com.google.ads.googleads.v13.common.ParentalStatusDimensionOrBuilder> 
        getParentalStatusFieldBuilder() {
      if (parentalStatusBuilder_ == null) {
        if (!(dimensionCase_ == 4)) {
          dimension_ = com.google.ads.googleads.v13.common.ParentalStatusDimension.getDefaultInstance();
        }
        parentalStatusBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.ads.googleads.v13.common.ParentalStatusDimension, com.google.ads.googleads.v13.common.ParentalStatusDimension.Builder, com.google.ads.googleads.v13.common.ParentalStatusDimensionOrBuilder>(
                (com.google.ads.googleads.v13.common.ParentalStatusDimension) dimension_,
                getParentForChildren(),
                isClean());
        dimension_ = null;
      }
      dimensionCase_ = 4;
      onChanged();
      return parentalStatusBuilder_;
    }

    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v13.common.AudienceSegmentDimension, com.google.ads.googleads.v13.common.AudienceSegmentDimension.Builder, com.google.ads.googleads.v13.common.AudienceSegmentDimensionOrBuilder> audienceSegmentsBuilder_;
    /**
     * <pre>
     * Dimension specifying users by their membership in other audience
     * segments.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.AudienceSegmentDimension audience_segments = 5;</code>
     * @return Whether the audienceSegments field is set.
     */
    @java.lang.Override
    public boolean hasAudienceSegments() {
      return dimensionCase_ == 5;
    }
    /**
     * <pre>
     * Dimension specifying users by their membership in other audience
     * segments.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.AudienceSegmentDimension audience_segments = 5;</code>
     * @return The audienceSegments.
     */
    @java.lang.Override
    public com.google.ads.googleads.v13.common.AudienceSegmentDimension getAudienceSegments() {
      if (audienceSegmentsBuilder_ == null) {
        if (dimensionCase_ == 5) {
          return (com.google.ads.googleads.v13.common.AudienceSegmentDimension) dimension_;
        }
        return com.google.ads.googleads.v13.common.AudienceSegmentDimension.getDefaultInstance();
      } else {
        if (dimensionCase_ == 5) {
          return audienceSegmentsBuilder_.getMessage();
        }
        return com.google.ads.googleads.v13.common.AudienceSegmentDimension.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Dimension specifying users by their membership in other audience
     * segments.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.AudienceSegmentDimension audience_segments = 5;</code>
     */
    public Builder setAudienceSegments(com.google.ads.googleads.v13.common.AudienceSegmentDimension value) {
      if (audienceSegmentsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        dimension_ = value;
        onChanged();
      } else {
        audienceSegmentsBuilder_.setMessage(value);
      }
      dimensionCase_ = 5;
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their membership in other audience
     * segments.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.AudienceSegmentDimension audience_segments = 5;</code>
     */
    public Builder setAudienceSegments(
        com.google.ads.googleads.v13.common.AudienceSegmentDimension.Builder builderForValue) {
      if (audienceSegmentsBuilder_ == null) {
        dimension_ = builderForValue.build();
        onChanged();
      } else {
        audienceSegmentsBuilder_.setMessage(builderForValue.build());
      }
      dimensionCase_ = 5;
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their membership in other audience
     * segments.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.AudienceSegmentDimension audience_segments = 5;</code>
     */
    public Builder mergeAudienceSegments(com.google.ads.googleads.v13.common.AudienceSegmentDimension value) {
      if (audienceSegmentsBuilder_ == null) {
        if (dimensionCase_ == 5 &&
            dimension_ != com.google.ads.googleads.v13.common.AudienceSegmentDimension.getDefaultInstance()) {
          dimension_ = com.google.ads.googleads.v13.common.AudienceSegmentDimension.newBuilder((com.google.ads.googleads.v13.common.AudienceSegmentDimension) dimension_)
              .mergeFrom(value).buildPartial();
        } else {
          dimension_ = value;
        }
        onChanged();
      } else {
        if (dimensionCase_ == 5) {
          audienceSegmentsBuilder_.mergeFrom(value);
        } else {
          audienceSegmentsBuilder_.setMessage(value);
        }
      }
      dimensionCase_ = 5;
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their membership in other audience
     * segments.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.AudienceSegmentDimension audience_segments = 5;</code>
     */
    public Builder clearAudienceSegments() {
      if (audienceSegmentsBuilder_ == null) {
        if (dimensionCase_ == 5) {
          dimensionCase_ = 0;
          dimension_ = null;
          onChanged();
        }
      } else {
        if (dimensionCase_ == 5) {
          dimensionCase_ = 0;
          dimension_ = null;
        }
        audienceSegmentsBuilder_.clear();
      }
      return this;
    }
    /**
     * <pre>
     * Dimension specifying users by their membership in other audience
     * segments.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.AudienceSegmentDimension audience_segments = 5;</code>
     */
    public com.google.ads.googleads.v13.common.AudienceSegmentDimension.Builder getAudienceSegmentsBuilder() {
      return getAudienceSegmentsFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Dimension specifying users by their membership in other audience
     * segments.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.AudienceSegmentDimension audience_segments = 5;</code>
     */
    @java.lang.Override
    public com.google.ads.googleads.v13.common.AudienceSegmentDimensionOrBuilder getAudienceSegmentsOrBuilder() {
      if ((dimensionCase_ == 5) && (audienceSegmentsBuilder_ != null)) {
        return audienceSegmentsBuilder_.getMessageOrBuilder();
      } else {
        if (dimensionCase_ == 5) {
          return (com.google.ads.googleads.v13.common.AudienceSegmentDimension) dimension_;
        }
        return com.google.ads.googleads.v13.common.AudienceSegmentDimension.getDefaultInstance();
      }
    }
    /**
     * <pre>
     * Dimension specifying users by their membership in other audience
     * segments.
     * </pre>
     *
     * <code>.google.ads.googleads.v13.common.AudienceSegmentDimension audience_segments = 5;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v13.common.AudienceSegmentDimension, com.google.ads.googleads.v13.common.AudienceSegmentDimension.Builder, com.google.ads.googleads.v13.common.AudienceSegmentDimensionOrBuilder> 
        getAudienceSegmentsFieldBuilder() {
      if (audienceSegmentsBuilder_ == null) {
        if (!(dimensionCase_ == 5)) {
          dimension_ = com.google.ads.googleads.v13.common.AudienceSegmentDimension.getDefaultInstance();
        }
        audienceSegmentsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.ads.googleads.v13.common.AudienceSegmentDimension, com.google.ads.googleads.v13.common.AudienceSegmentDimension.Builder, com.google.ads.googleads.v13.common.AudienceSegmentDimensionOrBuilder>(
                (com.google.ads.googleads.v13.common.AudienceSegmentDimension) dimension_,
                getParentForChildren(),
                isClean());
        dimension_ = null;
      }
      dimensionCase_ = 5;
      onChanged();
      return audienceSegmentsBuilder_;
    }
    @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.v13.common.AudienceDimension)
  }

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

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

  private static final com.google.protobuf.Parser<AudienceDimension>
      PARSER = new com.google.protobuf.AbstractParser<AudienceDimension>() {
    @java.lang.Override
    public AudienceDimension 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<AudienceDimension> parser() {
    return PARSER;
  }

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

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

}

