/*
 * 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 ReservationResponse.
 * @extends models['BaseResource']
 */
class ReservationResponse extends models['BaseResource'] {
  /**
   * Create a ReservationResponse.
   * @property {string} [location] The Azure Region where the reserved resource
   * lives.
   * @property {number} [etag]
   * @property {string} [id] Identifier of the reservation
   * @property {string} [name] Name of the reservation
   * @property {object} [sku]
   * @property {string} [sku.name]
   * @property {object} [properties]
   * @property {string} [properties.reservedResourceType] Possible values
   * include: 'VirtualMachines', 'SqlDatabases', 'SuseLinux', 'CosmosDb'
   * @property {string} [properties.instanceFlexibility] Possible values
   * include: 'On', 'Off'
   * @property {string} [properties.displayName] Friendly name for user to
   * easily identify the reservation
   * @property {array} [properties.appliedScopes]
   * @property {string} [properties.appliedScopeType] Possible values include:
   * 'Single', 'Shared'
   * @property {number} [properties.quantity]
   * @property {string} [properties.provisioningState] Current state of the
   * reservation.
   * @property {date} [properties.effectiveDateTime] DateTime of the
   * Reservation starting when this version is effective from.
   * @property {date} [properties.lastUpdatedDateTime] DateTime of the last
   * time the Reservation was updated.
   * @property {date} [properties.expiryDate] This is the date when the
   * Reservation will expire.
   * @property {string} [properties.skuDescription] Description of the SKU in
   * english.
   * @property {object} [properties.extendedStatusInfo]
   * @property {string} [properties.extendedStatusInfo.statusCode] Possible
   * values include: 'None', 'Pending', 'Active', 'PurchaseError',
   * 'PaymentInstrumentError', 'Split', 'Merged', 'Expired', 'Succeeded'
   * @property {string} [properties.extendedStatusInfo.message] The message
   * giving detailed information about the status code.
   * @property {object} [properties.splitProperties]
   * @property {array} [properties.splitProperties.splitDestinations] List of
   * destination Resource Id that are created due to split. Format of the
   * resource Id is
   * /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}
   * @property {string} [properties.splitProperties.splitSource] Resource Id of
   * the Reservation from which this is split. Format of the resource Id is
   * /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}
   * @property {object} [properties.mergeProperties]
   * @property {string} [properties.mergeProperties.mergeDestination]
   * Reservation Resource Id Created due to the merge. Format of the resource
   * Id is
   * /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}
   * @property {array} [properties.mergeProperties.mergeSources] Resource Ids
   * of the Source Reservation's merged to form this Reservation. Format of the
   * resource Id is
   * /providers/Microsoft.Capacity/reservationOrders/{reservationOrderId}/reservations/{reservationId}
   * @property {string} [type] Type of resource.
   * "Microsoft.Capacity/reservationOrders/reservations"
   */
  constructor() {
    super();
  }

  /**
   * Defines the metadata of ReservationResponse
   *
   * @returns {object} metadata of ReservationResponse
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ReservationResponse',
      type: {
        name: 'Composite',
        className: 'ReservationResponse',
        modelProperties: {
          location: {
            required: false,
            readOnly: true,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          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'
            }
          },
          sku: {
            required: false,
            serializedName: 'sku',
            type: {
              name: 'Composite',
              className: 'SkuName'
            }
          },
          properties: {
            required: false,
            serializedName: 'properties',
            type: {
              name: 'Composite',
              className: 'ReservationProperties'
            }
          },
          type: {
            required: false,
            readOnly: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = ReservationResponse;
