/*
 * 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 cost item.
 *
 * @extends models['Resource']
 */
class LabCost extends models['Resource'] {
  /**
   * Create a LabCost.
   * @property {object} [targetCost] The target cost properties
   * @property {string} [targetCost.status] Target cost status. Possible values
   * include: 'Enabled', 'Disabled'
   * @property {number} [targetCost.target] Lab target cost
   * @property {array} [targetCost.costThresholds] Cost thresholds.
   * @property {date} [targetCost.cycleStartDateTime] Reporting cycle start
   * date.
   * @property {date} [targetCost.cycleEndDateTime] Reporting cycle end date.
   * @property {string} [targetCost.cycleType] Reporting cycle type. Possible
   * values include: 'CalendarMonth', 'Custom'
   * @property {object} [labCostSummary] The lab cost summary component of the
   * cost data.
   * @property {number} [labCostSummary.estimatedLabCost] The cost component of
   * the cost item.
   * @property {array} [labCostDetails] The lab cost details component of the
   * cost data.
   * @property {array} [resourceCosts] The resource cost component of the cost
   * data.
   * @property {string} [currencyCode] The currency code of the cost.
   * @property {date} [startDateTime] The start time of the cost data.
   * @property {date} [endDateTime] The end time of the cost data.
   * @property {date} [createdDate] The creation date of the cost.
   * @property {string} [provisioningState] The provisioning status of the
   * resource.
   * @property {string} [uniqueIdentifier] The unique immutable identifier of a
   * resource (Guid).
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of LabCost
   *
   * @returns {object} metadata of LabCost
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'LabCost',
      type: {
        name: 'Composite',
        className: 'LabCost',
        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'
            }
          },
          location: {
            required: false,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          tags: {
            required: false,
            serializedName: 'tags',
            type: {
              name: 'Dictionary',
              value: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          targetCost: {
            required: false,
            serializedName: 'properties.targetCost',
            type: {
              name: 'Composite',
              className: 'TargetCostProperties'
            }
          },
          labCostSummary: {
            required: false,
            readOnly: true,
            serializedName: 'properties.labCostSummary',
            type: {
              name: 'Composite',
              className: 'LabCostSummaryProperties'
            }
          },
          labCostDetails: {
            required: false,
            readOnly: true,
            serializedName: 'properties.labCostDetails',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'LabCostDetailsPropertiesElementType',
                  type: {
                    name: 'Composite',
                    className: 'LabCostDetailsProperties'
                  }
              }
            }
          },
          resourceCosts: {
            required: false,
            readOnly: true,
            serializedName: 'properties.resourceCosts',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'LabResourceCostPropertiesElementType',
                  type: {
                    name: 'Composite',
                    className: 'LabResourceCostProperties'
                  }
              }
            }
          },
          currencyCode: {
            required: false,
            serializedName: 'properties.currencyCode',
            type: {
              name: 'String'
            }
          },
          startDateTime: {
            required: false,
            serializedName: 'properties.startDateTime',
            type: {
              name: 'DateTime'
            }
          },
          endDateTime: {
            required: false,
            serializedName: 'properties.endDateTime',
            type: {
              name: 'DateTime'
            }
          },
          createdDate: {
            required: false,
            serializedName: 'properties.createdDate',
            type: {
              name: 'DateTime'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          uniqueIdentifier: {
            required: false,
            readOnly: true,
            serializedName: 'properties.uniqueIdentifier',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = LabCost;
