/*
 * 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');

/**
 * Price and Metadata information for resources
 *
 */
class ResourceRateCardInfo {
  /**
   * Create a ResourceRateCardInfo.
   * @member {string} [currency] The currency in which the rates are provided.
   * @member {string} [locale] The culture in which the resource information is
   * localized.
   * @member {boolean} [isTaxIncluded] All rates are pretax, so this will
   * always be returned as 'false'.
   * @member {array} [offerTerms] A list of offer terms.
   * @member {array} [meters] A list of meters.
   */
  constructor() {
  }

  /**
   * Defines the metadata of ResourceRateCardInfo
   *
   * @returns {object} metadata of ResourceRateCardInfo
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ResourceRateCardInfo',
      type: {
        name: 'Composite',
        className: 'ResourceRateCardInfo',
        modelProperties: {
          currency: {
            required: false,
            serializedName: 'Currency',
            type: {
              name: 'String'
            }
          },
          locale: {
            required: false,
            serializedName: 'Locale',
            type: {
              name: 'String'
            }
          },
          isTaxIncluded: {
            required: false,
            serializedName: 'IsTaxIncluded',
            type: {
              name: 'Boolean'
            }
          },
          offerTerms: {
            required: false,
            serializedName: 'OfferTerms',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'OfferTermInfoElementType',
                  type: {
                    name: 'Composite',
                    polymorphicDiscriminator: {
                      serializedName: 'Name',
                      clientName: 'name'
                    },
                    uberParent: 'OfferTermInfo',
                    className: 'OfferTermInfo'
                  }
              }
            }
          },
          meters: {
            required: false,
            serializedName: 'Meters',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'MeterInfoElementType',
                  type: {
                    name: 'Composite',
                    className: 'MeterInfo'
                  }
              }
            }
          }
        }
      }
    };
  }
}

module.exports = ResourceRateCardInfo;
