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

/**
 * The batch release criteria.
 *
 */
class BatchReleaseCriteria {
  /**
   * Create a BatchReleaseCriteria.
   * @property {number} [messageCount] The message count.
   * @property {number} [batchSize] The batch size in bytes.
   * @property {object} [recurrence] The recurrence.
   * @property {string} [recurrence.frequency] The frequency. Possible values
   * include: 'NotSpecified', 'Second', 'Minute', 'Hour', 'Day', 'Week',
   * 'Month', 'Year'
   * @property {number} [recurrence.interval] The interval.
   * @property {string} [recurrence.startTime] The start time.
   * @property {string} [recurrence.endTime] The end time.
   * @property {string} [recurrence.timeZone] The time zone.
   * @property {object} [recurrence.schedule] The recurrence schedule.
   * @property {array} [recurrence.schedule.minutes] The minutes.
   * @property {array} [recurrence.schedule.hours] The hours.
   * @property {array} [recurrence.schedule.weekDays] The days of the week.
   * @property {array} [recurrence.schedule.monthDays] The month days.
   * @property {array} [recurrence.schedule.monthlyOccurrences] The monthly
   * occurrences.
   */
  constructor() {
  }

  /**
   * Defines the metadata of BatchReleaseCriteria
   *
   * @returns {object} metadata of BatchReleaseCriteria
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'BatchReleaseCriteria',
      type: {
        name: 'Composite',
        className: 'BatchReleaseCriteria',
        modelProperties: {
          messageCount: {
            required: false,
            serializedName: 'messageCount',
            type: {
              name: 'Number'
            }
          },
          batchSize: {
            required: false,
            serializedName: 'batchSize',
            type: {
              name: 'Number'
            }
          },
          recurrence: {
            required: false,
            serializedName: 'recurrence',
            type: {
              name: 'Composite',
              className: 'WorkflowTriggerRecurrence'
            }
          }
        }
      }
    };
  }
}

module.exports = BatchReleaseCriteria;
