/*
 * Copyright 2020 Google LLC
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     https://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: google/cloud/channel/v1/reports_service.proto

package com.google.cloud.channel.v1;

/**
 *
 *
 * <pre>
 * A representation of usage or invoice date ranges.
 * </pre>
 *
 * Protobuf type {@code google.cloud.channel.v1.DateRange}
 */
public final class DateRange extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.DateRange)
    DateRangeOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use DateRange.newBuilder() to construct.
  private DateRange(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private DateRange() {}

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

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.channel.v1.ReportsServiceProto
        .internal_static_google_cloud_channel_v1_DateRange_descriptor;
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.channel.v1.ReportsServiceProto
        .internal_static_google_cloud_channel_v1_DateRange_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.channel.v1.DateRange.class,
            com.google.cloud.channel.v1.DateRange.Builder.class);
  }

  public static final int USAGE_START_DATE_TIME_FIELD_NUMBER = 1;
  private com.google.type.DateTime usageStartDateTime_;
  /**
   *
   *
   * <pre>
   * The earliest usage date time (inclusive).
   * If you use time groupings (daily, weekly, etc), each group uses
   * midnight to midnight (Pacific time). The usage start date is
   * rounded down to include all usage from the specified date. We recommend
   * that clients pass `usage_start_date_time` in Pacific time.
   * </pre>
   *
   * <code>.google.type.DateTime usage_start_date_time = 1;</code>
   *
   * @return Whether the usageStartDateTime field is set.
   */
  @java.lang.Override
  public boolean hasUsageStartDateTime() {
    return usageStartDateTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * The earliest usage date time (inclusive).
   * If you use time groupings (daily, weekly, etc), each group uses
   * midnight to midnight (Pacific time). The usage start date is
   * rounded down to include all usage from the specified date. We recommend
   * that clients pass `usage_start_date_time` in Pacific time.
   * </pre>
   *
   * <code>.google.type.DateTime usage_start_date_time = 1;</code>
   *
   * @return The usageStartDateTime.
   */
  @java.lang.Override
  public com.google.type.DateTime getUsageStartDateTime() {
    return usageStartDateTime_ == null
        ? com.google.type.DateTime.getDefaultInstance()
        : usageStartDateTime_;
  }
  /**
   *
   *
   * <pre>
   * The earliest usage date time (inclusive).
   * If you use time groupings (daily, weekly, etc), each group uses
   * midnight to midnight (Pacific time). The usage start date is
   * rounded down to include all usage from the specified date. We recommend
   * that clients pass `usage_start_date_time` in Pacific time.
   * </pre>
   *
   * <code>.google.type.DateTime usage_start_date_time = 1;</code>
   */
  @java.lang.Override
  public com.google.type.DateTimeOrBuilder getUsageStartDateTimeOrBuilder() {
    return usageStartDateTime_ == null
        ? com.google.type.DateTime.getDefaultInstance()
        : usageStartDateTime_;
  }

  public static final int USAGE_END_DATE_TIME_FIELD_NUMBER = 2;
  private com.google.type.DateTime usageEndDateTime_;
  /**
   *
   *
   * <pre>
   * The latest usage date time (exclusive).
   * If you use time groupings (daily, weekly, etc), each group uses
   * midnight to midnight (Pacific time). The usage end date is
   * rounded down to include all usage from the specified date. We recommend
   * that clients pass `usage_start_date_time` in Pacific time.
   * </pre>
   *
   * <code>.google.type.DateTime usage_end_date_time = 2;</code>
   *
   * @return Whether the usageEndDateTime field is set.
   */
  @java.lang.Override
  public boolean hasUsageEndDateTime() {
    return usageEndDateTime_ != null;
  }
  /**
   *
   *
   * <pre>
   * The latest usage date time (exclusive).
   * If you use time groupings (daily, weekly, etc), each group uses
   * midnight to midnight (Pacific time). The usage end date is
   * rounded down to include all usage from the specified date. We recommend
   * that clients pass `usage_start_date_time` in Pacific time.
   * </pre>
   *
   * <code>.google.type.DateTime usage_end_date_time = 2;</code>
   *
   * @return The usageEndDateTime.
   */
  @java.lang.Override
  public com.google.type.DateTime getUsageEndDateTime() {
    return usageEndDateTime_ == null
        ? com.google.type.DateTime.getDefaultInstance()
        : usageEndDateTime_;
  }
  /**
   *
   *
   * <pre>
   * The latest usage date time (exclusive).
   * If you use time groupings (daily, weekly, etc), each group uses
   * midnight to midnight (Pacific time). The usage end date is
   * rounded down to include all usage from the specified date. We recommend
   * that clients pass `usage_start_date_time` in Pacific time.
   * </pre>
   *
   * <code>.google.type.DateTime usage_end_date_time = 2;</code>
   */
  @java.lang.Override
  public com.google.type.DateTimeOrBuilder getUsageEndDateTimeOrBuilder() {
    return usageEndDateTime_ == null
        ? com.google.type.DateTime.getDefaultInstance()
        : usageEndDateTime_;
  }

  public static final int INVOICE_START_DATE_FIELD_NUMBER = 3;
  private com.google.type.Date invoiceStartDate_;
  /**
   *
   *
   * <pre>
   * The earliest invoice date (inclusive).
   * If your product uses monthly invoices, and this value is not the beginning
   * of a month, this will adjust the date to the first day of the given month.
   * </pre>
   *
   * <code>.google.type.Date invoice_start_date = 3;</code>
   *
   * @return Whether the invoiceStartDate field is set.
   */
  @java.lang.Override
  public boolean hasInvoiceStartDate() {
    return invoiceStartDate_ != null;
  }
  /**
   *
   *
   * <pre>
   * The earliest invoice date (inclusive).
   * If your product uses monthly invoices, and this value is not the beginning
   * of a month, this will adjust the date to the first day of the given month.
   * </pre>
   *
   * <code>.google.type.Date invoice_start_date = 3;</code>
   *
   * @return The invoiceStartDate.
   */
  @java.lang.Override
  public com.google.type.Date getInvoiceStartDate() {
    return invoiceStartDate_ == null
        ? com.google.type.Date.getDefaultInstance()
        : invoiceStartDate_;
  }
  /**
   *
   *
   * <pre>
   * The earliest invoice date (inclusive).
   * If your product uses monthly invoices, and this value is not the beginning
   * of a month, this will adjust the date to the first day of the given month.
   * </pre>
   *
   * <code>.google.type.Date invoice_start_date = 3;</code>
   */
  @java.lang.Override
  public com.google.type.DateOrBuilder getInvoiceStartDateOrBuilder() {
    return invoiceStartDate_ == null
        ? com.google.type.Date.getDefaultInstance()
        : invoiceStartDate_;
  }

  public static final int INVOICE_END_DATE_FIELD_NUMBER = 4;
  private com.google.type.Date invoiceEndDate_;
  /**
   *
   *
   * <pre>
   * The latest invoice date (exclusive).
   * If your product uses monthly invoices, and this value is not the beginning
   * of a month, this will adjust the date to the first day of the following
   * month.
   * </pre>
   *
   * <code>.google.type.Date invoice_end_date = 4;</code>
   *
   * @return Whether the invoiceEndDate field is set.
   */
  @java.lang.Override
  public boolean hasInvoiceEndDate() {
    return invoiceEndDate_ != null;
  }
  /**
   *
   *
   * <pre>
   * The latest invoice date (exclusive).
   * If your product uses monthly invoices, and this value is not the beginning
   * of a month, this will adjust the date to the first day of the following
   * month.
   * </pre>
   *
   * <code>.google.type.Date invoice_end_date = 4;</code>
   *
   * @return The invoiceEndDate.
   */
  @java.lang.Override
  public com.google.type.Date getInvoiceEndDate() {
    return invoiceEndDate_ == null ? com.google.type.Date.getDefaultInstance() : invoiceEndDate_;
  }
  /**
   *
   *
   * <pre>
   * The latest invoice date (exclusive).
   * If your product uses monthly invoices, and this value is not the beginning
   * of a month, this will adjust the date to the first day of the following
   * month.
   * </pre>
   *
   * <code>.google.type.Date invoice_end_date = 4;</code>
   */
  @java.lang.Override
  public com.google.type.DateOrBuilder getInvoiceEndDateOrBuilder() {
    return invoiceEndDate_ == null ? com.google.type.Date.getDefaultInstance() : invoiceEndDate_;
  }

  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 (usageStartDateTime_ != null) {
      output.writeMessage(1, getUsageStartDateTime());
    }
    if (usageEndDateTime_ != null) {
      output.writeMessage(2, getUsageEndDateTime());
    }
    if (invoiceStartDate_ != null) {
      output.writeMessage(3, getInvoiceStartDate());
    }
    if (invoiceEndDate_ != null) {
      output.writeMessage(4, getInvoiceEndDate());
    }
    getUnknownFields().writeTo(output);
  }

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

    size = 0;
    if (usageStartDateTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getUsageStartDateTime());
    }
    if (usageEndDateTime_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getUsageEndDateTime());
    }
    if (invoiceStartDate_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getInvoiceStartDate());
    }
    if (invoiceEndDate_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getInvoiceEndDate());
    }
    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.cloud.channel.v1.DateRange)) {
      return super.equals(obj);
    }
    com.google.cloud.channel.v1.DateRange other = (com.google.cloud.channel.v1.DateRange) obj;

    if (hasUsageStartDateTime() != other.hasUsageStartDateTime()) return false;
    if (hasUsageStartDateTime()) {
      if (!getUsageStartDateTime().equals(other.getUsageStartDateTime())) return false;
    }
    if (hasUsageEndDateTime() != other.hasUsageEndDateTime()) return false;
    if (hasUsageEndDateTime()) {
      if (!getUsageEndDateTime().equals(other.getUsageEndDateTime())) return false;
    }
    if (hasInvoiceStartDate() != other.hasInvoiceStartDate()) return false;
    if (hasInvoiceStartDate()) {
      if (!getInvoiceStartDate().equals(other.getInvoiceStartDate())) return false;
    }
    if (hasInvoiceEndDate() != other.hasInvoiceEndDate()) return false;
    if (hasInvoiceEndDate()) {
      if (!getInvoiceEndDate().equals(other.getInvoiceEndDate())) 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 (hasUsageStartDateTime()) {
      hash = (37 * hash) + USAGE_START_DATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getUsageStartDateTime().hashCode();
    }
    if (hasUsageEndDateTime()) {
      hash = (37 * hash) + USAGE_END_DATE_TIME_FIELD_NUMBER;
      hash = (53 * hash) + getUsageEndDateTime().hashCode();
    }
    if (hasInvoiceStartDate()) {
      hash = (37 * hash) + INVOICE_START_DATE_FIELD_NUMBER;
      hash = (53 * hash) + getInvoiceStartDate().hashCode();
    }
    if (hasInvoiceEndDate()) {
      hash = (37 * hash) + INVOICE_END_DATE_FIELD_NUMBER;
      hash = (53 * hash) + getInvoiceEndDate().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.channel.v1.DateRange parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.channel.v1.DateRange parseFrom(
      java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.channel.v1.DateRange parseFrom(com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.channel.v1.DateRange 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.cloud.channel.v1.DateRange parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.channel.v1.DateRange parseFrom(
      byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data, extensionRegistry);
  }

  public static com.google.cloud.channel.v1.DateRange parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.channel.v1.DateRange 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.cloud.channel.v1.DateRange parseDelimitedFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.channel.v1.DateRange 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.cloud.channel.v1.DateRange parseFrom(
      com.google.protobuf.CodedInputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.channel.v1.DateRange 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.cloud.channel.v1.DateRange 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 representation of usage or invoice date ranges.
   * </pre>
   *
   * Protobuf type {@code google.cloud.channel.v1.DateRange}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.DateRange)
      com.google.cloud.channel.v1.DateRangeOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.channel.v1.ReportsServiceProto
          .internal_static_google_cloud_channel_v1_DateRange_descriptor;
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.channel.v1.ReportsServiceProto
          .internal_static_google_cloud_channel_v1_DateRange_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.channel.v1.DateRange.class,
              com.google.cloud.channel.v1.DateRange.Builder.class);
    }

    // Construct using com.google.cloud.channel.v1.DateRange.newBuilder()
    private Builder() {}

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

    @java.lang.Override
    public Builder clear() {
      super.clear();
      bitField0_ = 0;
      usageStartDateTime_ = null;
      if (usageStartDateTimeBuilder_ != null) {
        usageStartDateTimeBuilder_.dispose();
        usageStartDateTimeBuilder_ = null;
      }
      usageEndDateTime_ = null;
      if (usageEndDateTimeBuilder_ != null) {
        usageEndDateTimeBuilder_.dispose();
        usageEndDateTimeBuilder_ = null;
      }
      invoiceStartDate_ = null;
      if (invoiceStartDateBuilder_ != null) {
        invoiceStartDateBuilder_.dispose();
        invoiceStartDateBuilder_ = null;
      }
      invoiceEndDate_ = null;
      if (invoiceEndDateBuilder_ != null) {
        invoiceEndDateBuilder_.dispose();
        invoiceEndDateBuilder_ = null;
      }
      return this;
    }

    @java.lang.Override
    public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
      return com.google.cloud.channel.v1.ReportsServiceProto
          .internal_static_google_cloud_channel_v1_DateRange_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.channel.v1.DateRange getDefaultInstanceForType() {
      return com.google.cloud.channel.v1.DateRange.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.channel.v1.DateRange build() {
      com.google.cloud.channel.v1.DateRange result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.channel.v1.DateRange buildPartial() {
      com.google.cloud.channel.v1.DateRange result =
          new com.google.cloud.channel.v1.DateRange(this);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartial0(com.google.cloud.channel.v1.DateRange result) {
      int from_bitField0_ = bitField0_;
      if (((from_bitField0_ & 0x00000001) != 0)) {
        result.usageStartDateTime_ =
            usageStartDateTimeBuilder_ == null
                ? usageStartDateTime_
                : usageStartDateTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000002) != 0)) {
        result.usageEndDateTime_ =
            usageEndDateTimeBuilder_ == null ? usageEndDateTime_ : usageEndDateTimeBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000004) != 0)) {
        result.invoiceStartDate_ =
            invoiceStartDateBuilder_ == null ? invoiceStartDate_ : invoiceStartDateBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.invoiceEndDate_ =
            invoiceEndDateBuilder_ == null ? invoiceEndDate_ : invoiceEndDateBuilder_.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.cloud.channel.v1.DateRange) {
        return mergeFrom((com.google.cloud.channel.v1.DateRange) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.channel.v1.DateRange other) {
      if (other == com.google.cloud.channel.v1.DateRange.getDefaultInstance()) return this;
      if (other.hasUsageStartDateTime()) {
        mergeUsageStartDateTime(other.getUsageStartDateTime());
      }
      if (other.hasUsageEndDateTime()) {
        mergeUsageEndDateTime(other.getUsageEndDateTime());
      }
      if (other.hasInvoiceStartDate()) {
        mergeInvoiceStartDate(other.getInvoiceStartDate());
      }
      if (other.hasInvoiceEndDate()) {
        mergeInvoiceEndDate(other.getInvoiceEndDate());
      }
      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(
                    getUsageStartDateTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000001;
                break;
              } // case 10
            case 18:
              {
                input.readMessage(
                    getUsageEndDateTimeFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000002;
                break;
              } // case 18
            case 26:
              {
                input.readMessage(
                    getInvoiceStartDateFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000004;
                break;
              } // case 26
            case 34:
              {
                input.readMessage(getInvoiceEndDateFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000008;
                break;
              } // case 34
            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 com.google.type.DateTime usageStartDateTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.type.DateTime,
            com.google.type.DateTime.Builder,
            com.google.type.DateTimeOrBuilder>
        usageStartDateTimeBuilder_;
    /**
     *
     *
     * <pre>
     * The earliest usage date time (inclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage start date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     * </pre>
     *
     * <code>.google.type.DateTime usage_start_date_time = 1;</code>
     *
     * @return Whether the usageStartDateTime field is set.
     */
    public boolean hasUsageStartDateTime() {
      return ((bitField0_ & 0x00000001) != 0);
    }
    /**
     *
     *
     * <pre>
     * The earliest usage date time (inclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage start date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     * </pre>
     *
     * <code>.google.type.DateTime usage_start_date_time = 1;</code>
     *
     * @return The usageStartDateTime.
     */
    public com.google.type.DateTime getUsageStartDateTime() {
      if (usageStartDateTimeBuilder_ == null) {
        return usageStartDateTime_ == null
            ? com.google.type.DateTime.getDefaultInstance()
            : usageStartDateTime_;
      } else {
        return usageStartDateTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The earliest usage date time (inclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage start date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     * </pre>
     *
     * <code>.google.type.DateTime usage_start_date_time = 1;</code>
     */
    public Builder setUsageStartDateTime(com.google.type.DateTime value) {
      if (usageStartDateTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        usageStartDateTime_ = value;
      } else {
        usageStartDateTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The earliest usage date time (inclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage start date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     * </pre>
     *
     * <code>.google.type.DateTime usage_start_date_time = 1;</code>
     */
    public Builder setUsageStartDateTime(com.google.type.DateTime.Builder builderForValue) {
      if (usageStartDateTimeBuilder_ == null) {
        usageStartDateTime_ = builderForValue.build();
      } else {
        usageStartDateTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The earliest usage date time (inclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage start date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     * </pre>
     *
     * <code>.google.type.DateTime usage_start_date_time = 1;</code>
     */
    public Builder mergeUsageStartDateTime(com.google.type.DateTime value) {
      if (usageStartDateTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000001) != 0)
            && usageStartDateTime_ != null
            && usageStartDateTime_ != com.google.type.DateTime.getDefaultInstance()) {
          getUsageStartDateTimeBuilder().mergeFrom(value);
        } else {
          usageStartDateTime_ = value;
        }
      } else {
        usageStartDateTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000001;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The earliest usage date time (inclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage start date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     * </pre>
     *
     * <code>.google.type.DateTime usage_start_date_time = 1;</code>
     */
    public Builder clearUsageStartDateTime() {
      bitField0_ = (bitField0_ & ~0x00000001);
      usageStartDateTime_ = null;
      if (usageStartDateTimeBuilder_ != null) {
        usageStartDateTimeBuilder_.dispose();
        usageStartDateTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The earliest usage date time (inclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage start date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     * </pre>
     *
     * <code>.google.type.DateTime usage_start_date_time = 1;</code>
     */
    public com.google.type.DateTime.Builder getUsageStartDateTimeBuilder() {
      bitField0_ |= 0x00000001;
      onChanged();
      return getUsageStartDateTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The earliest usage date time (inclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage start date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     * </pre>
     *
     * <code>.google.type.DateTime usage_start_date_time = 1;</code>
     */
    public com.google.type.DateTimeOrBuilder getUsageStartDateTimeOrBuilder() {
      if (usageStartDateTimeBuilder_ != null) {
        return usageStartDateTimeBuilder_.getMessageOrBuilder();
      } else {
        return usageStartDateTime_ == null
            ? com.google.type.DateTime.getDefaultInstance()
            : usageStartDateTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * The earliest usage date time (inclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage start date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     * </pre>
     *
     * <code>.google.type.DateTime usage_start_date_time = 1;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.type.DateTime,
            com.google.type.DateTime.Builder,
            com.google.type.DateTimeOrBuilder>
        getUsageStartDateTimeFieldBuilder() {
      if (usageStartDateTimeBuilder_ == null) {
        usageStartDateTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.type.DateTime,
                com.google.type.DateTime.Builder,
                com.google.type.DateTimeOrBuilder>(
                getUsageStartDateTime(), getParentForChildren(), isClean());
        usageStartDateTime_ = null;
      }
      return usageStartDateTimeBuilder_;
    }

    private com.google.type.DateTime usageEndDateTime_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.type.DateTime,
            com.google.type.DateTime.Builder,
            com.google.type.DateTimeOrBuilder>
        usageEndDateTimeBuilder_;
    /**
     *
     *
     * <pre>
     * The latest usage date time (exclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage end date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     * </pre>
     *
     * <code>.google.type.DateTime usage_end_date_time = 2;</code>
     *
     * @return Whether the usageEndDateTime field is set.
     */
    public boolean hasUsageEndDateTime() {
      return ((bitField0_ & 0x00000002) != 0);
    }
    /**
     *
     *
     * <pre>
     * The latest usage date time (exclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage end date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     * </pre>
     *
     * <code>.google.type.DateTime usage_end_date_time = 2;</code>
     *
     * @return The usageEndDateTime.
     */
    public com.google.type.DateTime getUsageEndDateTime() {
      if (usageEndDateTimeBuilder_ == null) {
        return usageEndDateTime_ == null
            ? com.google.type.DateTime.getDefaultInstance()
            : usageEndDateTime_;
      } else {
        return usageEndDateTimeBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The latest usage date time (exclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage end date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     * </pre>
     *
     * <code>.google.type.DateTime usage_end_date_time = 2;</code>
     */
    public Builder setUsageEndDateTime(com.google.type.DateTime value) {
      if (usageEndDateTimeBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        usageEndDateTime_ = value;
      } else {
        usageEndDateTimeBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The latest usage date time (exclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage end date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     * </pre>
     *
     * <code>.google.type.DateTime usage_end_date_time = 2;</code>
     */
    public Builder setUsageEndDateTime(com.google.type.DateTime.Builder builderForValue) {
      if (usageEndDateTimeBuilder_ == null) {
        usageEndDateTime_ = builderForValue.build();
      } else {
        usageEndDateTimeBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The latest usage date time (exclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage end date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     * </pre>
     *
     * <code>.google.type.DateTime usage_end_date_time = 2;</code>
     */
    public Builder mergeUsageEndDateTime(com.google.type.DateTime value) {
      if (usageEndDateTimeBuilder_ == null) {
        if (((bitField0_ & 0x00000002) != 0)
            && usageEndDateTime_ != null
            && usageEndDateTime_ != com.google.type.DateTime.getDefaultInstance()) {
          getUsageEndDateTimeBuilder().mergeFrom(value);
        } else {
          usageEndDateTime_ = value;
        }
      } else {
        usageEndDateTimeBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000002;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The latest usage date time (exclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage end date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     * </pre>
     *
     * <code>.google.type.DateTime usage_end_date_time = 2;</code>
     */
    public Builder clearUsageEndDateTime() {
      bitField0_ = (bitField0_ & ~0x00000002);
      usageEndDateTime_ = null;
      if (usageEndDateTimeBuilder_ != null) {
        usageEndDateTimeBuilder_.dispose();
        usageEndDateTimeBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The latest usage date time (exclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage end date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     * </pre>
     *
     * <code>.google.type.DateTime usage_end_date_time = 2;</code>
     */
    public com.google.type.DateTime.Builder getUsageEndDateTimeBuilder() {
      bitField0_ |= 0x00000002;
      onChanged();
      return getUsageEndDateTimeFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The latest usage date time (exclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage end date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     * </pre>
     *
     * <code>.google.type.DateTime usage_end_date_time = 2;</code>
     */
    public com.google.type.DateTimeOrBuilder getUsageEndDateTimeOrBuilder() {
      if (usageEndDateTimeBuilder_ != null) {
        return usageEndDateTimeBuilder_.getMessageOrBuilder();
      } else {
        return usageEndDateTime_ == null
            ? com.google.type.DateTime.getDefaultInstance()
            : usageEndDateTime_;
      }
    }
    /**
     *
     *
     * <pre>
     * The latest usage date time (exclusive).
     * If you use time groupings (daily, weekly, etc), each group uses
     * midnight to midnight (Pacific time). The usage end date is
     * rounded down to include all usage from the specified date. We recommend
     * that clients pass `usage_start_date_time` in Pacific time.
     * </pre>
     *
     * <code>.google.type.DateTime usage_end_date_time = 2;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.type.DateTime,
            com.google.type.DateTime.Builder,
            com.google.type.DateTimeOrBuilder>
        getUsageEndDateTimeFieldBuilder() {
      if (usageEndDateTimeBuilder_ == null) {
        usageEndDateTimeBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.type.DateTime,
                com.google.type.DateTime.Builder,
                com.google.type.DateTimeOrBuilder>(
                getUsageEndDateTime(), getParentForChildren(), isClean());
        usageEndDateTime_ = null;
      }
      return usageEndDateTimeBuilder_;
    }

    private com.google.type.Date invoiceStartDate_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>
        invoiceStartDateBuilder_;
    /**
     *
     *
     * <pre>
     * The earliest invoice date (inclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the given month.
     * </pre>
     *
     * <code>.google.type.Date invoice_start_date = 3;</code>
     *
     * @return Whether the invoiceStartDate field is set.
     */
    public boolean hasInvoiceStartDate() {
      return ((bitField0_ & 0x00000004) != 0);
    }
    /**
     *
     *
     * <pre>
     * The earliest invoice date (inclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the given month.
     * </pre>
     *
     * <code>.google.type.Date invoice_start_date = 3;</code>
     *
     * @return The invoiceStartDate.
     */
    public com.google.type.Date getInvoiceStartDate() {
      if (invoiceStartDateBuilder_ == null) {
        return invoiceStartDate_ == null
            ? com.google.type.Date.getDefaultInstance()
            : invoiceStartDate_;
      } else {
        return invoiceStartDateBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The earliest invoice date (inclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the given month.
     * </pre>
     *
     * <code>.google.type.Date invoice_start_date = 3;</code>
     */
    public Builder setInvoiceStartDate(com.google.type.Date value) {
      if (invoiceStartDateBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        invoiceStartDate_ = value;
      } else {
        invoiceStartDateBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The earliest invoice date (inclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the given month.
     * </pre>
     *
     * <code>.google.type.Date invoice_start_date = 3;</code>
     */
    public Builder setInvoiceStartDate(com.google.type.Date.Builder builderForValue) {
      if (invoiceStartDateBuilder_ == null) {
        invoiceStartDate_ = builderForValue.build();
      } else {
        invoiceStartDateBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The earliest invoice date (inclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the given month.
     * </pre>
     *
     * <code>.google.type.Date invoice_start_date = 3;</code>
     */
    public Builder mergeInvoiceStartDate(com.google.type.Date value) {
      if (invoiceStartDateBuilder_ == null) {
        if (((bitField0_ & 0x00000004) != 0)
            && invoiceStartDate_ != null
            && invoiceStartDate_ != com.google.type.Date.getDefaultInstance()) {
          getInvoiceStartDateBuilder().mergeFrom(value);
        } else {
          invoiceStartDate_ = value;
        }
      } else {
        invoiceStartDateBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The earliest invoice date (inclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the given month.
     * </pre>
     *
     * <code>.google.type.Date invoice_start_date = 3;</code>
     */
    public Builder clearInvoiceStartDate() {
      bitField0_ = (bitField0_ & ~0x00000004);
      invoiceStartDate_ = null;
      if (invoiceStartDateBuilder_ != null) {
        invoiceStartDateBuilder_.dispose();
        invoiceStartDateBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The earliest invoice date (inclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the given month.
     * </pre>
     *
     * <code>.google.type.Date invoice_start_date = 3;</code>
     */
    public com.google.type.Date.Builder getInvoiceStartDateBuilder() {
      bitField0_ |= 0x00000004;
      onChanged();
      return getInvoiceStartDateFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The earliest invoice date (inclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the given month.
     * </pre>
     *
     * <code>.google.type.Date invoice_start_date = 3;</code>
     */
    public com.google.type.DateOrBuilder getInvoiceStartDateOrBuilder() {
      if (invoiceStartDateBuilder_ != null) {
        return invoiceStartDateBuilder_.getMessageOrBuilder();
      } else {
        return invoiceStartDate_ == null
            ? com.google.type.Date.getDefaultInstance()
            : invoiceStartDate_;
      }
    }
    /**
     *
     *
     * <pre>
     * The earliest invoice date (inclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the given month.
     * </pre>
     *
     * <code>.google.type.Date invoice_start_date = 3;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>
        getInvoiceStartDateFieldBuilder() {
      if (invoiceStartDateBuilder_ == null) {
        invoiceStartDateBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>(
                getInvoiceStartDate(), getParentForChildren(), isClean());
        invoiceStartDate_ = null;
      }
      return invoiceStartDateBuilder_;
    }

    private com.google.type.Date invoiceEndDate_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>
        invoiceEndDateBuilder_;
    /**
     *
     *
     * <pre>
     * The latest invoice date (exclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the following
     * month.
     * </pre>
     *
     * <code>.google.type.Date invoice_end_date = 4;</code>
     *
     * @return Whether the invoiceEndDate field is set.
     */
    public boolean hasInvoiceEndDate() {
      return ((bitField0_ & 0x00000008) != 0);
    }
    /**
     *
     *
     * <pre>
     * The latest invoice date (exclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the following
     * month.
     * </pre>
     *
     * <code>.google.type.Date invoice_end_date = 4;</code>
     *
     * @return The invoiceEndDate.
     */
    public com.google.type.Date getInvoiceEndDate() {
      if (invoiceEndDateBuilder_ == null) {
        return invoiceEndDate_ == null
            ? com.google.type.Date.getDefaultInstance()
            : invoiceEndDate_;
      } else {
        return invoiceEndDateBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The latest invoice date (exclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the following
     * month.
     * </pre>
     *
     * <code>.google.type.Date invoice_end_date = 4;</code>
     */
    public Builder setInvoiceEndDate(com.google.type.Date value) {
      if (invoiceEndDateBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        invoiceEndDate_ = value;
      } else {
        invoiceEndDateBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The latest invoice date (exclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the following
     * month.
     * </pre>
     *
     * <code>.google.type.Date invoice_end_date = 4;</code>
     */
    public Builder setInvoiceEndDate(com.google.type.Date.Builder builderForValue) {
      if (invoiceEndDateBuilder_ == null) {
        invoiceEndDate_ = builderForValue.build();
      } else {
        invoiceEndDateBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The latest invoice date (exclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the following
     * month.
     * </pre>
     *
     * <code>.google.type.Date invoice_end_date = 4;</code>
     */
    public Builder mergeInvoiceEndDate(com.google.type.Date value) {
      if (invoiceEndDateBuilder_ == null) {
        if (((bitField0_ & 0x00000008) != 0)
            && invoiceEndDate_ != null
            && invoiceEndDate_ != com.google.type.Date.getDefaultInstance()) {
          getInvoiceEndDateBuilder().mergeFrom(value);
        } else {
          invoiceEndDate_ = value;
        }
      } else {
        invoiceEndDateBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The latest invoice date (exclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the following
     * month.
     * </pre>
     *
     * <code>.google.type.Date invoice_end_date = 4;</code>
     */
    public Builder clearInvoiceEndDate() {
      bitField0_ = (bitField0_ & ~0x00000008);
      invoiceEndDate_ = null;
      if (invoiceEndDateBuilder_ != null) {
        invoiceEndDateBuilder_.dispose();
        invoiceEndDateBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The latest invoice date (exclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the following
     * month.
     * </pre>
     *
     * <code>.google.type.Date invoice_end_date = 4;</code>
     */
    public com.google.type.Date.Builder getInvoiceEndDateBuilder() {
      bitField0_ |= 0x00000008;
      onChanged();
      return getInvoiceEndDateFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The latest invoice date (exclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the following
     * month.
     * </pre>
     *
     * <code>.google.type.Date invoice_end_date = 4;</code>
     */
    public com.google.type.DateOrBuilder getInvoiceEndDateOrBuilder() {
      if (invoiceEndDateBuilder_ != null) {
        return invoiceEndDateBuilder_.getMessageOrBuilder();
      } else {
        return invoiceEndDate_ == null
            ? com.google.type.Date.getDefaultInstance()
            : invoiceEndDate_;
      }
    }
    /**
     *
     *
     * <pre>
     * The latest invoice date (exclusive).
     * If your product uses monthly invoices, and this value is not the beginning
     * of a month, this will adjust the date to the first day of the following
     * month.
     * </pre>
     *
     * <code>.google.type.Date invoice_end_date = 4;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>
        getInvoiceEndDateFieldBuilder() {
      if (invoiceEndDateBuilder_ == null) {
        invoiceEndDateBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.type.Date, com.google.type.Date.Builder, com.google.type.DateOrBuilder>(
                getInvoiceEndDate(), getParentForChildren(), isClean());
        invoiceEndDate_ = null;
      }
      return invoiceEndDateBuilder_;
    }

    @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.cloud.channel.v1.DateRange)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.DateRange)
  private static final com.google.cloud.channel.v1.DateRange DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.channel.v1.DateRange();
  }

  public static com.google.cloud.channel.v1.DateRange getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

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

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

  @java.lang.Override
  public com.google.cloud.channel.v1.DateRange getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
