text: /*
   * Copyright (c) Microsoft Corporation. All rights reserved.
   * Licensed under the MIT License. See License.txt in the project root for
   * license information.
   *
   * Code generated by Microsoft (R) AutoRest Code Generator.
   * Changes may cause incorrect behavior and will be lost if the code is
   * regenerated.
   */
  
  'use strict';
  
  const models = require('./index');
  
  /**
   * A balance resource.
   *
   * @extends models['Resource']
   */
  class Balance extends models['Resource'] {
    /**
     * Create a Balance.
     * @member {string} [currency] The ISO currency in which the meter is
     * charged, for example, USD.
     * @member {number} [beginningBalance] The beginning balance for the billing
     * period.
     * @member {number} [endingBalance] The ending balance for the billing period
     * (for open periods this will be updated daily).
     * @member {number} [newPurchases] Total new purchase amount.
     * @member {number} [adjustments] Total adjustment amount.
     * @member {number} [utilized] Total Commitment usage.
     * @member {number} [serviceOverage] Overage for Azure services.
     * @member {number} [chargesBilledSeparately] Charges Billed separately.
     * @member {number} [totalOverage] serviceOverage + chargesBilledSeparately.
     * @member {number} [totalUsage] Azure service commitment + total Overage.
     * @member {number} [azureMarketplaceServiceCharges] Total charges for Azure
     * Marketplace.
     * @member {string} [billingFrequency] The billing frequency. Possible values
     * include: 'Month', 'Quarter', 'Year'
     * @member {boolean} [priceHidden] Price is hidden or not.
     * @member {array} [newPurchasesDetails] List of new purchases.
     * @member {array} [adjustmentDetails] List of Adjustments (Promo credit, SIE
     * credit etc.).
     */
    constructor() {
      super();
    }
  
    /**
     * Defines the metadata of Balance
     *
     * @returns {object} metadata of Balance
     *
     */
    mapper() {
      return {
        required: false,
        serializedName: 'Balance',
        type: {
          name: 'Composite',
          className: 'Balance',
          modelProperties: {
            id: {
              required: false,
              readOnly: true,
              serializedName: 'id',
              type: {
                name: 'String'
              }
            },
            name: {
              required: false,
              readOnly: true,
              serializedName: 'name',
              type: {
                name: 'String'
              }
            },
            type: {
              required: false,
              readOnly: true,
              serializedName: 'type',
              type: {
                name: 'String'
              }
            },
            tags: {
              required: false,
              readOnly: true,
              serializedName: 'tags',
              type: {
                name: 'Dictionary',
                value: {
                    required: false,
                    serializedName: 'StringElementType',
                    type: {
                      name: 'String'
                    }
                }
              }
            },
            currency: {
              required: false,
              readOnly: true,
              serializedName: 'properties.currency',
              type: {
                name: 'String'
              }
            },
            beginningBalance: {
              required: false,
              readOnly: true,
              serializedName: 'properties.beginningBalance',
              type: {
                name: 'Number'
              }
            },
            endingBalance: {
              required: false,
              readOnly: true,
              serializedName: 'properties.endingBalance',
              type: {
                name: 'Number'
              }
            },
            newPurchases: {
              required: false,
              readOnly: true,
              serializedName: 'properties.newPurchases',
              type: {
                name: 'Number'
              }
            },
            adjustments: {
              required: false,
              readOnly: true,
              serializedName: 'properties.adjustments',
              type: {
                name: 'Number'
              }
            },
            utilized: {
              required: false,
              readOnly: true,
              serializedName: 'properties.utilized',
              type: {
                name: 'Number'
              }
            },
            serviceOverage: {
              required: false,
              readOnly: true,
              serializedName: 'properties.serviceOverage',
              type: {
                name: 'Number'
              }
            },
            chargesBilledSeparately: {
              required: false,
              readOnly: true,
              serializedName: 'properties.chargesBilledSeparately',
              type: {
                name: 'Number'
              }
            },
            totalOverage: {
              required: false,
              readOnly: true,
              serializedName: 'properties.totalOverage',
              type: {
                name: 'Number'
              }
            },
            totalUsage: {
              required: false,
              readOnly: true,
              serializedName: 'properties.totalUsage',
              type: {
                name: 'Number'
              }
            },
            azureMarketplaceServiceCharges: {
              required: false,
              readOnly: true,
              serializedName: 'properties.azureMarketplaceServiceCharges',
              type: {
                name: 'Number'
              }
            },
            billingFrequency: {
              required: false,
              serializedName: 'properties.billingFrequency',
              type: {
                name: 'String'
              }
            },
            priceHidden: {
              required: false,
              readOnly: true,
              serializedName: 'properties.priceHidden',
              type: {
                name: 'Boolean'
              }
            },
            newPurchasesDetails: {
              required: false,
              readOnly: true,
              serializedName: 'properties.newPurchasesDetails',
              type: {
                name: 'Sequence',
                element: {
                    required: false,
                    serializedName: 'BalancePropertiesNewPurchasesDetailsItemElementType',
                    type: {
                      name: 'Composite',
                      className: 'BalancePropertiesNewPurchasesDetailsItem'
                    }
                }
              }
            },
            adjustmentDetails: {
              required: false,
              readOnly: true,
              serializedName: 'properties.adjustmentDetails',
              type: {
                name: 'Sequence',
                element: {
                    required: false,
                    serializedName: 'BalancePropertiesAdjustmentDetailsItemElementType',
                    type: {
                      name: 'Composite',
                      className: 'BalancePropertiesAdjustmentDetailsItem'
                    }
                }
              }
            }
          }
        }
      };
    }
  }
  
  module.exports = Balance;
  