microsoft/vscode-react-native
Publicmirrored from https://github.com/microsoft/vscode-react-nativeAvailable
lib/app-center-node-client/src/account/accountClient.js
65lines · modecode
| 1 | /* |
| 2 | * Code generated by Microsoft (R) AutoRest Code Generator. |
| 3 | * Changes may cause incorrect behavior and will be lost if the code is |
| 4 | * regenerated. |
| 5 | */ |
| 6 | |
| 7 | /* jshint latedef:false */ |
| 8 | /* jshint forin:false */ |
| 9 | /* jshint noempty:false */ |
| 10 | |
| 11 | 'use strict'; |
| 12 | |
| 13 | const msRest = require('ms-rest'); |
| 14 | const ServiceClient = msRest.ServiceClient; |
| 15 | |
| 16 | const models = require('./models'); |
| 17 | const operations = require('./operations'); |
| 18 | |
| 19 | |
| 20 | /** Class representing a AccountClient. */ |
| 21 | class AccountClient extends ServiceClient { |
| 22 | /** |
| 23 | * Create a AccountClient. |
| 24 | * @param {credentials} credentials - Subscription credentials which uniquely identify client subscription. |
| 25 | * @param {string} [baseUri] - The base URI of the service. |
| 26 | * @param {object} [options] - The parameter options |
| 27 | * @param {Array} [options.filters] - Filters to be added to the request pipeline |
| 28 | * @param {object} [options.requestOptions] - Options for the underlying request object |
| 29 | * {@link https://github.com/request/request#requestoptions-callback Options doc} |
| 30 | * @param {boolean} [options.noRetryPolicy] - If set to true, turn off default retry policy |
| 31 | */ |
| 32 | constructor(credentials, baseUri, options) { |
| 33 | if (credentials === null || credentials === undefined) { |
| 34 | throw new Error('\'credentials\' cannot be null.'); |
| 35 | } |
| 36 | |
| 37 | if (!options) options = {}; |
| 38 | |
| 39 | super(credentials, options); |
| 40 | |
| 41 | this.baseUri = baseUri; |
| 42 | if (!this.baseUri) { |
| 43 | this.baseUri = 'https://api.appcenter.ms/'; |
| 44 | } |
| 45 | this.credentials = credentials; |
| 46 | |
| 47 | let packageInfo = this.getPackageJsonInfo(__dirname); |
| 48 | this.addUserAgentInfo(`${packageInfo.name}/${packageInfo.version}`); |
| 49 | this.apiTokens = new operations.ApiTokens(this); |
| 50 | this.apps = new operations.Apps(this); |
| 51 | this.azureSubscription = new operations.AzureSubscription(this); |
| 52 | this.distributionGroups = new operations.DistributionGroups(this); |
| 53 | this.appInvitations = new operations.AppInvitations(this); |
| 54 | this.users = new operations.Users(this); |
| 55 | this.organizations = new operations.Organizations(this); |
| 56 | this.orgInvitations = new operations.OrgInvitations(this); |
| 57 | this.teams = new operations.Teams(this); |
| 58 | this.distributionGroupInvitations = new operations.DistributionGroupInvitations(this); |
| 59 | this.models = models; |
| 60 | msRest.addSerializationMixin(this); |
| 61 | } |
| 62 | |
| 63 | } |
| 64 | |
| 65 | module.exports = AccountClient; |
| 66 | |