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

/**
 * Software update configuration collection item properties.
 *
 */
class SoftwareUpdateConfigurationCollectionItem {
  /**
   * Create a SoftwareUpdateConfigurationCollectionItem.
   * @member {string} [name] Name of the software update configuration.
   * @member {string} [id] Resource Id of the software update configuration
   * @member {object} [updateConfiguration] Update specific properties of the
   * software update configuration.
   * @member {array} [updateConfiguration.azureVirtualMachines] List of azure
   * resource Ids for azure virtual machines targeted by the software update
   * configuration.
   * @member {moment.duration} [updateConfiguration.duration] Maximum time
   * allowed for the software update configuration run. Duration needs to be
   * specified using the format PT[n]H[n]M[n]S as per ISO8601
   * @member {string} [frequency] execution frequency of the schedule
   * associated with the software update configuration. Possible values
   * include: 'OneTime', 'Day', 'Hour', 'Week', 'Month'
   * @member {date} [startTime] the start time of the update.
   * @member {date} [creationTime] Creation time of the software update
   * configuration, which only appears in the response.
   * @member {date} [lastModifiedTime] Last time software update configuration
   * was modified, which only appears in the response.
   * @member {string} [provisioningState] Provisioning state for the software
   * update configuration, which only appears in the response.
   * @member {date} [nextRun] ext run time of the update.
   */
  constructor() {
  }

  /**
   * Defines the metadata of SoftwareUpdateConfigurationCollectionItem
   *
   * @returns {object} metadata of SoftwareUpdateConfigurationCollectionItem
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'softwareUpdateConfigurationCollectionItem',
      type: {
        name: 'Composite',
        className: 'SoftwareUpdateConfigurationCollectionItem',
        modelProperties: {
          name: {
            required: false,
            readOnly: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          id: {
            required: false,
            readOnly: true,
            serializedName: 'id',
            type: {
              name: 'String'
            }
          },
          updateConfiguration: {
            required: false,
            serializedName: 'properties.updateConfiguration',
            type: {
              name: 'Composite',
              className: 'CollectionItemUpdateConfiguration'
            }
          },
          frequency: {
            required: false,
            serializedName: 'properties.frequency',
            type: {
              name: 'String'
            }
          },
          startTime: {
            required: false,
            nullable: false,
            serializedName: 'properties.startTime',
            type: {
              name: 'DateTime'
            }
          },
          creationTime: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'properties.creationTime',
            type: {
              name: 'DateTime'
            }
          },
          lastModifiedTime: {
            required: false,
            nullable: false,
            readOnly: true,
            serializedName: 'properties.lastModifiedTime',
            type: {
              name: 'DateTime'
            }
          },
          provisioningState: {
            required: false,
            readOnly: true,
            serializedName: 'properties.provisioningState',
            type: {
              name: 'String'
            }
          },
          nextRun: {
            required: false,
            nullable: true,
            serializedName: 'properties.nextRun',
            type: {
              name: 'DateTime'
            }
          }
        }
      }
    };
  }
}

module.exports = SoftwareUpdateConfigurationCollectionItem;
