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

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

  /**
   * Defines the metadata of BatchConfigurationProperties
   *
   * @returns {object} metadata of BatchConfigurationProperties
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'BatchConfigurationProperties',
      type: {
        name: 'Composite',
        className: 'BatchConfigurationProperties',
        modelProperties: {
          createdTime: {
            required: false,
            serializedName: 'createdTime',
            type: {
              name: 'DateTime'
            }
          },
          changedTime: {
            required: false,
            serializedName: 'changedTime',
            type: {
              name: 'DateTime'
            }
          },
          metadata: {
            required: false,
            serializedName: 'metadata',
            type: {
              name: 'Object'
            }
          },
          batchGroupName: {
            required: true,
            serializedName: 'batchGroupName',
            type: {
              name: 'String'
            }
          },
          releaseCriteria: {
            required: true,
            serializedName: 'releaseCriteria',
            type: {
              name: 'Composite',
              className: 'BatchReleaseCriteria'
            }
          }
        }
      }
    };
  }
}

module.exports = BatchConfigurationProperties;
