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.
  /**
   * This sample demonstrates how to Operation to update a lab schedule.
   *
   * @summary Operation to update a lab schedule.
   * x-ms-original-file: specification/labservices/resource-manager/Microsoft.LabServices/preview/2021-11-15-preview/examples/Schedules/patchSchedule.json
   */
  const { LabServicesClient } = require("@azure/arm-labservices");
  const { DefaultAzureCredential } = require("@azure/identity");
  
  async function patchSchedule() {
    const subscriptionId = "34adfa4f-cedf-4dc0-ba29-b6d1a69ab345";
    const resourceGroupName = "testrg123";
    const labName = "testlab";
    const scheduleName = "schedule1";
    const body = {
      recurrencePattern: {
        expirationDate: new Date("2020-08-14"),
        frequency: "Daily",
        interval: 2,
      },
    };
    const credential = new DefaultAzureCredential();
    const client = new LabServicesClient(credential, subscriptionId);
    const result = await client.schedules.update(resourceGroupName, labName, scheduleName, body);
    console.log(result);
  }
  
  patchSchedule().catch(console.error);
  