/*
 * 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
 *
 * http://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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.cloudbilling.v1beta.model;

/**
 * A SKU price consisting of tiered rates.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Cloud Billing API. For a detailed explanation see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class Rate extends com.google.api.client.json.GenericJson {

  /**
   * The service tiers.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<RateTier> tiers;

  /**
   * The SKU's pricing unit. For example, if the tier price is $1 per 1000000 Bytes, then this field
   * will show 'By'. The `start_amount` field in each tier will be in this unit.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String unit;

  /**
   * The SKU's count for the pricing unit. For example, if the tier price is $1 per 1000000 Bytes,
   * then this column will show 1000000.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Double unitCount;

  /**
   * The service tiers.
   * @return value or {@code null} for none
   */
  public java.util.List<RateTier> getTiers() {
    return tiers;
  }

  /**
   * The service tiers.
   * @param tiers tiers or {@code null} for none
   */
  public Rate setTiers(java.util.List<RateTier> tiers) {
    this.tiers = tiers;
    return this;
  }

  /**
   * The SKU's pricing unit. For example, if the tier price is $1 per 1000000 Bytes, then this field
   * will show 'By'. The `start_amount` field in each tier will be in this unit.
   * @return value or {@code null} for none
   */
  public java.lang.String getUnit() {
    return unit;
  }

  /**
   * The SKU's pricing unit. For example, if the tier price is $1 per 1000000 Bytes, then this field
   * will show 'By'. The `start_amount` field in each tier will be in this unit.
   * @param unit unit or {@code null} for none
   */
  public Rate setUnit(java.lang.String unit) {
    this.unit = unit;
    return this;
  }

  /**
   * The SKU's count for the pricing unit. For example, if the tier price is $1 per 1000000 Bytes,
   * then this column will show 1000000.
   * @return value or {@code null} for none
   */
  public java.lang.Double getUnitCount() {
    return unitCount;
  }

  /**
   * The SKU's count for the pricing unit. For example, if the tier price is $1 per 1000000 Bytes,
   * then this column will show 1000000.
   * @param unitCount unitCount or {@code null} for none
   */
  public Rate setUnitCount(java.lang.Double unitCount) {
    this.unitCount = unitCount;
    return this;
  }

  @Override
  public Rate set(String fieldName, Object value) {
    return (Rate) super.set(fieldName, value);
  }

  @Override
  public Rate clone() {
    return (Rate) super.clone();
  }

}
