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

/**
 * Yearly retention schedule.
 *
 */
class YearlyRetentionSchedule {
  /**
   * Create a YearlyRetentionSchedule.
   * @member {string} [retentionScheduleFormatType] Retention schedule format
   * for yearly retention policy. Possible values include: 'Invalid', 'Daily',
   * 'Weekly'
   * @member {array} [monthsOfYear] List of months of year of yearly retention
   * policy.
   * @member {object} [retentionScheduleDaily] Daily retention format for
   * yearly retention policy.
   * @member {array} [retentionScheduleDaily.daysOfTheMonth] List of days of
   * the month.
   * @member {object} [retentionScheduleWeekly] Weekly retention format for
   * yearly retention policy.
   * @member {array} [retentionScheduleWeekly.daysOfTheWeek] List of days of
   * the week.
   * @member {array} [retentionScheduleWeekly.weeksOfTheMonth] List of weeks of
   * month.
   * @member {array} [retentionTimes] Retention times of retention policy.
   * @member {object} [retentionDuration] Retention duration of retention
   * Policy.
   * @member {number} [retentionDuration.count] Count of duration types.
   * Retention duration is obtained by the counting the duration type Count
   * times.
   * For example, when Count = 3 and DurationType = Weeks, retention duration
   * will be three weeks.
   * @member {string} [retentionDuration.durationType] Retention duration type
   * of retention policy. Possible values include: 'Invalid', 'Days', 'Weeks',
   * 'Months', 'Years'
   */
  constructor() {
  }

  /**
   * Defines the metadata of YearlyRetentionSchedule
   *
   * @returns {object} metadata of YearlyRetentionSchedule
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'YearlyRetentionSchedule',
      type: {
        name: 'Composite',
        className: 'YearlyRetentionSchedule',
        modelProperties: {
          retentionScheduleFormatType: {
            required: false,
            serializedName: 'retentionScheduleFormatType',
            type: {
              name: 'String'
            }
          },
          monthsOfYear: {
            required: false,
            serializedName: 'monthsOfYear',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'MonthOfYearElementType',
                  type: {
                    name: 'Enum',
                    allowedValues: [ 'Invalid', 'January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December' ]
                  }
              }
            }
          },
          retentionScheduleDaily: {
            required: false,
            serializedName: 'retentionScheduleDaily',
            type: {
              name: 'Composite',
              className: 'DailyRetentionFormat'
            }
          },
          retentionScheduleWeekly: {
            required: false,
            serializedName: 'retentionScheduleWeekly',
            type: {
              name: 'Composite',
              className: 'WeeklyRetentionFormat'
            }
          },
          retentionTimes: {
            required: false,
            serializedName: 'retentionTimes',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'DateElementType',
                  type: {
                    name: 'DateTime'
                  }
              }
            }
          },
          retentionDuration: {
            required: false,
            serializedName: 'retentionDuration',
            type: {
              name: 'Composite',
              className: 'RetentionDuration'
            }
          }
        }
      }
    };
  }
}

module.exports = YearlyRetentionSchedule;
