UNPKG

@azure/eventgrid

Version:
40 lines 1.67 kB
"use strict"; /* * 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. */ Object.defineProperty(exports, "__esModule", { value: true }); exports.GeneratedClientContext = void 0; const tslib_1 = require("tslib"); const coreClient = tslib_1.__importStar(require("@azure/core-client")); /** @internal */ 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"; } } exports.GeneratedClientContext = GeneratedClientContext; //# sourceMappingURL=generatedClientContext.js.map