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

/**
 * Description of a Check Name availability request properties.
 *
 */
class CheckNameAvailabilityResult {
  /**
   * Create a CheckNameAvailabilityResult.
   * @property {string} [message] The detailed info regarding the reason
   * associated with the namespace.
   * @property {boolean} [nameAvailable] Value indicating namespace is
   * availability, true if the namespace is available; otherwise, false.
   * @property {string} [reason] The reason for unavailability of a namespace.
   * Possible values include: 'None', 'InvalidName', 'SubscriptionIsDisabled',
   * 'NameInUse', 'NameInLockdown', 'TooManyNamespaceInCurrentSubscription'
   */
  constructor() {
  }

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

module.exports = CheckNameAvailabilityResult;
