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

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

/**
 * <pre>
 * Forecast metrics.
 * </pre>
 *
 * Protobuf type {@code google.ads.googleads.v13.services.ForecastMetrics}
 */
public final class ForecastMetrics extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.ads.googleads.v13.services.ForecastMetrics)
    ForecastMetricsOrBuilder {
private static final long serialVersionUID = 0L;
  // Use ForecastMetrics.newBuilder() to construct.
  private ForecastMetrics(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private ForecastMetrics() {
  }

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

  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.ads.googleads.v13.services.KeywordPlanServiceProto.internal_static_google_ads_googleads_v13_services_ForecastMetrics_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.ads.googleads.v13.services.KeywordPlanServiceProto.internal_static_google_ads_googleads_v13_services_ForecastMetrics_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.ads.googleads.v13.services.ForecastMetrics.class, com.google.ads.googleads.v13.services.ForecastMetrics.Builder.class);
  }

  private int bitField0_;
  public static final int IMPRESSIONS_FIELD_NUMBER = 7;
  private double impressions_ = 0D;
  /**
   * <pre>
   * Impressions
   * </pre>
   *
   * <code>optional double impressions = 7;</code>
   * @return Whether the impressions field is set.
   */
  @java.lang.Override
  public boolean hasImpressions() {
    return ((bitField0_ & 0x00000001) != 0);
  }
  /**
   * <pre>
   * Impressions
   * </pre>
   *
   * <code>optional double impressions = 7;</code>
   * @return The impressions.
   */
  @java.lang.Override
  public double getImpressions() {
    return impressions_;
  }

  public static final int CTR_FIELD_NUMBER = 8;
  private double ctr_ = 0D;
  /**
   * <pre>
   * Ctr
   * </pre>
   *
   * <code>optional double ctr = 8;</code>
   * @return Whether the ctr field is set.
   */
  @java.lang.Override
  public boolean hasCtr() {
    return ((bitField0_ & 0x00000002) != 0);
  }
  /**
   * <pre>
   * Ctr
   * </pre>
   *
   * <code>optional double ctr = 8;</code>
   * @return The ctr.
   */
  @java.lang.Override
  public double getCtr() {
    return ctr_;
  }

  public static final int AVERAGE_CPC_FIELD_NUMBER = 9;
  private long averageCpc_ = 0L;
  /**
   * <pre>
   * AVG cpc
   * </pre>
   *
   * <code>optional int64 average_cpc = 9;</code>
   * @return Whether the averageCpc field is set.
   */
  @java.lang.Override
  public boolean hasAverageCpc() {
    return ((bitField0_ & 0x00000004) != 0);
  }
  /**
   * <pre>
   * AVG cpc
   * </pre>
   *
   * <code>optional int64 average_cpc = 9;</code>
   * @return The averageCpc.
   */
  @java.lang.Override
  public long getAverageCpc() {
    return averageCpc_;
  }

  public static final int CLICKS_FIELD_NUMBER = 10;
  private double clicks_ = 0D;
  /**
   * <pre>
   * Clicks
   * </pre>
   *
   * <code>optional double clicks = 10;</code>
   * @return Whether the clicks field is set.
   */
  @java.lang.Override
  public boolean hasClicks() {
    return ((bitField0_ & 0x00000008) != 0);
  }
  /**
   * <pre>
   * Clicks
   * </pre>
   *
   * <code>optional double clicks = 10;</code>
   * @return The clicks.
   */
  @java.lang.Override
  public double getClicks() {
    return clicks_;
  }

  public static final int COST_MICROS_FIELD_NUMBER = 11;
  private long costMicros_ = 0L;
  /**
   * <pre>
   * Cost
   * </pre>
   *
   * <code>optional int64 cost_micros = 11;</code>
   * @return Whether the costMicros field is set.
   */
  @java.lang.Override
  public boolean hasCostMicros() {
    return ((bitField0_ & 0x00000010) != 0);
  }
  /**
   * <pre>
   * Cost
   * </pre>
   *
   * <code>optional int64 cost_micros = 11;</code>
   * @return The costMicros.
   */
  @java.lang.Override
  public long getCostMicros() {
    return costMicros_;
  }

  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 (((bitField0_ & 0x00000001) != 0)) {
      output.writeDouble(7, impressions_);
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      output.writeDouble(8, ctr_);
    }
    if (((bitField0_ & 0x00000004) != 0)) {
      output.writeInt64(9, averageCpc_);
    }
    if (((bitField0_ & 0x00000008) != 0)) {
      output.writeDouble(10, clicks_);
    }
    if (((bitField0_ & 0x00000010) != 0)) {
      output.writeInt64(11, costMicros_);
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (((bitField0_ & 0x00000001) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeDoubleSize(7, impressions_);
    }
    if (((bitField0_ & 0x00000002) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeDoubleSize(8, ctr_);
    }
    if (((bitField0_ & 0x00000004) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(9, averageCpc_);
    }
    if (((bitField0_ & 0x00000008) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeDoubleSize(10, clicks_);
    }
    if (((bitField0_ & 0x00000010) != 0)) {
      size += com.google.protobuf.CodedOutputStream
        .computeInt64Size(11, costMicros_);
    }
    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.services.ForecastMetrics)) {
      return super.equals(obj);
    }
    com.google.ads.googleads.v13.services.ForecastMetrics other = (com.google.ads.googleads.v13.services.ForecastMetrics) obj;

    if (hasImpressions() != other.hasImpressions()) return false;
    if (hasImpressions()) {
      if (java.lang.Double.doubleToLongBits(getImpressions())
          != java.lang.Double.doubleToLongBits(
              other.getImpressions())) return false;
    }
    if (hasCtr() != other.hasCtr()) return false;
    if (hasCtr()) {
      if (java.lang.Double.doubleToLongBits(getCtr())
          != java.lang.Double.doubleToLongBits(
              other.getCtr())) return false;
    }
    if (hasAverageCpc() != other.hasAverageCpc()) return false;
    if (hasAverageCpc()) {
      if (getAverageCpc()
          != other.getAverageCpc()) return false;
    }
    if (hasClicks() != other.hasClicks()) return false;
    if (hasClicks()) {
      if (java.lang.Double.doubleToLongBits(getClicks())
          != java.lang.Double.doubleToLongBits(
              other.getClicks())) return false;
    }
    if (hasCostMicros() != other.hasCostMicros()) return false;
    if (hasCostMicros()) {
      if (getCostMicros()
          != other.getCostMicros()) 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 (hasImpressions()) {
      hash = (37 * hash) + IMPRESSIONS_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          java.lang.Double.doubleToLongBits(getImpressions()));
    }
    if (hasCtr()) {
      hash = (37 * hash) + CTR_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          java.lang.Double.doubleToLongBits(getCtr()));
    }
    if (hasAverageCpc()) {
      hash = (37 * hash) + AVERAGE_CPC_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getAverageCpc());
    }
    if (hasClicks()) {
      hash = (37 * hash) + CLICKS_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          java.lang.Double.doubleToLongBits(getClicks()));
    }
    if (hasCostMicros()) {
      hash = (37 * hash) + COST_MICROS_FIELD_NUMBER;
      hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
          getCostMicros());
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

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

  public static com.google.ads.googleads.v13.services.ForecastMetrics 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.services.ForecastMetrics 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.services.ForecastMetrics 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.services.ForecastMetrics 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>
   * Forecast metrics.
   * </pre>
   *
   * Protobuf type {@code google.ads.googleads.v13.services.ForecastMetrics}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.ads.googleads.v13.services.ForecastMetrics)
      com.google.ads.googleads.v13.services.ForecastMetricsOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.ads.googleads.v13.services.KeywordPlanServiceProto.internal_static_google_ads_googleads_v13_services_ForecastMetrics_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.ads.googleads.v13.services.KeywordPlanServiceProto.internal_static_google_ads_googleads_v13_services_ForecastMetrics_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.ads.googleads.v13.services.ForecastMetrics.class, com.google.ads.googleads.v13.services.ForecastMetrics.Builder.class);
    }

    // Construct using com.google.ads.googleads.v13.services.ForecastMetrics.newBuilder()
    private Builder() {

    }

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

    }
    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      impressions_ = 0D;
      ctr_ = 0D;
      averageCpc_ = 0L;
      clicks_ = 0D;
      costMicros_ = 0L;
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.ads.googleads.v13.services.KeywordPlanServiceProto.internal_static_google_ads_googleads_v13_services_ForecastMetrics_descriptor;
    }

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

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

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

    private void buildPartial0(com.google.ads.googleads.v13.services.ForecastMetrics result) {
      int from_bitField0_ = bitField0_;
      int to_bitField0_ = 0;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.impressions_ = impressions_;
        to_bitField0_ |= 0x00000001;
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.ctr_ = ctr_;
        to_bitField0_ |= 0x00000002;
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.averageCpc_ = averageCpc_;
        to_bitField0_ |= 0x00000004;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.clicks_ = clicks_;
        to_bitField0_ |= 0x00000008;
      }
      if (((from_bitField0_ & 0x00000010) != 0)) {
        result.costMicros_ = costMicros_;
        to_bitField0_ |= 0x00000010;
      }
      result.bitField0_ |= to_bitField0_;
    }

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

    public Builder mergeFrom(com.google.ads.googleads.v13.services.ForecastMetrics other) {
      if (other == com.google.ads.googleads.v13.services.ForecastMetrics.getDefaultInstance()) return this;
      if (other.hasImpressions()) {
        setImpressions(other.getImpressions());
      }
      if (other.hasCtr()) {
        setCtr(other.getCtr());
      }
      if (other.hasAverageCpc()) {
        setAverageCpc(other.getAverageCpc());
      }
      if (other.hasClicks()) {
        setClicks(other.getClicks());
      }
      if (other.hasCostMicros()) {
        setCostMicros(other.getCostMicros());
      }
      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 57: {
              impressions_ = input.readDouble();
              bitField0_ |= 0x00000001;
              break;
            } // case 57
            case 65: {
              ctr_ = input.readDouble();
              bitField0_ |= 0x00000002;
              break;
            } // case 65
            case 72: {
              averageCpc_ = input.readInt64();
              bitField0_ |= 0x00000004;
              break;
            } // case 72
            case 81: {
              clicks_ = input.readDouble();
              bitField0_ |= 0x00000008;
              break;
            } // case 81
            case 88: {
              costMicros_ = input.readInt64();
              bitField0_ |= 0x00000010;
              break;
            } // case 88
            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 double impressions_ ;
    /**
     * <pre>
     * Impressions
     * </pre>
     *
     * <code>optional double impressions = 7;</code>
     * @return Whether the impressions field is set.
     */
    @java.lang.Override
    public boolean hasImpressions() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     * <pre>
     * Impressions
     * </pre>
     *
     * <code>optional double impressions = 7;</code>
     * @return The impressions.
     */
    @java.lang.Override
    public double getImpressions() {
      return impressions_;
    }
    /**
     * <pre>
     * Impressions
     * </pre>
     *
     * <code>optional double impressions = 7;</code>
     * @param value The impressions to set.
     * @return This builder for chaining.
     */
    public Builder setImpressions(double value) {

      impressions_ = value;
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Impressions
     * </pre>
     *
     * <code>optional double impressions = 7;</code>
     * @return This builder for chaining.
     */
    public Builder clearImpressions() {
      bitField0_ = (bitField0_ & ~0x00000001);
      impressions_ = 0D;
      onChanged();
      return this;
    }

    private double ctr_ ;
    /**
     * <pre>
     * Ctr
     * </pre>
     *
     * <code>optional double ctr = 8;</code>
     * @return Whether the ctr field is set.
     */
    @java.lang.Override
    public boolean hasCtr() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     * <pre>
     * Ctr
     * </pre>
     *
     * <code>optional double ctr = 8;</code>
     * @return The ctr.
     */
    @java.lang.Override
    public double getCtr() {
      return ctr_;
    }
    /**
     * <pre>
     * Ctr
     * </pre>
     *
     * <code>optional double ctr = 8;</code>
     * @param value The ctr to set.
     * @return This builder for chaining.
     */
    public Builder setCtr(double value) {

      ctr_ = value;
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Ctr
     * </pre>
     *
     * <code>optional double ctr = 8;</code>
     * @return This builder for chaining.
     */
    public Builder clearCtr() {
      bitField0_ = (bitField0_ & ~0x00000002);
      ctr_ = 0D;
      onChanged();
      return this;
    }

    private long averageCpc_ ;
    /**
     * <pre>
     * AVG cpc
     * </pre>
     *
     * <code>optional int64 average_cpc = 9;</code>
     * @return Whether the averageCpc field is set.
     */
    @java.lang.Override
    public boolean hasAverageCpc() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     * <pre>
     * AVG cpc
     * </pre>
     *
     * <code>optional int64 average_cpc = 9;</code>
     * @return The averageCpc.
     */
    @java.lang.Override
    public long getAverageCpc() {
      return averageCpc_;
    }
    /**
     * <pre>
     * AVG cpc
     * </pre>
     *
     * <code>optional int64 average_cpc = 9;</code>
     * @param value The averageCpc to set.
     * @return This builder for chaining.
     */
    public Builder setAverageCpc(long value) {

      averageCpc_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * AVG cpc
     * </pre>
     *
     * <code>optional int64 average_cpc = 9;</code>
     * @return This builder for chaining.
     */
    public Builder clearAverageCpc() {
      bitField0_ = (bitField0_ & ~0x00000004);
      averageCpc_ = 0L;
      onChanged();
      return this;
    }

    private double clicks_ ;
    /**
     * <pre>
     * Clicks
     * </pre>
     *
     * <code>optional double clicks = 10;</code>
     * @return Whether the clicks field is set.
     */
    @java.lang.Override
    public boolean hasClicks() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     * <pre>
     * Clicks
     * </pre>
     *
     * <code>optional double clicks = 10;</code>
     * @return The clicks.
     */
    @java.lang.Override
    public double getClicks() {
      return clicks_;
    }
    /**
     * <pre>
     * Clicks
     * </pre>
     *
     * <code>optional double clicks = 10;</code>
     * @param value The clicks to set.
     * @return This builder for chaining.
     */
    public Builder setClicks(double value) {

      clicks_ = value;
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Clicks
     * </pre>
     *
     * <code>optional double clicks = 10;</code>
     * @return This builder for chaining.
     */
    public Builder clearClicks() {
      bitField0_ = (bitField0_ & ~0x00000008);
      clicks_ = 0D;
      onChanged();
      return this;
    }

    private long costMicros_ ;
    /**
     * <pre>
     * Cost
     * </pre>
     *
     * <code>optional int64 cost_micros = 11;</code>
     * @return Whether the costMicros field is set.
     */
    @java.lang.Override
    public boolean hasCostMicros() {
      return ((bitField0_ & 0x00000010) != 0);
    }
    /**
     * <pre>
     * Cost
     * </pre>
     *
     * <code>optional int64 cost_micros = 11;</code>
     * @return The costMicros.
     */
    @java.lang.Override
    public long getCostMicros() {
      return costMicros_;
    }
    /**
     * <pre>
     * Cost
     * </pre>
     *
     * <code>optional int64 cost_micros = 11;</code>
     * @param value The costMicros to set.
     * @return This builder for chaining.
     */
    public Builder setCostMicros(long value) {

      costMicros_ = value;
      bitField0_ |= 0x00000010;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Cost
     * </pre>
     *
     * <code>optional int64 cost_micros = 11;</code>
     * @return This builder for chaining.
     */
    public Builder clearCostMicros() {
      bitField0_ = (bitField0_ & ~0x00000010);
      costMicros_ = 0L;
      onChanged();
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:google.ads.googleads.v13.services.ForecastMetrics)
  }

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

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

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

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

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

}

