/*
 * 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 Result of the CheckNameAvailability operation
 *
 */
class CheckNameAvailabilityResult {
  /**
   * Create a CheckNameAvailabilityResult.
   * @member {string} [message] The detailed info regarding the reason
   * associated with the Namespace.
   * @member {boolean} [nameAvailable] Value indicating Namespace is
   * availability, true if the Namespace is available; otherwise, false.
   * @member {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;
