UNPKG

@azure/eventgrid

Version:
35 lines 1.45 kB
/* * 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. */ import * as coreClient from "@azure/core-client"; /** @internal */ export class GeneratedClientContext extends coreClient.ServiceClient { /** * Initializes a new instance of the GeneratedClientContext class. * @param options The parameter options */ constructor(options) { // Initializing default values for options if (!options) { options = {}; } const defaults = { requestContentType: "application/json; charset=utf-8" }; const packageDetails = `azsdk-js-eventgrid/5.12.0`; const userAgentPrefix = options.userAgentOptions && options.userAgentOptions.userAgentPrefix ? `${options.userAgentOptions.userAgentPrefix} ${packageDetails}` : `${packageDetails}`; const optionsWithDefaults = Object.assign(Object.assign(Object.assign({}, defaults), options), { userAgentOptions: { userAgentPrefix }, baseUri: options.endpoint || "{topicHostname}" }); super(optionsWithDefaults); // Assigning values to Constant parameters this.apiVersion = options.apiVersion || "2018-01-01"; } } //# sourceMappingURL=generatedClientContext.js.map