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

/**
 * Update specifc properties of the software update configuration.
 *
 */
class UpdateConfiguration {
  /**
   * Create a UpdateConfiguration.
   * @member {string} operatingSystem operating system of target machines.
   * Possible values include: 'Windows', 'Linux'
   * @member {object} [windows] Windows specific update configuration.
   * @member {string} [windows.includedUpdateClassifications] Update
   * classification included in the software update configuration. A comma
   * separated string with required values. Possible values include:
   * 'Unclassified', 'Critical', 'Security', 'UpdateRollup', 'FeaturePack',
   * 'ServicePack', 'Definition', 'Tools', 'Updates'
   * @member {array} [windows.excludedKbNumbers] KB numbers excluded from the
   * software update configuration.
   * @member {array} [windows.includedKbNumbers] KB numbers included from the
   * software update configuration.
   * @member {string} [windows.rebootSetting] Reboot setting for the software
   * update configuration.
   * @member {object} [linux] Linux specific update configuration.
   * @member {string} [linux.includedPackageClassifications] Update
   * classifications included in the software update configuration. Possible
   * values include: 'Unclassified', 'Critical', 'Security', 'Other'
   * @member {array} [linux.excludedPackageNameMasks] packages excluded from
   * the software update configuration.
   * @member {array} [linux.includedPackageNameMasks] packages included from
   * the software update configuration.
   * @member {string} [linux.rebootSetting] Reboot setting for the software
   * update configuration.
   * @member {moment.duration} [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 {array} [azureVirtualMachines] List of azure resource Ids for
   * azure virtual machines targeted by the software update configuration.
   * @member {array} [nonAzureComputerNames] List of names of non-azure
   * machines targeted by the software update configuration.
   * @member {object} [targets] Group targets for the software update
   * configuration.
   * @member {array} [targets.azureQueries] List of Azure queries in the
   * software update configuration.
   */
  constructor() {
  }

  /**
   * Defines the metadata of UpdateConfiguration
   *
   * @returns {object} metadata of UpdateConfiguration
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'updateConfiguration',
      type: {
        name: 'Composite',
        className: 'UpdateConfiguration',
        modelProperties: {
          operatingSystem: {
            required: true,
            serializedName: 'operatingSystem',
            type: {
              name: 'Enum',
              allowedValues: [ 'Windows', 'Linux' ]
            }
          },
          windows: {
            required: false,
            serializedName: 'windows',
            type: {
              name: 'Composite',
              className: 'WindowsProperties'
            }
          },
          linux: {
            required: false,
            serializedName: 'linux',
            type: {
              name: 'Composite',
              className: 'LinuxProperties'
            }
          },
          duration: {
            required: false,
            serializedName: 'duration',
            type: {
              name: 'TimeSpan'
            }
          },
          azureVirtualMachines: {
            required: false,
            serializedName: 'azureVirtualMachines',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          nonAzureComputerNames: {
            required: false,
            serializedName: 'nonAzureComputerNames',
            type: {
              name: 'Sequence',
              element: {
                  required: false,
                  serializedName: 'StringElementType',
                  type: {
                    name: 'String'
                  }
              }
            }
          },
          targets: {
            required: false,
            serializedName: 'targets',
            type: {
              name: 'Composite',
              className: 'TargetProperties'
            }
          }
        }
      }
    };
  }
}

module.exports = UpdateConfiguration;
