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

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

/**
 * <pre>
 * A single price offering within a PriceAsset.
 * </pre>
 *
 * Protobuf type {@code google.ads.googleads.v9.common.PriceOffering}
 */
public final class PriceOffering extends
    com.google.protobuf.GeneratedMessageV3 implements
    // @@protoc_insertion_point(message_implements:google.ads.googleads.v9.common.PriceOffering)
    PriceOfferingOrBuilder {
private static final long serialVersionUID = 0L;
  // Use PriceOffering.newBuilder() to construct.
  private PriceOffering(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }
  private PriceOffering() {
    header_ = "";
    description_ = "";
    unit_ = 0;
    finalUrl_ = "";
    finalMobileUrl_ = "";
  }

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet
  getUnknownFields() {
    return this.unknownFields;
  }
  private PriceOffering(
      com.google.protobuf.CodedInputStream input,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    this();
    if (extensionRegistry == null) {
      throw new java.lang.NullPointerException();
    }
    com.google.protobuf.UnknownFieldSet.Builder unknownFields =
        com.google.protobuf.UnknownFieldSet.newBuilder();
    try {
      boolean done = false;
      while (!done) {
        int tag = input.readTag();
        switch (tag) {
          case 0:
            done = true;
            break;
          case 10: {
            java.lang.String s = input.readStringRequireUtf8();

            header_ = s;
            break;
          }
          case 18: {
            java.lang.String s = input.readStringRequireUtf8();

            description_ = s;
            break;
          }
          case 26: {
            com.google.ads.googleads.v9.common.Money.Builder subBuilder = null;
            if (price_ != null) {
              subBuilder = price_.toBuilder();
            }
            price_ = input.readMessage(com.google.ads.googleads.v9.common.Money.parser(), extensionRegistry);
            if (subBuilder != null) {
              subBuilder.mergeFrom(price_);
              price_ = subBuilder.buildPartial();
            }

            break;
          }
          case 32: {
            int rawValue = input.readEnum();

            unit_ = rawValue;
            break;
          }
          case 42: {
            java.lang.String s = input.readStringRequireUtf8();

            finalUrl_ = s;
            break;
          }
          case 50: {
            java.lang.String s = input.readStringRequireUtf8();

            finalMobileUrl_ = s;
            break;
          }
          default: {
            if (!parseUnknownField(
                input, unknownFields, extensionRegistry, tag)) {
              done = true;
            }
            break;
          }
        }
      }
    } catch (com.google.protobuf.InvalidProtocolBufferException e) {
      throw e.setUnfinishedMessage(this);
    } catch (java.io.IOException e) {
      throw new com.google.protobuf.InvalidProtocolBufferException(
          e).setUnfinishedMessage(this);
    } finally {
      this.unknownFields = unknownFields.build();
      makeExtensionsImmutable();
    }
  }
  public static final com.google.protobuf.Descriptors.Descriptor
      getDescriptor() {
    return com.google.ads.googleads.v9.common.AssetTypesProto.internal_static_google_ads_googleads_v9_common_PriceOffering_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.ads.googleads.v9.common.AssetTypesProto.internal_static_google_ads_googleads_v9_common_PriceOffering_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.ads.googleads.v9.common.PriceOffering.class, com.google.ads.googleads.v9.common.PriceOffering.Builder.class);
  }

  public static final int HEADER_FIELD_NUMBER = 1;
  private volatile java.lang.Object header_;
  /**
   * <pre>
   * Required. The header of the price offering.
   * The length of this string should be between 1 and 25, inclusive.
   * </pre>
   *
   * <code>string header = 1 [(.google.api.field_behavior) = REQUIRED];</code>
   * @return The header.
   */
  @java.lang.Override
  public java.lang.String getHeader() {
    java.lang.Object ref = header_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      header_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Required. The header of the price offering.
   * The length of this string should be between 1 and 25, inclusive.
   * </pre>
   *
   * <code>string header = 1 [(.google.api.field_behavior) = REQUIRED];</code>
   * @return The bytes for header.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getHeaderBytes() {
    java.lang.Object ref = header_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      header_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int DESCRIPTION_FIELD_NUMBER = 2;
  private volatile java.lang.Object description_;
  /**
   * <pre>
   * Required. The description of the price offering.
   * The length of this string should be between 1 and 25, inclusive.
   * </pre>
   *
   * <code>string description = 2 [(.google.api.field_behavior) = REQUIRED];</code>
   * @return The description.
   */
  @java.lang.Override
  public java.lang.String getDescription() {
    java.lang.Object ref = description_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      description_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Required. The description of the price offering.
   * The length of this string should be between 1 and 25, inclusive.
   * </pre>
   *
   * <code>string description = 2 [(.google.api.field_behavior) = REQUIRED];</code>
   * @return The bytes for description.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getDescriptionBytes() {
    java.lang.Object ref = description_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      description_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int PRICE_FIELD_NUMBER = 3;
  private com.google.ads.googleads.v9.common.Money price_;
  /**
   * <pre>
   * Required. The price value of the price offering.
   * </pre>
   *
   * <code>.google.ads.googleads.v9.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];</code>
   * @return Whether the price field is set.
   */
  @java.lang.Override
  public boolean hasPrice() {
    return price_ != null;
  }
  /**
   * <pre>
   * Required. The price value of the price offering.
   * </pre>
   *
   * <code>.google.ads.googleads.v9.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];</code>
   * @return The price.
   */
  @java.lang.Override
  public com.google.ads.googleads.v9.common.Money getPrice() {
    return price_ == null ? com.google.ads.googleads.v9.common.Money.getDefaultInstance() : price_;
  }
  /**
   * <pre>
   * Required. The price value of the price offering.
   * </pre>
   *
   * <code>.google.ads.googleads.v9.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];</code>
   */
  @java.lang.Override
  public com.google.ads.googleads.v9.common.MoneyOrBuilder getPriceOrBuilder() {
    return getPrice();
  }

  public static final int UNIT_FIELD_NUMBER = 4;
  private int unit_;
  /**
   * <pre>
   * The price unit of the price offering.
   * </pre>
   *
   * <code>.google.ads.googleads.v9.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;</code>
   * @return The enum numeric value on the wire for unit.
   */
  @java.lang.Override public int getUnitValue() {
    return unit_;
  }
  /**
   * <pre>
   * The price unit of the price offering.
   * </pre>
   *
   * <code>.google.ads.googleads.v9.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;</code>
   * @return The unit.
   */
  @java.lang.Override public com.google.ads.googleads.v9.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit getUnit() {
    @SuppressWarnings("deprecation")
    com.google.ads.googleads.v9.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit result = com.google.ads.googleads.v9.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit.valueOf(unit_);
    return result == null ? com.google.ads.googleads.v9.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit.UNRECOGNIZED : result;
  }

  public static final int FINAL_URL_FIELD_NUMBER = 5;
  private volatile java.lang.Object finalUrl_;
  /**
   * <pre>
   * Required. The final URL after all cross domain redirects.
   * </pre>
   *
   * <code>string final_url = 5 [(.google.api.field_behavior) = REQUIRED];</code>
   * @return The finalUrl.
   */
  @java.lang.Override
  public java.lang.String getFinalUrl() {
    java.lang.Object ref = finalUrl_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      finalUrl_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * Required. The final URL after all cross domain redirects.
   * </pre>
   *
   * <code>string final_url = 5 [(.google.api.field_behavior) = REQUIRED];</code>
   * @return The bytes for finalUrl.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getFinalUrlBytes() {
    java.lang.Object ref = finalUrl_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      finalUrl_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int FINAL_MOBILE_URL_FIELD_NUMBER = 6;
  private volatile java.lang.Object finalMobileUrl_;
  /**
   * <pre>
   * The final mobile URL after all cross domain redirects.
   * </pre>
   *
   * <code>string final_mobile_url = 6;</code>
   * @return The finalMobileUrl.
   */
  @java.lang.Override
  public java.lang.String getFinalMobileUrl() {
    java.lang.Object ref = finalMobileUrl_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      finalMobileUrl_ = s;
      return s;
    }
  }
  /**
   * <pre>
   * The final mobile URL after all cross domain redirects.
   * </pre>
   *
   * <code>string final_mobile_url = 6;</code>
   * @return The bytes for finalMobileUrl.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString
      getFinalMobileUrlBytes() {
    java.lang.Object ref = finalMobileUrl_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      finalMobileUrl_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

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

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output)
                      throws java.io.IOException {
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(header_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 1, header_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_);
    }
    if (price_ != null) {
      output.writeMessage(3, getPrice());
    }
    if (unit_ != com.google.ads.googleads.v9.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit.UNSPECIFIED.getNumber()) {
      output.writeEnum(4, unit_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(finalUrl_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, finalUrl_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(finalMobileUrl_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 6, finalMobileUrl_);
    }
    unknownFields.writeTo(output);
  }

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

    size = 0;
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(header_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, header_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_);
    }
    if (price_ != null) {
      size += com.google.protobuf.CodedOutputStream
        .computeMessageSize(3, getPrice());
    }
    if (unit_ != com.google.ads.googleads.v9.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit.UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream
        .computeEnumSize(4, unit_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(finalUrl_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, finalUrl_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(finalMobileUrl_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, finalMobileUrl_);
    }
    size += unknownFields.getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
     return true;
    }
    if (!(obj instanceof com.google.ads.googleads.v9.common.PriceOffering)) {
      return super.equals(obj);
    }
    com.google.ads.googleads.v9.common.PriceOffering other = (com.google.ads.googleads.v9.common.PriceOffering) obj;

    if (!getHeader()
        .equals(other.getHeader())) return false;
    if (!getDescription()
        .equals(other.getDescription())) return false;
    if (hasPrice() != other.hasPrice()) return false;
    if (hasPrice()) {
      if (!getPrice()
          .equals(other.getPrice())) return false;
    }
    if (unit_ != other.unit_) return false;
    if (!getFinalUrl()
        .equals(other.getFinalUrl())) return false;
    if (!getFinalMobileUrl()
        .equals(other.getFinalMobileUrl())) return false;
    if (!unknownFields.equals(other.unknownFields)) return false;
    return true;
  }

  @java.lang.Override
  public int hashCode() {
    if (memoizedHashCode != 0) {
      return memoizedHashCode;
    }
    int hash = 41;
    hash = (19 * hash) + getDescriptor().hashCode();
    hash = (37 * hash) + HEADER_FIELD_NUMBER;
    hash = (53 * hash) + getHeader().hashCode();
    hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
    hash = (53 * hash) + getDescription().hashCode();
    if (hasPrice()) {
      hash = (37 * hash) + PRICE_FIELD_NUMBER;
      hash = (53 * hash) + getPrice().hashCode();
    }
    hash = (37 * hash) + UNIT_FIELD_NUMBER;
    hash = (53 * hash) + unit_;
    hash = (37 * hash) + FINAL_URL_FIELD_NUMBER;
    hash = (53 * hash) + getFinalUrl().hashCode();
    hash = (37 * hash) + FINAL_MOBILE_URL_FIELD_NUMBER;
    hash = (53 * hash) + getFinalMobileUrl().hashCode();
    hash = (29 * hash) + unknownFields.hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.ads.googleads.v9.common.PriceOffering parseFrom(
      java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.ads.googleads.v9.common.PriceOffering 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.v9.common.PriceOffering parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.ads.googleads.v9.common.PriceOffering 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.v9.common.PriceOffering parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }
  public static com.google.ads.googleads.v9.common.PriceOffering parseFrom(
      byte[] data,
      com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }
  public static com.google.ads.googleads.v9.common.PriceOffering parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.ads.googleads.v9.common.PriceOffering 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.v9.common.PriceOffering parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseDelimitedWithIOException(PARSER, input);
  }
  public static com.google.ads.googleads.v9.common.PriceOffering 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.v9.common.PriceOffering parseFrom(
      com.google.protobuf.CodedInputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3
        .parseWithIOException(PARSER, input);
  }
  public static com.google.ads.googleads.v9.common.PriceOffering 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.v9.common.PriceOffering 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>
   * A single price offering within a PriceAsset.
   * </pre>
   *
   * Protobuf type {@code google.ads.googleads.v9.common.PriceOffering}
   */
  public static final class Builder extends
      com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
      // @@protoc_insertion_point(builder_implements:google.ads.googleads.v9.common.PriceOffering)
      com.google.ads.googleads.v9.common.PriceOfferingOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor
        getDescriptor() {
      return com.google.ads.googleads.v9.common.AssetTypesProto.internal_static_google_ads_googleads_v9_common_PriceOffering_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.ads.googleads.v9.common.AssetTypesProto.internal_static_google_ads_googleads_v9_common_PriceOffering_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.ads.googleads.v9.common.PriceOffering.class, com.google.ads.googleads.v9.common.PriceOffering.Builder.class);
    }

    // Construct using com.google.ads.googleads.v9.common.PriceOffering.newBuilder()
    private Builder() {
      maybeForceBuilderInitialization();
    }

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

      description_ = "";

      if (priceBuilder_ == null) {
        price_ = null;
      } else {
        price_ = null;
        priceBuilder_ = null;
      }
      unit_ = 0;

      finalUrl_ = "";

      finalMobileUrl_ = "";

      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor
        getDescriptorForType() {
      return com.google.ads.googleads.v9.common.AssetTypesProto.internal_static_google_ads_googleads_v9_common_PriceOffering_descriptor;
    }

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

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

    @java.lang.Override
    public com.google.ads.googleads.v9.common.PriceOffering buildPartial() {
      com.google.ads.googleads.v9.common.PriceOffering result = new com.google.ads.googleads.v9.common.PriceOffering(this);
      result.header_ = header_;
      result.description_ = description_;
      if (priceBuilder_ == null) {
        result.price_ = price_;
      } else {
        result.price_ = priceBuilder_.build();
      }
      result.unit_ = unit_;
      result.finalUrl_ = finalUrl_;
      result.finalMobileUrl_ = finalMobileUrl_;
      onBuilt();
      return result;
    }

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

    public Builder mergeFrom(com.google.ads.googleads.v9.common.PriceOffering other) {
      if (other == com.google.ads.googleads.v9.common.PriceOffering.getDefaultInstance()) return this;
      if (!other.getHeader().isEmpty()) {
        header_ = other.header_;
        onChanged();
      }
      if (!other.getDescription().isEmpty()) {
        description_ = other.description_;
        onChanged();
      }
      if (other.hasPrice()) {
        mergePrice(other.getPrice());
      }
      if (other.unit_ != 0) {
        setUnitValue(other.getUnitValue());
      }
      if (!other.getFinalUrl().isEmpty()) {
        finalUrl_ = other.finalUrl_;
        onChanged();
      }
      if (!other.getFinalMobileUrl().isEmpty()) {
        finalMobileUrl_ = other.finalMobileUrl_;
        onChanged();
      }
      this.mergeUnknownFields(other.unknownFields);
      onChanged();
      return this;
    }

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

    @java.lang.Override
    public Builder mergeFrom(
        com.google.protobuf.CodedInputStream input,
        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
        throws java.io.IOException {
      com.google.ads.googleads.v9.common.PriceOffering parsedMessage = null;
      try {
        parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
        parsedMessage = (com.google.ads.googleads.v9.common.PriceOffering) e.getUnfinishedMessage();
        throw e.unwrapIOException();
      } finally {
        if (parsedMessage != null) {
          mergeFrom(parsedMessage);
        }
      }
      return this;
    }

    private java.lang.Object header_ = "";
    /**
     * <pre>
     * Required. The header of the price offering.
     * The length of this string should be between 1 and 25, inclusive.
     * </pre>
     *
     * <code>string header = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return The header.
     */
    public java.lang.String getHeader() {
      java.lang.Object ref = header_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        header_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Required. The header of the price offering.
     * The length of this string should be between 1 and 25, inclusive.
     * </pre>
     *
     * <code>string header = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return The bytes for header.
     */
    public com.google.protobuf.ByteString
        getHeaderBytes() {
      java.lang.Object ref = header_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        header_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Required. The header of the price offering.
     * The length of this string should be between 1 and 25, inclusive.
     * </pre>
     *
     * <code>string header = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param value The header to set.
     * @return This builder for chaining.
     */
    public Builder setHeader(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      header_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Required. The header of the price offering.
     * The length of this string should be between 1 and 25, inclusive.
     * </pre>
     *
     * <code>string header = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return This builder for chaining.
     */
    public Builder clearHeader() {
      
      header_ = getDefaultInstance().getHeader();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Required. The header of the price offering.
     * The length of this string should be between 1 and 25, inclusive.
     * </pre>
     *
     * <code>string header = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param value The bytes for header to set.
     * @return This builder for chaining.
     */
    public Builder setHeaderBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      header_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object description_ = "";
    /**
     * <pre>
     * Required. The description of the price offering.
     * The length of this string should be between 1 and 25, inclusive.
     * </pre>
     *
     * <code>string description = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return The description.
     */
    public java.lang.String getDescription() {
      java.lang.Object ref = description_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        description_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Required. The description of the price offering.
     * The length of this string should be between 1 and 25, inclusive.
     * </pre>
     *
     * <code>string description = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return The bytes for description.
     */
    public com.google.protobuf.ByteString
        getDescriptionBytes() {
      java.lang.Object ref = description_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        description_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Required. The description of the price offering.
     * The length of this string should be between 1 and 25, inclusive.
     * </pre>
     *
     * <code>string description = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param value The description to set.
     * @return This builder for chaining.
     */
    public Builder setDescription(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      description_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Required. The description of the price offering.
     * The length of this string should be between 1 and 25, inclusive.
     * </pre>
     *
     * <code>string description = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return This builder for chaining.
     */
    public Builder clearDescription() {
      
      description_ = getDefaultInstance().getDescription();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Required. The description of the price offering.
     * The length of this string should be between 1 and 25, inclusive.
     * </pre>
     *
     * <code>string description = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param value The bytes for description to set.
     * @return This builder for chaining.
     */
    public Builder setDescriptionBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      description_ = value;
      onChanged();
      return this;
    }

    private com.google.ads.googleads.v9.common.Money price_;
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v9.common.Money, com.google.ads.googleads.v9.common.Money.Builder, com.google.ads.googleads.v9.common.MoneyOrBuilder> priceBuilder_;
    /**
     * <pre>
     * Required. The price value of the price offering.
     * </pre>
     *
     * <code>.google.ads.googleads.v9.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return Whether the price field is set.
     */
    public boolean hasPrice() {
      return priceBuilder_ != null || price_ != null;
    }
    /**
     * <pre>
     * Required. The price value of the price offering.
     * </pre>
     *
     * <code>.google.ads.googleads.v9.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return The price.
     */
    public com.google.ads.googleads.v9.common.Money getPrice() {
      if (priceBuilder_ == null) {
        return price_ == null ? com.google.ads.googleads.v9.common.Money.getDefaultInstance() : price_;
      } else {
        return priceBuilder_.getMessage();
      }
    }
    /**
     * <pre>
     * Required. The price value of the price offering.
     * </pre>
     *
     * <code>.google.ads.googleads.v9.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder setPrice(com.google.ads.googleads.v9.common.Money value) {
      if (priceBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        price_ = value;
        onChanged();
      } else {
        priceBuilder_.setMessage(value);
      }

      return this;
    }
    /**
     * <pre>
     * Required. The price value of the price offering.
     * </pre>
     *
     * <code>.google.ads.googleads.v9.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder setPrice(
        com.google.ads.googleads.v9.common.Money.Builder builderForValue) {
      if (priceBuilder_ == null) {
        price_ = builderForValue.build();
        onChanged();
      } else {
        priceBuilder_.setMessage(builderForValue.build());
      }

      return this;
    }
    /**
     * <pre>
     * Required. The price value of the price offering.
     * </pre>
     *
     * <code>.google.ads.googleads.v9.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder mergePrice(com.google.ads.googleads.v9.common.Money value) {
      if (priceBuilder_ == null) {
        if (price_ != null) {
          price_ =
            com.google.ads.googleads.v9.common.Money.newBuilder(price_).mergeFrom(value).buildPartial();
        } else {
          price_ = value;
        }
        onChanged();
      } else {
        priceBuilder_.mergeFrom(value);
      }

      return this;
    }
    /**
     * <pre>
     * Required. The price value of the price offering.
     * </pre>
     *
     * <code>.google.ads.googleads.v9.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public Builder clearPrice() {
      if (priceBuilder_ == null) {
        price_ = null;
        onChanged();
      } else {
        price_ = null;
        priceBuilder_ = null;
      }

      return this;
    }
    /**
     * <pre>
     * Required. The price value of the price offering.
     * </pre>
     *
     * <code>.google.ads.googleads.v9.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public com.google.ads.googleads.v9.common.Money.Builder getPriceBuilder() {
      
      onChanged();
      return getPriceFieldBuilder().getBuilder();
    }
    /**
     * <pre>
     * Required. The price value of the price offering.
     * </pre>
     *
     * <code>.google.ads.googleads.v9.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    public com.google.ads.googleads.v9.common.MoneyOrBuilder getPriceOrBuilder() {
      if (priceBuilder_ != null) {
        return priceBuilder_.getMessageOrBuilder();
      } else {
        return price_ == null ?
            com.google.ads.googleads.v9.common.Money.getDefaultInstance() : price_;
      }
    }
    /**
     * <pre>
     * Required. The price value of the price offering.
     * </pre>
     *
     * <code>.google.ads.googleads.v9.common.Money price = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
        com.google.ads.googleads.v9.common.Money, com.google.ads.googleads.v9.common.Money.Builder, com.google.ads.googleads.v9.common.MoneyOrBuilder> 
        getPriceFieldBuilder() {
      if (priceBuilder_ == null) {
        priceBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
            com.google.ads.googleads.v9.common.Money, com.google.ads.googleads.v9.common.Money.Builder, com.google.ads.googleads.v9.common.MoneyOrBuilder>(
                getPrice(),
                getParentForChildren(),
                isClean());
        price_ = null;
      }
      return priceBuilder_;
    }

    private int unit_ = 0;
    /**
     * <pre>
     * The price unit of the price offering.
     * </pre>
     *
     * <code>.google.ads.googleads.v9.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;</code>
     * @return The enum numeric value on the wire for unit.
     */
    @java.lang.Override public int getUnitValue() {
      return unit_;
    }
    /**
     * <pre>
     * The price unit of the price offering.
     * </pre>
     *
     * <code>.google.ads.googleads.v9.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;</code>
     * @param value The enum numeric value on the wire for unit to set.
     * @return This builder for chaining.
     */
    public Builder setUnitValue(int value) {
      
      unit_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The price unit of the price offering.
     * </pre>
     *
     * <code>.google.ads.googleads.v9.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;</code>
     * @return The unit.
     */
    @java.lang.Override
    public com.google.ads.googleads.v9.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit getUnit() {
      @SuppressWarnings("deprecation")
      com.google.ads.googleads.v9.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit result = com.google.ads.googleads.v9.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit.valueOf(unit_);
      return result == null ? com.google.ads.googleads.v9.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit.UNRECOGNIZED : result;
    }
    /**
     * <pre>
     * The price unit of the price offering.
     * </pre>
     *
     * <code>.google.ads.googleads.v9.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;</code>
     * @param value The unit to set.
     * @return This builder for chaining.
     */
    public Builder setUnit(com.google.ads.googleads.v9.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit value) {
      if (value == null) {
        throw new NullPointerException();
      }
      
      unit_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The price unit of the price offering.
     * </pre>
     *
     * <code>.google.ads.googleads.v9.enums.PriceExtensionPriceUnitEnum.PriceExtensionPriceUnit unit = 4;</code>
     * @return This builder for chaining.
     */
    public Builder clearUnit() {
      
      unit_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object finalUrl_ = "";
    /**
     * <pre>
     * Required. The final URL after all cross domain redirects.
     * </pre>
     *
     * <code>string final_url = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return The finalUrl.
     */
    public java.lang.String getFinalUrl() {
      java.lang.Object ref = finalUrl_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        finalUrl_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * Required. The final URL after all cross domain redirects.
     * </pre>
     *
     * <code>string final_url = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return The bytes for finalUrl.
     */
    public com.google.protobuf.ByteString
        getFinalUrlBytes() {
      java.lang.Object ref = finalUrl_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        finalUrl_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * Required. The final URL after all cross domain redirects.
     * </pre>
     *
     * <code>string final_url = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param value The finalUrl to set.
     * @return This builder for chaining.
     */
    public Builder setFinalUrl(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      finalUrl_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Required. The final URL after all cross domain redirects.
     * </pre>
     *
     * <code>string final_url = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return This builder for chaining.
     */
    public Builder clearFinalUrl() {
      
      finalUrl_ = getDefaultInstance().getFinalUrl();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * Required. The final URL after all cross domain redirects.
     * </pre>
     *
     * <code>string final_url = 5 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param value The bytes for finalUrl to set.
     * @return This builder for chaining.
     */
    public Builder setFinalUrlBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      finalUrl_ = value;
      onChanged();
      return this;
    }

    private java.lang.Object finalMobileUrl_ = "";
    /**
     * <pre>
     * The final mobile URL after all cross domain redirects.
     * </pre>
     *
     * <code>string final_mobile_url = 6;</code>
     * @return The finalMobileUrl.
     */
    public java.lang.String getFinalMobileUrl() {
      java.lang.Object ref = finalMobileUrl_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs =
            (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        finalMobileUrl_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     * <pre>
     * The final mobile URL after all cross domain redirects.
     * </pre>
     *
     * <code>string final_mobile_url = 6;</code>
     * @return The bytes for finalMobileUrl.
     */
    public com.google.protobuf.ByteString
        getFinalMobileUrlBytes() {
      java.lang.Object ref = finalMobileUrl_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b = 
            com.google.protobuf.ByteString.copyFromUtf8(
                (java.lang.String) ref);
        finalMobileUrl_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     * <pre>
     * The final mobile URL after all cross domain redirects.
     * </pre>
     *
     * <code>string final_mobile_url = 6;</code>
     * @param value The finalMobileUrl to set.
     * @return This builder for chaining.
     */
    public Builder setFinalMobileUrl(
        java.lang.String value) {
      if (value == null) {
    throw new NullPointerException();
  }
  
      finalMobileUrl_ = value;
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The final mobile URL after all cross domain redirects.
     * </pre>
     *
     * <code>string final_mobile_url = 6;</code>
     * @return This builder for chaining.
     */
    public Builder clearFinalMobileUrl() {
      
      finalMobileUrl_ = getDefaultInstance().getFinalMobileUrl();
      onChanged();
      return this;
    }
    /**
     * <pre>
     * The final mobile URL after all cross domain redirects.
     * </pre>
     *
     * <code>string final_mobile_url = 6;</code>
     * @param value The bytes for finalMobileUrl to set.
     * @return This builder for chaining.
     */
    public Builder setFinalMobileUrlBytes(
        com.google.protobuf.ByteString value) {
      if (value == null) {
    throw new NullPointerException();
  }
  checkByteStringIsUtf8(value);
      
      finalMobileUrl_ = value;
      onChanged();
      return this;
    }
    @java.lang.Override
    public final Builder setUnknownFields(
        final com.google.protobuf.UnknownFieldSet unknownFields) {
      return super.setUnknownFields(unknownFields);
    }

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


    // @@protoc_insertion_point(builder_scope:google.ads.googleads.v9.common.PriceOffering)
  }

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

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

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

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

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

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

}

