@azure/arm-automation
Version:
AutomationClient Library with typescript type definitions for node.js and browser.
67 lines • 3.27 kB
JavaScript
/*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for
* license information.
*
* Code generated by Microsoft (R) AutoRest Code Generator.
* Changes may cause incorrect behavior and will be lost if the code is
* regenerated.
*/
import { __extends } from "tslib";
import * as msRestAzure from "@azure/ms-rest-azure-js";
var packageName = "@azure/arm-automation";
var packageVersion = "10.1.1";
var AutomationClientContext = /** @class */ (function (_super) {
__extends(AutomationClientContext, _super);
/**
* Initializes a new instance of the AutomationClient class.
* @param credentials Credentials needed for the client to connect to Azure. Credentials
* implementing the TokenCredential interface from the @azure/identity package are recommended. For
* more information about these credentials, see
* {@link https://www.npmjs.com/package/@azure/identity}. Credentials implementing the
* ServiceClientCredentials interface from the older packages @azure/ms-rest-nodeauth and
* @azure/ms-rest-browserauth are also supported.
* @param subscriptionId Gets subscription credentials which uniquely identify Microsoft Azure
* subscription. The subscription ID forms part of the URI for every service call.
* @param countType1 The type of counts to retrieve. Possible values include: 'status',
* 'nodeconfiguration'
* @param [options] The parameter options
*/
function AutomationClientContext(credentials, subscriptionId, countType1, options) {
var _this = this;
if (credentials == undefined) {
throw new Error('\'credentials\' cannot be null.');
}
if (subscriptionId == undefined) {
throw new Error('\'subscriptionId\' cannot be null.');
}
if (countType1 == undefined) {
throw new Error('\'countType1\' cannot be null.');
}
if (!options) {
options = {};
}
if (!options.userAgent) {
var defaultUserAgent = msRestAzure.getDefaultUserAgentValue();
options.userAgent = packageName + "/" + packageVersion + " " + defaultUserAgent;
}
_this = _super.call(this, credentials, options) || this;
_this.acceptLanguage = 'en-US';
_this.longRunningOperationRetryTimeout = 30;
_this.baseUri = options.baseUri || _this.baseUri || "https://management.azure.com";
_this.requestContentType = "application/json; charset=utf-8";
_this.credentials = credentials;
_this.subscriptionId = subscriptionId;
_this.countType1 = countType1;
if (options.acceptLanguage !== null && options.acceptLanguage !== undefined) {
_this.acceptLanguage = options.acceptLanguage;
}
if (options.longRunningOperationRetryTimeout !== null && options.longRunningOperationRetryTimeout !== undefined) {
_this.longRunningOperationRetryTimeout = options.longRunningOperationRetryTimeout;
}
return _this;
}
return AutomationClientContext;
}(msRestAzure.AzureServiceClient));
export { AutomationClientContext };
//# sourceMappingURL=automationClientContext.js.map