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

/**
 * Class representing a ReservationProperties.
 */
class ReservationProperties {
  /**
   * Create a ReservationProperties.
   * @property {string} [reservedResourceType] Possible values include:
   * 'VirtualMachines', 'SqlDatabases', 'SuseLinux', 'CosmosDb'
   * @property {string} [instanceFlexibility] Possible values include: 'On',
   * 'Off'
   * @property {string} [displayName] Friendly name for user to easily identify
   * the reservation
   * @property {array} [appliedScopes]
   * @property {string} [appliedScopeType] Possible values include: 'Single',
   * 'Shared'
   * @property {number} [quantity]
   * @property {string} [provisioningState] Current state of the reservation.
   * @property {date} [effectiveDateTime] DateTime of the Reservation starting
   * when this version is effective from.
   * @property {date} [lastUpdatedDateTime] DateTime of the last time the
   * Reservation was updated.
   * @property {date} [expiryDate] This is the date when the Reservation will
   * expire.
   * @property {string} [skuDescription] Description of the SKU in english.
   * @property {object} [extendedStatusInfo]
   * @property {string} [extendedStatusInfo.statusCode] Possible values
   * include: 'None', 'Pending', 'Active', 'PurchaseError',
   * 'PaymentInstrumentError', 'Split', 'Merged', 'Expired', 'Succeeded'
   * @property {string} [extendedStatusInfo.message] The message giving
   * detailed information about the status code.
   * @property {object} [splitProperties]
   * @property {array} [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} [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} [mergeProperties]
   * @property {string} [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} [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}
   */
  constructor() {
  }

  /**
   * Defines the metadata of ReservationProperties
   *
   * @returns {object} metadata of ReservationProperties
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ReservationProperties',
      type: {
        name: 'Composite',
        className: 'ReservationProperties',
        modelProperties: {
          reservedResourceType: {
            required: false,
            serializedName: 'reservedResourceType',
            type: {
              name: 'String'
            }
          },
          instanceFlexibility: {
            required: false,
            serializedName: 'instanceFlexibility',
            type: {
              name: 'String'
            }
          },
          displayName: {
            required: false,
            serializedName: 'displayName',
            type: {
              name: 'String'
            }
          },
          appliedScopes: {
            required: false,
            serializedName: 'appliedScopes',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          appliedScopeType: {
            required: false,
            serializedName: 'appliedScopeType',
            type: {
              name: 'String'
            }
          },
          quantity: {
            required: false,
            serializedName: 'quantity',
            type: {
              name: 'Number'
            }
          },
          provisioningState: {
            required: false,
            serializedName: 'provisioningState',
            type: {
              name: 'String'
            }
          },
          effectiveDateTime: {
            required: false,
            serializedName: 'effectiveDateTime',
            type: {
              name: 'DateTime'
            }
          },
          lastUpdatedDateTime: {
            required: false,
            readOnly: true,
            serializedName: 'lastUpdatedDateTime',
            type: {
              name: 'DateTime'
            }
          },
          expiryDate: {
            required: false,
            serializedName: 'expiryDate',
            type: {
              name: 'Date'
            }
          },
          skuDescription: {
            required: false,
            serializedName: 'skuDescription',
            type: {
              name: 'String'
            }
          },
          extendedStatusInfo: {
            required: false,
            serializedName: 'extendedStatusInfo',
            type: {
              name: 'Composite',
              className: 'ExtendedStatusInfo'
            }
          },
          splitProperties: {
            required: false,
            serializedName: 'splitProperties',
            type: {
              name: 'Composite',
              className: 'ReservationSplitProperties'
            }
          },
          mergeProperties: {
            required: false,
            serializedName: 'mergeProperties',
            type: {
              name: 'Composite',
              className: 'ReservationMergeProperties'
            }
          }
        }
      }
    };
  }
}

module.exports = ReservationProperties;
