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

/**
 * Resource validation request content.
 *
 */
class ValidateRequest {
  /**
   * Create a ValidateRequest.
   * @member {string} name Resource name to verify.
   * @member {string} type Resource type used for verification. Possible values
   * include: 'ServerFarm', 'Site'
   * @member {string} location Expected location of the resource.
   * @member {string} [serverFarmId] ARM resource ID of an App Service plan
   * that would host the app.
   * @member {string} [skuName] Name of the target SKU for the App Service
   * plan.
   * @member {boolean} [needLinuxWorkers] <code>true</code> if App Service plan
   * is for Linux workers; otherwise, <code>false</code>.
   * @member {boolean} [isSpot] <code>true</code> if App Service plan is for
   * Spot instances; otherwise, <code>false</code>.
   * @member {number} [capacity] Target capacity of the App Service plan
   * (number of VM's).
   * @member {string} [hostingEnvironment] Name of App Service Environment
   * where app or App Service plan should be created.
   * @member {boolean} [isXenon] <code>true</code> if App Service plan is
   * running as a windows container
   */
  constructor() {
  }

  /**
   * Defines the metadata of ValidateRequest
   *
   * @returns {object} metadata of ValidateRequest
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'ValidateRequest',
      type: {
        name: 'Composite',
        className: 'ValidateRequest',
        modelProperties: {
          name: {
            required: true,
            serializedName: 'name',
            type: {
              name: 'String'
            }
          },
          type: {
            required: true,
            serializedName: 'type',
            type: {
              name: 'String'
            }
          },
          location: {
            required: true,
            serializedName: 'location',
            type: {
              name: 'String'
            }
          },
          serverFarmId: {
            required: false,
            serializedName: 'properties.serverFarmId',
            type: {
              name: 'String'
            }
          },
          skuName: {
            required: false,
            serializedName: 'properties.skuName',
            type: {
              name: 'String'
            }
          },
          needLinuxWorkers: {
            required: false,
            serializedName: 'properties.needLinuxWorkers',
            type: {
              name: 'Boolean'
            }
          },
          isSpot: {
            required: false,
            serializedName: 'properties.isSpot',
            type: {
              name: 'Boolean'
            }
          },
          capacity: {
            required: false,
            serializedName: 'properties.capacity',
            constraints: {
              InclusiveMinimum: 1
            },
            type: {
              name: 'Number'
            }
          },
          hostingEnvironment: {
            required: false,
            serializedName: 'properties.hostingEnvironment',
            type: {
              name: 'String'
            }
          },
          isXenon: {
            required: false,
            serializedName: 'properties.isXenon',
            type: {
              name: 'Boolean'
            }
          }
        }
      }
    };
  }
}

module.exports = ValidateRequest;
