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 c4458a521a2ba50f9fa500c161bff1d36ef4c7e7 into 42e2c0bcd77b0de6c523404668fa63511484d485
  • Loading branch information
SDKAuto committed Nov 10, 2023
1 parent 99baa8c commit 3e67a6f
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 3e67a6f

Please sign in to comment.