text: /*
   * Copyright (c) Microsoft Corporation.
   * Licensed under the MIT License.
   *
   * Code generated by Microsoft (R) AutoRest Code Generator.
   * Changes may cause incorrect behavior and will be lost if the code is regenerated.
   */
  
  // Copyright (c) Microsoft Corporation.
  // Licensed under the MIT License.
  const { RelayAPI } = require("@azure/arm-relay");
  const { DefaultAzureCredential } = require("@azure/identity");
  
  /**
   * This sample demonstrates how to Check the specified namespace name availability.
   *
   * @summary Check the specified namespace name availability.
   * x-ms-original-file: specification/relay/resource-manager/Microsoft.Relay/stable/2017-04-01/examples/NameSpaces/RelayNameSpaceCheckNameAvailability.json
   */
  async function relayCheckNameAvailability() {
    const subscriptionId = "ffffffff-ffff-ffff-ffff-ffffffffffff";
    const parameters = { name: "sdk-Namespace1321" };
    const credential = new DefaultAzureCredential();
    const client = new RelayAPI(credential, subscriptionId);
    const result = await client.namespaces.checkNameAvailability(parameters);
    console.log(result);
  }
  
  relayCheckNameAvailability().catch(console.error);
  