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

/**
 * Class representing a ReservationOrderResponse.
 * @extends models['BaseResource']
 */
class ReservationOrderResponse extends models['BaseResource'] {
  /**
   * Create a ReservationOrderResponse.
   * @property {number} [etag]
   * @property {string} [id] Identifier of the reservation
   * @property {string} [name] Name of the reservation
   * @property {string} [displayName] Friendly name for user to easily
   * identified the reservation.
   * @property {date} [requestDateTime] This is the DateTime when the
   * reservation was initially requested for purchase.
   * @property {date} [createdDateTime] This is the DateTime when the
   * reservation was created.
   * @property {date} [expiryDate] This is the date when the Reservation will
   * expire.
   * @property {number} [originalQuantity]
   * @property {string} [term] Possible values include: 'P1Y', 'P3Y'
   * @property {string} [provisioningState] Current state of the reservation.
   * @property {array} [reservations]
   * @property {string} [type] Type of resource.
   * "Microsoft.Capacity/reservations"
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ReservationOrderResponse
   *
   * @returns {object} metadata of ReservationOrderResponse
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ReservationOrderResponse',
      type: {
        name: 'Composite',
        className: 'ReservationOrderResponse',
        modelProperties: {
          etag: {
            required: false,
            serializedName: 'etag',
            type: {
              name: 'Number'
            }
          },
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          displayName: {
            required: false,
            serializedName: 'properties.displayName',
            type: {
              name: 'String'
            }
          },
          requestDateTime: {
            required: false,
            serializedName: 'properties.requestDateTime',
            type: {
              name: 'DateTime'
            }
          },
          createdDateTime: {
            required: false,
            serializedName: 'properties.createdDateTime',
            type: {
              name: 'DateTime'
            }
          },
          expiryDate: {
            required: false,
            serializedName: 'properties.expiryDate',
            type: {
              name: 'Date'
            }
          },
          originalQuantity: {
            required: false,
            serializedName: 'properties.originalQuantity',
            type: {
              name: 'Number'
            }
          },
          term: {
            required: false,
            serializedName: 'properties.term',
            type: {
              name: 'String'
            }
          },
          provisioningState: {
            required: false,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          reservations: {
            required: false,
            serializedName: 'properties.reservations',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'ReservationResponseElementType',
                  type: {
                    name: 'Composite',
                    className: 'ReservationResponse'
                  }
              }
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ReservationOrderResponse;
