All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.zuora.model.ExpandedRatePlanCharge Maven / Gradle / Ivy

There is a newer version: 3.2.1
Show newest version
/*
 * Zuora API Reference
 * REST API reference for the Zuora Billing, Payments, and Central Platform! Check out the [REST API Overview](https://www.zuora.com/developer/api-references/api/overview/).
 *
 * The version of the OpenAPI document: 2024-05-20
 * Contact: [email protected]
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */


package com.zuora.model;

import java.util.Objects;
import com.google.gson.TypeAdapter;
import com.google.gson.annotations.JsonAdapter;
import com.google.gson.annotations.SerializedName;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import com.zuora.model.ExpandedProductRatePlanCharge;
import com.zuora.model.ExpandedRatePlan;
import com.zuora.model.ExpandedRatePlanChargeTier;
import java.io.IOException;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

import com.google.gson.Gson;
import com.google.gson.GsonBuilder;
import com.google.gson.JsonArray;
import com.google.gson.JsonDeserializationContext;
import com.google.gson.JsonDeserializer;
import com.google.gson.JsonElement;
import com.google.gson.JsonObject;
import com.google.gson.JsonParseException;
import com.google.gson.TypeAdapterFactory;
import com.google.gson.reflect.TypeToken;
import com.google.gson.TypeAdapter;
import com.google.gson.stream.JsonReader;
import com.google.gson.stream.JsonWriter;
import java.io.IOException;

import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;

import com.zuora.JSON;

/**
 * ExpandedRatePlanCharge
 */
@javax.annotation.Generated(value = "org.openapitools.codegen.languages.JavaClientCodegen", comments = "Generator version: 7.6.0")
public class ExpandedRatePlanCharge {
  public static final String SERIALIZED_NAME_RATE_PLAN_ID = "ratePlanId";
  @SerializedName(SERIALIZED_NAME_RATE_PLAN_ID)
  private String ratePlanId;

  public static final String SERIALIZED_NAME_PRODUCT_RATE_PLAN_CHARGE_ID = "productRatePlanChargeId";
  @SerializedName(SERIALIZED_NAME_PRODUCT_RATE_PLAN_CHARGE_ID)
  private String productRatePlanChargeId;

  public static final String SERIALIZED_NAME_ACCOUNTING_CODE = "accountingCode";
  @SerializedName(SERIALIZED_NAME_ACCOUNTING_CODE)
  private String accountingCode;

  public static final String SERIALIZED_NAME_ACCOUNTING_CODE_ENTITY_ID = "accountingCodeEntityId";
  @SerializedName(SERIALIZED_NAME_ACCOUNTING_CODE_ENTITY_ID)
  private Long accountingCodeEntityId;

  public static final String SERIALIZED_NAME_APPLY_DISCOUNT_TO = "applyDiscountTo";
  @SerializedName(SERIALIZED_NAME_APPLY_DISCOUNT_TO)
  private String applyDiscountTo;

  public static final String SERIALIZED_NAME_BILL_CYCLE_DAY = "billCycleDay";
  @SerializedName(SERIALIZED_NAME_BILL_CYCLE_DAY)
  private Long billCycleDay;

  public static final String SERIALIZED_NAME_BILL_CYCLE_TYPE = "billCycleType";
  @SerializedName(SERIALIZED_NAME_BILL_CYCLE_TYPE)
  private String billCycleType;

  public static final String SERIALIZED_NAME_BILLING_PERIOD = "billingPeriod";
  @SerializedName(SERIALIZED_NAME_BILLING_PERIOD)
  private String billingPeriod;

  public static final String SERIALIZED_NAME_BILLING_PERIOD_ALIGNMENT = "billingPeriodAlignment";
  @SerializedName(SERIALIZED_NAME_BILLING_PERIOD_ALIGNMENT)
  private String billingPeriodAlignment;

  public static final String SERIALIZED_NAME_BILLING_TIMING = "billingTiming";
  @SerializedName(SERIALIZED_NAME_BILLING_TIMING)
  private String billingTiming;

  public static final String SERIALIZED_NAME_CHARGED_THROUGH_DATE = "chargedThroughDate";
  @SerializedName(SERIALIZED_NAME_CHARGED_THROUGH_DATE)
  private LocalDate chargedThroughDate;

  public static final String SERIALIZED_NAME_CHARGE_FUNCTION = "chargeFunction";
  @SerializedName(SERIALIZED_NAME_CHARGE_FUNCTION)
  private String chargeFunction;

  public static final String SERIALIZED_NAME_CHARGE_MODEL = "chargeModel";
  @SerializedName(SERIALIZED_NAME_CHARGE_MODEL)
  private String chargeModel;

  public static final String SERIALIZED_NAME_CHARGE_NUMBER = "chargeNumber";
  @SerializedName(SERIALIZED_NAME_CHARGE_NUMBER)
  private String chargeNumber;

  public static final String SERIALIZED_NAME_CHARGE_TYPE = "chargeType";
  @SerializedName(SERIALIZED_NAME_CHARGE_TYPE)
  private String chargeType;

  public static final String SERIALIZED_NAME_DESCRIPTION = "description";
  @SerializedName(SERIALIZED_NAME_DESCRIPTION)
  private String description;

  public static final String SERIALIZED_NAME_DISCOUNT_LEVEL = "discountLevel";
  @SerializedName(SERIALIZED_NAME_DISCOUNT_LEVEL)
  private String discountLevel;

  public static final String SERIALIZED_NAME_D_M_R_C = "dMRC";
  @SerializedName(SERIALIZED_NAME_D_M_R_C)
  private BigDecimal dMRC;

  public static final String SERIALIZED_NAME_DRAWDOWN_RATE = "drawdownRate";
  @SerializedName(SERIALIZED_NAME_DRAWDOWN_RATE)
  private BigDecimal drawdownRate;

  public static final String SERIALIZED_NAME_D_T_C_V = "dTCV";
  @SerializedName(SERIALIZED_NAME_D_T_C_V)
  private BigDecimal dTCV;

  public static final String SERIALIZED_NAME_EFFECTIVE_END_DATE = "effectiveEndDate";
  @SerializedName(SERIALIZED_NAME_EFFECTIVE_END_DATE)
  private LocalDate effectiveEndDate;

  public static final String SERIALIZED_NAME_EFFECTIVE_START_DATE = "effectiveStartDate";
  @SerializedName(SERIALIZED_NAME_EFFECTIVE_START_DATE)
  private LocalDate effectiveStartDate;

  public static final String SERIALIZED_NAME_END_DATE_CONDITION = "endDateCondition";
  @SerializedName(SERIALIZED_NAME_END_DATE_CONDITION)
  private String endDateCondition;

  public static final String SERIALIZED_NAME_EXCLUDE_ITEM_BOOKING_FROM_REVENUE_ACCOUNTING = "excludeItemBookingFromRevenueAccounting";
  @SerializedName(SERIALIZED_NAME_EXCLUDE_ITEM_BOOKING_FROM_REVENUE_ACCOUNTING)
  private Boolean excludeItemBookingFromRevenueAccounting;

  public static final String SERIALIZED_NAME_REFLECT_DISCOUNT_IN_NET_AMOUNT = "reflectDiscountInNetAmount";
  @SerializedName(SERIALIZED_NAME_REFLECT_DISCOUNT_IN_NET_AMOUNT)
  private Boolean reflectDiscountInNetAmount;

  public static final String SERIALIZED_NAME_REVENUE_RECOGNITION_TIMING = "revenueRecognitionTiming";
  @SerializedName(SERIALIZED_NAME_REVENUE_RECOGNITION_TIMING)
  private String revenueRecognitionTiming;

  public static final String SERIALIZED_NAME_REVENUE_AMORTIZATION_METHOD = "revenueAmortizationMethod";
  @SerializedName(SERIALIZED_NAME_REVENUE_AMORTIZATION_METHOD)
  private String revenueAmortizationMethod;

  public static final String SERIALIZED_NAME_EXCLUDE_ITEM_BILLING_FROM_REVENUE_ACCOUNTING = "excludeItemBillingFromRevenueAccounting";
  @SerializedName(SERIALIZED_NAME_EXCLUDE_ITEM_BILLING_FROM_REVENUE_ACCOUNTING)
  private Boolean excludeItemBillingFromRevenueAccounting;

  public static final String SERIALIZED_NAME_INVOICE_SCHEDULE_ID = "invoiceScheduleId";
  @SerializedName(SERIALIZED_NAME_INVOICE_SCHEDULE_ID)
  private String invoiceScheduleId;

  public static final String SERIALIZED_NAME_IS_LAST_SEGMENT = "isLastSegment";
  @SerializedName(SERIALIZED_NAME_IS_LAST_SEGMENT)
  private Boolean isLastSegment;

  public static final String SERIALIZED_NAME_IS_PREPAID = "isPrepaid";
  @SerializedName(SERIALIZED_NAME_IS_PREPAID)
  private Boolean isPrepaid;

  public static final String SERIALIZED_NAME_IS_ROLLOVER = "isRollover";
  @SerializedName(SERIALIZED_NAME_IS_ROLLOVER)
  private Boolean isRollover;

  public static final String SERIALIZED_NAME_ROLLOVER_PERIODS = "rolloverPeriods";
  @SerializedName(SERIALIZED_NAME_ROLLOVER_PERIODS)
  private Long rolloverPeriods;

  public static final String SERIALIZED_NAME_ROLLOVER_PERIOD_LENGTH = "rolloverPeriodLength";
  @SerializedName(SERIALIZED_NAME_ROLLOVER_PERIOD_LENGTH)
  private Integer rolloverPeriodLength;

  public static final String SERIALIZED_NAME_ROLLOVER_APPLY = "rolloverApply";
  @SerializedName(SERIALIZED_NAME_ROLLOVER_APPLY)
  private String rolloverApply;

  public static final String SERIALIZED_NAME_IS_PROCESSED = "isProcessed";
  @SerializedName(SERIALIZED_NAME_IS_PROCESSED)
  private Boolean isProcessed;

  public static final String SERIALIZED_NAME_LIST_PRICE_BASE = "listPriceBase";
  @SerializedName(SERIALIZED_NAME_LIST_PRICE_BASE)
  private String listPriceBase;

  public static final String SERIALIZED_NAME_SPECIFIC_LIST_PRICE_BASE = "specificListPriceBase";
  @SerializedName(SERIALIZED_NAME_SPECIFIC_LIST_PRICE_BASE)
  private Integer specificListPriceBase;

  public static final String SERIALIZED_NAME_PRICE_UPSELL_QUANTITY_STACKED = "priceUpsellQuantityStacked";
  @SerializedName(SERIALIZED_NAME_PRICE_UPSELL_QUANTITY_STACKED)
  private Boolean priceUpsellQuantityStacked;

  public static final String SERIALIZED_NAME_COMMITMENT_TYPE = "commitmentType";
  @SerializedName(SERIALIZED_NAME_COMMITMENT_TYPE)
  private String commitmentType;

  public static final String SERIALIZED_NAME_IS_COMMITTED = "isCommitted";
  @SerializedName(SERIALIZED_NAME_IS_COMMITTED)
  private Boolean isCommitted;

  public static final String SERIALIZED_NAME_M_R_R = "mRR";
  @SerializedName(SERIALIZED_NAME_M_R_R)
  private BigDecimal mRR;

  public static final String SERIALIZED_NAME_NAME = "name";
  @SerializedName(SERIALIZED_NAME_NAME)
  private String name;

  public static final String SERIALIZED_NAME_NUMBER_OF_PERIODS = "numberOfPeriods";
  @SerializedName(SERIALIZED_NAME_NUMBER_OF_PERIODS)
  private Long numberOfPeriods;

  public static final String SERIALIZED_NAME_ORIGINAL_ID = "originalId";
  @SerializedName(SERIALIZED_NAME_ORIGINAL_ID)
  private String originalId;

  public static final String SERIALIZED_NAME_OVERAGE_CALCULATION_OPTION = "overageCalculationOption";
  @SerializedName(SERIALIZED_NAME_OVERAGE_CALCULATION_OPTION)
  private String overageCalculationOption;

  public static final String SERIALIZED_NAME_OVERAGE_UNUSED_UNITS_CREDIT_OPTION = "overageUnusedUnitsCreditOption";
  @SerializedName(SERIALIZED_NAME_OVERAGE_UNUSED_UNITS_CREDIT_OPTION)
  private String overageUnusedUnitsCreditOption;

  public static final String SERIALIZED_NAME_PREPAID_OPERATION_TYPE = "prepaidOperationType";
  @SerializedName(SERIALIZED_NAME_PREPAID_OPERATION_TYPE)
  private String prepaidOperationType;

  public static final String SERIALIZED_NAME_PREPAID_QUANTITY = "prepaidQuantity";
  @SerializedName(SERIALIZED_NAME_PREPAID_QUANTITY)
  private BigDecimal prepaidQuantity;

  public static final String SERIALIZED_NAME_PREPAID_TOTAL_QUANTITY = "prepaidTotalQuantity";
  @SerializedName(SERIALIZED_NAME_PREPAID_TOTAL_QUANTITY)
  private BigDecimal prepaidTotalQuantity;

  public static final String SERIALIZED_NAME_SALES_PRICE = "salesPrice";
  @SerializedName(SERIALIZED_NAME_SALES_PRICE)
  private BigDecimal salesPrice;

  public static final String SERIALIZED_NAME_PRICE_CHANGE_OPTION = "priceChangeOption";
  @SerializedName(SERIALIZED_NAME_PRICE_CHANGE_OPTION)
  private String priceChangeOption;

  public static final String SERIALIZED_NAME_PRICE_INCREASE_PERCENTAGE = "priceIncreasePercentage";
  @SerializedName(SERIALIZED_NAME_PRICE_INCREASE_PERCENTAGE)
  private BigDecimal priceIncreasePercentage;

  public static final String SERIALIZED_NAME_PROCESSED_THROUGH_DATE = "processedThroughDate";
  @SerializedName(SERIALIZED_NAME_PROCESSED_THROUGH_DATE)
  private LocalDate processedThroughDate;

  public static final String SERIALIZED_NAME_PRORATION_OPTION = "prorationOption";
  @SerializedName(SERIALIZED_NAME_PRORATION_OPTION)
  private String prorationOption;

  public static final String SERIALIZED_NAME_QUANTITY = "quantity";
  @SerializedName(SERIALIZED_NAME_QUANTITY)
  private BigDecimal quantity;

  public static final String SERIALIZED_NAME_NUMBER_OF_DELIVERIES = "numberOfDeliveries";
  @SerializedName(SERIALIZED_NAME_NUMBER_OF_DELIVERIES)
  private BigDecimal numberOfDeliveries;

  public static final String SERIALIZED_NAME_RATING_GROUP = "ratingGroup";
  @SerializedName(SERIALIZED_NAME_RATING_GROUP)
  private String ratingGroup;

  public static final String SERIALIZED_NAME_REVENUE_RECOGNITION_RULE_NAME = "revenueRecognitionRuleName";
  @SerializedName(SERIALIZED_NAME_REVENUE_RECOGNITION_RULE_NAME)
  private String revenueRecognitionRuleName;

  public static final String SERIALIZED_NAME_REV_REC_CODE = "revRecCode";
  @SerializedName(SERIALIZED_NAME_REV_REC_CODE)
  private String revRecCode;

  public static final String SERIALIZED_NAME_REV_REC_TRIGGER_CONDITION = "revRecTriggerCondition";
  @SerializedName(SERIALIZED_NAME_REV_REC_TRIGGER_CONDITION)
  private String revRecTriggerCondition;

  public static final String SERIALIZED_NAME_SEGMENT = "segment";
  @SerializedName(SERIALIZED_NAME_SEGMENT)
  private Integer segment;

  public static final String SERIALIZED_NAME_SPECIFIC_BILLING_PERIOD = "specificBillingPeriod";
  @SerializedName(SERIALIZED_NAME_SPECIFIC_BILLING_PERIOD)
  private Long specificBillingPeriod;

  public static final String SERIALIZED_NAME_SPECIFIC_END_DATE = "specificEndDate";
  @SerializedName(SERIALIZED_NAME_SPECIFIC_END_DATE)
  private LocalDate specificEndDate;

  public static final String SERIALIZED_NAME_TAXABLE = "taxable";
  @SerializedName(SERIALIZED_NAME_TAXABLE)
  private Boolean taxable;

  public static final String SERIALIZED_NAME_TAX_CODE_NAME = "taxCodeName";
  @SerializedName(SERIALIZED_NAME_TAX_CODE_NAME)
  private String taxCodeName;

  public static final String SERIALIZED_NAME_TAX_MODE_OPTION = "taxModeOption";
  @SerializedName(SERIALIZED_NAME_TAX_MODE_OPTION)
  private String taxModeOption;

  public static final String SERIALIZED_NAME_T_C_V = "tCV";
  @SerializedName(SERIALIZED_NAME_T_C_V)
  private BigDecimal tCV;

  public static final String SERIALIZED_NAME_TRIGGER_DATE = "triggerDate";
  @SerializedName(SERIALIZED_NAME_TRIGGER_DATE)
  private LocalDate triggerDate;

  public static final String SERIALIZED_NAME_TRIGGER_EVENT = "triggerEvent";
  @SerializedName(SERIALIZED_NAME_TRIGGER_EVENT)
  private String triggerEvent;

  public static final String SERIALIZED_NAME_U_O_M = "uOM";
  @SerializedName(SERIALIZED_NAME_U_O_M)
  private String uOM;

  public static final String SERIALIZED_NAME_UP_TO_PERIODS = "upToPeriods";
  @SerializedName(SERIALIZED_NAME_UP_TO_PERIODS)
  private Long upToPeriods;

  public static final String SERIALIZED_NAME_UP_TO_PERIODS_TYPE = "upToPeriodsType";
  @SerializedName(SERIALIZED_NAME_UP_TO_PERIODS_TYPE)
  private String upToPeriodsType;

  public static final String SERIALIZED_NAME_VERSION = "version";
  @SerializedName(SERIALIZED_NAME_VERSION)
  private Long version;

  public static final String SERIALIZED_NAME_WEEKLY_BILL_CYCLE_DAY = "weeklyBillCycleDay";
  @SerializedName(SERIALIZED_NAME_WEEKLY_BILL_CYCLE_DAY)
  private String weeklyBillCycleDay;

  public static final String SERIALIZED_NAME_ID = "id";
  @SerializedName(SERIALIZED_NAME_ID)
  private String id;

  public static final String SERIALIZED_NAME_CREATED_BY_ID = "createdById";
  @SerializedName(SERIALIZED_NAME_CREATED_BY_ID)
  private String createdById;

  public static final String SERIALIZED_NAME_CREATED_DATE = "createdDate";
  @SerializedName(SERIALIZED_NAME_CREATED_DATE)
  private String createdDate;

  public static final String SERIALIZED_NAME_UPDATED_BY_ID = "updatedById";
  @SerializedName(SERIALIZED_NAME_UPDATED_BY_ID)
  private String updatedById;

  public static final String SERIALIZED_NAME_UPDATED_DATE = "updatedDate";
  @SerializedName(SERIALIZED_NAME_UPDATED_DATE)
  private String updatedDate;

  public static final String SERIALIZED_NAME_SUBSCRIPTION_ID = "subscriptionId";
  @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_ID)
  private String subscriptionId;

  public static final String SERIALIZED_NAME_SUBSCRIPTION_OWNER_ID = "subscriptionOwnerId";
  @SerializedName(SERIALIZED_NAME_SUBSCRIPTION_OWNER_ID)
  private String subscriptionOwnerId;

  public static final String SERIALIZED_NAME_INVOICE_OWNER_ID = "invoiceOwnerId";
  @SerializedName(SERIALIZED_NAME_INVOICE_OWNER_ID)
  private String invoiceOwnerId;

  public static final String SERIALIZED_NAME_ORIGINAL_ORDER_DATE = "originalOrderDate";
  @SerializedName(SERIALIZED_NAME_ORIGINAL_ORDER_DATE)
  private LocalDate originalOrderDate;

  public static final String SERIALIZED_NAME_AMENDED_BY_ORDER_ON = "amendedByOrderOn";
  @SerializedName(SERIALIZED_NAME_AMENDED_BY_ORDER_ON)
  private LocalDate amendedByOrderOn;

  public static final String SERIALIZED_NAME_VALIDITY_PERIOD_TYPE = "validityPeriodType";
  @SerializedName(SERIALIZED_NAME_VALIDITY_PERIOD_TYPE)
  private String validityPeriodType;

  public static final String SERIALIZED_NAME_CREDIT_OPTION = "creditOption";
  @SerializedName(SERIALIZED_NAME_CREDIT_OPTION)
  private String creditOption;

  public static final String SERIALIZED_NAME_APPLY_TO_BILLING_PERIOD_PARTIALLY = "applyToBillingPeriodPartially";
  @SerializedName(SERIALIZED_NAME_APPLY_TO_BILLING_PERIOD_PARTIALLY)
  private Boolean applyToBillingPeriodPartially;

  public static final String SERIALIZED_NAME_PRODUCT_CHARGE_DEFINITION_ID = "productChargeDefinitionId";
  @SerializedName(SERIALIZED_NAME_PRODUCT_CHARGE_DEFINITION_ID)
  private String productChargeDefinitionId;

  public static final String SERIALIZED_NAME_REVERTED = "reverted";
  @SerializedName(SERIALIZED_NAME_REVERTED)
  private Boolean reverted;

  public static final String SERIALIZED_NAME_ACCOUNT_RECEIVABLE_ACCOUNTING_CODE_ID = "accountReceivableAccountingCodeId";
  @SerializedName(SERIALIZED_NAME_ACCOUNT_RECEIVABLE_ACCOUNTING_CODE_ID)
  private String accountReceivableAccountingCodeId;

  public static final String SERIALIZED_NAME_DEFERRED_REVENUE_ACCOUNTING_CODE_ID = "deferredRevenueAccountingCodeId";
  @SerializedName(SERIALIZED_NAME_DEFERRED_REVENUE_ACCOUNTING_CODE_ID)
  private String deferredRevenueAccountingCodeId;

  public static final String SERIALIZED_NAME_RECOGNIZED_REVENUE_ACCOUNTING_CODE_ID = "recognizedRevenueAccountingCodeId";
  @SerializedName(SERIALIZED_NAME_RECOGNIZED_REVENUE_ACCOUNTING_CODE_ID)
  private String recognizedRevenueAccountingCodeId;

  public static final String SERIALIZED_NAME_PREPAID_U_O_M = "prepaidUOM";
  @SerializedName(SERIALIZED_NAME_PREPAID_U_O_M)
  private String prepaidUOM;

  public static final String SERIALIZED_NAME_DRAWDOWN_UOM = "drawdownUom";
  @SerializedName(SERIALIZED_NAME_DRAWDOWN_UOM)
  private String drawdownUom;

  public static final String SERIALIZED_NAME_RATE_PLAN = "ratePlan";
  @SerializedName(SERIALIZED_NAME_RATE_PLAN)
  private ExpandedRatePlan ratePlan;

  public static final String SERIALIZED_NAME_PRODUCT_RATE_PLAN_CHARGE = "productRatePlanCharge";
  @SerializedName(SERIALIZED_NAME_PRODUCT_RATE_PLAN_CHARGE)
  private ExpandedProductRatePlanCharge productRatePlanCharge;

  public static final String SERIALIZED_NAME_RATE_PLAN_CHARGE_TIERS = "ratePlanChargeTiers";
  @SerializedName(SERIALIZED_NAME_RATE_PLAN_CHARGE_TIERS)
  private List ratePlanChargeTiers;

  public ExpandedRatePlanCharge() {
  }

  public ExpandedRatePlanCharge ratePlanId(String ratePlanId) {
    this.ratePlanId = ratePlanId;
    return this;
  }

  /**
   * Get ratePlanId
   * @return ratePlanId
   */
  @javax.annotation.Nullable
  public String getRatePlanId() {
    return ratePlanId;
  }

  public void setRatePlanId(String ratePlanId) {
    this.ratePlanId = ratePlanId;
  }


  public ExpandedRatePlanCharge productRatePlanChargeId(String productRatePlanChargeId) {
    this.productRatePlanChargeId = productRatePlanChargeId;
    return this;
  }

  /**
   * Get productRatePlanChargeId
   * @return productRatePlanChargeId
   */
  @javax.annotation.Nullable
  public String getProductRatePlanChargeId() {
    return productRatePlanChargeId;
  }

  public void setProductRatePlanChargeId(String productRatePlanChargeId) {
    this.productRatePlanChargeId = productRatePlanChargeId;
  }


  public ExpandedRatePlanCharge accountingCode(String accountingCode) {
    this.accountingCode = accountingCode;
    return this;
  }

  /**
   * Get accountingCode
   * @return accountingCode
   */
  @javax.annotation.Nullable
  public String getAccountingCode() {
    return accountingCode;
  }

  public void setAccountingCode(String accountingCode) {
    this.accountingCode = accountingCode;
  }


  public ExpandedRatePlanCharge accountingCodeEntityId(Long accountingCodeEntityId) {
    this.accountingCodeEntityId = accountingCodeEntityId;
    return this;
  }

  /**
   * Get accountingCodeEntityId
   * @return accountingCodeEntityId
   */
  @javax.annotation.Nullable
  public Long getAccountingCodeEntityId() {
    return accountingCodeEntityId;
  }

  public void setAccountingCodeEntityId(Long accountingCodeEntityId) {
    this.accountingCodeEntityId = accountingCodeEntityId;
  }


  public ExpandedRatePlanCharge applyDiscountTo(String applyDiscountTo) {
    this.applyDiscountTo = applyDiscountTo;
    return this;
  }

  /**
   * Get applyDiscountTo
   * @return applyDiscountTo
   */
  @javax.annotation.Nullable
  public String getApplyDiscountTo() {
    return applyDiscountTo;
  }

  public void setApplyDiscountTo(String applyDiscountTo) {
    this.applyDiscountTo = applyDiscountTo;
  }


  public ExpandedRatePlanCharge billCycleDay(Long billCycleDay) {
    this.billCycleDay = billCycleDay;
    return this;
  }

  /**
   * Get billCycleDay
   * @return billCycleDay
   */
  @javax.annotation.Nullable
  public Long getBillCycleDay() {
    return billCycleDay;
  }

  public void setBillCycleDay(Long billCycleDay) {
    this.billCycleDay = billCycleDay;
  }


  public ExpandedRatePlanCharge billCycleType(String billCycleType) {
    this.billCycleType = billCycleType;
    return this;
  }

  /**
   * Get billCycleType
   * @return billCycleType
   */
  @javax.annotation.Nullable
  public String getBillCycleType() {
    return billCycleType;
  }

  public void setBillCycleType(String billCycleType) {
    this.billCycleType = billCycleType;
  }


  public ExpandedRatePlanCharge billingPeriod(String billingPeriod) {
    this.billingPeriod = billingPeriod;
    return this;
  }

  /**
   * Get billingPeriod
   * @return billingPeriod
   */
  @javax.annotation.Nullable
  public String getBillingPeriod() {
    return billingPeriod;
  }

  public void setBillingPeriod(String billingPeriod) {
    this.billingPeriod = billingPeriod;
  }


  public ExpandedRatePlanCharge billingPeriodAlignment(String billingPeriodAlignment) {
    this.billingPeriodAlignment = billingPeriodAlignment;
    return this;
  }

  /**
   * Get billingPeriodAlignment
   * @return billingPeriodAlignment
   */
  @javax.annotation.Nullable
  public String getBillingPeriodAlignment() {
    return billingPeriodAlignment;
  }

  public void setBillingPeriodAlignment(String billingPeriodAlignment) {
    this.billingPeriodAlignment = billingPeriodAlignment;
  }


  public ExpandedRatePlanCharge billingTiming(String billingTiming) {
    this.billingTiming = billingTiming;
    return this;
  }

  /**
   * Get billingTiming
   * @return billingTiming
   */
  @javax.annotation.Nullable
  public String getBillingTiming() {
    return billingTiming;
  }

  public void setBillingTiming(String billingTiming) {
    this.billingTiming = billingTiming;
  }


  public ExpandedRatePlanCharge chargedThroughDate(LocalDate chargedThroughDate) {
    this.chargedThroughDate = chargedThroughDate;
    return this;
  }

  /**
   * Get chargedThroughDate
   * @return chargedThroughDate
   */
  @javax.annotation.Nullable
  public LocalDate getChargedThroughDate() {
    return chargedThroughDate;
  }

  public void setChargedThroughDate(LocalDate chargedThroughDate) {
    this.chargedThroughDate = chargedThroughDate;
  }


  public ExpandedRatePlanCharge chargeFunction(String chargeFunction) {
    this.chargeFunction = chargeFunction;
    return this;
  }

  /**
   * Get chargeFunction
   * @return chargeFunction
   */
  @javax.annotation.Nullable
  public String getChargeFunction() {
    return chargeFunction;
  }

  public void setChargeFunction(String chargeFunction) {
    this.chargeFunction = chargeFunction;
  }


  public ExpandedRatePlanCharge chargeModel(String chargeModel) {
    this.chargeModel = chargeModel;
    return this;
  }

  /**
   * Get chargeModel
   * @return chargeModel
   */
  @javax.annotation.Nullable
  public String getChargeModel() {
    return chargeModel;
  }

  public void setChargeModel(String chargeModel) {
    this.chargeModel = chargeModel;
  }


  public ExpandedRatePlanCharge chargeNumber(String chargeNumber) {
    this.chargeNumber = chargeNumber;
    return this;
  }

  /**
   * Get chargeNumber
   * @return chargeNumber
   */
  @javax.annotation.Nullable
  public String getChargeNumber() {
    return chargeNumber;
  }

  public void setChargeNumber(String chargeNumber) {
    this.chargeNumber = chargeNumber;
  }


  public ExpandedRatePlanCharge chargeType(String chargeType) {
    this.chargeType = chargeType;
    return this;
  }

  /**
   * Get chargeType
   * @return chargeType
   */
  @javax.annotation.Nullable
  public String getChargeType() {
    return chargeType;
  }

  public void setChargeType(String chargeType) {
    this.chargeType = chargeType;
  }


  public ExpandedRatePlanCharge description(String description) {
    this.description = description;
    return this;
  }

  /**
   * Get description
   * @return description
   */
  @javax.annotation.Nullable
  public String getDescription() {
    return description;
  }

  public void setDescription(String description) {
    this.description = description;
  }


  public ExpandedRatePlanCharge discountLevel(String discountLevel) {
    this.discountLevel = discountLevel;
    return this;
  }

  /**
   * Get discountLevel
   * @return discountLevel
   */
  @javax.annotation.Nullable
  public String getDiscountLevel() {
    return discountLevel;
  }

  public void setDiscountLevel(String discountLevel) {
    this.discountLevel = discountLevel;
  }


  public ExpandedRatePlanCharge dMRC(BigDecimal dMRC) {
    this.dMRC = dMRC;
    return this;
  }

  /**
   * Get dMRC
   * @return dMRC
   */
  @javax.annotation.Nullable
  public BigDecimal getdMRC() {
    return dMRC;
  }

  public void setdMRC(BigDecimal dMRC) {
    this.dMRC = dMRC;
  }


  public ExpandedRatePlanCharge drawdownRate(BigDecimal drawdownRate) {
    this.drawdownRate = drawdownRate;
    return this;
  }

  /**
   * Get drawdownRate
   * @return drawdownRate
   */
  @javax.annotation.Nullable
  public BigDecimal getDrawdownRate() {
    return drawdownRate;
  }

  public void setDrawdownRate(BigDecimal drawdownRate) {
    this.drawdownRate = drawdownRate;
  }


  public ExpandedRatePlanCharge dTCV(BigDecimal dTCV) {
    this.dTCV = dTCV;
    return this;
  }

  /**
   * Get dTCV
   * @return dTCV
   */
  @javax.annotation.Nullable
  public BigDecimal getdTCV() {
    return dTCV;
  }

  public void setdTCV(BigDecimal dTCV) {
    this.dTCV = dTCV;
  }


  public ExpandedRatePlanCharge effectiveEndDate(LocalDate effectiveEndDate) {
    this.effectiveEndDate = effectiveEndDate;
    return this;
  }

  /**
   * Get effectiveEndDate
   * @return effectiveEndDate
   */
  @javax.annotation.Nullable
  public LocalDate getEffectiveEndDate() {
    return effectiveEndDate;
  }

  public void setEffectiveEndDate(LocalDate effectiveEndDate) {
    this.effectiveEndDate = effectiveEndDate;
  }


  public ExpandedRatePlanCharge effectiveStartDate(LocalDate effectiveStartDate) {
    this.effectiveStartDate = effectiveStartDate;
    return this;
  }

  /**
   * Get effectiveStartDate
   * @return effectiveStartDate
   */
  @javax.annotation.Nullable
  public LocalDate getEffectiveStartDate() {
    return effectiveStartDate;
  }

  public void setEffectiveStartDate(LocalDate effectiveStartDate) {
    this.effectiveStartDate = effectiveStartDate;
  }


  public ExpandedRatePlanCharge endDateCondition(String endDateCondition) {
    this.endDateCondition = endDateCondition;
    return this;
  }

  /**
   * Get endDateCondition
   * @return endDateCondition
   */
  @javax.annotation.Nullable
  public String getEndDateCondition() {
    return endDateCondition;
  }

  public void setEndDateCondition(String endDateCondition) {
    this.endDateCondition = endDateCondition;
  }


  public ExpandedRatePlanCharge excludeItemBookingFromRevenueAccounting(Boolean excludeItemBookingFromRevenueAccounting) {
    this.excludeItemBookingFromRevenueAccounting = excludeItemBookingFromRevenueAccounting;
    return this;
  }

  /**
   * Get excludeItemBookingFromRevenueAccounting
   * @return excludeItemBookingFromRevenueAccounting
   */
  @javax.annotation.Nullable
  public Boolean getExcludeItemBookingFromRevenueAccounting() {
    return excludeItemBookingFromRevenueAccounting;
  }

  public void setExcludeItemBookingFromRevenueAccounting(Boolean excludeItemBookingFromRevenueAccounting) {
    this.excludeItemBookingFromRevenueAccounting = excludeItemBookingFromRevenueAccounting;
  }


  public ExpandedRatePlanCharge reflectDiscountInNetAmount(Boolean reflectDiscountInNetAmount) {
    this.reflectDiscountInNetAmount = reflectDiscountInNetAmount;
    return this;
  }

  /**
   * Get reflectDiscountInNetAmount
   * @return reflectDiscountInNetAmount
   */
  @javax.annotation.Nullable
  public Boolean getReflectDiscountInNetAmount() {
    return reflectDiscountInNetAmount;
  }

  public void setReflectDiscountInNetAmount(Boolean reflectDiscountInNetAmount) {
    this.reflectDiscountInNetAmount = reflectDiscountInNetAmount;
  }


  public ExpandedRatePlanCharge revenueRecognitionTiming(String revenueRecognitionTiming) {
    this.revenueRecognitionTiming = revenueRecognitionTiming;
    return this;
  }

  /**
   * Get revenueRecognitionTiming
   * @return revenueRecognitionTiming
   */
  @javax.annotation.Nullable
  public String getRevenueRecognitionTiming() {
    return revenueRecognitionTiming;
  }

  public void setRevenueRecognitionTiming(String revenueRecognitionTiming) {
    this.revenueRecognitionTiming = revenueRecognitionTiming;
  }


  public ExpandedRatePlanCharge revenueAmortizationMethod(String revenueAmortizationMethod) {
    this.revenueAmortizationMethod = revenueAmortizationMethod;
    return this;
  }

  /**
   * Get revenueAmortizationMethod
   * @return revenueAmortizationMethod
   */
  @javax.annotation.Nullable
  public String getRevenueAmortizationMethod() {
    return revenueAmortizationMethod;
  }

  public void setRevenueAmortizationMethod(String revenueAmortizationMethod) {
    this.revenueAmortizationMethod = revenueAmortizationMethod;
  }


  public ExpandedRatePlanCharge excludeItemBillingFromRevenueAccounting(Boolean excludeItemBillingFromRevenueAccounting) {
    this.excludeItemBillingFromRevenueAccounting = excludeItemBillingFromRevenueAccounting;
    return this;
  }

  /**
   * Get excludeItemBillingFromRevenueAccounting
   * @return excludeItemBillingFromRevenueAccounting
   */
  @javax.annotation.Nullable
  public Boolean getExcludeItemBillingFromRevenueAccounting() {
    return excludeItemBillingFromRevenueAccounting;
  }

  public void setExcludeItemBillingFromRevenueAccounting(Boolean excludeItemBillingFromRevenueAccounting) {
    this.excludeItemBillingFromRevenueAccounting = excludeItemBillingFromRevenueAccounting;
  }


  public ExpandedRatePlanCharge invoiceScheduleId(String invoiceScheduleId) {
    this.invoiceScheduleId = invoiceScheduleId;
    return this;
  }

  /**
   * Get invoiceScheduleId
   * @return invoiceScheduleId
   */
  @javax.annotation.Nullable
  public String getInvoiceScheduleId() {
    return invoiceScheduleId;
  }

  public void setInvoiceScheduleId(String invoiceScheduleId) {
    this.invoiceScheduleId = invoiceScheduleId;
  }


  public ExpandedRatePlanCharge isLastSegment(Boolean isLastSegment) {
    this.isLastSegment = isLastSegment;
    return this;
  }

  /**
   * Get isLastSegment
   * @return isLastSegment
   */
  @javax.annotation.Nullable
  public Boolean getIsLastSegment() {
    return isLastSegment;
  }

  public void setIsLastSegment(Boolean isLastSegment) {
    this.isLastSegment = isLastSegment;
  }


  public ExpandedRatePlanCharge isPrepaid(Boolean isPrepaid) {
    this.isPrepaid = isPrepaid;
    return this;
  }

  /**
   * Get isPrepaid
   * @return isPrepaid
   */
  @javax.annotation.Nullable
  public Boolean getIsPrepaid() {
    return isPrepaid;
  }

  public void setIsPrepaid(Boolean isPrepaid) {
    this.isPrepaid = isPrepaid;
  }


  public ExpandedRatePlanCharge isRollover(Boolean isRollover) {
    this.isRollover = isRollover;
    return this;
  }

  /**
   * Get isRollover
   * @return isRollover
   */
  @javax.annotation.Nullable
  public Boolean getIsRollover() {
    return isRollover;
  }

  public void setIsRollover(Boolean isRollover) {
    this.isRollover = isRollover;
  }


  public ExpandedRatePlanCharge rolloverPeriods(Long rolloverPeriods) {
    this.rolloverPeriods = rolloverPeriods;
    return this;
  }

  /**
   * Get rolloverPeriods
   * @return rolloverPeriods
   */
  @javax.annotation.Nullable
  public Long getRolloverPeriods() {
    return rolloverPeriods;
  }

  public void setRolloverPeriods(Long rolloverPeriods) {
    this.rolloverPeriods = rolloverPeriods;
  }


  public ExpandedRatePlanCharge rolloverPeriodLength(Integer rolloverPeriodLength) {
    this.rolloverPeriodLength = rolloverPeriodLength;
    return this;
  }

  /**
   * Get rolloverPeriodLength
   * @return rolloverPeriodLength
   */
  @javax.annotation.Nullable
  public Integer getRolloverPeriodLength() {
    return rolloverPeriodLength;
  }

  public void setRolloverPeriodLength(Integer rolloverPeriodLength) {
    this.rolloverPeriodLength = rolloverPeriodLength;
  }


  public ExpandedRatePlanCharge rolloverApply(String rolloverApply) {
    this.rolloverApply = rolloverApply;
    return this;
  }

  /**
   * Get rolloverApply
   * @return rolloverApply
   */
  @javax.annotation.Nullable
  public String getRolloverApply() {
    return rolloverApply;
  }

  public void setRolloverApply(String rolloverApply) {
    this.rolloverApply = rolloverApply;
  }


  public ExpandedRatePlanCharge isProcessed(Boolean isProcessed) {
    this.isProcessed = isProcessed;
    return this;
  }

  /**
   * Get isProcessed
   * @return isProcessed
   */
  @javax.annotation.Nullable
  public Boolean getIsProcessed() {
    return isProcessed;
  }

  public void setIsProcessed(Boolean isProcessed) {
    this.isProcessed = isProcessed;
  }


  public ExpandedRatePlanCharge listPriceBase(String listPriceBase) {
    this.listPriceBase = listPriceBase;
    return this;
  }

  /**
   * Get listPriceBase
   * @return listPriceBase
   */
  @javax.annotation.Nullable
  public String getListPriceBase() {
    return listPriceBase;
  }

  public void setListPriceBase(String listPriceBase) {
    this.listPriceBase = listPriceBase;
  }


  public ExpandedRatePlanCharge specificListPriceBase(Integer specificListPriceBase) {
    this.specificListPriceBase = specificListPriceBase;
    return this;
  }

  /**
   * Get specificListPriceBase
   * @return specificListPriceBase
   */
  @javax.annotation.Nullable
  public Integer getSpecificListPriceBase() {
    return specificListPriceBase;
  }

  public void setSpecificListPriceBase(Integer specificListPriceBase) {
    this.specificListPriceBase = specificListPriceBase;
  }


  public ExpandedRatePlanCharge priceUpsellQuantityStacked(Boolean priceUpsellQuantityStacked) {
    this.priceUpsellQuantityStacked = priceUpsellQuantityStacked;
    return this;
  }

  /**
   * Get priceUpsellQuantityStacked
   * @return priceUpsellQuantityStacked
   */
  @javax.annotation.Nullable
  public Boolean getPriceUpsellQuantityStacked() {
    return priceUpsellQuantityStacked;
  }

  public void setPriceUpsellQuantityStacked(Boolean priceUpsellQuantityStacked) {
    this.priceUpsellQuantityStacked = priceUpsellQuantityStacked;
  }


  public ExpandedRatePlanCharge commitmentType(String commitmentType) {
    this.commitmentType = commitmentType;
    return this;
  }

  /**
   * Get commitmentType
   * @return commitmentType
   */
  @javax.annotation.Nullable
  public String getCommitmentType() {
    return commitmentType;
  }

  public void setCommitmentType(String commitmentType) {
    this.commitmentType = commitmentType;
  }


  public ExpandedRatePlanCharge isCommitted(Boolean isCommitted) {
    this.isCommitted = isCommitted;
    return this;
  }

  /**
   * Get isCommitted
   * @return isCommitted
   */
  @javax.annotation.Nullable
  public Boolean getIsCommitted() {
    return isCommitted;
  }

  public void setIsCommitted(Boolean isCommitted) {
    this.isCommitted = isCommitted;
  }


  public ExpandedRatePlanCharge mRR(BigDecimal mRR) {
    this.mRR = mRR;
    return this;
  }

  /**
   * Get mRR
   * @return mRR
   */
  @javax.annotation.Nullable
  public BigDecimal getmRR() {
    return mRR;
  }

  public void setmRR(BigDecimal mRR) {
    this.mRR = mRR;
  }


  public ExpandedRatePlanCharge name(String name) {
    this.name = name;
    return this;
  }

  /**
   * Get name
   * @return name
   */
  @javax.annotation.Nullable
  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }


  public ExpandedRatePlanCharge numberOfPeriods(Long numberOfPeriods) {
    this.numberOfPeriods = numberOfPeriods;
    return this;
  }

  /**
   * Get numberOfPeriods
   * @return numberOfPeriods
   */
  @javax.annotation.Nullable
  public Long getNumberOfPeriods() {
    return numberOfPeriods;
  }

  public void setNumberOfPeriods(Long numberOfPeriods) {
    this.numberOfPeriods = numberOfPeriods;
  }


  public ExpandedRatePlanCharge originalId(String originalId) {
    this.originalId = originalId;
    return this;
  }

  /**
   * Get originalId
   * @return originalId
   */
  @javax.annotation.Nullable
  public String getOriginalId() {
    return originalId;
  }

  public void setOriginalId(String originalId) {
    this.originalId = originalId;
  }


  public ExpandedRatePlanCharge overageCalculationOption(String overageCalculationOption) {
    this.overageCalculationOption = overageCalculationOption;
    return this;
  }

  /**
   * Get overageCalculationOption
   * @return overageCalculationOption
   */
  @javax.annotation.Nullable
  public String getOverageCalculationOption() {
    return overageCalculationOption;
  }

  public void setOverageCalculationOption(String overageCalculationOption) {
    this.overageCalculationOption = overageCalculationOption;
  }


  public ExpandedRatePlanCharge overageUnusedUnitsCreditOption(String overageUnusedUnitsCreditOption) {
    this.overageUnusedUnitsCreditOption = overageUnusedUnitsCreditOption;
    return this;
  }

  /**
   * Get overageUnusedUnitsCreditOption
   * @return overageUnusedUnitsCreditOption
   */
  @javax.annotation.Nullable
  public String getOverageUnusedUnitsCreditOption() {
    return overageUnusedUnitsCreditOption;
  }

  public void setOverageUnusedUnitsCreditOption(String overageUnusedUnitsCreditOption) {
    this.overageUnusedUnitsCreditOption = overageUnusedUnitsCreditOption;
  }


  public ExpandedRatePlanCharge prepaidOperationType(String prepaidOperationType) {
    this.prepaidOperationType = prepaidOperationType;
    return this;
  }

  /**
   * Get prepaidOperationType
   * @return prepaidOperationType
   */
  @javax.annotation.Nullable
  public String getPrepaidOperationType() {
    return prepaidOperationType;
  }

  public void setPrepaidOperationType(String prepaidOperationType) {
    this.prepaidOperationType = prepaidOperationType;
  }


  public ExpandedRatePlanCharge prepaidQuantity(BigDecimal prepaidQuantity) {
    this.prepaidQuantity = prepaidQuantity;
    return this;
  }

  /**
   * Get prepaidQuantity
   * @return prepaidQuantity
   */
  @javax.annotation.Nullable
  public BigDecimal getPrepaidQuantity() {
    return prepaidQuantity;
  }

  public void setPrepaidQuantity(BigDecimal prepaidQuantity) {
    this.prepaidQuantity = prepaidQuantity;
  }


  public ExpandedRatePlanCharge prepaidTotalQuantity(BigDecimal prepaidTotalQuantity) {
    this.prepaidTotalQuantity = prepaidTotalQuantity;
    return this;
  }

  /**
   * Get prepaidTotalQuantity
   * @return prepaidTotalQuantity
   */
  @javax.annotation.Nullable
  public BigDecimal getPrepaidTotalQuantity() {
    return prepaidTotalQuantity;
  }

  public void setPrepaidTotalQuantity(BigDecimal prepaidTotalQuantity) {
    this.prepaidTotalQuantity = prepaidTotalQuantity;
  }


  public ExpandedRatePlanCharge salesPrice(BigDecimal salesPrice) {
    this.salesPrice = salesPrice;
    return this;
  }

  /**
   * Get salesPrice
   * @return salesPrice
   */
  @javax.annotation.Nullable
  public BigDecimal getSalesPrice() {
    return salesPrice;
  }

  public void setSalesPrice(BigDecimal salesPrice) {
    this.salesPrice = salesPrice;
  }


  public ExpandedRatePlanCharge priceChangeOption(String priceChangeOption) {
    this.priceChangeOption = priceChangeOption;
    return this;
  }

  /**
   * Get priceChangeOption
   * @return priceChangeOption
   */
  @javax.annotation.Nullable
  public String getPriceChangeOption() {
    return priceChangeOption;
  }

  public void setPriceChangeOption(String priceChangeOption) {
    this.priceChangeOption = priceChangeOption;
  }


  public ExpandedRatePlanCharge priceIncreasePercentage(BigDecimal priceIncreasePercentage) {
    this.priceIncreasePercentage = priceIncreasePercentage;
    return this;
  }

  /**
   * Get priceIncreasePercentage
   * @return priceIncreasePercentage
   */
  @javax.annotation.Nullable
  public BigDecimal getPriceIncreasePercentage() {
    return priceIncreasePercentage;
  }

  public void setPriceIncreasePercentage(BigDecimal priceIncreasePercentage) {
    this.priceIncreasePercentage = priceIncreasePercentage;
  }


  public ExpandedRatePlanCharge processedThroughDate(LocalDate processedThroughDate) {
    this.processedThroughDate = processedThroughDate;
    return this;
  }

  /**
   * Get processedThroughDate
   * @return processedThroughDate
   */
  @javax.annotation.Nullable
  public LocalDate getProcessedThroughDate() {
    return processedThroughDate;
  }

  public void setProcessedThroughDate(LocalDate processedThroughDate) {
    this.processedThroughDate = processedThroughDate;
  }


  public ExpandedRatePlanCharge prorationOption(String prorationOption) {
    this.prorationOption = prorationOption;
    return this;
  }

  /**
   * Get prorationOption
   * @return prorationOption
   */
  @javax.annotation.Nullable
  public String getProrationOption() {
    return prorationOption;
  }

  public void setProrationOption(String prorationOption) {
    this.prorationOption = prorationOption;
  }


  public ExpandedRatePlanCharge quantity(BigDecimal quantity) {
    this.quantity = quantity;
    return this;
  }

  /**
   * Get quantity
   * @return quantity
   */
  @javax.annotation.Nullable
  public BigDecimal getQuantity() {
    return quantity;
  }

  public void setQuantity(BigDecimal quantity) {
    this.quantity = quantity;
  }


  public ExpandedRatePlanCharge numberOfDeliveries(BigDecimal numberOfDeliveries) {
    this.numberOfDeliveries = numberOfDeliveries;
    return this;
  }

  /**
   * Get numberOfDeliveries
   * @return numberOfDeliveries
   */
  @javax.annotation.Nullable
  public BigDecimal getNumberOfDeliveries() {
    return numberOfDeliveries;
  }

  public void setNumberOfDeliveries(BigDecimal numberOfDeliveries) {
    this.numberOfDeliveries = numberOfDeliveries;
  }


  public ExpandedRatePlanCharge ratingGroup(String ratingGroup) {
    this.ratingGroup = ratingGroup;
    return this;
  }

  /**
   * Get ratingGroup
   * @return ratingGroup
   */
  @javax.annotation.Nullable
  public String getRatingGroup() {
    return ratingGroup;
  }

  public void setRatingGroup(String ratingGroup) {
    this.ratingGroup = ratingGroup;
  }


  public ExpandedRatePlanCharge revenueRecognitionRuleName(String revenueRecognitionRuleName) {
    this.revenueRecognitionRuleName = revenueRecognitionRuleName;
    return this;
  }

  /**
   * Get revenueRecognitionRuleName
   * @return revenueRecognitionRuleName
   */
  @javax.annotation.Nullable
  public String getRevenueRecognitionRuleName() {
    return revenueRecognitionRuleName;
  }

  public void setRevenueRecognitionRuleName(String revenueRecognitionRuleName) {
    this.revenueRecognitionRuleName = revenueRecognitionRuleName;
  }


  public ExpandedRatePlanCharge revRecCode(String revRecCode) {
    this.revRecCode = revRecCode;
    return this;
  }

  /**
   * Get revRecCode
   * @return revRecCode
   */
  @javax.annotation.Nullable
  public String getRevRecCode() {
    return revRecCode;
  }

  public void setRevRecCode(String revRecCode) {
    this.revRecCode = revRecCode;
  }


  public ExpandedRatePlanCharge revRecTriggerCondition(String revRecTriggerCondition) {
    this.revRecTriggerCondition = revRecTriggerCondition;
    return this;
  }

  /**
   * Get revRecTriggerCondition
   * @return revRecTriggerCondition
   */
  @javax.annotation.Nullable
  public String getRevRecTriggerCondition() {
    return revRecTriggerCondition;
  }

  public void setRevRecTriggerCondition(String revRecTriggerCondition) {
    this.revRecTriggerCondition = revRecTriggerCondition;
  }


  public ExpandedRatePlanCharge segment(Integer segment) {
    this.segment = segment;
    return this;
  }

  /**
   * Get segment
   * @return segment
   */
  @javax.annotation.Nullable
  public Integer getSegment() {
    return segment;
  }

  public void setSegment(Integer segment) {
    this.segment = segment;
  }


  public ExpandedRatePlanCharge specificBillingPeriod(Long specificBillingPeriod) {
    this.specificBillingPeriod = specificBillingPeriod;
    return this;
  }

  /**
   * Get specificBillingPeriod
   * @return specificBillingPeriod
   */
  @javax.annotation.Nullable
  public Long getSpecificBillingPeriod() {
    return specificBillingPeriod;
  }

  public void setSpecificBillingPeriod(Long specificBillingPeriod) {
    this.specificBillingPeriod = specificBillingPeriod;
  }


  public ExpandedRatePlanCharge specificEndDate(LocalDate specificEndDate) {
    this.specificEndDate = specificEndDate;
    return this;
  }

  /**
   * Get specificEndDate
   * @return specificEndDate
   */
  @javax.annotation.Nullable
  public LocalDate getSpecificEndDate() {
    return specificEndDate;
  }

  public void setSpecificEndDate(LocalDate specificEndDate) {
    this.specificEndDate = specificEndDate;
  }


  public ExpandedRatePlanCharge taxable(Boolean taxable) {
    this.taxable = taxable;
    return this;
  }

  /**
   * Get taxable
   * @return taxable
   */
  @javax.annotation.Nullable
  public Boolean getTaxable() {
    return taxable;
  }

  public void setTaxable(Boolean taxable) {
    this.taxable = taxable;
  }


  public ExpandedRatePlanCharge taxCodeName(String taxCodeName) {
    this.taxCodeName = taxCodeName;
    return this;
  }

  /**
   * Get taxCodeName
   * @return taxCodeName
   */
  @javax.annotation.Nullable
  public String getTaxCodeName() {
    return taxCodeName;
  }

  public void setTaxCodeName(String taxCodeName) {
    this.taxCodeName = taxCodeName;
  }


  public ExpandedRatePlanCharge taxModeOption(String taxModeOption) {
    this.taxModeOption = taxModeOption;
    return this;
  }

  /**
   * Get taxModeOption
   * @return taxModeOption
   */
  @javax.annotation.Nullable
  public String getTaxModeOption() {
    return taxModeOption;
  }

  public void setTaxModeOption(String taxModeOption) {
    this.taxModeOption = taxModeOption;
  }


  public ExpandedRatePlanCharge tCV(BigDecimal tCV) {
    this.tCV = tCV;
    return this;
  }

  /**
   * Get tCV
   * @return tCV
   */
  @javax.annotation.Nullable
  public BigDecimal gettCV() {
    return tCV;
  }

  public void settCV(BigDecimal tCV) {
    this.tCV = tCV;
  }


  public ExpandedRatePlanCharge triggerDate(LocalDate triggerDate) {
    this.triggerDate = triggerDate;
    return this;
  }

  /**
   * Get triggerDate
   * @return triggerDate
   */
  @javax.annotation.Nullable
  public LocalDate getTriggerDate() {
    return triggerDate;
  }

  public void setTriggerDate(LocalDate triggerDate) {
    this.triggerDate = triggerDate;
  }


  public ExpandedRatePlanCharge triggerEvent(String triggerEvent) {
    this.triggerEvent = triggerEvent;
    return this;
  }

  /**
   * Get triggerEvent
   * @return triggerEvent
   */
  @javax.annotation.Nullable
  public String getTriggerEvent() {
    return triggerEvent;
  }

  public void setTriggerEvent(String triggerEvent) {
    this.triggerEvent = triggerEvent;
  }


  public ExpandedRatePlanCharge uOM(String uOM) {
    this.uOM = uOM;
    return this;
  }

  /**
   * Get uOM
   * @return uOM
   */
  @javax.annotation.Nullable
  public String getuOM() {
    return uOM;
  }

  public void setuOM(String uOM) {
    this.uOM = uOM;
  }


  public ExpandedRatePlanCharge upToPeriods(Long upToPeriods) {
    this.upToPeriods = upToPeriods;
    return this;
  }

  /**
   * Get upToPeriods
   * @return upToPeriods
   */
  @javax.annotation.Nullable
  public Long getUpToPeriods() {
    return upToPeriods;
  }

  public void setUpToPeriods(Long upToPeriods) {
    this.upToPeriods = upToPeriods;
  }


  public ExpandedRatePlanCharge upToPeriodsType(String upToPeriodsType) {
    this.upToPeriodsType = upToPeriodsType;
    return this;
  }

  /**
   * Get upToPeriodsType
   * @return upToPeriodsType
   */
  @javax.annotation.Nullable
  public String getUpToPeriodsType() {
    return upToPeriodsType;
  }

  public void setUpToPeriodsType(String upToPeriodsType) {
    this.upToPeriodsType = upToPeriodsType;
  }


  public ExpandedRatePlanCharge version(Long version) {
    this.version = version;
    return this;
  }

  /**
   * Get version
   * @return version
   */
  @javax.annotation.Nullable
  public Long getVersion() {
    return version;
  }

  public void setVersion(Long version) {
    this.version = version;
  }


  public ExpandedRatePlanCharge weeklyBillCycleDay(String weeklyBillCycleDay) {
    this.weeklyBillCycleDay = weeklyBillCycleDay;
    return this;
  }

  /**
   * Get weeklyBillCycleDay
   * @return weeklyBillCycleDay
   */
  @javax.annotation.Nullable
  public String getWeeklyBillCycleDay() {
    return weeklyBillCycleDay;
  }

  public void setWeeklyBillCycleDay(String weeklyBillCycleDay) {
    this.weeklyBillCycleDay = weeklyBillCycleDay;
  }


  public ExpandedRatePlanCharge id(String id) {
    this.id = id;
    return this;
  }

  /**
   * Get id
   * @return id
   */
  @javax.annotation.Nullable
  public String getId() {
    return id;
  }

  public void setId(String id) {
    this.id = id;
  }


  public ExpandedRatePlanCharge createdById(String createdById) {
    this.createdById = createdById;
    return this;
  }

  /**
   * Get createdById
   * @return createdById
   */
  @javax.annotation.Nullable
  public String getCreatedById() {
    return createdById;
  }

  public void setCreatedById(String createdById) {
    this.createdById = createdById;
  }


  public ExpandedRatePlanCharge createdDate(String createdDate) {
    this.createdDate = createdDate;
    return this;
  }

  /**
   * Get createdDate
   * @return createdDate
   */
  @javax.annotation.Nullable
  public String getCreatedDate() {
    return createdDate;
  }

  public void setCreatedDate(String createdDate) {
    this.createdDate = createdDate;
  }


  public ExpandedRatePlanCharge updatedById(String updatedById) {
    this.updatedById = updatedById;
    return this;
  }

  /**
   * Get updatedById
   * @return updatedById
   */
  @javax.annotation.Nullable
  public String getUpdatedById() {
    return updatedById;
  }

  public void setUpdatedById(String updatedById) {
    this.updatedById = updatedById;
  }


  public ExpandedRatePlanCharge updatedDate(String updatedDate) {
    this.updatedDate = updatedDate;
    return this;
  }

  /**
   * Get updatedDate
   * @return updatedDate
   */
  @javax.annotation.Nullable
  public String getUpdatedDate() {
    return updatedDate;
  }

  public void setUpdatedDate(String updatedDate) {
    this.updatedDate = updatedDate;
  }


  public ExpandedRatePlanCharge subscriptionId(String subscriptionId) {
    this.subscriptionId = subscriptionId;
    return this;
  }

  /**
   * Get subscriptionId
   * @return subscriptionId
   */
  @javax.annotation.Nullable
  public String getSubscriptionId() {
    return subscriptionId;
  }

  public void setSubscriptionId(String subscriptionId) {
    this.subscriptionId = subscriptionId;
  }


  public ExpandedRatePlanCharge subscriptionOwnerId(String subscriptionOwnerId) {
    this.subscriptionOwnerId = subscriptionOwnerId;
    return this;
  }

  /**
   * Get subscriptionOwnerId
   * @return subscriptionOwnerId
   */
  @javax.annotation.Nullable
  public String getSubscriptionOwnerId() {
    return subscriptionOwnerId;
  }

  public void setSubscriptionOwnerId(String subscriptionOwnerId) {
    this.subscriptionOwnerId = subscriptionOwnerId;
  }


  public ExpandedRatePlanCharge invoiceOwnerId(String invoiceOwnerId) {
    this.invoiceOwnerId = invoiceOwnerId;
    return this;
  }

  /**
   * Get invoiceOwnerId
   * @return invoiceOwnerId
   */
  @javax.annotation.Nullable
  public String getInvoiceOwnerId() {
    return invoiceOwnerId;
  }

  public void setInvoiceOwnerId(String invoiceOwnerId) {
    this.invoiceOwnerId = invoiceOwnerId;
  }


  public ExpandedRatePlanCharge originalOrderDate(LocalDate originalOrderDate) {
    this.originalOrderDate = originalOrderDate;
    return this;
  }

  /**
   * Get originalOrderDate
   * @return originalOrderDate
   */
  @javax.annotation.Nullable
  public LocalDate getOriginalOrderDate() {
    return originalOrderDate;
  }

  public void setOriginalOrderDate(LocalDate originalOrderDate) {
    this.originalOrderDate = originalOrderDate;
  }


  public ExpandedRatePlanCharge amendedByOrderOn(LocalDate amendedByOrderOn) {
    this.amendedByOrderOn = amendedByOrderOn;
    return this;
  }

  /**
   * Get amendedByOrderOn
   * @return amendedByOrderOn
   */
  @javax.annotation.Nullable
  public LocalDate getAmendedByOrderOn() {
    return amendedByOrderOn;
  }

  public void setAmendedByOrderOn(LocalDate amendedByOrderOn) {
    this.amendedByOrderOn = amendedByOrderOn;
  }


  public ExpandedRatePlanCharge validityPeriodType(String validityPeriodType) {
    this.validityPeriodType = validityPeriodType;
    return this;
  }

  /**
   * Get validityPeriodType
   * @return validityPeriodType
   */
  @javax.annotation.Nullable
  public String getValidityPeriodType() {
    return validityPeriodType;
  }

  public void setValidityPeriodType(String validityPeriodType) {
    this.validityPeriodType = validityPeriodType;
  }


  public ExpandedRatePlanCharge creditOption(String creditOption) {
    this.creditOption = creditOption;
    return this;
  }

  /**
   * Get creditOption
   * @return creditOption
   */
  @javax.annotation.Nullable
  public String getCreditOption() {
    return creditOption;
  }

  public void setCreditOption(String creditOption) {
    this.creditOption = creditOption;
  }


  public ExpandedRatePlanCharge applyToBillingPeriodPartially(Boolean applyToBillingPeriodPartially) {
    this.applyToBillingPeriodPartially = applyToBillingPeriodPartially;
    return this;
  }

  /**
   * Get applyToBillingPeriodPartially
   * @return applyToBillingPeriodPartially
   */
  @javax.annotation.Nullable
  public Boolean getApplyToBillingPeriodPartially() {
    return applyToBillingPeriodPartially;
  }

  public void setApplyToBillingPeriodPartially(Boolean applyToBillingPeriodPartially) {
    this.applyToBillingPeriodPartially = applyToBillingPeriodPartially;
  }


  public ExpandedRatePlanCharge productChargeDefinitionId(String productChargeDefinitionId) {
    this.productChargeDefinitionId = productChargeDefinitionId;
    return this;
  }

  /**
   * Get productChargeDefinitionId
   * @return productChargeDefinitionId
   */
  @javax.annotation.Nullable
  public String getProductChargeDefinitionId() {
    return productChargeDefinitionId;
  }

  public void setProductChargeDefinitionId(String productChargeDefinitionId) {
    this.productChargeDefinitionId = productChargeDefinitionId;
  }


  public ExpandedRatePlanCharge reverted(Boolean reverted) {
    this.reverted = reverted;
    return this;
  }

  /**
   * Get reverted
   * @return reverted
   */
  @javax.annotation.Nullable
  public Boolean getReverted() {
    return reverted;
  }

  public void setReverted(Boolean reverted) {
    this.reverted = reverted;
  }


  public ExpandedRatePlanCharge accountReceivableAccountingCodeId(String accountReceivableAccountingCodeId) {
    this.accountReceivableAccountingCodeId = accountReceivableAccountingCodeId;
    return this;
  }

  /**
   * Get accountReceivableAccountingCodeId
   * @return accountReceivableAccountingCodeId
   */
  @javax.annotation.Nullable
  public String getAccountReceivableAccountingCodeId() {
    return accountReceivableAccountingCodeId;
  }

  public void setAccountReceivableAccountingCodeId(String accountReceivableAccountingCodeId) {
    this.accountReceivableAccountingCodeId = accountReceivableAccountingCodeId;
  }


  public ExpandedRatePlanCharge deferredRevenueAccountingCodeId(String deferredRevenueAccountingCodeId) {
    this.deferredRevenueAccountingCodeId = deferredRevenueAccountingCodeId;
    return this;
  }

  /**
   * Get deferredRevenueAccountingCodeId
   * @return deferredRevenueAccountingCodeId
   */
  @javax.annotation.Nullable
  public String getDeferredRevenueAccountingCodeId() {
    return deferredRevenueAccountingCodeId;
  }

  public void setDeferredRevenueAccountingCodeId(String deferredRevenueAccountingCodeId) {
    this.deferredRevenueAccountingCodeId = deferredRevenueAccountingCodeId;
  }


  public ExpandedRatePlanCharge recognizedRevenueAccountingCodeId(String recognizedRevenueAccountingCodeId) {
    this.recognizedRevenueAccountingCodeId = recognizedRevenueAccountingCodeId;
    return this;
  }

  /**
   * Get recognizedRevenueAccountingCodeId
   * @return recognizedRevenueAccountingCodeId
   */
  @javax.annotation.Nullable
  public String getRecognizedRevenueAccountingCodeId() {
    return recognizedRevenueAccountingCodeId;
  }

  public void setRecognizedRevenueAccountingCodeId(String recognizedRevenueAccountingCodeId) {
    this.recognizedRevenueAccountingCodeId = recognizedRevenueAccountingCodeId;
  }


  public ExpandedRatePlanCharge prepaidUOM(String prepaidUOM) {
    this.prepaidUOM = prepaidUOM;
    return this;
  }

  /**
   * Get prepaidUOM
   * @return prepaidUOM
   */
  @javax.annotation.Nullable
  public String getPrepaidUOM() {
    return prepaidUOM;
  }

  public void setPrepaidUOM(String prepaidUOM) {
    this.prepaidUOM = prepaidUOM;
  }


  public ExpandedRatePlanCharge drawdownUom(String drawdownUom) {
    this.drawdownUom = drawdownUom;
    return this;
  }

  /**
   * Get drawdownUom
   * @return drawdownUom
   */
  @javax.annotation.Nullable
  public String getDrawdownUom() {
    return drawdownUom;
  }

  public void setDrawdownUom(String drawdownUom) {
    this.drawdownUom = drawdownUom;
  }


  public ExpandedRatePlanCharge ratePlan(ExpandedRatePlan ratePlan) {
    this.ratePlan = ratePlan;
    return this;
  }

  /**
   * Get ratePlan
   * @return ratePlan
   */
  @javax.annotation.Nullable
  public ExpandedRatePlan getRatePlan() {
    return ratePlan;
  }

  public void setRatePlan(ExpandedRatePlan ratePlan) {
    this.ratePlan = ratePlan;
  }


  public ExpandedRatePlanCharge productRatePlanCharge(ExpandedProductRatePlanCharge productRatePlanCharge) {
    this.productRatePlanCharge = productRatePlanCharge;
    return this;
  }

  /**
   * Get productRatePlanCharge
   * @return productRatePlanCharge
   */
  @javax.annotation.Nullable
  public ExpandedProductRatePlanCharge getProductRatePlanCharge() {
    return productRatePlanCharge;
  }

  public void setProductRatePlanCharge(ExpandedProductRatePlanCharge productRatePlanCharge) {
    this.productRatePlanCharge = productRatePlanCharge;
  }


  public ExpandedRatePlanCharge ratePlanChargeTiers(List ratePlanChargeTiers) {
    this.ratePlanChargeTiers = ratePlanChargeTiers;
    return this;
  }

  public ExpandedRatePlanCharge addRatePlanChargeTiersItem(ExpandedRatePlanChargeTier ratePlanChargeTiersItem) {
    if (this.ratePlanChargeTiers == null) {
      this.ratePlanChargeTiers = new ArrayList<>();
    }
    this.ratePlanChargeTiers.add(ratePlanChargeTiersItem);
    return this;
  }

  /**
   * Get ratePlanChargeTiers
   * @return ratePlanChargeTiers
   */
  @javax.annotation.Nullable
  public List getRatePlanChargeTiers() {
    return ratePlanChargeTiers;
  }

  public void setRatePlanChargeTiers(List ratePlanChargeTiers) {
    this.ratePlanChargeTiers = ratePlanChargeTiers;
  }

  /**
   * A container for additional, undeclared properties.
   * This is a holder for any undeclared properties as specified with
   * the 'additionalProperties' keyword in the OAS document.
   */
  private Map additionalProperties;

  /**
   * Set the additional (undeclared) property with the specified name and value.
   * If the property does not already exist, create it otherwise replace it.
   *
   * @param key name of the property
   * @param value value of the property
   * @return the ExpandedRatePlanCharge instance itself
   */
  public ExpandedRatePlanCharge putAdditionalProperty(String key, Object value) {
    if (this.additionalProperties == null) {
        this.additionalProperties = new HashMap();
    }
    this.additionalProperties.put(key, value);
    return this;
  }

  /**
   * Return the additional (undeclared) property.
   *
   * @return a map of objects
   */
  public Map getAdditionalProperties() {
    return additionalProperties;
  }

  /**
   * Return the additional (undeclared) property with the specified name.
   *
   * @param key name of the property
   * @return an object
   */
  public Object getAdditionalProperty(String key) {
    if (this.additionalProperties == null) {
        return null;
    }
    return this.additionalProperties.get(key);
  }


  @Override
  public boolean equals(Object o) {
    if (this == o) {
      return true;
    }
    if (o == null || getClass() != o.getClass()) {
      return false;
    }
    ExpandedRatePlanCharge expandedRatePlanCharge = (ExpandedRatePlanCharge) o;
    return Objects.equals(this.ratePlanId, expandedRatePlanCharge.ratePlanId) &&
        Objects.equals(this.productRatePlanChargeId, expandedRatePlanCharge.productRatePlanChargeId) &&
        Objects.equals(this.accountingCode, expandedRatePlanCharge.accountingCode) &&
        Objects.equals(this.accountingCodeEntityId, expandedRatePlanCharge.accountingCodeEntityId) &&
        Objects.equals(this.applyDiscountTo, expandedRatePlanCharge.applyDiscountTo) &&
        Objects.equals(this.billCycleDay, expandedRatePlanCharge.billCycleDay) &&
        Objects.equals(this.billCycleType, expandedRatePlanCharge.billCycleType) &&
        Objects.equals(this.billingPeriod, expandedRatePlanCharge.billingPeriod) &&
        Objects.equals(this.billingPeriodAlignment, expandedRatePlanCharge.billingPeriodAlignment) &&
        Objects.equals(this.billingTiming, expandedRatePlanCharge.billingTiming) &&
        Objects.equals(this.chargedThroughDate, expandedRatePlanCharge.chargedThroughDate) &&
        Objects.equals(this.chargeFunction, expandedRatePlanCharge.chargeFunction) &&
        Objects.equals(this.chargeModel, expandedRatePlanCharge.chargeModel) &&
        Objects.equals(this.chargeNumber, expandedRatePlanCharge.chargeNumber) &&
        Objects.equals(this.chargeType, expandedRatePlanCharge.chargeType) &&
        Objects.equals(this.description, expandedRatePlanCharge.description) &&
        Objects.equals(this.discountLevel, expandedRatePlanCharge.discountLevel) &&
        Objects.equals(this.dMRC, expandedRatePlanCharge.dMRC) &&
        Objects.equals(this.drawdownRate, expandedRatePlanCharge.drawdownRate) &&
        Objects.equals(this.dTCV, expandedRatePlanCharge.dTCV) &&
        Objects.equals(this.effectiveEndDate, expandedRatePlanCharge.effectiveEndDate) &&
        Objects.equals(this.effectiveStartDate, expandedRatePlanCharge.effectiveStartDate) &&
        Objects.equals(this.endDateCondition, expandedRatePlanCharge.endDateCondition) &&
        Objects.equals(this.excludeItemBookingFromRevenueAccounting, expandedRatePlanCharge.excludeItemBookingFromRevenueAccounting) &&
        Objects.equals(this.reflectDiscountInNetAmount, expandedRatePlanCharge.reflectDiscountInNetAmount) &&
        Objects.equals(this.revenueRecognitionTiming, expandedRatePlanCharge.revenueRecognitionTiming) &&
        Objects.equals(this.revenueAmortizationMethod, expandedRatePlanCharge.revenueAmortizationMethod) &&
        Objects.equals(this.excludeItemBillingFromRevenueAccounting, expandedRatePlanCharge.excludeItemBillingFromRevenueAccounting) &&
        Objects.equals(this.invoiceScheduleId, expandedRatePlanCharge.invoiceScheduleId) &&
        Objects.equals(this.isLastSegment, expandedRatePlanCharge.isLastSegment) &&
        Objects.equals(this.isPrepaid, expandedRatePlanCharge.isPrepaid) &&
        Objects.equals(this.isRollover, expandedRatePlanCharge.isRollover) &&
        Objects.equals(this.rolloverPeriods, expandedRatePlanCharge.rolloverPeriods) &&
        Objects.equals(this.rolloverPeriodLength, expandedRatePlanCharge.rolloverPeriodLength) &&
        Objects.equals(this.rolloverApply, expandedRatePlanCharge.rolloverApply) &&
        Objects.equals(this.isProcessed, expandedRatePlanCharge.isProcessed) &&
        Objects.equals(this.listPriceBase, expandedRatePlanCharge.listPriceBase) &&
        Objects.equals(this.specificListPriceBase, expandedRatePlanCharge.specificListPriceBase) &&
        Objects.equals(this.priceUpsellQuantityStacked, expandedRatePlanCharge.priceUpsellQuantityStacked) &&
        Objects.equals(this.commitmentType, expandedRatePlanCharge.commitmentType) &&
        Objects.equals(this.isCommitted, expandedRatePlanCharge.isCommitted) &&
        Objects.equals(this.mRR, expandedRatePlanCharge.mRR) &&
        Objects.equals(this.name, expandedRatePlanCharge.name) &&
        Objects.equals(this.numberOfPeriods, expandedRatePlanCharge.numberOfPeriods) &&
        Objects.equals(this.originalId, expandedRatePlanCharge.originalId) &&
        Objects.equals(this.overageCalculationOption, expandedRatePlanCharge.overageCalculationOption) &&
        Objects.equals(this.overageUnusedUnitsCreditOption, expandedRatePlanCharge.overageUnusedUnitsCreditOption) &&
        Objects.equals(this.prepaidOperationType, expandedRatePlanCharge.prepaidOperationType) &&
        Objects.equals(this.prepaidQuantity, expandedRatePlanCharge.prepaidQuantity) &&
        Objects.equals(this.prepaidTotalQuantity, expandedRatePlanCharge.prepaidTotalQuantity) &&
        Objects.equals(this.salesPrice, expandedRatePlanCharge.salesPrice) &&
        Objects.equals(this.priceChangeOption, expandedRatePlanCharge.priceChangeOption) &&
        Objects.equals(this.priceIncreasePercentage, expandedRatePlanCharge.priceIncreasePercentage) &&
        Objects.equals(this.processedThroughDate, expandedRatePlanCharge.processedThroughDate) &&
        Objects.equals(this.prorationOption, expandedRatePlanCharge.prorationOption) &&
        Objects.equals(this.quantity, expandedRatePlanCharge.quantity) &&
        Objects.equals(this.numberOfDeliveries, expandedRatePlanCharge.numberOfDeliveries) &&
        Objects.equals(this.ratingGroup, expandedRatePlanCharge.ratingGroup) &&
        Objects.equals(this.revenueRecognitionRuleName, expandedRatePlanCharge.revenueRecognitionRuleName) &&
        Objects.equals(this.revRecCode, expandedRatePlanCharge.revRecCode) &&
        Objects.equals(this.revRecTriggerCondition, expandedRatePlanCharge.revRecTriggerCondition) &&
        Objects.equals(this.segment, expandedRatePlanCharge.segment) &&
        Objects.equals(this.specificBillingPeriod, expandedRatePlanCharge.specificBillingPeriod) &&
        Objects.equals(this.specificEndDate, expandedRatePlanCharge.specificEndDate) &&
        Objects.equals(this.taxable, expandedRatePlanCharge.taxable) &&
        Objects.equals(this.taxCodeName, expandedRatePlanCharge.taxCodeName) &&
        Objects.equals(this.taxModeOption, expandedRatePlanCharge.taxModeOption) &&
        Objects.equals(this.tCV, expandedRatePlanCharge.tCV) &&
        Objects.equals(this.triggerDate, expandedRatePlanCharge.triggerDate) &&
        Objects.equals(this.triggerEvent, expandedRatePlanCharge.triggerEvent) &&
        Objects.equals(this.uOM, expandedRatePlanCharge.uOM) &&
        Objects.equals(this.upToPeriods, expandedRatePlanCharge.upToPeriods) &&
        Objects.equals(this.upToPeriodsType, expandedRatePlanCharge.upToPeriodsType) &&
        Objects.equals(this.version, expandedRatePlanCharge.version) &&
        Objects.equals(this.weeklyBillCycleDay, expandedRatePlanCharge.weeklyBillCycleDay) &&
        Objects.equals(this.id, expandedRatePlanCharge.id) &&
        Objects.equals(this.createdById, expandedRatePlanCharge.createdById) &&
        Objects.equals(this.createdDate, expandedRatePlanCharge.createdDate) &&
        Objects.equals(this.updatedById, expandedRatePlanCharge.updatedById) &&
        Objects.equals(this.updatedDate, expandedRatePlanCharge.updatedDate) &&
        Objects.equals(this.subscriptionId, expandedRatePlanCharge.subscriptionId) &&
        Objects.equals(this.subscriptionOwnerId, expandedRatePlanCharge.subscriptionOwnerId) &&
        Objects.equals(this.invoiceOwnerId, expandedRatePlanCharge.invoiceOwnerId) &&
        Objects.equals(this.originalOrderDate, expandedRatePlanCharge.originalOrderDate) &&
        Objects.equals(this.amendedByOrderOn, expandedRatePlanCharge.amendedByOrderOn) &&
        Objects.equals(this.validityPeriodType, expandedRatePlanCharge.validityPeriodType) &&
        Objects.equals(this.creditOption, expandedRatePlanCharge.creditOption) &&
        Objects.equals(this.applyToBillingPeriodPartially, expandedRatePlanCharge.applyToBillingPeriodPartially) &&
        Objects.equals(this.productChargeDefinitionId, expandedRatePlanCharge.productChargeDefinitionId) &&
        Objects.equals(this.reverted, expandedRatePlanCharge.reverted) &&
        Objects.equals(this.accountReceivableAccountingCodeId, expandedRatePlanCharge.accountReceivableAccountingCodeId) &&
        Objects.equals(this.deferredRevenueAccountingCodeId, expandedRatePlanCharge.deferredRevenueAccountingCodeId) &&
        Objects.equals(this.recognizedRevenueAccountingCodeId, expandedRatePlanCharge.recognizedRevenueAccountingCodeId) &&
        Objects.equals(this.prepaidUOM, expandedRatePlanCharge.prepaidUOM) &&
        Objects.equals(this.drawdownUom, expandedRatePlanCharge.drawdownUom) &&
        Objects.equals(this.ratePlan, expandedRatePlanCharge.ratePlan) &&
        Objects.equals(this.productRatePlanCharge, expandedRatePlanCharge.productRatePlanCharge) &&
        Objects.equals(this.ratePlanChargeTiers, expandedRatePlanCharge.ratePlanChargeTiers)&&
        Objects.equals(this.additionalProperties, expandedRatePlanCharge.additionalProperties);
  }

  @Override
  public int hashCode() {
    return Objects.hash(ratePlanId, productRatePlanChargeId, accountingCode, accountingCodeEntityId, applyDiscountTo, billCycleDay, billCycleType, billingPeriod, billingPeriodAlignment, billingTiming, chargedThroughDate, chargeFunction, chargeModel, chargeNumber, chargeType, description, discountLevel, dMRC, drawdownRate, dTCV, effectiveEndDate, effectiveStartDate, endDateCondition, excludeItemBookingFromRevenueAccounting, reflectDiscountInNetAmount, revenueRecognitionTiming, revenueAmortizationMethod, excludeItemBillingFromRevenueAccounting, invoiceScheduleId, isLastSegment, isPrepaid, isRollover, rolloverPeriods, rolloverPeriodLength, rolloverApply, isProcessed, listPriceBase, specificListPriceBase, priceUpsellQuantityStacked, commitmentType, isCommitted, mRR, name, numberOfPeriods, originalId, overageCalculationOption, overageUnusedUnitsCreditOption, prepaidOperationType, prepaidQuantity, prepaidTotalQuantity, salesPrice, priceChangeOption, priceIncreasePercentage, processedThroughDate, prorationOption, quantity, numberOfDeliveries, ratingGroup, revenueRecognitionRuleName, revRecCode, revRecTriggerCondition, segment, specificBillingPeriod, specificEndDate, taxable, taxCodeName, taxModeOption, tCV, triggerDate, triggerEvent, uOM, upToPeriods, upToPeriodsType, version, weeklyBillCycleDay, id, createdById, createdDate, updatedById, updatedDate, subscriptionId, subscriptionOwnerId, invoiceOwnerId, originalOrderDate, amendedByOrderOn, validityPeriodType, creditOption, applyToBillingPeriodPartially, productChargeDefinitionId, reverted, accountReceivableAccountingCodeId, deferredRevenueAccountingCodeId, recognizedRevenueAccountingCodeId, prepaidUOM, drawdownUom, ratePlan, productRatePlanCharge, ratePlanChargeTiers, additionalProperties);
  }

  @Override
  public String toString() {
    StringBuilder sb = new StringBuilder();
    sb.append("class ExpandedRatePlanCharge {\n");
    sb.append("    ratePlanId: ").append(toIndentedString(ratePlanId)).append("\n");
    sb.append("    productRatePlanChargeId: ").append(toIndentedString(productRatePlanChargeId)).append("\n");
    sb.append("    accountingCode: ").append(toIndentedString(accountingCode)).append("\n");
    sb.append("    accountingCodeEntityId: ").append(toIndentedString(accountingCodeEntityId)).append("\n");
    sb.append("    applyDiscountTo: ").append(toIndentedString(applyDiscountTo)).append("\n");
    sb.append("    billCycleDay: ").append(toIndentedString(billCycleDay)).append("\n");
    sb.append("    billCycleType: ").append(toIndentedString(billCycleType)).append("\n");
    sb.append("    billingPeriod: ").append(toIndentedString(billingPeriod)).append("\n");
    sb.append("    billingPeriodAlignment: ").append(toIndentedString(billingPeriodAlignment)).append("\n");
    sb.append("    billingTiming: ").append(toIndentedString(billingTiming)).append("\n");
    sb.append("    chargedThroughDate: ").append(toIndentedString(chargedThroughDate)).append("\n");
    sb.append("    chargeFunction: ").append(toIndentedString(chargeFunction)).append("\n");
    sb.append("    chargeModel: ").append(toIndentedString(chargeModel)).append("\n");
    sb.append("    chargeNumber: ").append(toIndentedString(chargeNumber)).append("\n");
    sb.append("    chargeType: ").append(toIndentedString(chargeType)).append("\n");
    sb.append("    description: ").append(toIndentedString(description)).append("\n");
    sb.append("    discountLevel: ").append(toIndentedString(discountLevel)).append("\n");
    sb.append("    dMRC: ").append(toIndentedString(dMRC)).append("\n");
    sb.append("    drawdownRate: ").append(toIndentedString(drawdownRate)).append("\n");
    sb.append("    dTCV: ").append(toIndentedString(dTCV)).append("\n");
    sb.append("    effectiveEndDate: ").append(toIndentedString(effectiveEndDate)).append("\n");
    sb.append("    effectiveStartDate: ").append(toIndentedString(effectiveStartDate)).append("\n");
    sb.append("    endDateCondition: ").append(toIndentedString(endDateCondition)).append("\n");
    sb.append("    excludeItemBookingFromRevenueAccounting: ").append(toIndentedString(excludeItemBookingFromRevenueAccounting)).append("\n");
    sb.append("    reflectDiscountInNetAmount: ").append(toIndentedString(reflectDiscountInNetAmount)).append("\n");
    sb.append("    revenueRecognitionTiming: ").append(toIndentedString(revenueRecognitionTiming)).append("\n");
    sb.append("    revenueAmortizationMethod: ").append(toIndentedString(revenueAmortizationMethod)).append("\n");
    sb.append("    excludeItemBillingFromRevenueAccounting: ").append(toIndentedString(excludeItemBillingFromRevenueAccounting)).append("\n");
    sb.append("    invoiceScheduleId: ").append(toIndentedString(invoiceScheduleId)).append("\n");
    sb.append("    isLastSegment: ").append(toIndentedString(isLastSegment)).append("\n");
    sb.append("    isPrepaid: ").append(toIndentedString(isPrepaid)).append("\n");
    sb.append("    isRollover: ").append(toIndentedString(isRollover)).append("\n");
    sb.append("    rolloverPeriods: ").append(toIndentedString(rolloverPeriods)).append("\n");
    sb.append("    rolloverPeriodLength: ").append(toIndentedString(rolloverPeriodLength)).append("\n");
    sb.append("    rolloverApply: ").append(toIndentedString(rolloverApply)).append("\n");
    sb.append("    isProcessed: ").append(toIndentedString(isProcessed)).append("\n");
    sb.append("    listPriceBase: ").append(toIndentedString(listPriceBase)).append("\n");
    sb.append("    specificListPriceBase: ").append(toIndentedString(specificListPriceBase)).append("\n");
    sb.append("    priceUpsellQuantityStacked: ").append(toIndentedString(priceUpsellQuantityStacked)).append("\n");
    sb.append("    commitmentType: ").append(toIndentedString(commitmentType)).append("\n");
    sb.append("    isCommitted: ").append(toIndentedString(isCommitted)).append("\n");
    sb.append("    mRR: ").append(toIndentedString(mRR)).append("\n");
    sb.append("    name: ").append(toIndentedString(name)).append("\n");
    sb.append("    numberOfPeriods: ").append(toIndentedString(numberOfPeriods)).append("\n");
    sb.append("    originalId: ").append(toIndentedString(originalId)).append("\n");
    sb.append("    overageCalculationOption: ").append(toIndentedString(overageCalculationOption)).append("\n");
    sb.append("    overageUnusedUnitsCreditOption: ").append(toIndentedString(overageUnusedUnitsCreditOption)).append("\n");
    sb.append("    prepaidOperationType: ").append(toIndentedString(prepaidOperationType)).append("\n");
    sb.append("    prepaidQuantity: ").append(toIndentedString(prepaidQuantity)).append("\n");
    sb.append("    prepaidTotalQuantity: ").append(toIndentedString(prepaidTotalQuantity)).append("\n");
    sb.append("    salesPrice: ").append(toIndentedString(salesPrice)).append("\n");
    sb.append("    priceChangeOption: ").append(toIndentedString(priceChangeOption)).append("\n");
    sb.append("    priceIncreasePercentage: ").append(toIndentedString(priceIncreasePercentage)).append("\n");
    sb.append("    processedThroughDate: ").append(toIndentedString(processedThroughDate)).append("\n");
    sb.append("    prorationOption: ").append(toIndentedString(prorationOption)).append("\n");
    sb.append("    quantity: ").append(toIndentedString(quantity)).append("\n");
    sb.append("    numberOfDeliveries: ").append(toIndentedString(numberOfDeliveries)).append("\n");
    sb.append("    ratingGroup: ").append(toIndentedString(ratingGroup)).append("\n");
    sb.append("    revenueRecognitionRuleName: ").append(toIndentedString(revenueRecognitionRuleName)).append("\n");
    sb.append("    revRecCode: ").append(toIndentedString(revRecCode)).append("\n");
    sb.append("    revRecTriggerCondition: ").append(toIndentedString(revRecTriggerCondition)).append("\n");
    sb.append("    segment: ").append(toIndentedString(segment)).append("\n");
    sb.append("    specificBillingPeriod: ").append(toIndentedString(specificBillingPeriod)).append("\n");
    sb.append("    specificEndDate: ").append(toIndentedString(specificEndDate)).append("\n");
    sb.append("    taxable: ").append(toIndentedString(taxable)).append("\n");
    sb.append("    taxCodeName: ").append(toIndentedString(taxCodeName)).append("\n");
    sb.append("    taxModeOption: ").append(toIndentedString(taxModeOption)).append("\n");
    sb.append("    tCV: ").append(toIndentedString(tCV)).append("\n");
    sb.append("    triggerDate: ").append(toIndentedString(triggerDate)).append("\n");
    sb.append("    triggerEvent: ").append(toIndentedString(triggerEvent)).append("\n");
    sb.append("    uOM: ").append(toIndentedString(uOM)).append("\n");
    sb.append("    upToPeriods: ").append(toIndentedString(upToPeriods)).append("\n");
    sb.append("    upToPeriodsType: ").append(toIndentedString(upToPeriodsType)).append("\n");
    sb.append("    version: ").append(toIndentedString(version)).append("\n");
    sb.append("    weeklyBillCycleDay: ").append(toIndentedString(weeklyBillCycleDay)).append("\n");
    sb.append("    id: ").append(toIndentedString(id)).append("\n");
    sb.append("    createdById: ").append(toIndentedString(createdById)).append("\n");
    sb.append("    createdDate: ").append(toIndentedString(createdDate)).append("\n");
    sb.append("    updatedById: ").append(toIndentedString(updatedById)).append("\n");
    sb.append("    updatedDate: ").append(toIndentedString(updatedDate)).append("\n");
    sb.append("    subscriptionId: ").append(toIndentedString(subscriptionId)).append("\n");
    sb.append("    subscriptionOwnerId: ").append(toIndentedString(subscriptionOwnerId)).append("\n");
    sb.append("    invoiceOwnerId: ").append(toIndentedString(invoiceOwnerId)).append("\n");
    sb.append("    originalOrderDate: ").append(toIndentedString(originalOrderDate)).append("\n");
    sb.append("    amendedByOrderOn: ").append(toIndentedString(amendedByOrderOn)).append("\n");
    sb.append("    validityPeriodType: ").append(toIndentedString(validityPeriodType)).append("\n");
    sb.append("    creditOption: ").append(toIndentedString(creditOption)).append("\n");
    sb.append("    applyToBillingPeriodPartially: ").append(toIndentedString(applyToBillingPeriodPartially)).append("\n");
    sb.append("    productChargeDefinitionId: ").append(toIndentedString(productChargeDefinitionId)).append("\n");
    sb.append("    reverted: ").append(toIndentedString(reverted)).append("\n");
    sb.append("    accountReceivableAccountingCodeId: ").append(toIndentedString(accountReceivableAccountingCodeId)).append("\n");
    sb.append("    deferredRevenueAccountingCodeId: ").append(toIndentedString(deferredRevenueAccountingCodeId)).append("\n");
    sb.append("    recognizedRevenueAccountingCodeId: ").append(toIndentedString(recognizedRevenueAccountingCodeId)).append("\n");
    sb.append("    prepaidUOM: ").append(toIndentedString(prepaidUOM)).append("\n");
    sb.append("    drawdownUom: ").append(toIndentedString(drawdownUom)).append("\n");
    sb.append("    ratePlan: ").append(toIndentedString(ratePlan)).append("\n");
    sb.append("    productRatePlanCharge: ").append(toIndentedString(productRatePlanCharge)).append("\n");
    sb.append("    ratePlanChargeTiers: ").append(toIndentedString(ratePlanChargeTiers)).append("\n");
    sb.append("    additionalProperties: ").append(toIndentedString(additionalProperties)).append("\n");
    sb.append("}");
    return sb.toString();
  }

  /**
   * Convert the given object to string with each line indented by 4 spaces
   * (except the first line).
   */
  private String toIndentedString(Object o) {
    if (o == null) {
      return "null";
    }
    return o.toString().replace("\n", "\n    ");
  }


  public static HashSet openapiFields;
  public static HashSet openapiRequiredFields;

  static {
    // a set of all properties/fields (JSON key names)
    openapiFields = new HashSet();
    openapiFields.add("ratePlanId");
    openapiFields.add("productRatePlanChargeId");
    openapiFields.add("accountingCode");
    openapiFields.add("accountingCodeEntityId");
    openapiFields.add("applyDiscountTo");
    openapiFields.add("billCycleDay");
    openapiFields.add("billCycleType");
    openapiFields.add("billingPeriod");
    openapiFields.add("billingPeriodAlignment");
    openapiFields.add("billingTiming");
    openapiFields.add("chargedThroughDate");
    openapiFields.add("chargeFunction");
    openapiFields.add("chargeModel");
    openapiFields.add("chargeNumber");
    openapiFields.add("chargeType");
    openapiFields.add("description");
    openapiFields.add("discountLevel");
    openapiFields.add("dMRC");
    openapiFields.add("drawdownRate");
    openapiFields.add("dTCV");
    openapiFields.add("effectiveEndDate");
    openapiFields.add("effectiveStartDate");
    openapiFields.add("endDateCondition");
    openapiFields.add("excludeItemBookingFromRevenueAccounting");
    openapiFields.add("reflectDiscountInNetAmount");
    openapiFields.add("revenueRecognitionTiming");
    openapiFields.add("revenueAmortizationMethod");
    openapiFields.add("excludeItemBillingFromRevenueAccounting");
    openapiFields.add("invoiceScheduleId");
    openapiFields.add("isLastSegment");
    openapiFields.add("isPrepaid");
    openapiFields.add("isRollover");
    openapiFields.add("rolloverPeriods");
    openapiFields.add("rolloverPeriodLength");
    openapiFields.add("rolloverApply");
    openapiFields.add("isProcessed");
    openapiFields.add("listPriceBase");
    openapiFields.add("specificListPriceBase");
    openapiFields.add("priceUpsellQuantityStacked");
    openapiFields.add("commitmentType");
    openapiFields.add("isCommitted");
    openapiFields.add("mRR");
    openapiFields.add("name");
    openapiFields.add("numberOfPeriods");
    openapiFields.add("originalId");
    openapiFields.add("overageCalculationOption");
    openapiFields.add("overageUnusedUnitsCreditOption");
    openapiFields.add("prepaidOperationType");
    openapiFields.add("prepaidQuantity");
    openapiFields.add("prepaidTotalQuantity");
    openapiFields.add("salesPrice");
    openapiFields.add("priceChangeOption");
    openapiFields.add("priceIncreasePercentage");
    openapiFields.add("processedThroughDate");
    openapiFields.add("prorationOption");
    openapiFields.add("quantity");
    openapiFields.add("numberOfDeliveries");
    openapiFields.add("ratingGroup");
    openapiFields.add("revenueRecognitionRuleName");
    openapiFields.add("revRecCode");
    openapiFields.add("revRecTriggerCondition");
    openapiFields.add("segment");
    openapiFields.add("specificBillingPeriod");
    openapiFields.add("specificEndDate");
    openapiFields.add("taxable");
    openapiFields.add("taxCodeName");
    openapiFields.add("taxModeOption");
    openapiFields.add("tCV");
    openapiFields.add("triggerDate");
    openapiFields.add("triggerEvent");
    openapiFields.add("uOM");
    openapiFields.add("upToPeriods");
    openapiFields.add("upToPeriodsType");
    openapiFields.add("version");
    openapiFields.add("weeklyBillCycleDay");
    openapiFields.add("id");
    openapiFields.add("createdById");
    openapiFields.add("createdDate");
    openapiFields.add("updatedById");
    openapiFields.add("updatedDate");
    openapiFields.add("subscriptionId");
    openapiFields.add("subscriptionOwnerId");
    openapiFields.add("invoiceOwnerId");
    openapiFields.add("originalOrderDate");
    openapiFields.add("amendedByOrderOn");
    openapiFields.add("validityPeriodType");
    openapiFields.add("creditOption");
    openapiFields.add("applyToBillingPeriodPartially");
    openapiFields.add("productChargeDefinitionId");
    openapiFields.add("reverted");
    openapiFields.add("accountReceivableAccountingCodeId");
    openapiFields.add("deferredRevenueAccountingCodeId");
    openapiFields.add("recognizedRevenueAccountingCodeId");
    openapiFields.add("prepaidUOM");
    openapiFields.add("drawdownUom");
    openapiFields.add("ratePlan");
    openapiFields.add("productRatePlanCharge");
    openapiFields.add("ratePlanChargeTiers");

    // a set of required properties/fields (JSON key names)
    openapiRequiredFields = new HashSet();
  }

  /**
   * Validates the JSON Element and throws an exception if issues found
   *
   * @param jsonElement JSON Element
   * @throws IOException if the JSON Element is invalid with respect to ExpandedRatePlanCharge
   */
  public static void validateJsonElement(JsonElement jsonElement) throws IOException {
      if (jsonElement == null) {
        if (!ExpandedRatePlanCharge.openapiRequiredFields.isEmpty()) { // has required fields but JSON element is null
          throw new IllegalArgumentException(String.format("The required field(s) %s in ExpandedRatePlanCharge is not found in the empty JSON string", ExpandedRatePlanCharge.openapiRequiredFields.toString()));
        }
      }
        JsonObject jsonObj = jsonElement.getAsJsonObject();
      if ((jsonObj.get("ratePlanId") != null && !jsonObj.get("ratePlanId").isJsonNull()) && !jsonObj.get("ratePlanId").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `ratePlanId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ratePlanId").toString()));
      }
      if ((jsonObj.get("productRatePlanChargeId") != null && !jsonObj.get("productRatePlanChargeId").isJsonNull()) && !jsonObj.get("productRatePlanChargeId").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `productRatePlanChargeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productRatePlanChargeId").toString()));
      }
      if ((jsonObj.get("accountingCode") != null && !jsonObj.get("accountingCode").isJsonNull()) && !jsonObj.get("accountingCode").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `accountingCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountingCode").toString()));
      }
      if ((jsonObj.get("applyDiscountTo") != null && !jsonObj.get("applyDiscountTo").isJsonNull()) && !jsonObj.get("applyDiscountTo").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `applyDiscountTo` to be a primitive type in the JSON string but got `%s`", jsonObj.get("applyDiscountTo").toString()));
      }
      if ((jsonObj.get("billCycleType") != null && !jsonObj.get("billCycleType").isJsonNull()) && !jsonObj.get("billCycleType").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `billCycleType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billCycleType").toString()));
      }
      if ((jsonObj.get("billingPeriod") != null && !jsonObj.get("billingPeriod").isJsonNull()) && !jsonObj.get("billingPeriod").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `billingPeriod` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billingPeriod").toString()));
      }
      if ((jsonObj.get("billingPeriodAlignment") != null && !jsonObj.get("billingPeriodAlignment").isJsonNull()) && !jsonObj.get("billingPeriodAlignment").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `billingPeriodAlignment` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billingPeriodAlignment").toString()));
      }
      if ((jsonObj.get("billingTiming") != null && !jsonObj.get("billingTiming").isJsonNull()) && !jsonObj.get("billingTiming").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `billingTiming` to be a primitive type in the JSON string but got `%s`", jsonObj.get("billingTiming").toString()));
      }
      if ((jsonObj.get("chargeFunction") != null && !jsonObj.get("chargeFunction").isJsonNull()) && !jsonObj.get("chargeFunction").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `chargeFunction` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chargeFunction").toString()));
      }
      if ((jsonObj.get("chargeModel") != null && !jsonObj.get("chargeModel").isJsonNull()) && !jsonObj.get("chargeModel").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `chargeModel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chargeModel").toString()));
      }
      if ((jsonObj.get("chargeNumber") != null && !jsonObj.get("chargeNumber").isJsonNull()) && !jsonObj.get("chargeNumber").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `chargeNumber` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chargeNumber").toString()));
      }
      if ((jsonObj.get("chargeType") != null && !jsonObj.get("chargeType").isJsonNull()) && !jsonObj.get("chargeType").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `chargeType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("chargeType").toString()));
      }
      if ((jsonObj.get("description") != null && !jsonObj.get("description").isJsonNull()) && !jsonObj.get("description").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `description` to be a primitive type in the JSON string but got `%s`", jsonObj.get("description").toString()));
      }
      if ((jsonObj.get("discountLevel") != null && !jsonObj.get("discountLevel").isJsonNull()) && !jsonObj.get("discountLevel").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `discountLevel` to be a primitive type in the JSON string but got `%s`", jsonObj.get("discountLevel").toString()));
      }
      if ((jsonObj.get("endDateCondition") != null && !jsonObj.get("endDateCondition").isJsonNull()) && !jsonObj.get("endDateCondition").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `endDateCondition` to be a primitive type in the JSON string but got `%s`", jsonObj.get("endDateCondition").toString()));
      }
      if ((jsonObj.get("revenueRecognitionTiming") != null && !jsonObj.get("revenueRecognitionTiming").isJsonNull()) && !jsonObj.get("revenueRecognitionTiming").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `revenueRecognitionTiming` to be a primitive type in the JSON string but got `%s`", jsonObj.get("revenueRecognitionTiming").toString()));
      }
      if ((jsonObj.get("revenueAmortizationMethod") != null && !jsonObj.get("revenueAmortizationMethod").isJsonNull()) && !jsonObj.get("revenueAmortizationMethod").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `revenueAmortizationMethod` to be a primitive type in the JSON string but got `%s`", jsonObj.get("revenueAmortizationMethod").toString()));
      }
      if ((jsonObj.get("invoiceScheduleId") != null && !jsonObj.get("invoiceScheduleId").isJsonNull()) && !jsonObj.get("invoiceScheduleId").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `invoiceScheduleId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoiceScheduleId").toString()));
      }
      if ((jsonObj.get("rolloverApply") != null && !jsonObj.get("rolloverApply").isJsonNull()) && !jsonObj.get("rolloverApply").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `rolloverApply` to be a primitive type in the JSON string but got `%s`", jsonObj.get("rolloverApply").toString()));
      }
      if ((jsonObj.get("listPriceBase") != null && !jsonObj.get("listPriceBase").isJsonNull()) && !jsonObj.get("listPriceBase").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `listPriceBase` to be a primitive type in the JSON string but got `%s`", jsonObj.get("listPriceBase").toString()));
      }
      if ((jsonObj.get("commitmentType") != null && !jsonObj.get("commitmentType").isJsonNull()) && !jsonObj.get("commitmentType").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `commitmentType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("commitmentType").toString()));
      }
      if ((jsonObj.get("name") != null && !jsonObj.get("name").isJsonNull()) && !jsonObj.get("name").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `name` to be a primitive type in the JSON string but got `%s`", jsonObj.get("name").toString()));
      }
      if ((jsonObj.get("originalId") != null && !jsonObj.get("originalId").isJsonNull()) && !jsonObj.get("originalId").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `originalId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("originalId").toString()));
      }
      if ((jsonObj.get("overageCalculationOption") != null && !jsonObj.get("overageCalculationOption").isJsonNull()) && !jsonObj.get("overageCalculationOption").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `overageCalculationOption` to be a primitive type in the JSON string but got `%s`", jsonObj.get("overageCalculationOption").toString()));
      }
      if ((jsonObj.get("overageUnusedUnitsCreditOption") != null && !jsonObj.get("overageUnusedUnitsCreditOption").isJsonNull()) && !jsonObj.get("overageUnusedUnitsCreditOption").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `overageUnusedUnitsCreditOption` to be a primitive type in the JSON string but got `%s`", jsonObj.get("overageUnusedUnitsCreditOption").toString()));
      }
      if ((jsonObj.get("prepaidOperationType") != null && !jsonObj.get("prepaidOperationType").isJsonNull()) && !jsonObj.get("prepaidOperationType").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `prepaidOperationType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prepaidOperationType").toString()));
      }
      if ((jsonObj.get("priceChangeOption") != null && !jsonObj.get("priceChangeOption").isJsonNull()) && !jsonObj.get("priceChangeOption").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `priceChangeOption` to be a primitive type in the JSON string but got `%s`", jsonObj.get("priceChangeOption").toString()));
      }
      if ((jsonObj.get("prorationOption") != null && !jsonObj.get("prorationOption").isJsonNull()) && !jsonObj.get("prorationOption").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `prorationOption` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prorationOption").toString()));
      }
      if ((jsonObj.get("ratingGroup") != null && !jsonObj.get("ratingGroup").isJsonNull()) && !jsonObj.get("ratingGroup").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `ratingGroup` to be a primitive type in the JSON string but got `%s`", jsonObj.get("ratingGroup").toString()));
      }
      if ((jsonObj.get("revenueRecognitionRuleName") != null && !jsonObj.get("revenueRecognitionRuleName").isJsonNull()) && !jsonObj.get("revenueRecognitionRuleName").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `revenueRecognitionRuleName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("revenueRecognitionRuleName").toString()));
      }
      if ((jsonObj.get("revRecCode") != null && !jsonObj.get("revRecCode").isJsonNull()) && !jsonObj.get("revRecCode").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `revRecCode` to be a primitive type in the JSON string but got `%s`", jsonObj.get("revRecCode").toString()));
      }
      if ((jsonObj.get("revRecTriggerCondition") != null && !jsonObj.get("revRecTriggerCondition").isJsonNull()) && !jsonObj.get("revRecTriggerCondition").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `revRecTriggerCondition` to be a primitive type in the JSON string but got `%s`", jsonObj.get("revRecTriggerCondition").toString()));
      }
      if ((jsonObj.get("taxCodeName") != null && !jsonObj.get("taxCodeName").isJsonNull()) && !jsonObj.get("taxCodeName").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `taxCodeName` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxCodeName").toString()));
      }
      if ((jsonObj.get("taxModeOption") != null && !jsonObj.get("taxModeOption").isJsonNull()) && !jsonObj.get("taxModeOption").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `taxModeOption` to be a primitive type in the JSON string but got `%s`", jsonObj.get("taxModeOption").toString()));
      }
      if ((jsonObj.get("triggerEvent") != null && !jsonObj.get("triggerEvent").isJsonNull()) && !jsonObj.get("triggerEvent").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `triggerEvent` to be a primitive type in the JSON string but got `%s`", jsonObj.get("triggerEvent").toString()));
      }
      if ((jsonObj.get("uOM") != null && !jsonObj.get("uOM").isJsonNull()) && !jsonObj.get("uOM").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `uOM` to be a primitive type in the JSON string but got `%s`", jsonObj.get("uOM").toString()));
      }
      if ((jsonObj.get("upToPeriodsType") != null && !jsonObj.get("upToPeriodsType").isJsonNull()) && !jsonObj.get("upToPeriodsType").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `upToPeriodsType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("upToPeriodsType").toString()));
      }
      if ((jsonObj.get("weeklyBillCycleDay") != null && !jsonObj.get("weeklyBillCycleDay").isJsonNull()) && !jsonObj.get("weeklyBillCycleDay").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `weeklyBillCycleDay` to be a primitive type in the JSON string but got `%s`", jsonObj.get("weeklyBillCycleDay").toString()));
      }
      if ((jsonObj.get("id") != null && !jsonObj.get("id").isJsonNull()) && !jsonObj.get("id").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `id` to be a primitive type in the JSON string but got `%s`", jsonObj.get("id").toString()));
      }
      if ((jsonObj.get("createdById") != null && !jsonObj.get("createdById").isJsonNull()) && !jsonObj.get("createdById").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `createdById` to be a primitive type in the JSON string but got `%s`", jsonObj.get("createdById").toString()));
      }
      if ((jsonObj.get("createdDate") != null && !jsonObj.get("createdDate").isJsonNull()) && !jsonObj.get("createdDate").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `createdDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("createdDate").toString()));
      }
      if ((jsonObj.get("updatedById") != null && !jsonObj.get("updatedById").isJsonNull()) && !jsonObj.get("updatedById").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `updatedById` to be a primitive type in the JSON string but got `%s`", jsonObj.get("updatedById").toString()));
      }
      if ((jsonObj.get("updatedDate") != null && !jsonObj.get("updatedDate").isJsonNull()) && !jsonObj.get("updatedDate").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `updatedDate` to be a primitive type in the JSON string but got `%s`", jsonObj.get("updatedDate").toString()));
      }
      if ((jsonObj.get("subscriptionId") != null && !jsonObj.get("subscriptionId").isJsonNull()) && !jsonObj.get("subscriptionId").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `subscriptionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subscriptionId").toString()));
      }
      if ((jsonObj.get("subscriptionOwnerId") != null && !jsonObj.get("subscriptionOwnerId").isJsonNull()) && !jsonObj.get("subscriptionOwnerId").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `subscriptionOwnerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("subscriptionOwnerId").toString()));
      }
      if ((jsonObj.get("invoiceOwnerId") != null && !jsonObj.get("invoiceOwnerId").isJsonNull()) && !jsonObj.get("invoiceOwnerId").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `invoiceOwnerId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("invoiceOwnerId").toString()));
      }
      if ((jsonObj.get("validityPeriodType") != null && !jsonObj.get("validityPeriodType").isJsonNull()) && !jsonObj.get("validityPeriodType").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `validityPeriodType` to be a primitive type in the JSON string but got `%s`", jsonObj.get("validityPeriodType").toString()));
      }
      if ((jsonObj.get("creditOption") != null && !jsonObj.get("creditOption").isJsonNull()) && !jsonObj.get("creditOption").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `creditOption` to be a primitive type in the JSON string but got `%s`", jsonObj.get("creditOption").toString()));
      }
      if ((jsonObj.get("productChargeDefinitionId") != null && !jsonObj.get("productChargeDefinitionId").isJsonNull()) && !jsonObj.get("productChargeDefinitionId").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `productChargeDefinitionId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("productChargeDefinitionId").toString()));
      }
      if ((jsonObj.get("accountReceivableAccountingCodeId") != null && !jsonObj.get("accountReceivableAccountingCodeId").isJsonNull()) && !jsonObj.get("accountReceivableAccountingCodeId").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `accountReceivableAccountingCodeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("accountReceivableAccountingCodeId").toString()));
      }
      if ((jsonObj.get("deferredRevenueAccountingCodeId") != null && !jsonObj.get("deferredRevenueAccountingCodeId").isJsonNull()) && !jsonObj.get("deferredRevenueAccountingCodeId").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `deferredRevenueAccountingCodeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("deferredRevenueAccountingCodeId").toString()));
      }
      if ((jsonObj.get("recognizedRevenueAccountingCodeId") != null && !jsonObj.get("recognizedRevenueAccountingCodeId").isJsonNull()) && !jsonObj.get("recognizedRevenueAccountingCodeId").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `recognizedRevenueAccountingCodeId` to be a primitive type in the JSON string but got `%s`", jsonObj.get("recognizedRevenueAccountingCodeId").toString()));
      }
      if ((jsonObj.get("prepaidUOM") != null && !jsonObj.get("prepaidUOM").isJsonNull()) && !jsonObj.get("prepaidUOM").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `prepaidUOM` to be a primitive type in the JSON string but got `%s`", jsonObj.get("prepaidUOM").toString()));
      }
      if ((jsonObj.get("drawdownUom") != null && !jsonObj.get("drawdownUom").isJsonNull()) && !jsonObj.get("drawdownUom").isJsonPrimitive()) {
        throw new IllegalArgumentException(String.format("Expected the field `drawdownUom` to be a primitive type in the JSON string but got `%s`", jsonObj.get("drawdownUom").toString()));
      }
      // ensure the optional json data is an array if present
      if (jsonObj.get("ratePlanChargeTiers") != null && !jsonObj.get("ratePlanChargeTiers").isJsonNull() && !jsonObj.get("ratePlanChargeTiers").isJsonArray()) {
        throw new IllegalArgumentException(String.format("Expected the field `ratePlanChargeTiers` to be an array in the JSON string but got `%s`", jsonObj.get("ratePlanChargeTiers").toString()));
      }
  }

  public static class CustomTypeAdapterFactory implements TypeAdapterFactory {
    @SuppressWarnings("unchecked")
    @Override
    public  TypeAdapter create(Gson gson, TypeToken type) {
       if (!ExpandedRatePlanCharge.class.isAssignableFrom(type.getRawType())) {
         return null; // this class only serializes 'ExpandedRatePlanCharge' and its subtypes
       }
       final TypeAdapter elementAdapter = gson.getAdapter(JsonElement.class);
       final TypeAdapter thisAdapter
                        = gson.getDelegateAdapter(this, TypeToken.get(ExpandedRatePlanCharge.class));

       return (TypeAdapter) new TypeAdapter() {
           @Override
           public void write(JsonWriter out, ExpandedRatePlanCharge value) throws IOException {
             JsonObject obj = thisAdapter.toJsonTree(value).getAsJsonObject();
             obj.remove("additionalProperties");

             // support null values
             out.beginObject();
             Iterator iterator = obj.entrySet().iterator();
             while(iterator.hasNext()) {
                 Map.Entry e = (Map.Entry) iterator.next();
                 out.name((String)e.getKey());
                 elementAdapter.write(out, e.getValue());
             }

             // end

             // serialize additional properties
             if (value.getAdditionalProperties() != null) {
               // support null values
               boolean oldSerializeNulls = out.getSerializeNulls();
               out.setSerializeNulls(true); //force serialize
               // end
               for (Map.Entry entry : value.getAdditionalProperties().entrySet()) {
                 if (entry.getValue() instanceof String)
                   obj.addProperty(entry.getKey(), (String) entry.getValue());
                 else if (entry.getValue() instanceof Number)
                   obj.addProperty(entry.getKey(), (Number) entry.getValue());
                 else if (entry.getValue() instanceof Boolean)
                   obj.addProperty(entry.getKey(), (Boolean) entry.getValue());
                 else if (entry.getValue() instanceof Character)
                   obj.addProperty(entry.getKey(), (Character) entry.getValue());
                 else if (entry.getValue() == null)
                    obj.add(entry.getKey(), null);
                 else {
                   JsonElement jsonElement = gson.toJsonTree(entry.getValue());
                   if (jsonElement.isJsonArray()) {
                     obj.add(entry.getKey(), jsonElement.getAsJsonArray());
                   } else {
                     obj.add(entry.getKey(), jsonElement.getAsJsonObject());
                   }
                 }
                 out.name((String)entry.getKey());
                 elementAdapter.write(out, obj.get(entry.getKey()));
               }
               out.setSerializeNulls(oldSerializeNulls); //restore
             }
             out.endObject();

           }

           @Override
           public ExpandedRatePlanCharge read(JsonReader in) throws IOException {
             JsonElement jsonElement = elementAdapter.read(in);
             validateJsonElement(jsonElement);
             JsonObject jsonObj = jsonElement.getAsJsonObject();
             // store additional fields in the deserialized instance
             ExpandedRatePlanCharge instance = thisAdapter.fromJsonTree(jsonObj);
             for (Map.Entry entry : jsonObj.entrySet()) {
               if (!openapiFields.contains(entry.getKey())) {
                 if (entry.getValue().isJsonPrimitive()) { // primitive type
                   if (entry.getValue().getAsJsonPrimitive().isString())
                     instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsString());
                   else if (entry.getValue().getAsJsonPrimitive().isNumber())
                     instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsNumber());
                   else if (entry.getValue().getAsJsonPrimitive().isBoolean())
                     instance.putAdditionalProperty(entry.getKey(), entry.getValue().getAsBoolean());
                   else
                     throw new IllegalArgumentException(String.format("The field `%s` has unknown primitive type. Value: %s", entry.getKey(), entry.getValue().toString()));
                 } else if (entry.getValue().isJsonArray()) {
                     instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), List.class));
                 } else { // JSON object
                     instance.putAdditionalProperty(entry.getKey(), gson.fromJson(entry.getValue(), HashMap.class));
                 }
               }
             }
             return instance;
           }

       }.nullSafe();
    }
  }

  /**
   * Create an instance of ExpandedRatePlanCharge given an JSON string
   *
   * @param jsonString JSON string
   * @return An instance of ExpandedRatePlanCharge
   * @throws IOException if the JSON string is invalid with respect to ExpandedRatePlanCharge
   */
  public static ExpandedRatePlanCharge fromJson(String jsonString) throws IOException {
    return JSON.getGson().fromJson(jsonString, ExpandedRatePlanCharge.class);
  }

  /**
   * Convert an instance of ExpandedRatePlanCharge to an JSON string
   *
   * @return JSON string
   */
  public String toJson() {
    return JSON.getGson().toJson(this);
  }
}





© 2015 - 2025 Weber Informatics LLC | Privacy Policy