/*
 * 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 CheckNameAvailability operation response.
 *
 */
class CheckNameAvailabilityResult {
  /**
   * Create a CheckNameAvailabilityResult.
   * @property {boolean} [nameAvailable] Gets a boolean value that indicates
   * whether the name is available for you to use. If true, the name is
   * available. If false, the name has already been taken or invalid and cannot
   * be used.
   * @property {string} [reason] Gets the reason that a Batch account name
   * could not be used. The Reason element is only returned if NameAvailable is
   * false. Possible values include: 'Invalid', 'AlreadyExists'
   * @property {string} [message] Gets an error message explaining the Reason
   * value in more detail.
   */
  constructor() {
  }

  /**
   * Defines the metadata of CheckNameAvailabilityResult
   *
   * @returns {object} metadata of CheckNameAvailabilityResult
   *
   */
  mapper() {
    return {
      required: false,
      serializedName: 'CheckNameAvailabilityResult',
      type: {
        name: 'Composite',
        className: 'CheckNameAvailabilityResult',
        modelProperties: {
          nameAvailable: {
            required: false,
            readOnly: true,
            serializedName: 'nameAvailable',
            type: {
              name: 'Boolean'
            }
          },
          reason: {
            required: false,
            readOnly: true,
            serializedName: 'reason',
            type: {
              name: 'Enum',
              allowedValues: [ 'Invalid', 'AlreadyExists' ]
            }
          },
          message: {
            required: false,
            readOnly: true,
            serializedName: 'message',
            type: {
              name: 'String'
            }
          }
        }
      }
    };
  }
}

module.exports = CheckNameAvailabilityResult;
