Skip to content

Commit

Permalink
CodeGen from PR 26658 in Azure/azure-rest-api-specs
Browse files Browse the repository at this point in the history
Merge cf5afb863e709430c8eef86bcce263690be7c43b into 08bbb7fa323c7ac24eab4e4b884148ffb8c330ad
  • Loading branch information
SDKAuto committed Nov 10, 2023
1 parent 7850e7a commit d1599d9
Show file tree
Hide file tree
Showing 32 changed files with 3,440 additions and 8,786 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,4 +28,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion sdk/communication/communication-job-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -128,4 +128,4 @@
"ts-node": "^10.0.0",
"esm": "^3.2.18"
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT license.

import { getClient, ClientOptions } from "@azure-rest/core-client";
import { logger } from "./logger";
import { AzureCommunicationRoutingServiceClient } from "./clientDefinitions";

/**
* Initialize a new instance of `AzureCommunicationRoutingServiceClient`
* @param endpoint - A sequence of textual characters.
* @param options - the parameter for all optional parameters
*/
export default function createClient(
endpoint: string,
options: ClientOptions = {}
): AzureCommunicationRoutingServiceClient {
const baseUrl = options.baseUrl ?? `${endpoint}`;
options.apiVersion = options.apiVersion ?? "2023-11-01";
const userAgentInfo = `azsdk-js-communication-job-router-rest/1.0.0-beta.1`;
const userAgentPrefix =
options.userAgentOptions && options.userAgentOptions.userAgentPrefix
? `${options.userAgentOptions.userAgentPrefix} ${userAgentInfo}`
: `${userAgentInfo}`;
options = {
...options,
userAgentOptions: {
userAgentPrefix,
},
loggingOptions: {
logger: options.loggingOptions?.logger ?? logger.info,
},
};

const client = getClient(
baseUrl,
options
) as AzureCommunicationRoutingServiceClient;

return client;
}
Loading

0 comments on commit d1599d9

Please sign in to comment.