diff --git a/generator/generatedClasses/AWS/appServices/aws-paaS.js b/generator/generatedClasses/AWS/appServices/aws-paaS.js index f6eee331..f8e62ded 100644 --- a/generator/generatedClasses/AWS/appServices/aws-paaS.js +++ b/generator/generatedClasses/AWS/appServices/aws-paaS.js @@ -4,280 +4,295 @@ * @category AWS */ class AWS_PaaS { - /** - * - * @param {module} aws AWS SDK - * @param {object} options SDK options - */ - constructor(aws, options) { - this._AWS = aws; - this._apiVersion = options.apiVersion; - this._elasticBeanstalk = new this._AWS.ElasticBeanstalk({ - apiVersion: this._apiVersion - }); - } - /** - * Trigers the checkDNSAvailability function of ElasticBeanstalk - * @param {CheckDNSAvailabilityMessage} params - Data required for checkDNSAvailability - * @returns {Promise} - */ - checkDNSAvailability(params) { - return new Promise((resolve, reject) => { - this._elasticBeanstalk.checkDNSAvailability(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the composeEnvironments function of ElasticBeanstalk - * @param {ComposeEnvironmentsMessage} params - Data required for composeEnvironments - * @returns {Promise} - */ - composeEnvironments(params) { - return new Promise((resolve, reject) => { - this._elasticBeanstalk.composeEnvironments(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the createApplication function of ElasticBeanstalk - * @param {CreateApplicationMessage} params - Data required for createApplication - * @returns {Promise} - */ - create(params) { - return new Promise((resolve, reject) => { - this._elasticBeanstalk.createApplication(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the createConfigurationTemplate function of ElasticBeanstalk - * @param {CreateConfigurationTemplateMessage} params - Data required for createConfigurationTemplate - * @returns {Promise} - */ - createConfigTemplate(params) { - return new Promise((resolve, reject) => { - this._elasticBeanstalk.createConfigurationTemplate( - params, - (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - } - ); - }); - } - /** - * Trigers the createEnvironment function of ElasticBeanstalk - * @param {CreateEnvironmentMessage} params - Data required for createEnvironment - * @returns {Promise} - */ - createEnvironment(params) { - return new Promise((resolve, reject) => { - this._elasticBeanstalk.createEnvironment(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the createStorageLocation function of ElasticBeanstalk - * @returns {Promise} - */ - createStorageLocation() { - return new Promise((resolve, reject) => { - this._elasticBeanstalk.createStorageLocation((error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteApplication function of ElasticBeanstalk - * @param {DeleteApplicationMessage} params - Data required for deleteApplication - * @returns {Promise} - */ - delete(params) { - return new Promise((resolve, reject) => { - this._elasticBeanstalk.deleteApplication(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteConfigurationTemplate function of ElasticBeanstalk - * @param {DeleteConfigurationTemplateMessage} params - Data required for deleteConfigurationTemplate - * @returns {Promise} - */ - deleteConfigTemplate(params) { - return new Promise((resolve, reject) => { - this._elasticBeanstalk.deleteConfigurationTemplate( - params, - (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - } - ); - }); - } - /** - * Trigers the describeAccountAttributes function of ElasticBeanstalk - * @returns {Promise} - */ - describeAccountAttributes() { - return new Promise((resolve, reject) => { - this._elasticBeanstalk.describeAccountAttributes((error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the describeApplications function of ElasticBeanstalk - * @param {DescribeApplicationsMessage} params - Data required for describeApplications - * @returns {Promise} - */ - describe(params) { - return new Promise((resolve, reject) => { - this._elasticBeanstalk.describeApplications(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the describeConfigurationSettings function of ElasticBeanstalk - * @param {DescribeConfigurationSettingsMessage} params - Data required for describeConfigurationSettings - * @returns {Promise} - */ - describeConfigSettings(params) { - return new Promise((resolve, reject) => { - this._elasticBeanstalk.describeConfigurationSettings( - params, - (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - } - ); - }); - } - /** - * Trigers the listPlatformVersions function of ElasticBeanstalk - * @param {ListPlatformVersionsRequest} params - Data required for listPlatformVersions - * @returns {Promise} - */ - listVersions(params) { - return new Promise((resolve, reject) => { - this._elasticBeanstalk.listPlatformVersions(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the restartAppServer function of ElasticBeanstalk - * @param {RestartAppServerMessage} params - Data required for restartAppServer - * @returns {Promise} - */ - restart(params) { - return new Promise((resolve, reject) => { - this._elasticBeanstalk.restartAppServer(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the terminateEnvironment function of ElasticBeanstalk - * @param {TerminateEnvironmentMessage} params - Data required for terminateEnvironment - * @returns {Promise} - */ - terminateEnvironment(params) { - return new Promise((resolve, reject) => { - this._elasticBeanstalk.terminateEnvironment(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the updateApplication function of ElasticBeanstalk - * @param {UpdateApplicationMessage} params - Data required for updateApplication - * @returns {Promise} - */ - update(params) { - return new Promise((resolve, reject) => { - this._elasticBeanstalk.updateApplication(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the updateEnvironment function of ElasticBeanstalk - * @param {UpdateEnvironmentMessage} params - Data required for updateEnvironment - * @returns {Promise} - */ - updateEnvironment(params) { - return new Promise((resolve, reject) => { - this._elasticBeanstalk.updateEnvironment(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } + /** + * + * @param {module} aws AWS SDK + * @param {object} options SDK options + */ + constructor(aws, options) { + this._AWS = aws; + this._apiVersion = options.apiVersion; + this._elasticBeanstalk = new this._AWS.ElasticBeanstalk({ + apiVersion: this._apiVersion, + }); + } + /** + * Trigers the checkDNSAvailability function of ElasticBeanstalk + * @param {CheckDNSAvailabilityMessage} params - Data required for checkDNSAvailability + * @returns {Promise} + */ + checkDNSAvailability(params) { + return new Promise((resolve, reject) => { + this._elasticBeanstalk.checkDNSAvailability( + params, + (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + } + ); + }); + } + /** + * Trigers the composeEnvironments function of ElasticBeanstalk + * @param {ComposeEnvironmentsMessage} params - Data required for composeEnvironments + * @returns {Promise} + */ + composeEnvironments(params) { + return new Promise((resolve, reject) => { + this._elasticBeanstalk.composeEnvironments( + params, + (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + } + ); + }); + } + /** + * Trigers the createApplication function of ElasticBeanstalk + * @param {CreateApplicationMessage} params - Data required for createApplication + * @returns {Promise} + */ + create(params) { + return new Promise((resolve, reject) => { + this._elasticBeanstalk.createApplication(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the createConfigurationTemplate function of ElasticBeanstalk + * @param {CreateConfigurationTemplateMessage} params - Data required for createConfigurationTemplate + * @returns {Promise} + */ + createConfigTemplate(params) { + return new Promise((resolve, reject) => { + this._elasticBeanstalk.createConfigurationTemplate( + params, + (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + } + ); + }); + } + /** + * Trigers the createEnvironment function of ElasticBeanstalk + * @param {CreateEnvironmentMessage} params - Data required for createEnvironment + * @returns {Promise} + */ + createEnvironment(params) { + return new Promise((resolve, reject) => { + this._elasticBeanstalk.createEnvironment(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the createStorageLocation function of ElasticBeanstalk + * @returns {Promise} + */ + createStorageLocation() { + return new Promise((resolve, reject) => { + this._elasticBeanstalk.createStorageLocation((error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteApplication function of ElasticBeanstalk + * @param {DeleteApplicationMessage} params - Data required for deleteApplication + * @returns {Promise} + */ + delete(params) { + return new Promise((resolve, reject) => { + this._elasticBeanstalk.deleteApplication(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteConfigurationTemplate function of ElasticBeanstalk + * @param {DeleteConfigurationTemplateMessage} params - Data required for deleteConfigurationTemplate + * @returns {Promise} + */ + deleteConfigTemplate(params) { + return new Promise((resolve, reject) => { + this._elasticBeanstalk.deleteConfigurationTemplate( + params, + (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + } + ); + }); + } + /** + * Trigers the describeAccountAttributes function of ElasticBeanstalk + * @returns {Promise} + */ + describeAccountAttributes() { + return new Promise((resolve, reject) => { + this._elasticBeanstalk.describeAccountAttributes((error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the describeApplications function of ElasticBeanstalk + * @param {DescribeApplicationsMessage} params - Data required for describeApplications + * @returns {Promise} + */ + describe(params) { + return new Promise((resolve, reject) => { + this._elasticBeanstalk.describeApplications( + params, + (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + } + ); + }); + } + /** + * Trigers the describeConfigurationSettings function of ElasticBeanstalk + * @param {DescribeConfigurationSettingsMessage} params - Data required for describeConfigurationSettings + * @returns {Promise} + */ + describeConfigSettings(params) { + return new Promise((resolve, reject) => { + this._elasticBeanstalk.describeConfigurationSettings( + params, + (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + } + ); + }); + } + /** + * Trigers the listPlatformVersions function of ElasticBeanstalk + * @param {ListPlatformVersionsRequest} params - Data required for listPlatformVersions + * @returns {Promise} + */ + listVersions(params) { + return new Promise((resolve, reject) => { + this._elasticBeanstalk.listPlatformVersions( + params, + (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + } + ); + }); + } + /** + * Trigers the restartAppServer function of ElasticBeanstalk + * @param {RestartAppServerMessage} params - Data required for restartAppServer + * @returns {Promise} + */ + restart(params) { + return new Promise((resolve, reject) => { + this._elasticBeanstalk.restartAppServer(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the terminateEnvironment function of ElasticBeanstalk + * @param {TerminateEnvironmentMessage} params - Data required for terminateEnvironment + * @returns {Promise} + */ + terminateEnvironment(params) { + return new Promise((resolve, reject) => { + this._elasticBeanstalk.terminateEnvironment( + params, + (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + } + ); + }); + } + /** + * Trigers the updateApplication function of ElasticBeanstalk + * @param {UpdateApplicationMessage} params - Data required for updateApplication + * @returns {Promise} + */ + update(params) { + return new Promise((resolve, reject) => { + this._elasticBeanstalk.updateApplication(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the updateEnvironment function of ElasticBeanstalk + * @param {UpdateEnvironmentMessage} params - Data required for updateEnvironment + * @returns {Promise} + */ + updateEnvironment(params) { + return new Promise((resolve, reject) => { + this._elasticBeanstalk.updateEnvironment(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } } module.exports = AWS_PaaS; diff --git a/generator/generatedClasses/AWS/artificialinteligence/aws-translation.js b/generator/generatedClasses/AWS/artificialinteligence/aws-translation.js index 978c2249..c89ce192 100644 --- a/generator/generatedClasses/AWS/artificialinteligence/aws-translation.js +++ b/generator/generatedClasses/AWS/artificialinteligence/aws-translation.js @@ -4,97 +4,97 @@ * @category AWS */ class AWS_Translation { - /** - * - * @param {module} aws AWS SDK - * @param {object} options SDK options - */ - constructor(aws, options) { - this._AWS = aws; - this._apiVersion = options.apiVersion; - this._translate = new this._AWS.Translate({ - apiVersion: this._apiVersion - }); - } - /** - * Trigers the deleteTerminology function of Translate - * @param {DeleteTerminologyRequest} params - Data required for deleteTerminology - * @returns {Promise} - */ - deleteGlossary(params) { - return new Promise((resolve, reject) => { - this._translate.deleteTerminology(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the getTerminology function of Translate - * @param {GetTerminologyRequest} params - Data required for getTerminology - * @returns {Promise} - */ - getGlossary(params) { - return new Promise((resolve, reject) => { - this._translate.getTerminology(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the importTerminology function of Translate - * @param {ImportTerminologyRequest} params - Data required for importTerminology - * @returns {Promise} - */ - createGlossary(params) { - return new Promise((resolve, reject) => { - this._translate.importTerminology(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the startTextTranslationJob function of Translate - * @param {StartTextTranslationJobRequest} params - Data required for startTextTranslationJob - * @returns {Promise} - */ - batchTranslate(params) { - return new Promise((resolve, reject) => { - this._translate.startTextTranslationJob(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the translateText function of Translate - * @param {TranslateTextRequest} params - Data required for translateText - * @returns {Promise} - */ - translate(params) { - return new Promise((resolve, reject) => { - this._translate.translateText(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } + /** + * + * @param {module} aws AWS SDK + * @param {object} options SDK options + */ + constructor(aws, options) { + this._AWS = aws; + this._apiVersion = options.apiVersion; + this._translate = new this._AWS.Translate({ + apiVersion: this._apiVersion, + }); + } + /** + * Trigers the deleteTerminology function of Translate + * @param {DeleteTerminologyRequest} params - Data required for deleteTerminology + * @returns {Promise} + */ + deleteGlossary(params) { + return new Promise((resolve, reject) => { + this._translate.deleteTerminology(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the getTerminology function of Translate + * @param {GetTerminologyRequest} params - Data required for getTerminology + * @returns {Promise} + */ + getGlossary(params) { + return new Promise((resolve, reject) => { + this._translate.getTerminology(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the importTerminology function of Translate + * @param {ImportTerminologyRequest} params - Data required for importTerminology + * @returns {Promise} + */ + createGlossary(params) { + return new Promise((resolve, reject) => { + this._translate.importTerminology(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the startTextTranslationJob function of Translate + * @param {StartTextTranslationJobRequest} params - Data required for startTextTranslationJob + * @returns {Promise} + */ + batchTranslate(params) { + return new Promise((resolve, reject) => { + this._translate.startTextTranslationJob(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the translateText function of Translate + * @param {TranslateTextRequest} params - Data required for translateText + * @returns {Promise} + */ + translate(params) { + return new Promise((resolve, reject) => { + this._translate.translateText(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } } module.exports = AWS_Translation; diff --git a/generator/generatedClasses/AWS/compute/aws-computeInstance.js b/generator/generatedClasses/AWS/compute/aws-computeInstance.js index e3010568..7ac04a34 100644 --- a/generator/generatedClasses/AWS/compute/aws-computeInstance.js +++ b/generator/generatedClasses/AWS/compute/aws-computeInstance.js @@ -4,161 +4,161 @@ * @category AWS */ class AWS_ComputeInstance { - /** - * - * @param {module} aws AWS SDK - * @param {object} options SDK options - */ - constructor(aws, options) { - this._AWS = aws; - this._apiVersion = options.apiVersion; - this._eC2 = new this._AWS.EC2({ - apiVersion: this._apiVersion - }); - } - /** - * Trigers the createTags function of EC2 - * @param {CreateTagsRequest} params - Data required for createTags - * @returns {Promise} - */ - addTags(params) { - return new Promise((resolve, reject) => { - this._eC2.createTags(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the describeInstances function of EC2 - * @param {DescribeInstancesRequest} params - Data required for describeInstances - * @returns {Promise} - */ - list(params) { - return new Promise((resolve, reject) => { - this._eC2.describeInstances(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the monitorInstances function of EC2 - * @param {MonitorInstancesRequest} params - Data required for monitorInstances - * @returns {Promise} - */ - monitor(params) { - return new Promise((resolve, reject) => { - this._eC2.monitorInstances(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the rebootInstances function of EC2 - * @param {RebootInstancesRequest} params - Data required for rebootInstances - * @returns {Promise} - */ - reboot(params) { - return new Promise((resolve, reject) => { - this._eC2.rebootInstances(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the runInstances function of EC2 - * @param {RunInstancesRequest} params - Data required for runInstances - * @returns {Promise} - */ - create(params) { - return new Promise((resolve, reject) => { - this._eC2.runInstances(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the startInstances function of EC2 - * @param {StartInstancesRequest} params - Data required for startInstances - * @returns {Promise} - */ - start(params) { - return new Promise((resolve, reject) => { - this._eC2.startInstances(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the stopInstances function of EC2 - * @param {StopInstancesRequest} params - Data required for stopInstances - * @returns {Promise} - */ - stop(params) { - return new Promise((resolve, reject) => { - this._eC2.stopInstances(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the terminateInstances function of EC2 - * @param {TerminateInstancesRequest} params - Data required for terminateInstances - * @returns {Promise} - */ - destroy(params) { - return new Promise((resolve, reject) => { - this._eC2.terminateInstances(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the unmonitorInstances function of EC2 - * @param {UnmonitorInstancesRequest} params - Data required for unmonitorInstances - * @returns {Promise} - */ - unmonitor(params) { - return new Promise((resolve, reject) => { - this._eC2.unmonitorInstances(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } + /** + * + * @param {module} aws AWS SDK + * @param {object} options SDK options + */ + constructor(aws, options) { + this._AWS = aws; + this._apiVersion = options.apiVersion; + this._eC2 = new this._AWS.EC2({ + apiVersion: this._apiVersion, + }); + } + /** + * Trigers the createTags function of EC2 + * @param {CreateTagsRequest} params - Data required for createTags + * @returns {Promise} + */ + addTags(params) { + return new Promise((resolve, reject) => { + this._eC2.createTags(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the describeInstances function of EC2 + * @param {DescribeInstancesRequest} params - Data required for describeInstances + * @returns {Promise} + */ + list(params) { + return new Promise((resolve, reject) => { + this._eC2.describeInstances(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the monitorInstances function of EC2 + * @param {MonitorInstancesRequest} params - Data required for monitorInstances + * @returns {Promise} + */ + monitor(params) { + return new Promise((resolve, reject) => { + this._eC2.monitorInstances(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the rebootInstances function of EC2 + * @param {RebootInstancesRequest} params - Data required for rebootInstances + * @returns {Promise} + */ + reboot(params) { + return new Promise((resolve, reject) => { + this._eC2.rebootInstances(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the runInstances function of EC2 + * @param {RunInstancesRequest} params - Data required for runInstances + * @returns {Promise} + */ + create(params) { + return new Promise((resolve, reject) => { + this._eC2.runInstances(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the startInstances function of EC2 + * @param {StartInstancesRequest} params - Data required for startInstances + * @returns {Promise} + */ + start(params) { + return new Promise((resolve, reject) => { + this._eC2.startInstances(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the stopInstances function of EC2 + * @param {StopInstancesRequest} params - Data required for stopInstances + * @returns {Promise} + */ + stop(params) { + return new Promise((resolve, reject) => { + this._eC2.stopInstances(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the terminateInstances function of EC2 + * @param {TerminateInstancesRequest} params - Data required for terminateInstances + * @returns {Promise} + */ + destroy(params) { + return new Promise((resolve, reject) => { + this._eC2.terminateInstances(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the unmonitorInstances function of EC2 + * @param {UnmonitorInstancesRequest} params - Data required for unmonitorInstances + * @returns {Promise} + */ + unmonitor(params) { + return new Promise((resolve, reject) => { + this._eC2.unmonitorInstances(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } } module.exports = AWS_ComputeInstance; diff --git a/generator/generatedClasses/AWS/compute/aws-container.js b/generator/generatedClasses/AWS/compute/aws-container.js index 2e9e6863..44da8f96 100644 --- a/generator/generatedClasses/AWS/compute/aws-container.js +++ b/generator/generatedClasses/AWS/compute/aws-container.js @@ -4,81 +4,81 @@ * @category AWS */ class AWS_Container { - /** - * - * @param {module} aws AWS SDK - * @param {object} options SDK options - */ - constructor(aws, options) { - this._AWS = aws; - this._apiVersion = options.apiVersion; - this._eCS = new this._AWS.ECS({ - apiVersion: this._apiVersion - }); - } - /** - * Trigers the createCluster function of ECS - * @param {CreateClusterRequest} params - Data required for createCluster - * @returns {Promise} - */ - create(params) { - return new Promise((resolve, reject) => { - this._eCS.createCluster(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteCluster function of ECS - * @param {DeleteClusterRequest} params - Data required for deleteCluster - * @returns {Promise} - */ - delete(params) { - return new Promise((resolve, reject) => { - this._eCS.deleteCluster(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the describeClusters function of ECS - * @param {DescribeClustersRequest} params - Data required for describeClusters - * @returns {Promise} - */ - describe(params) { - return new Promise((resolve, reject) => { - this._eCS.describeClusters(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the listClusters function of ECS - * @param {ListClustersRequest} params - Data required for listClusters - * @returns {Promise} - */ - list(params) { - return new Promise((resolve, reject) => { - this._eCS.listClusters(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } + /** + * + * @param {module} aws AWS SDK + * @param {object} options SDK options + */ + constructor(aws, options) { + this._AWS = aws; + this._apiVersion = options.apiVersion; + this._eCS = new this._AWS.ECS({ + apiVersion: this._apiVersion, + }); + } + /** + * Trigers the createCluster function of ECS + * @param {CreateClusterRequest} params - Data required for createCluster + * @returns {Promise} + */ + create(params) { + return new Promise((resolve, reject) => { + this._eCS.createCluster(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteCluster function of ECS + * @param {DeleteClusterRequest} params - Data required for deleteCluster + * @returns {Promise} + */ + delete(params) { + return new Promise((resolve, reject) => { + this._eCS.deleteCluster(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the describeClusters function of ECS + * @param {DescribeClustersRequest} params - Data required for describeClusters + * @returns {Promise} + */ + describe(params) { + return new Promise((resolve, reject) => { + this._eCS.describeClusters(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the listClusters function of ECS + * @param {ListClustersRequest} params - Data required for listClusters + * @returns {Promise} + */ + list(params) { + return new Promise((resolve, reject) => { + this._eCS.listClusters(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } } module.exports = AWS_Container; diff --git a/generator/generatedClasses/AWS/compute/aws-kubernetes.js b/generator/generatedClasses/AWS/compute/aws-kubernetes.js index 394d8b9a..6381ac0f 100644 --- a/generator/generatedClasses/AWS/compute/aws-kubernetes.js +++ b/generator/generatedClasses/AWS/compute/aws-kubernetes.js @@ -4,177 +4,177 @@ * @category AWS */ class AWS_Kubernetes { - /** - * - * @param {module} aws AWS SDK - * @param {object} options SDK options - */ - constructor(aws, options) { - this._AWS = aws; - this._apiVersion = options.apiVersion; - this._eKS = new this._AWS.EKS({ - apiVersion: this._apiVersion - }); - } - /** - * Trigers the createCluster function of EKS - * @param {CreateClusterRequest} params - Data required for createCluster - * @returns {Promise} - */ - create(params) { - return new Promise((resolve, reject) => { - this._eKS.createCluster(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the createNodegroup function of EKS - * @param {CreateNodegroupRequest} params - Data required for createNodegroup - * @returns {Promise} - */ - createNodeGroup(params) { - return new Promise((resolve, reject) => { - this._eKS.createNodegroup(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteCluster function of EKS - * @param {DeleteClusterRequest} params - Data required for deleteCluster - * @returns {Promise} - */ - delete(params) { - return new Promise((resolve, reject) => { - this._eKS.deleteCluster(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteNodegroup function of EKS - * @param {DeleteNodegroupRequest} params - Data required for deleteNodegroup - * @returns {Promise} - */ - deleteNodegroup(params) { - return new Promise((resolve, reject) => { - this._eKS.deleteNodegroup(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the describeCluster function of EKS - * @param {DescribeClusterRequest} params - Data required for describeCluster - * @returns {Promise} - */ - describeCluster(params) { - return new Promise((resolve, reject) => { - this._eKS.describeCluster(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the describeNodegroup function of EKS - * @param {DescribeNodegroupRequest} params - Data required for describeNodegroup - * @returns {Promise} - */ - describeNodeGroup(params) { - return new Promise((resolve, reject) => { - this._eKS.describeNodegroup(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the listClusters function of EKS - * @param {ListClustersRequest} params - Data required for listClusters - * @returns {Promise} - */ - listClusters(params) { - return new Promise((resolve, reject) => { - this._eKS.listClusters(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the listNodegroups function of EKS - * @param {ListNodegroupsRequest} params - Data required for listNodegroups - * @returns {Promise} - */ - listNodegroups(params) { - return new Promise((resolve, reject) => { - this._eKS.listNodegroups(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the tagResource function of EKS - * @param {TagResourceRequest} params - Data required for tagResource - * @returns {Promise} - */ - updateTags(params) { - return new Promise((resolve, reject) => { - this._eKS.tagResource(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the updateClusterConfig function of EKS - * @param {UpdateClusterConfigRequest} params - Data required for updateClusterConfig - * @returns {Promise} - */ - updateConfig(params) { - return new Promise((resolve, reject) => { - this._eKS.updateClusterConfig(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } + /** + * + * @param {module} aws AWS SDK + * @param {object} options SDK options + */ + constructor(aws, options) { + this._AWS = aws; + this._apiVersion = options.apiVersion; + this._eKS = new this._AWS.EKS({ + apiVersion: this._apiVersion, + }); + } + /** + * Trigers the createCluster function of EKS + * @param {CreateClusterRequest} params - Data required for createCluster + * @returns {Promise} + */ + create(params) { + return new Promise((resolve, reject) => { + this._eKS.createCluster(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the createNodegroup function of EKS + * @param {CreateNodegroupRequest} params - Data required for createNodegroup + * @returns {Promise} + */ + createNodeGroup(params) { + return new Promise((resolve, reject) => { + this._eKS.createNodegroup(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteCluster function of EKS + * @param {DeleteClusterRequest} params - Data required for deleteCluster + * @returns {Promise} + */ + delete(params) { + return new Promise((resolve, reject) => { + this._eKS.deleteCluster(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteNodegroup function of EKS + * @param {DeleteNodegroupRequest} params - Data required for deleteNodegroup + * @returns {Promise} + */ + deleteNodegroup(params) { + return new Promise((resolve, reject) => { + this._eKS.deleteNodegroup(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the describeCluster function of EKS + * @param {DescribeClusterRequest} params - Data required for describeCluster + * @returns {Promise} + */ + describeCluster(params) { + return new Promise((resolve, reject) => { + this._eKS.describeCluster(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the describeNodegroup function of EKS + * @param {DescribeNodegroupRequest} params - Data required for describeNodegroup + * @returns {Promise} + */ + describeNodeGroup(params) { + return new Promise((resolve, reject) => { + this._eKS.describeNodegroup(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the listClusters function of EKS + * @param {ListClustersRequest} params - Data required for listClusters + * @returns {Promise} + */ + listClusters(params) { + return new Promise((resolve, reject) => { + this._eKS.listClusters(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the listNodegroups function of EKS + * @param {ListNodegroupsRequest} params - Data required for listNodegroups + * @returns {Promise} + */ + listNodegroups(params) { + return new Promise((resolve, reject) => { + this._eKS.listNodegroups(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the tagResource function of EKS + * @param {TagResourceRequest} params - Data required for tagResource + * @returns {Promise} + */ + updateTags(params) { + return new Promise((resolve, reject) => { + this._eKS.tagResource(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the updateClusterConfig function of EKS + * @param {UpdateClusterConfigRequest} params - Data required for updateClusterConfig + * @returns {Promise} + */ + updateConfig(params) { + return new Promise((resolve, reject) => { + this._eKS.updateClusterConfig(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } } module.exports = AWS_Kubernetes; diff --git a/generator/generatedClasses/AWS/database/aws-RDBMS.js b/generator/generatedClasses/AWS/database/aws-RDBMS.js index 215ab2fb..b53f2bcb 100644 --- a/generator/generatedClasses/AWS/database/aws-RDBMS.js +++ b/generator/generatedClasses/AWS/database/aws-RDBMS.js @@ -4,113 +4,113 @@ * @category AWS */ class AWS_RDBMS { - /** - * - * @param {module} aws AWS SDK - * @param {object} options SDK options - */ - constructor(aws, options) { - this._AWS = aws; - this._apiVersion = options.apiVersion; - this._rDS = new this._AWS.RDS({ - apiVersion: this._apiVersion - }); - } - /** - * Trigers the createDBCluster function of RDS - * @param {CreateDBClusterMessage} params - Data required for createDBCluster - * @returns {Promise} - */ - createDatabse(params) { - return new Promise((resolve, reject) => { - this._rDS.createDBCluster(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the createDBSnapshot function of RDS - * @param {CreateDBSnapshotMessage} params - Data required for createDBSnapshot - * @returns {Promise} - */ - createSnapshots(params) { - return new Promise((resolve, reject) => { - this._rDS.createDBSnapshot(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteDBCluster function of RDS - * @param {DeleteDBClusterMessage} params - Data required for deleteDBCluster - * @returns {Promise} - */ - deleteDatabase(params) { - return new Promise((resolve, reject) => { - this._rDS.deleteDBCluster(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteDBSnapshot function of RDS - * @param {DeleteDBSnapshotMessage} params - Data required for deleteDBSnapshot - * @returns {Promise} - */ - deleteDBSnapshot(params) { - return new Promise((resolve, reject) => { - this._rDS.deleteDBSnapshot(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the modifyDBCluster function of RDS - * @param {ModifyDBClusterMessage} params - Data required for modifyDBCluster - * @returns {Promise} - */ - modifyDB(params) { - return new Promise((resolve, reject) => { - this._rDS.modifyDBCluster(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the rebootDBInstance function of RDS - * @param {RebootDBInstanceMessage} params - Data required for rebootDBInstance - * @returns {Promise} - */ - restoreDatabase(params) { - return new Promise((resolve, reject) => { - this._rDS.rebootDBInstance(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } + /** + * + * @param {module} aws AWS SDK + * @param {object} options SDK options + */ + constructor(aws, options) { + this._AWS = aws; + this._apiVersion = options.apiVersion; + this._rDS = new this._AWS.RDS({ + apiVersion: this._apiVersion, + }); + } + /** + * Trigers the createDBCluster function of RDS + * @param {CreateDBClusterMessage} params - Data required for createDBCluster + * @returns {Promise} + */ + createDatabse(params) { + return new Promise((resolve, reject) => { + this._rDS.createDBCluster(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the createDBSnapshot function of RDS + * @param {CreateDBSnapshotMessage} params - Data required for createDBSnapshot + * @returns {Promise} + */ + createSnapshots(params) { + return new Promise((resolve, reject) => { + this._rDS.createDBSnapshot(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteDBCluster function of RDS + * @param {DeleteDBClusterMessage} params - Data required for deleteDBCluster + * @returns {Promise} + */ + deleteDatabase(params) { + return new Promise((resolve, reject) => { + this._rDS.deleteDBCluster(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteDBSnapshot function of RDS + * @param {DeleteDBSnapshotMessage} params - Data required for deleteDBSnapshot + * @returns {Promise} + */ + deleteDBSnapshot(params) { + return new Promise((resolve, reject) => { + this._rDS.deleteDBSnapshot(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the modifyDBCluster function of RDS + * @param {ModifyDBClusterMessage} params - Data required for modifyDBCluster + * @returns {Promise} + */ + modifyDB(params) { + return new Promise((resolve, reject) => { + this._rDS.modifyDBCluster(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the rebootDBInstance function of RDS + * @param {RebootDBInstanceMessage} params - Data required for rebootDBInstance + * @returns {Promise} + */ + restoreDatabase(params) { + return new Promise((resolve, reject) => { + this._rDS.rebootDBInstance(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } } module.exports = AWS_RDBMS; diff --git a/generator/generatedClasses/AWS/database/aws-noSql.js b/generator/generatedClasses/AWS/database/aws-noSql.js index c11898c9..3eebfbbd 100644 --- a/generator/generatedClasses/AWS/database/aws-noSql.js +++ b/generator/generatedClasses/AWS/database/aws-noSql.js @@ -4,113 +4,113 @@ * @category AWS */ class AWS_NoSql { - /** - * - * @param {module} aws AWS SDK - * @param {object} options SDK options - */ - constructor(aws, options) { - this._AWS = aws; - this._apiVersion = options.apiVersion; - this._dynamoDB = new this._AWS.DynamoDB({ - apiVersion: this._apiVersion - }); - } - /** - * Trigers the createTable function of DynamoDB - * @param {CreateTableInput} params - Data required for createTable - * @returns {Promise} - */ - createTable(params) { - return new Promise((resolve, reject) => { - this._dynamoDB.createTable(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteItem function of DynamoDB - * @param {DeleteItemInput} params - Data required for deleteItem - * @returns {Promise} - */ - deleteItem(params) { - return new Promise((resolve, reject) => { - this._dynamoDB.deleteItem(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteTable function of DynamoDB - * @param {DeleteTableInput} params - Data required for deleteTable - * @returns {Promise} - */ - deleteTable(params) { - return new Promise((resolve, reject) => { - this._dynamoDB.deleteTable(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the putItem function of DynamoDB - * @param {PutItemInput} params - Data required for putItem - * @returns {Promise} - */ - createItem(params) { - return new Promise((resolve, reject) => { - this._dynamoDB.putItem(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the query function of DynamoDB - * @param {QueryInput} params - Data required for query - * @returns {Promise} - */ - query(params) { - return new Promise((resolve, reject) => { - this._dynamoDB.query(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the updateItem function of DynamoDB - * @param {UpdateItemInput} params - Data required for updateItem - * @returns {Promise} - */ - updateItem(params) { - return new Promise((resolve, reject) => { - this._dynamoDB.updateItem(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } + /** + * + * @param {module} aws AWS SDK + * @param {object} options SDK options + */ + constructor(aws, options) { + this._AWS = aws; + this._apiVersion = options.apiVersion; + this._dynamoDB = new this._AWS.DynamoDB({ + apiVersion: this._apiVersion, + }); + } + /** + * Trigers the createTable function of DynamoDB + * @param {CreateTableInput} params - Data required for createTable + * @returns {Promise} + */ + createTable(params) { + return new Promise((resolve, reject) => { + this._dynamoDB.createTable(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteItem function of DynamoDB + * @param {DeleteItemInput} params - Data required for deleteItem + * @returns {Promise} + */ + deleteItem(params) { + return new Promise((resolve, reject) => { + this._dynamoDB.deleteItem(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteTable function of DynamoDB + * @param {DeleteTableInput} params - Data required for deleteTable + * @returns {Promise} + */ + deleteTable(params) { + return new Promise((resolve, reject) => { + this._dynamoDB.deleteTable(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the putItem function of DynamoDB + * @param {PutItemInput} params - Data required for putItem + * @returns {Promise} + */ + createItem(params) { + return new Promise((resolve, reject) => { + this._dynamoDB.putItem(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the query function of DynamoDB + * @param {QueryInput} params - Data required for query + * @returns {Promise} + */ + query(params) { + return new Promise((resolve, reject) => { + this._dynamoDB.query(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the updateItem function of DynamoDB + * @param {UpdateItemInput} params - Data required for updateItem + * @returns {Promise} + */ + updateItem(params) { + return new Promise((resolve, reject) => { + this._dynamoDB.updateItem(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } } module.exports = AWS_NoSql; diff --git a/generator/generatedClasses/AWS/database/aws-noSqlIndexed.js b/generator/generatedClasses/AWS/database/aws-noSqlIndexed.js index c86ffc13..82128eef 100644 --- a/generator/generatedClasses/AWS/database/aws-noSqlIndexed.js +++ b/generator/generatedClasses/AWS/database/aws-noSqlIndexed.js @@ -4,161 +4,161 @@ * @category AWS */ class AWS_NoSqlIndexed { - /** - * - * @param {module} aws AWS SDK - * @param {object} options SDK options - */ - constructor(aws, options) { - this._AWS = aws; - this._apiVersion = options.apiVersion; - this._simpleDB = new this._AWS.SimpleDB({ - apiVersion: this._apiVersion - }); - } - /** - * Trigers the batchDeleteAttributes function of SimpleDB - * @param {BatchDeleteAttributesRequest} params - Data required for batchDeleteAttributes - * @returns {Promise} - */ - batchDelete(params) { - return new Promise((resolve, reject) => { - this._simpleDB.batchDeleteAttributes(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the batchPutAttributes function of SimpleDB - * @param {BatchPutAttributesRequest} params - Data required for batchPutAttributes - * @returns {Promise} - */ - batchWrite(params) { - return new Promise((resolve, reject) => { - this._simpleDB.batchPutAttributes(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the createDomain function of SimpleDB - * @param {CreateDomainRequest} params - Data required for createDomain - * @returns {Promise} - */ - createCollection(params) { - return new Promise((resolve, reject) => { - this._simpleDB.createDomain(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteAttributes function of SimpleDB - * @param {DeleteAttributesRequest} params - Data required for deleteAttributes - * @returns {Promise} - */ - deleteAttribute(params) { - return new Promise((resolve, reject) => { - this._simpleDB.deleteAttributes(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteDomain function of SimpleDB - * @param {DeleteDomainRequest} params - Data required for deleteDomain - * @returns {Promise} - */ - deleteCollection(params) { - return new Promise((resolve, reject) => { - this._simpleDB.deleteDomain(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the getAttributes function of SimpleDB - * @param {GetAttributesRequest} params - Data required for getAttributes - * @returns {Promise} - */ - getAttributes(params) { - return new Promise((resolve, reject) => { - this._simpleDB.getAttributes(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the listDomains function of SimpleDB - * @param {ListDomainsRequest} params - Data required for listDomains - * @returns {Promise} - */ - listCollections(params) { - return new Promise((resolve, reject) => { - this._simpleDB.listDomains(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the putAttributes function of SimpleDB - * @param {PutAttributesRequest} params - Data required for putAttributes - * @returns {Promise} - */ - setAttribute(params) { - return new Promise((resolve, reject) => { - this._simpleDB.putAttributes(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the select function of SimpleDB - * @param {SelectRequest} params - Data required for select - * @returns {Promise} - */ - query(params) { - return new Promise((resolve, reject) => { - this._simpleDB.select(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } + /** + * + * @param {module} aws AWS SDK + * @param {object} options SDK options + */ + constructor(aws, options) { + this._AWS = aws; + this._apiVersion = options.apiVersion; + this._simpleDB = new this._AWS.SimpleDB({ + apiVersion: this._apiVersion, + }); + } + /** + * Trigers the batchDeleteAttributes function of SimpleDB + * @param {BatchDeleteAttributesRequest} params - Data required for batchDeleteAttributes + * @returns {Promise} + */ + batchDelete(params) { + return new Promise((resolve, reject) => { + this._simpleDB.batchDeleteAttributes(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the batchPutAttributes function of SimpleDB + * @param {BatchPutAttributesRequest} params - Data required for batchPutAttributes + * @returns {Promise} + */ + batchWrite(params) { + return new Promise((resolve, reject) => { + this._simpleDB.batchPutAttributes(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the createDomain function of SimpleDB + * @param {CreateDomainRequest} params - Data required for createDomain + * @returns {Promise} + */ + createCollection(params) { + return new Promise((resolve, reject) => { + this._simpleDB.createDomain(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteAttributes function of SimpleDB + * @param {DeleteAttributesRequest} params - Data required for deleteAttributes + * @returns {Promise} + */ + deleteAttribute(params) { + return new Promise((resolve, reject) => { + this._simpleDB.deleteAttributes(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteDomain function of SimpleDB + * @param {DeleteDomainRequest} params - Data required for deleteDomain + * @returns {Promise} + */ + deleteCollection(params) { + return new Promise((resolve, reject) => { + this._simpleDB.deleteDomain(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the getAttributes function of SimpleDB + * @param {GetAttributesRequest} params - Data required for getAttributes + * @returns {Promise} + */ + getAttributes(params) { + return new Promise((resolve, reject) => { + this._simpleDB.getAttributes(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the listDomains function of SimpleDB + * @param {ListDomainsRequest} params - Data required for listDomains + * @returns {Promise} + */ + listCollections(params) { + return new Promise((resolve, reject) => { + this._simpleDB.listDomains(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the putAttributes function of SimpleDB + * @param {PutAttributesRequest} params - Data required for putAttributes + * @returns {Promise} + */ + setAttribute(params) { + return new Promise((resolve, reject) => { + this._simpleDB.putAttributes(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the select function of SimpleDB + * @param {SelectRequest} params - Data required for select + * @returns {Promise} + */ + query(params) { + return new Promise((resolve, reject) => { + this._simpleDB.select(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } } module.exports = AWS_NoSqlIndexed; diff --git a/generator/generatedClasses/AWS/management/aws-keyManagement.js b/generator/generatedClasses/AWS/management/aws-keyManagement.js index 7bab4b56..c311e123 100644 --- a/generator/generatedClasses/AWS/management/aws-keyManagement.js +++ b/generator/generatedClasses/AWS/management/aws-keyManagement.js @@ -4,97 +4,97 @@ * @category AWS */ class AWS_KeyManagement { - /** - * - * @param {module} aws AWS SDK - * @param {object} options SDK options - */ - constructor(aws, options) { - this._AWS = aws; - this._apiVersion = options.apiVersion; - this._kMS = new this._AWS.KMS({ - apiVersion: this._apiVersion - }); - } - /** - * Trigers the createKey function of KMS - * @param {CreateKeyRequest} params - Data required for createKey - * @returns {Promise} - */ - createKey(params) { - return new Promise((resolve, reject) => { - this._kMS.createKey(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteCustomKeyStore function of KMS - * @param {DeleteCustomKeyStoreRequest} params - Data required for deleteCustomKeyStore - * @returns {Promise} - */ - deleteKey(params) { - return new Promise((resolve, reject) => { - this._kMS.deleteCustomKeyStore(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the describeKey function of KMS - * @param {DescribeKeyRequest} params - Data required for describeKey - * @returns {Promise} - */ - describeKey(params) { - return new Promise((resolve, reject) => { - this._kMS.describeKey(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the putKeyPolicy function of KMS - * @param {PutKeyPolicyRequest} params - Data required for putKeyPolicy - * @returns {Promise} - */ - putKeyPolicy(params) { - return new Promise((resolve, reject) => { - this._kMS.putKeyPolicy(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the updateKeyDescription function of KMS - * @param {UpdateKeyDescriptionRequest} params - Data required for updateKeyDescription - * @returns {Promise} - */ - update(params) { - return new Promise((resolve, reject) => { - this._kMS.updateKeyDescription(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } + /** + * + * @param {module} aws AWS SDK + * @param {object} options SDK options + */ + constructor(aws, options) { + this._AWS = aws; + this._apiVersion = options.apiVersion; + this._kMS = new this._AWS.KMS({ + apiVersion: this._apiVersion, + }); + } + /** + * Trigers the createKey function of KMS + * @param {CreateKeyRequest} params - Data required for createKey + * @returns {Promise} + */ + createKey(params) { + return new Promise((resolve, reject) => { + this._kMS.createKey(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteCustomKeyStore function of KMS + * @param {DeleteCustomKeyStoreRequest} params - Data required for deleteCustomKeyStore + * @returns {Promise} + */ + deleteKey(params) { + return new Promise((resolve, reject) => { + this._kMS.deleteCustomKeyStore(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the describeKey function of KMS + * @param {DescribeKeyRequest} params - Data required for describeKey + * @returns {Promise} + */ + describeKey(params) { + return new Promise((resolve, reject) => { + this._kMS.describeKey(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the putKeyPolicy function of KMS + * @param {PutKeyPolicyRequest} params - Data required for putKeyPolicy + * @returns {Promise} + */ + putKeyPolicy(params) { + return new Promise((resolve, reject) => { + this._kMS.putKeyPolicy(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the updateKeyDescription function of KMS + * @param {UpdateKeyDescriptionRequest} params - Data required for updateKeyDescription + * @returns {Promise} + */ + update(params) { + return new Promise((resolve, reject) => { + this._kMS.updateKeyDescription(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } } module.exports = AWS_KeyManagement; diff --git a/generator/generatedClasses/AWS/management/aws-monitoring.js b/generator/generatedClasses/AWS/management/aws-monitoring.js index ba4a17de..24c83246 100644 --- a/generator/generatedClasses/AWS/management/aws-monitoring.js +++ b/generator/generatedClasses/AWS/management/aws-monitoring.js @@ -4,81 +4,81 @@ * @category AWS */ class AWS_Monitoring { - /** - * - * @param {module} aws AWS SDK - * @param {object} options SDK options - */ - constructor(aws, options) { - this._AWS = aws; - this._apiVersion = options.apiVersion; - this._cloudWatch = new this._AWS.CloudWatch({ - apiVersion: this._apiVersion - }); - } - /** - * Trigers the deleteAlarms function of CloudWatch - * @param {DeleteAlarmsInput} params - Data required for deleteAlarms - * @returns {Promise} - */ - deleteAlarm(params) { - return new Promise((resolve, reject) => { - this._cloudWatch.deleteAlarms(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the getMetricData function of CloudWatch - * @param {GetMetricDataInput} params - Data required for getMetricData - * @returns {Promise} - */ - getMetricData(params) { - return new Promise((resolve, reject) => { - this._cloudWatch.getMetricData(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the listMetrics function of CloudWatch - * @param {ListMetricsInput} params - Data required for listMetrics - * @returns {Promise} - */ - listAlarms(params) { - return new Promise((resolve, reject) => { - this._cloudWatch.listMetrics(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the putMetricAlarm function of CloudWatch - * @param {PutMetricAlarmInput} params - Data required for putMetricAlarm - * @returns {Promise} - */ - updateAlarm(params) { - return new Promise((resolve, reject) => { - this._cloudWatch.putMetricAlarm(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } + /** + * + * @param {module} aws AWS SDK + * @param {object} options SDK options + */ + constructor(aws, options) { + this._AWS = aws; + this._apiVersion = options.apiVersion; + this._cloudWatch = new this._AWS.CloudWatch({ + apiVersion: this._apiVersion, + }); + } + /** + * Trigers the deleteAlarms function of CloudWatch + * @param {DeleteAlarmsInput} params - Data required for deleteAlarms + * @returns {Promise} + */ + deleteAlarm(params) { + return new Promise((resolve, reject) => { + this._cloudWatch.deleteAlarms(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the getMetricData function of CloudWatch + * @param {GetMetricDataInput} params - Data required for getMetricData + * @returns {Promise} + */ + getMetricData(params) { + return new Promise((resolve, reject) => { + this._cloudWatch.getMetricData(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the listMetrics function of CloudWatch + * @param {ListMetricsInput} params - Data required for listMetrics + * @returns {Promise} + */ + listAlarms(params) { + return new Promise((resolve, reject) => { + this._cloudWatch.listMetrics(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the putMetricAlarm function of CloudWatch + * @param {PutMetricAlarmInput} params - Data required for putMetricAlarm + * @returns {Promise} + */ + updateAlarm(params) { + return new Promise((resolve, reject) => { + this._cloudWatch.putMetricAlarm(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } } module.exports = AWS_Monitoring; diff --git a/generator/generatedClasses/AWS/management/aws-notificationService.js b/generator/generatedClasses/AWS/management/aws-notificationService.js index 7e37e378..50efb35e 100644 --- a/generator/generatedClasses/AWS/management/aws-notificationService.js +++ b/generator/generatedClasses/AWS/management/aws-notificationService.js @@ -4,145 +4,145 @@ * @category AWS */ class AWS_NotificationService { - /** - * - * @param {module} aws AWS SDK - * @param {object} options SDK options - */ - constructor(aws, options) { - this._AWS = aws; - this._apiVersion = options.apiVersion; - this._sNS = new this._AWS.SNS({ - apiVersion: this._apiVersion - }); - } - /** - * Trigers the createTopic function of SNS - * @param {CreateTopicInput} params - Data required for createTopic - * @returns {Promise} - */ - createTopic(params) { - return new Promise((resolve, reject) => { - this._sNS.createTopic(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteTopic function of SNS - * @param {DeleteTopicInput} params - Data required for deleteTopic - * @returns {Promise} - */ - deleteTopic(params) { - return new Promise((resolve, reject) => { - this._sNS.deleteTopic(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the getTopicAttributes function of SNS - * @param {GetTopicAttributesInput} params - Data required for getTopicAttributes - * @returns {Promise} - */ - getTopicAttributes(params) { - return new Promise((resolve, reject) => { - this._sNS.getTopicAttributes(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the listSubscriptions function of SNS - * @param {ListSubscriptionsInput} params - Data required for listSubscriptions - * @returns {Promise} - */ - listSubscriptions(params) { - return new Promise((resolve, reject) => { - this._sNS.listSubscriptions(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the listTopics function of SNS - * @param {ListTopicsInput} params - Data required for listTopics - * @returns {Promise} - */ - listTopics(params) { - return new Promise((resolve, reject) => { - this._sNS.listTopics(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the publish function of SNS - * @param {PublishInput} params - Data required for publish - * @returns {Promise} - */ - publish(params) { - return new Promise((resolve, reject) => { - this._sNS.publish(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the subscribe function of SNS - * @param {SubscribeInput} params - Data required for subscribe - * @returns {Promise} - */ - subscribe(params) { - return new Promise((resolve, reject) => { - this._sNS.subscribe(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the unsubscribe function of SNS - * @param {UnsubscribeInput} params - Data required for unsubscribe - * @returns {Promise} - */ - unsubscribe(params) { - return new Promise((resolve, reject) => { - this._sNS.unsubscribe(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } + /** + * + * @param {module} aws AWS SDK + * @param {object} options SDK options + */ + constructor(aws, options) { + this._AWS = aws; + this._apiVersion = options.apiVersion; + this._sNS = new this._AWS.SNS({ + apiVersion: this._apiVersion, + }); + } + /** + * Trigers the createTopic function of SNS + * @param {CreateTopicInput} params - Data required for createTopic + * @returns {Promise} + */ + createTopic(params) { + return new Promise((resolve, reject) => { + this._sNS.createTopic(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteTopic function of SNS + * @param {DeleteTopicInput} params - Data required for deleteTopic + * @returns {Promise} + */ + deleteTopic(params) { + return new Promise((resolve, reject) => { + this._sNS.deleteTopic(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the getTopicAttributes function of SNS + * @param {GetTopicAttributesInput} params - Data required for getTopicAttributes + * @returns {Promise} + */ + getTopicAttributes(params) { + return new Promise((resolve, reject) => { + this._sNS.getTopicAttributes(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the listSubscriptions function of SNS + * @param {ListSubscriptionsInput} params - Data required for listSubscriptions + * @returns {Promise} + */ + listSubscriptions(params) { + return new Promise((resolve, reject) => { + this._sNS.listSubscriptions(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the listTopics function of SNS + * @param {ListTopicsInput} params - Data required for listTopics + * @returns {Promise} + */ + listTopics(params) { + return new Promise((resolve, reject) => { + this._sNS.listTopics(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the publish function of SNS + * @param {PublishInput} params - Data required for publish + * @returns {Promise} + */ + publish(params) { + return new Promise((resolve, reject) => { + this._sNS.publish(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the subscribe function of SNS + * @param {SubscribeInput} params - Data required for subscribe + * @returns {Promise} + */ + subscribe(params) { + return new Promise((resolve, reject) => { + this._sNS.subscribe(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the unsubscribe function of SNS + * @param {UnsubscribeInput} params - Data required for unsubscribe + * @returns {Promise} + */ + unsubscribe(params) { + return new Promise((resolve, reject) => { + this._sNS.unsubscribe(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } } module.exports = AWS_NotificationService; diff --git a/generator/generatedClasses/AWS/network/aws-DNS.js b/generator/generatedClasses/AWS/network/aws-DNS.js index 422f035b..7a62602f 100644 --- a/generator/generatedClasses/AWS/network/aws-DNS.js +++ b/generator/generatedClasses/AWS/network/aws-DNS.js @@ -4,81 +4,81 @@ * @category AWS */ class AWS_DNS { - /** - * - * @param {module} aws AWS SDK - * @param {object} options SDK options - */ - constructor(aws, options) { - this._AWS = aws; - this._apiVersion = options.apiVersion; - this._route53 = new this._AWS.Route53({ - apiVersion: this._apiVersion - }); - } - /** - * Trigers the changeResourceRecordSets function of Route53 - * @param {ChangeResourceRecordSetsRequest} params - Data required for changeResourceRecordSets - * @returns {Promise} - */ - changeRecordSets(params) { - return new Promise((resolve, reject) => { - this._route53.changeResourceRecordSets(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the createHostedZone function of Route53 - * @param {CreateHostedZoneRequest} params - Data required for createHostedZone - * @returns {Promise} - */ - createZone(params) { - return new Promise((resolve, reject) => { - this._route53.createHostedZone(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteHostedZone function of Route53 - * @param {DeleteHostedZoneRequest} params - Data required for deleteHostedZone - * @returns {Promise} - */ - deleteZone(params) { - return new Promise((resolve, reject) => { - this._route53.deleteHostedZone(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the listHostedZones function of Route53 - * @param {ListHostedZonesRequest} params - Data required for listHostedZones - * @returns {Promise} - */ - listZones(params) { - return new Promise((resolve, reject) => { - this._route53.listHostedZones(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } + /** + * + * @param {module} aws AWS SDK + * @param {object} options SDK options + */ + constructor(aws, options) { + this._AWS = aws; + this._apiVersion = options.apiVersion; + this._route53 = new this._AWS.Route53({ + apiVersion: this._apiVersion, + }); + } + /** + * Trigers the changeResourceRecordSets function of Route53 + * @param {ChangeResourceRecordSetsRequest} params - Data required for changeResourceRecordSets + * @returns {Promise} + */ + changeRecordSets(params) { + return new Promise((resolve, reject) => { + this._route53.changeResourceRecordSets(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the createHostedZone function of Route53 + * @param {CreateHostedZoneRequest} params - Data required for createHostedZone + * @returns {Promise} + */ + createZone(params) { + return new Promise((resolve, reject) => { + this._route53.createHostedZone(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteHostedZone function of Route53 + * @param {DeleteHostedZoneRequest} params - Data required for deleteHostedZone + * @returns {Promise} + */ + deleteZone(params) { + return new Promise((resolve, reject) => { + this._route53.deleteHostedZone(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the listHostedZones function of Route53 + * @param {ListHostedZonesRequest} params - Data required for listHostedZones + * @returns {Promise} + */ + listZones(params) { + return new Promise((resolve, reject) => { + this._route53.listHostedZones(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } } module.exports = AWS_DNS; diff --git a/generator/generatedClasses/AWS/network/aws-loadBalancer.js b/generator/generatedClasses/AWS/network/aws-loadBalancer.js index f722dd14..d9eba23b 100644 --- a/generator/generatedClasses/AWS/network/aws-loadBalancer.js +++ b/generator/generatedClasses/AWS/network/aws-loadBalancer.js @@ -4,97 +4,97 @@ * @category AWS */ class AWS_LoadBalancer { - /** - * - * @param {module} aws AWS SDK - * @param {object} options SDK options - */ - constructor(aws, options) { - this._AWS = aws; - this._apiVersion = options.apiVersion; - this._eLB = new this._AWS.ELB({ - apiVersion: this._apiVersion - }); - } - /** - * Trigers the addTags function of ELB - * @param {AddTagsInput} params - Data required for addTags - * @returns {Promise} - */ - addTags(params) { - return new Promise((resolve, reject) => { - this._eLB.addTags(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the createLoadBalancer function of ELB - * @param {CreateAccessPointInput} params - Data required for createLoadBalancer - * @returns {Promise} - */ - create(params) { - return new Promise((resolve, reject) => { - this._eLB.createLoadBalancer(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteLoadBalancer function of ELB - * @param {DeleteAccessPointInput} params - Data required for deleteLoadBalancer - * @returns {Promise} - */ - delete(params) { - return new Promise((resolve, reject) => { - this._eLB.deleteLoadBalancer(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the describeLoadBalancerAttributes function of ELB - * @param {DescribeLoadBalancerAttributesInput} params - Data required for describeLoadBalancerAttributes - * @returns {Promise} - */ - describe(params) { - return new Promise((resolve, reject) => { - this._eLB.describeLoadBalancerAttributes(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the describeLoadBalancers function of ELB - * @param {DescribeAccessPointsInput} params - Data required for describeLoadBalancers - * @returns {Promise} - */ - list(params) { - return new Promise((resolve, reject) => { - this._eLB.describeLoadBalancers(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } + /** + * + * @param {module} aws AWS SDK + * @param {object} options SDK options + */ + constructor(aws, options) { + this._AWS = aws; + this._apiVersion = options.apiVersion; + this._eLB = new this._AWS.ELB({ + apiVersion: this._apiVersion, + }); + } + /** + * Trigers the addTags function of ELB + * @param {AddTagsInput} params - Data required for addTags + * @returns {Promise} + */ + addTags(params) { + return new Promise((resolve, reject) => { + this._eLB.addTags(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the createLoadBalancer function of ELB + * @param {CreateAccessPointInput} params - Data required for createLoadBalancer + * @returns {Promise} + */ + create(params) { + return new Promise((resolve, reject) => { + this._eLB.createLoadBalancer(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteLoadBalancer function of ELB + * @param {DeleteAccessPointInput} params - Data required for deleteLoadBalancer + * @returns {Promise} + */ + delete(params) { + return new Promise((resolve, reject) => { + this._eLB.deleteLoadBalancer(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the describeLoadBalancerAttributes function of ELB + * @param {DescribeLoadBalancerAttributesInput} params - Data required for describeLoadBalancerAttributes + * @returns {Promise} + */ + describe(params) { + return new Promise((resolve, reject) => { + this._eLB.describeLoadBalancerAttributes(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the describeLoadBalancers function of ELB + * @param {DescribeAccessPointsInput} params - Data required for describeLoadBalancers + * @returns {Promise} + */ + list(params) { + return new Promise((resolve, reject) => { + this._eLB.describeLoadBalancers(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } } module.exports = AWS_LoadBalancer; diff --git a/generator/generatedClasses/AWS/security/aws-IAM.js b/generator/generatedClasses/AWS/security/aws-IAM.js index 265a6a31..9191ab3d 100644 --- a/generator/generatedClasses/AWS/security/aws-IAM.js +++ b/generator/generatedClasses/AWS/security/aws-IAM.js @@ -4,97 +4,97 @@ * @category AWS */ class AWS_IAM { - /** - * - * @param {module} aws AWS SDK - * @param {object} options SDK options - */ - constructor(aws, options) { - this._AWS = aws; - this._apiVersion = options.apiVersion; - this._iAM = new this._AWS.IAM({ - apiVersion: this._apiVersion - }); - } - /** - * Trigers the attachGroupPolicy function of IAM - * @param {AttachGroupPolicyRequest} params - Data required for attachGroupPolicy - * @returns {Promise} - */ - attachGroupPolicy(params) { - return new Promise((resolve, reject) => { - this._iAM.attachGroupPolicy(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the createGroup function of IAM - * @param {CreateGroupRequest} params - Data required for createGroup - * @returns {Promise} - */ - createGroup(params) { - return new Promise((resolve, reject) => { - this._iAM.createGroup(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteGroup function of IAM - * @param {DeleteGroupRequest} params - Data required for deleteGroup - * @returns {Promise} - */ - deleteGroup(params) { - return new Promise((resolve, reject) => { - this._iAM.deleteGroup(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the detachGroupPolicy function of IAM - * @param {DetachGroupPolicyRequest} params - Data required for detachGroupPolicy - * @returns {Promise} - */ - detachGroupPolicy(params) { - return new Promise((resolve, reject) => { - this._iAM.detachGroupPolicy(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the getGroup function of IAM - * @param {GetGroupRequest} params - Data required for getGroup - * @returns {Promise} - */ - describe(params) { - return new Promise((resolve, reject) => { - this._iAM.getGroup(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } + /** + * + * @param {module} aws AWS SDK + * @param {object} options SDK options + */ + constructor(aws, options) { + this._AWS = aws; + this._apiVersion = options.apiVersion; + this._iAM = new this._AWS.IAM({ + apiVersion: this._apiVersion, + }); + } + /** + * Trigers the attachGroupPolicy function of IAM + * @param {AttachGroupPolicyRequest} params - Data required for attachGroupPolicy + * @returns {Promise} + */ + attachGroupPolicy(params) { + return new Promise((resolve, reject) => { + this._iAM.attachGroupPolicy(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the createGroup function of IAM + * @param {CreateGroupRequest} params - Data required for createGroup + * @returns {Promise} + */ + createGroup(params) { + return new Promise((resolve, reject) => { + this._iAM.createGroup(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteGroup function of IAM + * @param {DeleteGroupRequest} params - Data required for deleteGroup + * @returns {Promise} + */ + deleteGroup(params) { + return new Promise((resolve, reject) => { + this._iAM.deleteGroup(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the detachGroupPolicy function of IAM + * @param {DetachGroupPolicyRequest} params - Data required for detachGroupPolicy + * @returns {Promise} + */ + detachGroupPolicy(params) { + return new Promise((resolve, reject) => { + this._iAM.detachGroupPolicy(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the getGroup function of IAM + * @param {GetGroupRequest} params - Data required for getGroup + * @returns {Promise} + */ + describe(params) { + return new Promise((resolve, reject) => { + this._iAM.getGroup(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } } module.exports = AWS_IAM; diff --git a/generator/generatedClasses/AWS/storage/aws-archivalStorage.js b/generator/generatedClasses/AWS/storage/aws-archivalStorage.js index 2b5236ec..a5189f99 100644 --- a/generator/generatedClasses/AWS/storage/aws-archivalStorage.js +++ b/generator/generatedClasses/AWS/storage/aws-archivalStorage.js @@ -4,97 +4,97 @@ * @category AWS */ class AWS_ArchivalStorage { - /** - * - * @param {module} aws AWS SDK - * @param {object} options SDK options - */ - constructor(aws, options) { - this._AWS = aws; - this._apiVersion = options.apiVersion; - this._glacier = new this._AWS.Glacier({ - apiVersion: this._apiVersion - }); - } - /** - * Trigers the createVault function of Glacier - * @param {CreateVaultInput} params - Data required for createVault - * @returns {Promise} - */ - create(params) { - return new Promise((resolve, reject) => { - this._glacier.createVault(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteArchive function of Glacier - * @param {DeleteArchiveInput} params - Data required for deleteArchive - * @returns {Promise} - */ - deleteFiles(params) { - return new Promise((resolve, reject) => { - this._glacier.deleteArchive(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteVault function of Glacier - * @param {DeleteVaultInput} params - Data required for deleteVault - * @returns {Promise} - */ - delete(params) { - return new Promise((resolve, reject) => { - this._glacier.deleteVault(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the initiateMultipartUpload function of Glacier - * @param {InitiateMultipartUploadInput} params - Data required for initiateMultipartUpload - * @returns {Promise} - */ - upload(params) { - return new Promise((resolve, reject) => { - this._glacier.initiateMultipartUpload(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the listParts function of Glacier - * @param {ListPartsInput} params - Data required for listParts - * @returns {Promise} - */ - list(params) { - return new Promise((resolve, reject) => { - this._glacier.listParts(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } + /** + * + * @param {module} aws AWS SDK + * @param {object} options SDK options + */ + constructor(aws, options) { + this._AWS = aws; + this._apiVersion = options.apiVersion; + this._glacier = new this._AWS.Glacier({ + apiVersion: this._apiVersion, + }); + } + /** + * Trigers the createVault function of Glacier + * @param {CreateVaultInput} params - Data required for createVault + * @returns {Promise} + */ + create(params) { + return new Promise((resolve, reject) => { + this._glacier.createVault(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteArchive function of Glacier + * @param {DeleteArchiveInput} params - Data required for deleteArchive + * @returns {Promise} + */ + deleteFiles(params) { + return new Promise((resolve, reject) => { + this._glacier.deleteArchive(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteVault function of Glacier + * @param {DeleteVaultInput} params - Data required for deleteVault + * @returns {Promise} + */ + delete(params) { + return new Promise((resolve, reject) => { + this._glacier.deleteVault(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the initiateMultipartUpload function of Glacier + * @param {InitiateMultipartUploadInput} params - Data required for initiateMultipartUpload + * @returns {Promise} + */ + upload(params) { + return new Promise((resolve, reject) => { + this._glacier.initiateMultipartUpload(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the listParts function of Glacier + * @param {ListPartsInput} params - Data required for listParts + * @returns {Promise} + */ + list(params) { + return new Promise((resolve, reject) => { + this._glacier.listParts(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } } module.exports = AWS_ArchivalStorage; diff --git a/generator/generatedClasses/AWS/storage/aws-blockStorage.js b/generator/generatedClasses/AWS/storage/aws-blockStorage.js index 8ada4a2a..b362afec 100644 --- a/generator/generatedClasses/AWS/storage/aws-blockStorage.js +++ b/generator/generatedClasses/AWS/storage/aws-blockStorage.js @@ -4,81 +4,81 @@ * @category AWS */ class AWS_BlockStorage { - /** - * - * @param {module} aws AWS SDK - * @param {object} options SDK options - */ - constructor(aws, options) { - this._AWS = aws; - this._apiVersion = options.apiVersion; - this._eC2 = new this._AWS.EC2({ - apiVersion: this._apiVersion - }); - } - /** - * Trigers the createVolume function of EC2 - * @param {CreateVolumeRequest} params - Data required for createVolume - * @returns {Promise} - */ - create(params) { - return new Promise((resolve, reject) => { - this._eC2.createVolume(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteVolume function of EC2 - * @param {DeleteVolumeRequest} params - Data required for deleteVolume - * @returns {Promise} - */ - delete(params) { - return new Promise((resolve, reject) => { - this._eC2.deleteVolume(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the describeVolumeAttribute function of EC2 - * @param {DescribeVolumeAttributeRequest} params - Data required for describeVolumeAttribute - * @returns {Promise} - */ - describe(params) { - return new Promise((resolve, reject) => { - this._eC2.describeVolumeAttribute(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the describeVolumes function of EC2 - * @param {DescribeVolumesRequest} params - Data required for describeVolumes - * @returns {Promise} - */ - list(params) { - return new Promise((resolve, reject) => { - this._eC2.describeVolumes(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } + /** + * + * @param {module} aws AWS SDK + * @param {object} options SDK options + */ + constructor(aws, options) { + this._AWS = aws; + this._apiVersion = options.apiVersion; + this._eC2 = new this._AWS.EC2({ + apiVersion: this._apiVersion, + }); + } + /** + * Trigers the createVolume function of EC2 + * @param {CreateVolumeRequest} params - Data required for createVolume + * @returns {Promise} + */ + create(params) { + return new Promise((resolve, reject) => { + this._eC2.createVolume(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteVolume function of EC2 + * @param {DeleteVolumeRequest} params - Data required for deleteVolume + * @returns {Promise} + */ + delete(params) { + return new Promise((resolve, reject) => { + this._eC2.deleteVolume(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the describeVolumeAttribute function of EC2 + * @param {DescribeVolumeAttributeRequest} params - Data required for describeVolumeAttribute + * @returns {Promise} + */ + describe(params) { + return new Promise((resolve, reject) => { + this._eC2.describeVolumeAttribute(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the describeVolumes function of EC2 + * @param {DescribeVolumesRequest} params - Data required for describeVolumes + * @returns {Promise} + */ + list(params) { + return new Promise((resolve, reject) => { + this._eC2.describeVolumes(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } } module.exports = AWS_BlockStorage; diff --git a/generator/generatedClasses/AWS/storage/aws-storageBucket.js b/generator/generatedClasses/AWS/storage/aws-storageBucket.js index ef50b831..f738acfc 100644 --- a/generator/generatedClasses/AWS/storage/aws-storageBucket.js +++ b/generator/generatedClasses/AWS/storage/aws-storageBucket.js @@ -4,96 +4,96 @@ * @category AWS */ class AWS_StorageBucket { - /** - * - * @param {module} aws AWS SDK - * @param {object} options SDK options - */ - constructor(aws, options) { - this._AWS = aws; - this._apiVersion = options.apiVersion; - this._s3 = new this._AWS.S3({ - apiVersion: this._apiVersion - }); - } - /** - * Trigers the createBucket function of S3 - * @param {CreateBucketRequest} params - Data required for createBucket - * @returns {Promise} - */ - create(params) { - return new Promise((resolve, reject) => { - this._s3.createBucket(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteBucket function of S3 - * @param {DeleteBucketRequest} params - Data required for deleteBucket - * @returns {Promise} - */ - delete(params) { - return new Promise((resolve, reject) => { - this._s3.deleteBucket(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the deleteObjects function of S3 - * @param {DeleteObjectsRequest} params - Data required for deleteObjects - * @returns {Promise} - */ - deleteFiles(params) { - return new Promise((resolve, reject) => { - this._s3.deleteObjects(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the listBuckets function of S3 - * @returns {Promise} - */ - list() { - return new Promise((resolve, reject) => { - this._s3.listBuckets((error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } - /** - * Trigers the uploadPart function of S3 - * @param {UploadPartRequest} params - Data required for uploadPart - * @returns {Promise} - */ - upload(params) { - return new Promise((resolve, reject) => { - this._s3.uploadPart(params, (error, data) => { - if (error) { - reject(error); - } else { - resolve(data); - } - }); - }); - } + /** + * + * @param {module} aws AWS SDK + * @param {object} options SDK options + */ + constructor(aws, options) { + this._AWS = aws; + this._apiVersion = options.apiVersion; + this._s3 = new this._AWS.S3({ + apiVersion: this._apiVersion, + }); + } + /** + * Trigers the createBucket function of S3 + * @param {CreateBucketRequest} params - Data required for createBucket + * @returns {Promise} + */ + create(params) { + return new Promise((resolve, reject) => { + this._s3.createBucket(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteBucket function of S3 + * @param {DeleteBucketRequest} params - Data required for deleteBucket + * @returns {Promise} + */ + delete(params) { + return new Promise((resolve, reject) => { + this._s3.deleteBucket(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the deleteObjects function of S3 + * @param {DeleteObjectsRequest} params - Data required for deleteObjects + * @returns {Promise} + */ + deleteFiles(params) { + return new Promise((resolve, reject) => { + this._s3.deleteObjects(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the listBuckets function of S3 + * @returns {Promise} + */ + list() { + return new Promise((resolve, reject) => { + this._s3.listBuckets((error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } + /** + * Trigers the uploadPart function of S3 + * @param {UploadPartRequest} params - Data required for uploadPart + * @returns {Promise} + */ + upload(params) { + return new Promise((resolve, reject) => { + this._s3.uploadPart(params, (error, data) => { + if (error) { + reject(error); + } else { + resolve(data); + } + }); + }); + } } module.exports = AWS_StorageBucket; diff --git a/generator/generatedClasses/Azure/appServices/azure-paaS.js b/generator/generatedClasses/Azure/appServices/azure-paaS.js index 02c914e5..db0d3ff8 100644 --- a/generator/generatedClasses/Azure/appServices/azure-paaS.js +++ b/generator/generatedClasses/Azure/appServices/azure-paaS.js @@ -1,422 +1,429 @@ -const { WebSiteManagementClient } = require("@azure/arm-appservice"); +const { WebSiteManagementClient } = require('@azure/arm-appservice'); /*This is an auto generated class, please do not change.*/ /** * Class to create a PaaS object * @category Azure */ class Azure_PaaS { - /** - * - * @param {module} azureRestSdk Azure Rest SDK - */ - constructor(azureRestSdk) { - this._azureRestSdk = azureRestSdk; - } - /** - * Trigers the createOrUpdate function of appservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} name - Mandatory parameter - * @param {TypeReference} siteEnvelope - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - create(resourceGroupName, name, siteEnvelope, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new WebSiteManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.webApps - .createOrUpdate(resourceGroupName, name, siteEnvelope, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the update function of appservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} name - Mandatory parameter - * @param {TypeReference} siteEnvelope - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - update(resourceGroupName, name, siteEnvelope, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new WebSiteManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.webApps - .update(resourceGroupName, name, siteEnvelope, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the get function of appservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} name - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - describe(resourceGroupName, name, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new WebSiteManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.webApps.get(resourceGroupName, name, options).then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteMethod function of appservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} name - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - delete(resourceGroupName, name, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new WebSiteManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.webApps - .deleteMethod(resourceGroupName, name, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the restart function of appservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} name - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - restart(resourceGroupName, name, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new WebSiteManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.webApps - .restart(resourceGroupName, name, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the createOrUpdate function of appservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} name - Mandatory parameter - * @param {TypeReference} hostingEnvironmentEnvelope - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - createEnvironment( - resourceGroupName, - name, - hostingEnvironmentEnvelope, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new WebSiteManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.appServiceEnvironments - .createOrUpdate( - resourceGroupName, - name, - hostingEnvironmentEnvelope, - options - ) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the update function of appservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} name - Mandatory parameter - * @param {TypeReference} hostingEnvironmentEnvelope - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - updateEnvironment( - resourceGroupName, - name, - hostingEnvironmentEnvelope, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new WebSiteManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.appServiceEnvironments - .update( - resourceGroupName, - name, - hostingEnvironmentEnvelope, - options - ) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the createOrUpdateSlot function of appservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} name - Mandatory parameter - * @param {TypeReference} siteEnvelope - Mandatory parameter - * @param {StringKeyword} slot - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - createConfigTemplate( - resourceGroupName, - name, - siteEnvelope, - slot, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new WebSiteManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.webApps - .createOrUpdateSlot( - resourceGroupName, - name, - siteEnvelope, - slot, - options - ) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the getSlot function of appservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} name - Mandatory parameter - * @param {StringKeyword} slot - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - describeConfigSettings(resourceGroupName, name, slot, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new WebSiteManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.webApps - .getSlot(resourceGroupName, name, slot, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteSlot function of appservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} name - Mandatory parameter - * @param {StringKeyword} slot - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - deleteConfigTemplate(resourceGroupName, name, slot, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new WebSiteManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.webApps - .deleteSlot(resourceGroupName, name, slot, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the checkAvailability function of appservice - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - checkDNSAvailability(options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new WebSiteManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.domains.checkAvailability(options).then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteMethod function of appservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} name - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - terminateEnvironment(resourceGroupName, name, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new WebSiteManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.appServiceEnvironments - .deleteMethod(resourceGroupName, name, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } + /** + * + * @param {module} azureRestSdk Azure Rest SDK + */ + constructor(azureRestSdk) { + this._azureRestSdk = azureRestSdk; + } + /** + * Trigers the createOrUpdate function of appservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} name - Mandatory parameter + * @param {TypeReference} siteEnvelope - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + create(resourceGroupName, name, siteEnvelope, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new WebSiteManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.webApps + .createOrUpdate( + resourceGroupName, + name, + siteEnvelope, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the update function of appservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} name - Mandatory parameter + * @param {TypeReference} siteEnvelope - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + update(resourceGroupName, name, siteEnvelope, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new WebSiteManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.webApps + .update(resourceGroupName, name, siteEnvelope, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the get function of appservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} name - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + describe(resourceGroupName, name, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new WebSiteManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.webApps + .get(resourceGroupName, name, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteMethod function of appservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} name - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + delete(resourceGroupName, name, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new WebSiteManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.webApps + .deleteMethod(resourceGroupName, name, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the restart function of appservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} name - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + restart(resourceGroupName, name, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new WebSiteManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.webApps + .restart(resourceGroupName, name, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the createOrUpdate function of appservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} name - Mandatory parameter + * @param {TypeReference} hostingEnvironmentEnvelope - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + createEnvironment( + resourceGroupName, + name, + hostingEnvironmentEnvelope, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new WebSiteManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.appServiceEnvironments + .createOrUpdate( + resourceGroupName, + name, + hostingEnvironmentEnvelope, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the update function of appservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} name - Mandatory parameter + * @param {TypeReference} hostingEnvironmentEnvelope - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + updateEnvironment( + resourceGroupName, + name, + hostingEnvironmentEnvelope, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new WebSiteManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.appServiceEnvironments + .update( + resourceGroupName, + name, + hostingEnvironmentEnvelope, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the createOrUpdateSlot function of appservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} name - Mandatory parameter + * @param {TypeReference} siteEnvelope - Mandatory parameter + * @param {StringKeyword} slot - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + createConfigTemplate( + resourceGroupName, + name, + siteEnvelope, + slot, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new WebSiteManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.webApps + .createOrUpdateSlot( + resourceGroupName, + name, + siteEnvelope, + slot, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the getSlot function of appservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} name - Mandatory parameter + * @param {StringKeyword} slot - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + describeConfigSettings(resourceGroupName, name, slot, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new WebSiteManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.webApps + .getSlot(resourceGroupName, name, slot, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteSlot function of appservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} name - Mandatory parameter + * @param {StringKeyword} slot - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + deleteConfigTemplate(resourceGroupName, name, slot, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new WebSiteManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.webApps + .deleteSlot(resourceGroupName, name, slot, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the checkAvailability function of appservice + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + checkDNSAvailability(options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new WebSiteManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.domains.checkAvailability(options).then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteMethod function of appservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} name - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + terminateEnvironment(resourceGroupName, name, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new WebSiteManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.appServiceEnvironments + .deleteMethod(resourceGroupName, name, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } } module.exports = Azure_PaaS; diff --git a/generator/generatedClasses/Azure/compute/azure-computeInstance.js b/generator/generatedClasses/Azure/compute/azure-computeInstance.js index 8029d665..d793562a 100644 --- a/generator/generatedClasses/Azure/compute/azure-computeInstance.js +++ b/generator/generatedClasses/Azure/compute/azure-computeInstance.js @@ -1,202 +1,207 @@ -const { ComputeManagementClient } = require("@azure/arm-compute"); +const { ComputeManagementClient } = require('@azure/arm-compute'); /*This is an auto generated class, please do not change.*/ /** * Class to create a ComputeInstance object * @category Azure */ class Azure_ComputeInstance { - /** - * - * @param {module} azureRestSdk Azure Rest SDK - */ - constructor(azureRestSdk) { - this._azureRestSdk = azureRestSdk; - } - /** - * Trigers the createOrUpdate function of compute - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} vmName - Mandatory parameter - * @param {TypeReference} parameters - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - create(resourceGroupName, vmName, parameters, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ComputeManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.virtualMachines - .createOrUpdate(resourceGroupName, vmName, parameters, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the list function of compute - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - list(resourceGroupName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ComputeManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.virtualMachines - .list(resourceGroupName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the start function of compute - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} vmName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - start(resourceGroupName, vmName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ComputeManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.virtualMachines - .start(resourceGroupName, vmName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the powerOff function of compute - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} vmName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - stop(resourceGroupName, vmName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ComputeManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.virtualMachines - .powerOff(resourceGroupName, vmName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the restart function of compute - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} vmName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - reboot(resourceGroupName, vmName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ComputeManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.virtualMachines - .restart(resourceGroupName, vmName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteMethod function of compute - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} vmName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - destroy(resourceGroupName, vmName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ComputeManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.virtualMachines - .deleteMethod(resourceGroupName, vmName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } + /** + * + * @param {module} azureRestSdk Azure Rest SDK + */ + constructor(azureRestSdk) { + this._azureRestSdk = azureRestSdk; + } + /** + * Trigers the createOrUpdate function of compute + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} vmName - Mandatory parameter + * @param {TypeReference} parameters - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + create(resourceGroupName, vmName, parameters, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ComputeManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.virtualMachines + .createOrUpdate( + resourceGroupName, + vmName, + parameters, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the list function of compute + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + list(resourceGroupName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ComputeManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.virtualMachines + .list(resourceGroupName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the start function of compute + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} vmName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + start(resourceGroupName, vmName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ComputeManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.virtualMachines + .start(resourceGroupName, vmName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the powerOff function of compute + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} vmName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + stop(resourceGroupName, vmName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ComputeManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.virtualMachines + .powerOff(resourceGroupName, vmName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the restart function of compute + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} vmName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + reboot(resourceGroupName, vmName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ComputeManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.virtualMachines + .restart(resourceGroupName, vmName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteMethod function of compute + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} vmName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + destroy(resourceGroupName, vmName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ComputeManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.virtualMachines + .deleteMethod(resourceGroupName, vmName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } } module.exports = Azure_ComputeInstance; diff --git a/generator/generatedClasses/Azure/compute/azure-container.js b/generator/generatedClasses/Azure/compute/azure-container.js index 14991423..f27e4286 100644 --- a/generator/generatedClasses/Azure/compute/azure-container.js +++ b/generator/generatedClasses/Azure/compute/azure-container.js @@ -1,147 +1,151 @@ -const { ContainerServiceClient } = require("@azure/arm-containerservice"); +const { ContainerServiceClient } = require('@azure/arm-containerservice'); /*This is an auto generated class, please do not change.*/ /** * Class to create a Container object * @category Azure */ class Azure_Container { - /** - * - * @param {module} azureRestSdk Azure Rest SDK - */ - constructor(azureRestSdk) { - this._azureRestSdk = azureRestSdk; - } - /** - * Trigers the createOrUpdate function of containerservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} containerServiceName - Mandatory parameter - * @param {TypeReference} parameters - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - create( - resourceGroupName, - containerServiceName, - parameters, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ContainerServiceClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.containerServices - .createOrUpdate( - resourceGroupName, - containerServiceName, - parameters, - options - ) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteMethod function of containerservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} containerServiceName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - delete(resourceGroupName, containerServiceName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ContainerServiceClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.containerServices - .deleteMethod(resourceGroupName, containerServiceName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the get function of containerservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} containerServiceName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - describe(resourceGroupName, containerServiceName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ContainerServiceClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.containerServices - .get(resourceGroupName, containerServiceName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the list function of containerservice - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - list(options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ContainerServiceClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.containerServices.list(options).then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } + /** + * + * @param {module} azureRestSdk Azure Rest SDK + */ + constructor(azureRestSdk) { + this._azureRestSdk = azureRestSdk; + } + /** + * Trigers the createOrUpdate function of containerservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} containerServiceName - Mandatory parameter + * @param {TypeReference} parameters - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + create( + resourceGroupName, + containerServiceName, + parameters, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ContainerServiceClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.containerServices + .createOrUpdate( + resourceGroupName, + containerServiceName, + parameters, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteMethod function of containerservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} containerServiceName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + delete(resourceGroupName, containerServiceName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ContainerServiceClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.containerServices + .deleteMethod( + resourceGroupName, + containerServiceName, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the get function of containerservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} containerServiceName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + describe(resourceGroupName, containerServiceName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ContainerServiceClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.containerServices + .get(resourceGroupName, containerServiceName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the list function of containerservice + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + list(options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ContainerServiceClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.containerServices.list(options).then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } } module.exports = Azure_Container; diff --git a/generator/generatedClasses/Azure/compute/azure-kubernetes.js b/generator/generatedClasses/Azure/compute/azure-kubernetes.js index 3e5f50a2..9ce5157f 100644 --- a/generator/generatedClasses/Azure/compute/azure-kubernetes.js +++ b/generator/generatedClasses/Azure/compute/azure-kubernetes.js @@ -1,360 +1,379 @@ -const { ContainerServiceClient } = require("@azure/arm-containerservice"); +const { ContainerServiceClient } = require('@azure/arm-containerservice'); /*This is an auto generated class, please do not change.*/ /** * Class to create a Kubernetes object * @category Azure */ class Azure_Kubernetes { - /** - * - * @param {module} azureRestSdk Azure Rest SDK - */ - constructor(azureRestSdk) { - this._azureRestSdk = azureRestSdk; - } - /** - * Trigers the createOrUpdate function of containerservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} resourceName - Mandatory parameter - * @param {TypeReference} parameters - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - create(resourceGroupName, resourceName, parameters, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ContainerServiceClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.managedClusters - .createOrUpdate( - resourceGroupName, - resourceName, - parameters, - options - ) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteMethod function of containerservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} resourceName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - delete(resourceGroupName, resourceName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ContainerServiceClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.managedClusters - .deleteMethod(resourceGroupName, resourceName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the updateTags function of containerservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} resourceName - Mandatory parameter - * @param {TypeReference} parameters - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - updateTags(resourceGroupName, resourceName, parameters, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ContainerServiceClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.managedClusters - .updateTags(resourceGroupName, resourceName, parameters, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the list function of containerservice - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - listClusters(options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ContainerServiceClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.managedClusters.list(options).then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the get function of containerservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} resourceName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - describeCluster(resourceGroupName, resourceName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ContainerServiceClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.managedClusters - .get(resourceGroupName, resourceName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the createOrUpdate function of containerservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} resourceName - Mandatory parameter - * @param {StringKeyword} agentPoolName - Mandatory parameter - * @param {TypeReference} parameters - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - createNodeGroup( - resourceGroupName, - resourceName, - agentPoolName, - parameters, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ContainerServiceClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.agentPools - .createOrUpdate( - resourceGroupName, - resourceName, - agentPoolName, - parameters, - options - ) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteMethod function of containerservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} resourceName - Mandatory parameter - * @param {StringKeyword} agentPoolName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - deleteNodegroup( - resourceGroupName, - resourceName, - agentPoolName, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ContainerServiceClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.agentPools - .deleteMethod( - resourceGroupName, - resourceName, - agentPoolName, - options - ) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the get function of containerservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} resourceName - Mandatory parameter - * @param {StringKeyword} agentPoolName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - describeNodeGroup( - resourceGroupName, - resourceName, - agentPoolName, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ContainerServiceClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.agentPools - .get(resourceGroupName, resourceName, agentPoolName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the list function of containerservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} resourceName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - listNodegroups(resourceGroupName, resourceName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ContainerServiceClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.agentPools - .list(resourceGroupName, resourceName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the rotateClusterCertificates function of containerservice - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} resourceName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - updateConfig(resourceGroupName, resourceName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ContainerServiceClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.managedClusters - .rotateClusterCertificates(resourceGroupName, resourceName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } + /** + * + * @param {module} azureRestSdk Azure Rest SDK + */ + constructor(azureRestSdk) { + this._azureRestSdk = azureRestSdk; + } + /** + * Trigers the createOrUpdate function of containerservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} resourceName - Mandatory parameter + * @param {TypeReference} parameters - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + create(resourceGroupName, resourceName, parameters, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ContainerServiceClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.managedClusters + .createOrUpdate( + resourceGroupName, + resourceName, + parameters, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteMethod function of containerservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} resourceName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + delete(resourceGroupName, resourceName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ContainerServiceClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.managedClusters + .deleteMethod(resourceGroupName, resourceName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the updateTags function of containerservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} resourceName - Mandatory parameter + * @param {TypeReference} parameters - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + updateTags( + resourceGroupName, + resourceName, + parameters, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ContainerServiceClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.managedClusters + .updateTags( + resourceGroupName, + resourceName, + parameters, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the list function of containerservice + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + listClusters(options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ContainerServiceClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.managedClusters.list(options).then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the get function of containerservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} resourceName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + describeCluster(resourceGroupName, resourceName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ContainerServiceClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.managedClusters + .get(resourceGroupName, resourceName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the createOrUpdate function of containerservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} resourceName - Mandatory parameter + * @param {StringKeyword} agentPoolName - Mandatory parameter + * @param {TypeReference} parameters - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + createNodeGroup( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ContainerServiceClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.agentPools + .createOrUpdate( + resourceGroupName, + resourceName, + agentPoolName, + parameters, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteMethod function of containerservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} resourceName - Mandatory parameter + * @param {StringKeyword} agentPoolName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + deleteNodegroup( + resourceGroupName, + resourceName, + agentPoolName, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ContainerServiceClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.agentPools + .deleteMethod( + resourceGroupName, + resourceName, + agentPoolName, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the get function of containerservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} resourceName - Mandatory parameter + * @param {StringKeyword} agentPoolName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + describeNodeGroup( + resourceGroupName, + resourceName, + agentPoolName, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ContainerServiceClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.agentPools + .get( + resourceGroupName, + resourceName, + agentPoolName, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the list function of containerservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} resourceName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + listNodegroups(resourceGroupName, resourceName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ContainerServiceClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.agentPools + .list(resourceGroupName, resourceName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the rotateClusterCertificates function of containerservice + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} resourceName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + updateConfig(resourceGroupName, resourceName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ContainerServiceClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.managedClusters + .rotateClusterCertificates( + resourceGroupName, + resourceName, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } } module.exports = Azure_Kubernetes; diff --git a/generator/generatedClasses/Azure/database/azure-RDBMS.js b/generator/generatedClasses/Azure/database/azure-RDBMS.js index 8767d939..d4d7d062 100644 --- a/generator/generatedClasses/Azure/database/azure-RDBMS.js +++ b/generator/generatedClasses/Azure/database/azure-RDBMS.js @@ -1,233 +1,238 @@ -const { SqlManagementClient } = require("@azure/arm-sql"); +const { SqlManagementClient } = require('@azure/arm-sql'); /*This is an auto generated class, please do not change.*/ /** * Class to create a RDBMS object * @category Azure */ class Azure_RDBMS { - /** - * - * @param {module} azureRestSdk Azure Rest SDK - */ - constructor(azureRestSdk) { - this._azureRestSdk = azureRestSdk; - } - /** - * Trigers the createOrUpdate function of sql - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} serverName - Mandatory parameter - * @param {StringKeyword} databaseName - Mandatory parameter - * @param {TypeReference} parameters - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - createDatabse( - resourceGroupName, - serverName, - databaseName, - parameters, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new SqlManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.databases - .createOrUpdate( - resourceGroupName, - serverName, - databaseName, - parameters, - options - ) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteMethod function of sql - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} serverName - Mandatory parameter - * @param {StringKeyword} databaseName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - deleteDatabase( - resourceGroupName, - serverName, - databaseName, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new SqlManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.databases - .deleteMethod(resourceGroupName, serverName, databaseName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the exportMethod function of sql - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} serverName - Mandatory parameter - * @param {StringKeyword} databaseName - Mandatory parameter - * @param {TypeReference} parameters - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - createSnapshots( - resourceGroupName, - serverName, - databaseName, - parameters, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new SqlManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.databases - .exportMethod( - resourceGroupName, - serverName, - databaseName, - parameters, - options - ) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the update function of sql - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} serverName - Mandatory parameter - * @param {StringKeyword} databaseName - Mandatory parameter - * @param {TypeReference} parameters - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - modifyDB( - resourceGroupName, - serverName, - databaseName, - parameters, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new SqlManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.databases - .update( - resourceGroupName, - serverName, - databaseName, - parameters, - options - ) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the completeRestore function of sql - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} managedInstanceName - Mandatory parameter - * @param {StringKeyword} databaseName - Mandatory parameter - * @param {TypeReference} parameters - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - restoreDatabase( - resourceGroupName, - managedInstanceName, - databaseName, - parameters, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new SqlManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.managedDatabases - .completeRestore( - resourceGroupName, - managedInstanceName, - databaseName, - parameters, - options - ) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } + /** + * + * @param {module} azureRestSdk Azure Rest SDK + */ + constructor(azureRestSdk) { + this._azureRestSdk = azureRestSdk; + } + /** + * Trigers the createOrUpdate function of sql + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} serverName - Mandatory parameter + * @param {StringKeyword} databaseName - Mandatory parameter + * @param {TypeReference} parameters - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + createDatabse( + resourceGroupName, + serverName, + databaseName, + parameters, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new SqlManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.databases + .createOrUpdate( + resourceGroupName, + serverName, + databaseName, + parameters, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteMethod function of sql + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} serverName - Mandatory parameter + * @param {StringKeyword} databaseName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + deleteDatabase( + resourceGroupName, + serverName, + databaseName, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new SqlManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.databases + .deleteMethod( + resourceGroupName, + serverName, + databaseName, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the exportMethod function of sql + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} serverName - Mandatory parameter + * @param {StringKeyword} databaseName - Mandatory parameter + * @param {TypeReference} parameters - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + createSnapshots( + resourceGroupName, + serverName, + databaseName, + parameters, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new SqlManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.databases + .exportMethod( + resourceGroupName, + serverName, + databaseName, + parameters, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the update function of sql + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} serverName - Mandatory parameter + * @param {StringKeyword} databaseName - Mandatory parameter + * @param {TypeReference} parameters - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + modifyDB( + resourceGroupName, + serverName, + databaseName, + parameters, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new SqlManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.databases + .update( + resourceGroupName, + serverName, + databaseName, + parameters, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the completeRestore function of sql + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} managedInstanceName - Mandatory parameter + * @param {StringKeyword} databaseName - Mandatory parameter + * @param {TypeReference} parameters - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + restoreDatabase( + resourceGroupName, + managedInstanceName, + databaseName, + parameters, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new SqlManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.managedDatabases + .completeRestore( + resourceGroupName, + managedInstanceName, + databaseName, + parameters, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } } module.exports = Azure_RDBMS; diff --git a/generator/generatedClasses/Azure/database/azure-noSql.js b/generator/generatedClasses/Azure/database/azure-noSql.js index c59fe9dd..70b2d295 100644 --- a/generator/generatedClasses/Azure/database/azure-noSql.js +++ b/generator/generatedClasses/Azure/database/azure-noSql.js @@ -1,211 +1,221 @@ -const { CosmosDBManagementClient } = require("@azure/arm-cosmosdb"); +const { CosmosDBManagementClient } = require('@azure/arm-cosmosdb'); /*This is an auto generated class, please do not change.*/ /** * Class to create a NoSql object * @category Azure */ class Azure_NoSql { - /** - * - * @param {module} azureRestSdk Azure Rest SDK - */ - constructor(azureRestSdk) { - this._azureRestSdk = azureRestSdk; - } - /** - * Trigers the createUpdateTable function of cosmosdb - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} accountName - Mandatory parameter - * @param {StringKeyword} tableName - Mandatory parameter - * @param {TypeReference} createUpdateTableParameters - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - createCollection( - resourceGroupName, - accountName, - tableName, - createUpdateTableParameters, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new CosmosDBManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.tableResources - .createUpdateTable( - resourceGroupName, - accountName, - tableName, - createUpdateTableParameters, - options - ) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteTable function of cosmosdb - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} accountName - Mandatory parameter - * @param {StringKeyword} tableName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - deleteCollection( - resourceGroupName, - accountName, - tableName, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new CosmosDBManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.tableResources - .deleteTable(resourceGroupName, accountName, tableName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the listTables function of cosmosdb - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} accountName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - listCollections(resourceGroupName, accountName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new CosmosDBManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.tableResources - .listTables(resourceGroupName, accountName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the updateTableThroughput function of cosmosdb - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} accountName - Mandatory parameter - * @param {StringKeyword} tableName - Mandatory parameter - * @param {TypeReference} updateThroughputParameters - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - setAttribute( - resourceGroupName, - accountName, - tableName, - updateThroughputParameters, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new CosmosDBManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.tableResources - .updateTableThroughput( - resourceGroupName, - accountName, - tableName, - updateThroughputParameters, - options - ) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the getTable function of cosmosdb - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} accountName - Mandatory parameter - * @param {StringKeyword} tableName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - getAttributes( - resourceGroupName, - accountName, - tableName, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new CosmosDBManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.tableResources - .getTable(resourceGroupName, accountName, tableName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } + /** + * + * @param {module} azureRestSdk Azure Rest SDK + */ + constructor(azureRestSdk) { + this._azureRestSdk = azureRestSdk; + } + /** + * Trigers the createUpdateTable function of cosmosdb + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} accountName - Mandatory parameter + * @param {StringKeyword} tableName - Mandatory parameter + * @param {TypeReference} createUpdateTableParameters - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + createCollection( + resourceGroupName, + accountName, + tableName, + createUpdateTableParameters, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new CosmosDBManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.tableResources + .createUpdateTable( + resourceGroupName, + accountName, + tableName, + createUpdateTableParameters, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteTable function of cosmosdb + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} accountName - Mandatory parameter + * @param {StringKeyword} tableName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + deleteCollection( + resourceGroupName, + accountName, + tableName, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new CosmosDBManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.tableResources + .deleteTable( + resourceGroupName, + accountName, + tableName, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the listTables function of cosmosdb + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} accountName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + listCollections(resourceGroupName, accountName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new CosmosDBManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.tableResources + .listTables(resourceGroupName, accountName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the updateTableThroughput function of cosmosdb + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} accountName - Mandatory parameter + * @param {StringKeyword} tableName - Mandatory parameter + * @param {TypeReference} updateThroughputParameters - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + setAttribute( + resourceGroupName, + accountName, + tableName, + updateThroughputParameters, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new CosmosDBManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.tableResources + .updateTableThroughput( + resourceGroupName, + accountName, + tableName, + updateThroughputParameters, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the getTable function of cosmosdb + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} accountName - Mandatory parameter + * @param {StringKeyword} tableName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + getAttributes( + resourceGroupName, + accountName, + tableName, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new CosmosDBManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.tableResources + .getTable( + resourceGroupName, + accountName, + tableName, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } } module.exports = Azure_NoSql; diff --git a/generator/generatedClasses/Azure/management/azure-keyManagement.js b/generator/generatedClasses/Azure/management/azure-keyManagement.js index 2a6a8316..ef080569 100644 --- a/generator/generatedClasses/Azure/management/azure-keyManagement.js +++ b/generator/generatedClasses/Azure/management/azure-keyManagement.js @@ -1,187 +1,197 @@ -const { KeyVaultManagementClient } = require("@azure/arm-keyvault"); +const { KeyVaultManagementClient } = require('@azure/arm-keyvault'); /*This is an auto generated class, please do not change.*/ /** * Class to create a KeyManagement object * @category Azure */ class Azure_KeyManagement { - /** - * - * @param {module} azureRestSdk Azure Rest SDK - */ - constructor(azureRestSdk) { - this._azureRestSdk = azureRestSdk; - } - /** - * Trigers the createOrUpdate function of keyvault - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} vaultName - Mandatory parameter - * @param {TypeReference} parameters - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - createKey(resourceGroupName, vaultName, parameters, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new KeyVaultManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.vaults - .createOrUpdate(resourceGroupName, vaultName, parameters, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteMethod function of keyvault - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} vaultName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - deleteKey(resourceGroupName, vaultName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new KeyVaultManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.vaults - .deleteMethod(resourceGroupName, vaultName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the update function of keyvault - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} vaultName - Mandatory parameter - * @param {TypeReference} parameters - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - update(resourceGroupName, vaultName, parameters, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new KeyVaultManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.vaults - .update(resourceGroupName, vaultName, parameters, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the get function of keyvault - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} vaultName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - describeKey(resourceGroupName, vaultName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new KeyVaultManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.vaults - .get(resourceGroupName, vaultName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the updateAccessPolicy function of keyvault - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} vaultName - Mandatory parameter - * @param {TypeReference} operationKind - Mandatory parameter - * @param {TypeReference} parameters - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - putKeyPolicy( - resourceGroupName, - vaultName, - operationKind, - parameters, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new KeyVaultManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.vaults - .updateAccessPolicy( - resourceGroupName, - vaultName, - operationKind, - parameters, - options - ) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } + /** + * + * @param {module} azureRestSdk Azure Rest SDK + */ + constructor(azureRestSdk) { + this._azureRestSdk = azureRestSdk; + } + /** + * Trigers the createOrUpdate function of keyvault + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} vaultName - Mandatory parameter + * @param {TypeReference} parameters - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + createKey(resourceGroupName, vaultName, parameters, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new KeyVaultManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.vaults + .createOrUpdate( + resourceGroupName, + vaultName, + parameters, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteMethod function of keyvault + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} vaultName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + deleteKey(resourceGroupName, vaultName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new KeyVaultManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.vaults + .deleteMethod(resourceGroupName, vaultName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the update function of keyvault + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} vaultName - Mandatory parameter + * @param {TypeReference} parameters - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + update(resourceGroupName, vaultName, parameters, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new KeyVaultManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.vaults + .update( + resourceGroupName, + vaultName, + parameters, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the get function of keyvault + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} vaultName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + describeKey(resourceGroupName, vaultName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new KeyVaultManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.vaults + .get(resourceGroupName, vaultName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the updateAccessPolicy function of keyvault + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} vaultName - Mandatory parameter + * @param {TypeReference} operationKind - Mandatory parameter + * @param {TypeReference} parameters - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + putKeyPolicy( + resourceGroupName, + vaultName, + operationKind, + parameters, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new KeyVaultManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.vaults + .updateAccessPolicy( + resourceGroupName, + vaultName, + operationKind, + parameters, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } } module.exports = Azure_KeyManagement; diff --git a/generator/generatedClasses/Azure/management/azure-monitoring.js b/generator/generatedClasses/Azure/management/azure-monitoring.js index f365ad1d..efb43c1f 100644 --- a/generator/generatedClasses/Azure/management/azure-monitoring.js +++ b/generator/generatedClasses/Azure/management/azure-monitoring.js @@ -1,174 +1,186 @@ -const { MonitorManagementClient } = require("@azure/arm-monitor"); +const { MonitorManagementClient } = require('@azure/arm-monitor'); /*This is an auto generated class, please do not change.*/ /** * Class to create a Monitoring object * @category Azure */ class Azure_Monitoring { - /** - * - * @param {module} azureRestSdk Azure Rest SDK - */ - constructor(azureRestSdk) { - this._azureRestSdk = azureRestSdk; - } - /** - * Trigers the createOrUpdate function of monitor - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} ruleName - Mandatory parameter - * @param {TypeReference} parameters - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - createAlarm(resourceGroupName, ruleName, parameters, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new MonitorManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.alertRules - .createOrUpdate(resourceGroupName, ruleName, parameters, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteMethod function of monitor - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} ruleName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - deleteAlarm(resourceGroupName, ruleName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new MonitorManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.alertRules - .deleteMethod(resourceGroupName, ruleName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the update function of monitor - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} ruleName - Mandatory parameter - * @param {TypeReference} alertRulesResource - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - updateAlarm( - resourceGroupName, - ruleName, - alertRulesResource, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new MonitorManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.alertRules - .update(resourceGroupName, ruleName, alertRulesResource, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the listBySubscription function of monitor - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - listAlarms(options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new MonitorManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.alertRules.listBySubscription(options).then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the get function of monitor - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} ruleName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - getMetricData(resourceGroupName, ruleName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new MonitorManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.alertRules - .get(resourceGroupName, ruleName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } + /** + * + * @param {module} azureRestSdk Azure Rest SDK + */ + constructor(azureRestSdk) { + this._azureRestSdk = azureRestSdk; + } + /** + * Trigers the createOrUpdate function of monitor + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} ruleName - Mandatory parameter + * @param {TypeReference} parameters - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + createAlarm(resourceGroupName, ruleName, parameters, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new MonitorManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.alertRules + .createOrUpdate( + resourceGroupName, + ruleName, + parameters, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteMethod function of monitor + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} ruleName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + deleteAlarm(resourceGroupName, ruleName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new MonitorManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.alertRules + .deleteMethod(resourceGroupName, ruleName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the update function of monitor + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} ruleName - Mandatory parameter + * @param {TypeReference} alertRulesResource - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + updateAlarm( + resourceGroupName, + ruleName, + alertRulesResource, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new MonitorManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.alertRules + .update( + resourceGroupName, + ruleName, + alertRulesResource, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the listBySubscription function of monitor + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + listAlarms(options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new MonitorManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.alertRules + .listBySubscription(options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the get function of monitor + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} ruleName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + getMetricData(resourceGroupName, ruleName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new MonitorManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.alertRules + .get(resourceGroupName, ruleName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } } module.exports = Azure_Monitoring; diff --git a/generator/generatedClasses/Azure/network/azure-DNS.js b/generator/generatedClasses/Azure/network/azure-DNS.js index 9e52b9cb..38ae476b 100644 --- a/generator/generatedClasses/Azure/network/azure-DNS.js +++ b/generator/generatedClasses/Azure/network/azure-DNS.js @@ -1,154 +1,159 @@ -const { DnsManagementClient } = require("@azure/arm-dns"); +const { DnsManagementClient } = require('@azure/arm-dns'); /*This is an auto generated class, please do not change.*/ /** * Class to create a DNS object * @category Azure */ class Azure_DNS { - /** - * - * @param {module} azureRestSdk Azure Rest SDK - */ - constructor(azureRestSdk) { - this._azureRestSdk = azureRestSdk; - } - /** - * Trigers the createOrUpdate function of dns - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} zoneName - Mandatory parameter - * @param {TypeReference} parameters - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - createZone(resourceGroupName, zoneName, parameters, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new DnsManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.zones - .createOrUpdate(resourceGroupName, zoneName, parameters, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteMethod function of dns - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} zoneName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - deleteZone(resourceGroupName, zoneName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new DnsManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.zones - .deleteMethod(resourceGroupName, zoneName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the list function of dns - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - listZones(options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new DnsManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.zones.list(options).then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the createOrUpdate function of dns - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} zoneName - Mandatory parameter - * @param {StringKeyword} relativeRecordSetName - Mandatory parameter - * @param {TypeReference} recordType - Mandatory parameter - * @param {TypeReference} parameters - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - changeRecordSets( - resourceGroupName, - zoneName, - relativeRecordSetName, - recordType, - parameters, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new DnsManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.recordSets - .createOrUpdate( - resourceGroupName, - zoneName, - relativeRecordSetName, - recordType, - parameters, - options - ) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } + /** + * + * @param {module} azureRestSdk Azure Rest SDK + */ + constructor(azureRestSdk) { + this._azureRestSdk = azureRestSdk; + } + /** + * Trigers the createOrUpdate function of dns + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} zoneName - Mandatory parameter + * @param {TypeReference} parameters - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + createZone(resourceGroupName, zoneName, parameters, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new DnsManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.zones + .createOrUpdate( + resourceGroupName, + zoneName, + parameters, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteMethod function of dns + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} zoneName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + deleteZone(resourceGroupName, zoneName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new DnsManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.zones + .deleteMethod(resourceGroupName, zoneName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the list function of dns + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + listZones(options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new DnsManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.zones.list(options).then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the createOrUpdate function of dns + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} zoneName - Mandatory parameter + * @param {StringKeyword} relativeRecordSetName - Mandatory parameter + * @param {TypeReference} recordType - Mandatory parameter + * @param {TypeReference} parameters - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + changeRecordSets( + resourceGroupName, + zoneName, + relativeRecordSetName, + recordType, + parameters, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new DnsManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.recordSets + .createOrUpdate( + resourceGroupName, + zoneName, + relativeRecordSetName, + recordType, + parameters, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } } module.exports = Azure_DNS; diff --git a/generator/generatedClasses/Azure/network/azure-loadBalancer.js b/generator/generatedClasses/Azure/network/azure-loadBalancer.js index 437a80c8..db3ae534 100644 --- a/generator/generatedClasses/Azure/network/azure-loadBalancer.js +++ b/generator/generatedClasses/Azure/network/azure-loadBalancer.js @@ -1,185 +1,196 @@ -const { NetworkManagementClient } = require("@azure/arm-network"); +const { NetworkManagementClient } = require('@azure/arm-network'); /*This is an auto generated class, please do not change.*/ /** * Class to create a LoadBalancer object * @category Azure */ class Azure_LoadBalancer { - /** - * - * @param {module} azureRestSdk Azure Rest SDK - */ - constructor(azureRestSdk) { - this._azureRestSdk = azureRestSdk; - } - /** - * Trigers the createOrUpdate function of network - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} loadBalancerName - Mandatory parameter - * @param {TypeReference} parameters - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - create(resourceGroupName, loadBalancerName, parameters, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new NetworkManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.loadBalancers - .createOrUpdate( - resourceGroupName, - loadBalancerName, - parameters, - options - ) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteMethod function of network - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} loadBalancerName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - delete(resourceGroupName, loadBalancerName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new NetworkManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.loadBalancers - .deleteMethod(resourceGroupName, loadBalancerName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the list function of network - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - list(resourceGroupName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new NetworkManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.loadBalancers.list(resourceGroupName, options).then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the updateTags function of network - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} loadBalancerName - Mandatory parameter - * @param {TypeReference} parameters - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - addTags( - resourceGroupName, - loadBalancerName, - parameters, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new NetworkManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.loadBalancers - .updateTags( - resourceGroupName, - loadBalancerName, - parameters, - options - ) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the get function of network - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} loadBalancerName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - describe(resourceGroupName, loadBalancerName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new NetworkManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.loadBalancers - .get(resourceGroupName, loadBalancerName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } + /** + * + * @param {module} azureRestSdk Azure Rest SDK + */ + constructor(azureRestSdk) { + this._azureRestSdk = azureRestSdk; + } + /** + * Trigers the createOrUpdate function of network + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} loadBalancerName - Mandatory parameter + * @param {TypeReference} parameters - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + create( + resourceGroupName, + loadBalancerName, + parameters, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new NetworkManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.loadBalancers + .createOrUpdate( + resourceGroupName, + loadBalancerName, + parameters, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteMethod function of network + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} loadBalancerName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + delete(resourceGroupName, loadBalancerName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new NetworkManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.loadBalancers + .deleteMethod( + resourceGroupName, + loadBalancerName, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the list function of network + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + list(resourceGroupName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new NetworkManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.loadBalancers + .list(resourceGroupName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the updateTags function of network + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} loadBalancerName - Mandatory parameter + * @param {TypeReference} parameters - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + addTags( + resourceGroupName, + loadBalancerName, + parameters, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new NetworkManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.loadBalancers + .updateTags( + resourceGroupName, + loadBalancerName, + parameters, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the get function of network + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} loadBalancerName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + describe(resourceGroupName, loadBalancerName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new NetworkManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.loadBalancers + .get(resourceGroupName, loadBalancerName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } } module.exports = Azure_LoadBalancer; diff --git a/generator/generatedClasses/Azure/storage/azure-blockStorage.js b/generator/generatedClasses/Azure/storage/azure-blockStorage.js index 638df80b..a792ee41 100644 --- a/generator/generatedClasses/Azure/storage/azure-blockStorage.js +++ b/generator/generatedClasses/Azure/storage/azure-blockStorage.js @@ -1,169 +1,174 @@ -const { ComputeManagementClient } = require("@azure/arm-compute"); +const { ComputeManagementClient } = require('@azure/arm-compute'); /*This is an auto generated class, please do not change.*/ /** * Class to create a BlockStorage object * @category Azure */ class Azure_BlockStorage { - /** - * - * @param {module} azureRestSdk Azure Rest SDK - */ - constructor(azureRestSdk) { - this._azureRestSdk = azureRestSdk; - } - /** - * Trigers the createOrUpdate function of compute - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} diskName - Mandatory parameter - * @param {TypeReference} disk - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - create(resourceGroupName, diskName, disk, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ComputeManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.disks - .createOrUpdate(resourceGroupName, diskName, disk, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteMethod function of compute - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} diskName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - delete(resourceGroupName, diskName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ComputeManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.disks - .deleteMethod(resourceGroupName, diskName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the get function of compute - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} diskName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - describe(resourceGroupName, diskName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ComputeManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.disks - .get(resourceGroupName, diskName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the list function of compute - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - list(options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ComputeManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.disks.list(options).then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the update function of compute - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} diskName - Mandatory parameter - * @param {TypeReference} disk - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - update(resourceGroupName, diskName, disk, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new ComputeManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.disks - .update(resourceGroupName, diskName, disk, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } + /** + * + * @param {module} azureRestSdk Azure Rest SDK + */ + constructor(azureRestSdk) { + this._azureRestSdk = azureRestSdk; + } + /** + * Trigers the createOrUpdate function of compute + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} diskName - Mandatory parameter + * @param {TypeReference} disk - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + create(resourceGroupName, diskName, disk, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ComputeManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.disks + .createOrUpdate( + resourceGroupName, + diskName, + disk, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteMethod function of compute + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} diskName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + delete(resourceGroupName, diskName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ComputeManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.disks + .deleteMethod(resourceGroupName, diskName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the get function of compute + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} diskName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + describe(resourceGroupName, diskName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ComputeManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.disks + .get(resourceGroupName, diskName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the list function of compute + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + list(options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ComputeManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.disks.list(options).then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the update function of compute + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} diskName - Mandatory parameter + * @param {TypeReference} disk - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + update(resourceGroupName, diskName, disk, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new ComputeManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.disks + .update(resourceGroupName, diskName, disk, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } } module.exports = Azure_BlockStorage; diff --git a/generator/generatedClasses/Azure/storage/azure-storageBucket.js b/generator/generatedClasses/Azure/storage/azure-storageBucket.js index b060e6fc..fd7c99ec 100644 --- a/generator/generatedClasses/Azure/storage/azure-storageBucket.js +++ b/generator/generatedClasses/Azure/storage/azure-storageBucket.js @@ -1,129 +1,129 @@ -const { StorageManagementClient } = require("@azure/arm-storage"); +const { StorageManagementClient } = require('@azure/arm-storage'); /*This is an auto generated class, please do not change.*/ /** * Class to create a StorageBucket object * @category Azure */ class Azure_StorageBucket { - /** - * - * @param {module} azureRestSdk Azure Rest SDK - */ - constructor(azureRestSdk) { - this._azureRestSdk = azureRestSdk; - } - /** - * Trigers the create function of storage - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} accountName - Mandatory parameter - * @param {StringKeyword} containerName - Mandatory parameter - * @param {TypeReference} blobContainer - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - create( - resourceGroupName, - accountName, - containerName, - blobContainer, - options = undefined - ) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new StorageManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.blobContainers - .create( - resourceGroupName, - accountName, - containerName, - blobContainer, - options - ) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteMethod function of storage - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} accountName - Mandatory parameter - * @param {StringKeyword} containerName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - delete(resourceGroupName, accountName, containerName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new StorageManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.blobContainers - .deleteMethod( - resourceGroupName, - accountName, - containerName, - options - ) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the list function of storage - * @param {StringKeyword} resourceGroupName - Mandatory parameter - * @param {StringKeyword} accountName - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - list(resourceGroupName, accountName, options = undefined) { - return new Promise((resolve, reject) => { - this._azureRestSdk - .loginWithServicePrincipalSecretWithAuthResponse( - process.env.AZURE_CLIENT_ID, - process.env.AZURE_CLIENT_SECRET, - process.env.AZURE_TENANT_ID - ) - .then(authres => { - const client = new StorageManagementClient( - authres.credentials, - process.env.AZURE_SUBSCRIPTION_ID - ); - client.blobContainers - .list(resourceGroupName, accountName, options) - .then(result => { - resolve(result); - }); - }) - .catch(err => { - reject(err); - }); - }); - } + /** + * + * @param {module} azureRestSdk Azure Rest SDK + */ + constructor(azureRestSdk) { + this._azureRestSdk = azureRestSdk; + } + /** + * Trigers the create function of storage + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} accountName - Mandatory parameter + * @param {StringKeyword} containerName - Mandatory parameter + * @param {TypeReference} blobContainer - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + create( + resourceGroupName, + accountName, + containerName, + blobContainer, + options = undefined + ) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new StorageManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.blobContainers + .create( + resourceGroupName, + accountName, + containerName, + blobContainer, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteMethod function of storage + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} accountName - Mandatory parameter + * @param {StringKeyword} containerName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + delete(resourceGroupName, accountName, containerName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new StorageManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.blobContainers + .deleteMethod( + resourceGroupName, + accountName, + containerName, + options + ) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the list function of storage + * @param {StringKeyword} resourceGroupName - Mandatory parameter + * @param {StringKeyword} accountName - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + list(resourceGroupName, accountName, options = undefined) { + return new Promise((resolve, reject) => { + this._azureRestSdk + .loginWithServicePrincipalSecretWithAuthResponse( + process.env.AZURE_CLIENT_ID, + process.env.AZURE_CLIENT_SECRET, + process.env.AZURE_TENANT_ID + ) + .then(authres => { + const client = new StorageManagementClient( + authres.credentials, + process.env.AZURE_SUBSCRIPTION_ID + ); + client.blobContainers + .list(resourceGroupName, accountName, options) + .then(result => { + resolve(result); + }); + }) + .catch(err => { + reject(err); + }); + }); + } } module.exports = Azure_StorageBucket; diff --git a/generator/generatedClasses/DO/compute/do-computeInstance.js b/generator/generatedClasses/DO/compute/do-computeInstance.js index 7f925773..593c3b85 100644 --- a/generator/generatedClasses/DO/compute/do-computeInstance.js +++ b/generator/generatedClasses/DO/compute/do-computeInstance.js @@ -4,76 +4,76 @@ * @category Digital Ocean */ class DO_ComputeInstance { - /** - * - * @param {module} do DO SDK - * @param {object} options SDK options - */ - constructor(dosdk, dotoken) { - this._DO = dosdk; - this._instance = new this._DO(dotoken); - this._droplets = this._instance.droplets; - } - /** - * Trigers the getAll function of Droplets - * @param {StringKeyword} tagName - Data required for getAll - * @param {BooleanKeyword} includeAll - Data required for getAll - * @param {NumberKeyword} page - Data required for getAll - * @param {NumberKeyword} pageSize - Data required for getAll - * @returns {Promise} - */ - list( - tagName, - includeAll = undefined, - page = undefined, - pageSize = undefined - ) { - return new Promise((resolve, reject) => { - this._droplets - .getAll(tagName, includeAll, page, pageSize) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the create function of Droplets - * @param {DropletCreationRequest} options - Data required for create - * @returns {Promise} - */ - create(options) { - return new Promise((resolve, reject) => { - this._droplets - .create(options) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the deleteById function of Droplets - * @param {StringKeyword} dropletId - Data required for deleteById - * @returns {Promise} - */ - destroy(dropletId) { - return new Promise((resolve, reject) => { - this._droplets - .deleteById(dropletId) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the requestAction function of Droplets - * @param {StringKeyword} dropletId - Data required for requestAction - * @param {AnyKeyword} action - Data required for requestAction - * @returns {Promise} - */ - stop(dropletId, action) { - return new Promise((resolve, reject) => { - this._droplets - .requestAction(dropletId, action) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } + /** + * + * @param {module} do DO SDK + * @param {object} options SDK options + */ + constructor(dosdk, dotoken) { + this._DO = dosdk; + this._instance = new this._DO(dotoken); + this._droplets = this._instance.droplets; + } + /** + * Trigers the getAll function of Droplets + * @param {StringKeyword} tagName - Data required for getAll + * @param {BooleanKeyword} includeAll - Data required for getAll + * @param {NumberKeyword} page - Data required for getAll + * @param {NumberKeyword} pageSize - Data required for getAll + * @returns {Promise} + */ + list( + tagName, + includeAll = undefined, + page = undefined, + pageSize = undefined + ) { + return new Promise((resolve, reject) => { + this._droplets + .getAll(tagName, includeAll, page, pageSize) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the create function of Droplets + * @param {DropletCreationRequest} options - Data required for create + * @returns {Promise} + */ + create(options) { + return new Promise((resolve, reject) => { + this._droplets + .create(options) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the deleteById function of Droplets + * @param {StringKeyword} dropletId - Data required for deleteById + * @returns {Promise} + */ + destroy(dropletId) { + return new Promise((resolve, reject) => { + this._droplets + .deleteById(dropletId) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the requestAction function of Droplets + * @param {StringKeyword} dropletId - Data required for requestAction + * @param {AnyKeyword} action - Data required for requestAction + * @returns {Promise} + */ + stop(dropletId, action) { + return new Promise((resolve, reject) => { + this._droplets + .requestAction(dropletId, action) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } } module.exports = DO_ComputeInstance; diff --git a/generator/generatedClasses/DO/compute/do-kubernetes.js b/generator/generatedClasses/DO/compute/do-kubernetes.js index ae3db733..bcf976ed 100644 --- a/generator/generatedClasses/DO/compute/do-kubernetes.js +++ b/generator/generatedClasses/DO/compute/do-kubernetes.js @@ -4,132 +4,136 @@ * @category Digital Ocean */ class DO_Kubernetes { - /** - * - * @param {module} do DO SDK - * @param {object} options SDK options - */ - constructor(dosdk, dotoken) { - this._DO = dosdk; - this._instance = new this._DO(dotoken); - this._kubernetes = this._instance.kubernetes; - } - /** - * Trigers the getClusters function of Kubernetes - * @param {BooleanKeyword} includeAll - Data required for getClusters - * @param {NumberKeyword} page - Data required for getClusters - * @param {NumberKeyword} pageSize - Data required for getClusters - * @returns {Promise} - */ - listClusters(includeAll = undefined, page = undefined, pageSize = undefined) { - return new Promise((resolve, reject) => { - this._kubernetes - .getClusters(includeAll, page, pageSize) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the create function of Kubernetes - * @param {NewClusterRequest} options - Data required for create - * @returns {Promise} - */ - create(options) { - return new Promise((resolve, reject) => { - this._kubernetes - .create(options) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the getById function of Kubernetes - * @param {StringKeyword} clusterId - Data required for getById - * @returns {Promise} - */ - describeCluster(clusterId) { - return new Promise((resolve, reject) => { - this._kubernetes - .getById(clusterId) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the delete function of Kubernetes - * @param {StringKeyword} clusterId - Data required for delete - * @returns {Promise} - */ - delete(clusterId) { - return new Promise((resolve, reject) => { - this._kubernetes - .delete(clusterId) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the getNodePools function of Kubernetes - * @param {StringKeyword} clusterId - Data required for getNodePools - * @param {BooleanKeyword} includeAll - Data required for getNodePools - * @param {NumberKeyword} page - Data required for getNodePools - * @param {NumberKeyword} pageSize - Data required for getNodePools - * @returns {Promise} - */ - listNodegroups( - clusterId, - includeAll = undefined, - page = undefined, - pageSize = undefined - ) { - return new Promise((resolve, reject) => { - this._kubernetes - .getNodePools(clusterId, includeAll, page, pageSize) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the getNodePoolById function of Kubernetes - * @param {StringKeyword} clusterId - Data required for getNodePoolById - * @param {StringKeyword} nodePoolId - Data required for getNodePoolById - * @returns {Promise} - */ - describeNodeGroup(clusterId, nodePoolId) { - return new Promise((resolve, reject) => { - this._kubernetes - .getNodePoolById(clusterId, nodePoolId) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the addNodePool function of Kubernetes - * @param {StringKeyword} clusterId - Data required for addNodePool - * @param {ClusterNodePool} nodePool - Data required for addNodePool - * @returns {Promise} - */ - createNodeGroup(clusterId, nodePool) { - return new Promise((resolve, reject) => { - this._kubernetes - .addNodePool(clusterId, nodePool) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the deleteNodePool function of Kubernetes - * @param {StringKeyword} clusterId - Data required for deleteNodePool - * @param {StringKeyword} nodePoolId - Data required for deleteNodePool - * @returns {Promise} - */ - deleteNodegroup(clusterId, nodePoolId) { - return new Promise((resolve, reject) => { - this._kubernetes - .deleteNodePool(clusterId, nodePoolId) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } + /** + * + * @param {module} do DO SDK + * @param {object} options SDK options + */ + constructor(dosdk, dotoken) { + this._DO = dosdk; + this._instance = new this._DO(dotoken); + this._kubernetes = this._instance.kubernetes; + } + /** + * Trigers the getClusters function of Kubernetes + * @param {BooleanKeyword} includeAll - Data required for getClusters + * @param {NumberKeyword} page - Data required for getClusters + * @param {NumberKeyword} pageSize - Data required for getClusters + * @returns {Promise} + */ + listClusters( + includeAll = undefined, + page = undefined, + pageSize = undefined + ) { + return new Promise((resolve, reject) => { + this._kubernetes + .getClusters(includeAll, page, pageSize) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the create function of Kubernetes + * @param {NewClusterRequest} options - Data required for create + * @returns {Promise} + */ + create(options) { + return new Promise((resolve, reject) => { + this._kubernetes + .create(options) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the getById function of Kubernetes + * @param {StringKeyword} clusterId - Data required for getById + * @returns {Promise} + */ + describeCluster(clusterId) { + return new Promise((resolve, reject) => { + this._kubernetes + .getById(clusterId) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the delete function of Kubernetes + * @param {StringKeyword} clusterId - Data required for delete + * @returns {Promise} + */ + delete(clusterId) { + return new Promise((resolve, reject) => { + this._kubernetes + .delete(clusterId) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the getNodePools function of Kubernetes + * @param {StringKeyword} clusterId - Data required for getNodePools + * @param {BooleanKeyword} includeAll - Data required for getNodePools + * @param {NumberKeyword} page - Data required for getNodePools + * @param {NumberKeyword} pageSize - Data required for getNodePools + * @returns {Promise} + */ + listNodegroups( + clusterId, + includeAll = undefined, + page = undefined, + pageSize = undefined + ) { + return new Promise((resolve, reject) => { + this._kubernetes + .getNodePools(clusterId, includeAll, page, pageSize) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the getNodePoolById function of Kubernetes + * @param {StringKeyword} clusterId - Data required for getNodePoolById + * @param {StringKeyword} nodePoolId - Data required for getNodePoolById + * @returns {Promise} + */ + describeNodeGroup(clusterId, nodePoolId) { + return new Promise((resolve, reject) => { + this._kubernetes + .getNodePoolById(clusterId, nodePoolId) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the addNodePool function of Kubernetes + * @param {StringKeyword} clusterId - Data required for addNodePool + * @param {ClusterNodePool} nodePool - Data required for addNodePool + * @returns {Promise} + */ + createNodeGroup(clusterId, nodePool) { + return new Promise((resolve, reject) => { + this._kubernetes + .addNodePool(clusterId, nodePool) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the deleteNodePool function of Kubernetes + * @param {StringKeyword} clusterId - Data required for deleteNodePool + * @param {StringKeyword} nodePoolId - Data required for deleteNodePool + * @returns {Promise} + */ + deleteNodegroup(clusterId, nodePoolId) { + return new Promise((resolve, reject) => { + this._kubernetes + .deleteNodePool(clusterId, nodePoolId) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } } module.exports = DO_Kubernetes; diff --git a/generator/generatedClasses/DO/database/do-RDBMS.js b/generator/generatedClasses/DO/database/do-RDBMS.js index 9363be19..216c49fd 100644 --- a/generator/generatedClasses/DO/database/do-RDBMS.js +++ b/generator/generatedClasses/DO/database/do-RDBMS.js @@ -4,76 +4,76 @@ * @category Digital Ocean */ class DO_RDBMS { - /** - * - * @param {module} do DO SDK - * @param {object} options SDK options - */ - constructor(dosdk, dotoken) { - this._DO = dosdk; - this._instance = new this._DO(dotoken); - this._databases = this._instance.databases; - } - /** - * Trigers the getAllClusters function of Databases - * @param {StringKeyword} tagName - Data required for getAllClusters - * @param {BooleanKeyword} includeAll - Data required for getAllClusters - * @param {NumberKeyword} page - Data required for getAllClusters - * @param {NumberKeyword} pageSize - Data required for getAllClusters - * @returns {Promise} - */ - getClusters( - tagName, - includeAll = undefined, - page = undefined, - pageSize = undefined - ) { - return new Promise((resolve, reject) => { - this._databases - .getAllClusters(tagName, includeAll, page, pageSize) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the createCluster function of Databases - * @param {DatabaseCreateClusterRequest} clusterOptions - Data required for createCluster - * @returns {Promise} - */ - createCluster(clusterOptions) { - return new Promise((resolve, reject) => { - this._databases - .createCluster(clusterOptions) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the getClusterById function of Databases - * @param {StringKeyword} clusterId - Data required for getClusterById - * @returns {Promise} - */ - getCluster(clusterId) { - return new Promise((resolve, reject) => { - this._databases - .getClusterById(clusterId) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the resizeCluster function of Databases - * @param {StringKeyword} clusterId - Data required for resizeCluster - * @param {DatabaseResizeClusterRequest} configuration - Data required for resizeCluster - * @returns {Promise} - */ - updateCluster(clusterId, configuration) { - return new Promise((resolve, reject) => { - this._databases - .resizeCluster(clusterId, configuration) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } + /** + * + * @param {module} do DO SDK + * @param {object} options SDK options + */ + constructor(dosdk, dotoken) { + this._DO = dosdk; + this._instance = new this._DO(dotoken); + this._databases = this._instance.databases; + } + /** + * Trigers the getAllClusters function of Databases + * @param {StringKeyword} tagName - Data required for getAllClusters + * @param {BooleanKeyword} includeAll - Data required for getAllClusters + * @param {NumberKeyword} page - Data required for getAllClusters + * @param {NumberKeyword} pageSize - Data required for getAllClusters + * @returns {Promise} + */ + getClusters( + tagName, + includeAll = undefined, + page = undefined, + pageSize = undefined + ) { + return new Promise((resolve, reject) => { + this._databases + .getAllClusters(tagName, includeAll, page, pageSize) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the createCluster function of Databases + * @param {DatabaseCreateClusterRequest} clusterOptions - Data required for createCluster + * @returns {Promise} + */ + createCluster(clusterOptions) { + return new Promise((resolve, reject) => { + this._databases + .createCluster(clusterOptions) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the getClusterById function of Databases + * @param {StringKeyword} clusterId - Data required for getClusterById + * @returns {Promise} + */ + getCluster(clusterId) { + return new Promise((resolve, reject) => { + this._databases + .getClusterById(clusterId) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the resizeCluster function of Databases + * @param {StringKeyword} clusterId - Data required for resizeCluster + * @param {DatabaseResizeClusterRequest} configuration - Data required for resizeCluster + * @returns {Promise} + */ + updateCluster(clusterId, configuration) { + return new Promise((resolve, reject) => { + this._databases + .resizeCluster(clusterId, configuration) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } } module.exports = DO_RDBMS; diff --git a/generator/generatedClasses/DO/database/do-noSql.js b/generator/generatedClasses/DO/database/do-noSql.js index 808b12d4..1fcbbe5e 100644 --- a/generator/generatedClasses/DO/database/do-noSql.js +++ b/generator/generatedClasses/DO/database/do-noSql.js @@ -4,76 +4,76 @@ * @category Digital Ocean */ class DO_NoSql { - /** - * - * @param {module} do DO SDK - * @param {object} options SDK options - */ - constructor(dosdk, dotoken) { - this._DO = dosdk; - this._instance = new this._DO(dotoken); - this._databases = this._instance.databases; - } - /** - * Trigers the getAllClusters function of Databases - * @param {StringKeyword} tagName - Data required for getAllClusters - * @param {BooleanKeyword} includeAll - Data required for getAllClusters - * @param {NumberKeyword} page - Data required for getAllClusters - * @param {NumberKeyword} pageSize - Data required for getAllClusters - * @returns {Promise} - */ - getClusters( - tagName, - includeAll = undefined, - page = undefined, - pageSize = undefined - ) { - return new Promise((resolve, reject) => { - this._databases - .getAllClusters(tagName, includeAll, page, pageSize) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the createCluster function of Databases - * @param {DatabaseCreateClusterRequest} clusterOptions - Data required for createCluster - * @returns {Promise} - */ - createCluster(clusterOptions) { - return new Promise((resolve, reject) => { - this._databases - .createCluster(clusterOptions) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the getClusterById function of Databases - * @param {StringKeyword} clusterId - Data required for getClusterById - * @returns {Promise} - */ - getCluster(clusterId) { - return new Promise((resolve, reject) => { - this._databases - .getClusterById(clusterId) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the resizeCluster function of Databases - * @param {StringKeyword} clusterId - Data required for resizeCluster - * @param {DatabaseResizeClusterRequest} configuration - Data required for resizeCluster - * @returns {Promise} - */ - updateCluster(clusterId, configuration) { - return new Promise((resolve, reject) => { - this._databases - .resizeCluster(clusterId, configuration) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } + /** + * + * @param {module} do DO SDK + * @param {object} options SDK options + */ + constructor(dosdk, dotoken) { + this._DO = dosdk; + this._instance = new this._DO(dotoken); + this._databases = this._instance.databases; + } + /** + * Trigers the getAllClusters function of Databases + * @param {StringKeyword} tagName - Data required for getAllClusters + * @param {BooleanKeyword} includeAll - Data required for getAllClusters + * @param {NumberKeyword} page - Data required for getAllClusters + * @param {NumberKeyword} pageSize - Data required for getAllClusters + * @returns {Promise} + */ + getClusters( + tagName, + includeAll = undefined, + page = undefined, + pageSize = undefined + ) { + return new Promise((resolve, reject) => { + this._databases + .getAllClusters(tagName, includeAll, page, pageSize) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the createCluster function of Databases + * @param {DatabaseCreateClusterRequest} clusterOptions - Data required for createCluster + * @returns {Promise} + */ + createCluster(clusterOptions) { + return new Promise((resolve, reject) => { + this._databases + .createCluster(clusterOptions) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the getClusterById function of Databases + * @param {StringKeyword} clusterId - Data required for getClusterById + * @returns {Promise} + */ + getCluster(clusterId) { + return new Promise((resolve, reject) => { + this._databases + .getClusterById(clusterId) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the resizeCluster function of Databases + * @param {StringKeyword} clusterId - Data required for resizeCluster + * @param {DatabaseResizeClusterRequest} configuration - Data required for resizeCluster + * @returns {Promise} + */ + updateCluster(clusterId, configuration) { + return new Promise((resolve, reject) => { + this._databases + .resizeCluster(clusterId, configuration) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } } module.exports = DO_NoSql; diff --git a/generator/generatedClasses/DO/management/do-keyManagement.js b/generator/generatedClasses/DO/management/do-keyManagement.js index ec2921ee..5af44abb 100644 --- a/generator/generatedClasses/DO/management/do-keyManagement.js +++ b/generator/generatedClasses/DO/management/do-keyManagement.js @@ -4,75 +4,75 @@ * @category Digital Ocean */ class DO_KeyManagement { - /** - * - * @param {module} do DO SDK - * @param {object} options SDK options - */ - constructor(dosdk, dotoken) { - this._DO = dosdk; - this._instance = new this._DO(dotoken); - this._keys = this._instance.keys; - } - /** - * Trigers the getAll function of Keys - * @param {StringKeyword} tagName - Data required for getAll - * @param {BooleanKeyword} includeAll - Data required for getAll - * @param {NumberKeyword} page - Data required for getAll - * @param {NumberKeyword} pageSize - Data required for getAll - * @returns {Promise} - */ - list( - tagName, - includeAll = undefined, - page = undefined, - pageSize = undefined - ) { - return new Promise((resolve, reject) => { - this._keys - .getAll(tagName, includeAll, page, pageSize) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the getById function of Keys - * @param {NumberKeyword} keyId - Data required for getById - * @returns {Promise} - */ - describeKey(keyId) { - return new Promise((resolve, reject) => { - this._keys - .getById(keyId) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the add function of Keys - * @param {AddKeyRequest} addKeyRequest - Data required for add - * @returns {Promise} - */ - createKey(addKeyRequest) { - return new Promise((resolve, reject) => { - this._keys - .add(addKeyRequest) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the delete function of Keys - * @param {StringKeyword} identifier - Data required for delete - * @returns {Promise} - */ - deleteKey(identifier) { - return new Promise((resolve, reject) => { - this._keys - .delete(identifier) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } + /** + * + * @param {module} do DO SDK + * @param {object} options SDK options + */ + constructor(dosdk, dotoken) { + this._DO = dosdk; + this._instance = new this._DO(dotoken); + this._keys = this._instance.keys; + } + /** + * Trigers the getAll function of Keys + * @param {StringKeyword} tagName - Data required for getAll + * @param {BooleanKeyword} includeAll - Data required for getAll + * @param {NumberKeyword} page - Data required for getAll + * @param {NumberKeyword} pageSize - Data required for getAll + * @returns {Promise} + */ + list( + tagName, + includeAll = undefined, + page = undefined, + pageSize = undefined + ) { + return new Promise((resolve, reject) => { + this._keys + .getAll(tagName, includeAll, page, pageSize) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the getById function of Keys + * @param {NumberKeyword} keyId - Data required for getById + * @returns {Promise} + */ + describeKey(keyId) { + return new Promise((resolve, reject) => { + this._keys + .getById(keyId) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the add function of Keys + * @param {AddKeyRequest} addKeyRequest - Data required for add + * @returns {Promise} + */ + createKey(addKeyRequest) { + return new Promise((resolve, reject) => { + this._keys + .add(addKeyRequest) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the delete function of Keys + * @param {StringKeyword} identifier - Data required for delete + * @returns {Promise} + */ + deleteKey(identifier) { + return new Promise((resolve, reject) => { + this._keys + .delete(identifier) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } } module.exports = DO_KeyManagement; diff --git a/generator/generatedClasses/DO/network/do-DNS.js b/generator/generatedClasses/DO/network/do-DNS.js index 377e3bb7..39ffe53e 100644 --- a/generator/generatedClasses/DO/network/do-DNS.js +++ b/generator/generatedClasses/DO/network/do-DNS.js @@ -4,95 +4,95 @@ * @category Digital Ocean */ class DO_DNS { - /** - * - * @param {module} do DO SDK - * @param {object} options SDK options - */ - constructor(dosdk, dotoken) { - this._DO = dosdk; - this._instance = new this._DO(dotoken); - this._domains = this._instance.domains; - } - /** - * Trigers the getAllRecords function of Domains - * @param {StringKeyword} domainName - Data required for getAllRecords - * @param {StringKeyword} tagName - Data required for getAllRecords - * @param {BooleanKeyword} includeAll - Data required for getAllRecords - * @param {NumberKeyword} page - Data required for getAllRecords - * @param {NumberKeyword} pageSize - Data required for getAllRecords - * @returns {Promise} - */ - getRecords( - domainName, - tagName, - includeAll = undefined, - page = undefined, - pageSize = undefined - ) { - return new Promise((resolve, reject) => { - this._domains - .getAllRecords(domainName, tagName, includeAll, page, pageSize) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the createRecord function of Domains - * @param {StringKeyword} domainName - Data required for createRecord - * @param {DomainRecordRequestOptions} options - Data required for createRecord - * @returns {Promise} - */ - createRecord(domainName, options) { - return new Promise((resolve, reject) => { - this._domains - .createRecord(domainName, options) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the getRecord function of Domains - * @param {StringKeyword} domainName - Data required for getRecord - * @param {StringKeyword} recordId - Data required for getRecord - * @returns {Promise} - */ - getRecord(domainName, recordId) { - return new Promise((resolve, reject) => { - this._domains - .getRecord(domainName, recordId) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the deleteRecord function of Domains - * @param {StringKeyword} domainName - Data required for deleteRecord - * @param {StringKeyword} recordId - Data required for deleteRecord - * @returns {Promise} - */ - deleteRecord(domainName, recordId) { - return new Promise((resolve, reject) => { - this._domains - .deleteRecord(domainName, recordId) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the updateRecord function of Domains - * @param {StringKeyword} domainName - Data required for updateRecord - * @param {StringKeyword} recordId - Data required for updateRecord - * @param {DomainRecordRequestOptions} options - Data required for updateRecord - * @returns {Promise} - */ - changeRecordSets(domainName, recordId, options) { - return new Promise((resolve, reject) => { - this._domains - .updateRecord(domainName, recordId, options) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } + /** + * + * @param {module} do DO SDK + * @param {object} options SDK options + */ + constructor(dosdk, dotoken) { + this._DO = dosdk; + this._instance = new this._DO(dotoken); + this._domains = this._instance.domains; + } + /** + * Trigers the getAllRecords function of Domains + * @param {StringKeyword} domainName - Data required for getAllRecords + * @param {StringKeyword} tagName - Data required for getAllRecords + * @param {BooleanKeyword} includeAll - Data required for getAllRecords + * @param {NumberKeyword} page - Data required for getAllRecords + * @param {NumberKeyword} pageSize - Data required for getAllRecords + * @returns {Promise} + */ + getRecords( + domainName, + tagName, + includeAll = undefined, + page = undefined, + pageSize = undefined + ) { + return new Promise((resolve, reject) => { + this._domains + .getAllRecords(domainName, tagName, includeAll, page, pageSize) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the createRecord function of Domains + * @param {StringKeyword} domainName - Data required for createRecord + * @param {DomainRecordRequestOptions} options - Data required for createRecord + * @returns {Promise} + */ + createRecord(domainName, options) { + return new Promise((resolve, reject) => { + this._domains + .createRecord(domainName, options) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the getRecord function of Domains + * @param {StringKeyword} domainName - Data required for getRecord + * @param {StringKeyword} recordId - Data required for getRecord + * @returns {Promise} + */ + getRecord(domainName, recordId) { + return new Promise((resolve, reject) => { + this._domains + .getRecord(domainName, recordId) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the deleteRecord function of Domains + * @param {StringKeyword} domainName - Data required for deleteRecord + * @param {StringKeyword} recordId - Data required for deleteRecord + * @returns {Promise} + */ + deleteRecord(domainName, recordId) { + return new Promise((resolve, reject) => { + this._domains + .deleteRecord(domainName, recordId) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the updateRecord function of Domains + * @param {StringKeyword} domainName - Data required for updateRecord + * @param {StringKeyword} recordId - Data required for updateRecord + * @param {DomainRecordRequestOptions} options - Data required for updateRecord + * @returns {Promise} + */ + changeRecordSets(domainName, recordId, options) { + return new Promise((resolve, reject) => { + this._domains + .updateRecord(domainName, recordId, options) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } } module.exports = DO_DNS; diff --git a/generator/generatedClasses/DO/network/do-loadBalancer.js b/generator/generatedClasses/DO/network/do-loadBalancer.js index c1d64d0b..665ebb2f 100644 --- a/generator/generatedClasses/DO/network/do-loadBalancer.js +++ b/generator/generatedClasses/DO/network/do-loadBalancer.js @@ -4,67 +4,67 @@ * @category Digital Ocean */ class DO_LoadBalancer { - /** - * - * @param {module} do DO SDK - * @param {object} options SDK options - */ - constructor(dosdk, dotoken) { - this._DO = dosdk; - this._instance = new this._DO(dotoken); - this._loadBalancers = this._instance.loadBalancers; - } - /** - * Trigers the create function of LoadBalancers - * @param {LoadBalancerCreationOptions} options - Data required for create - * @returns {Promise} - */ - create(options) { - return new Promise((resolve, reject) => { - this._loadBalancers - .create(options) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the getAll function of LoadBalancers - * @returns {Promise} - */ - list() { - return new Promise((resolve, reject) => { - this._loadBalancers - .getAll() - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the update function of LoadBalancers - * @param {StringKeyword} loadBalancerId - Data required for update - * @param {AnyKeyword} options - Data required for update - * @returns {Promise} - */ - update(loadBalancerId, options) { - return new Promise((resolve, reject) => { - this._loadBalancers - .update(loadBalancerId, options) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the delete function of LoadBalancers - * @param {StringKeyword} loadBalancerId - Data required for delete - * @returns {Promise} - */ - delete(loadBalancerId) { - return new Promise((resolve, reject) => { - this._loadBalancers - .delete(loadBalancerId) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } + /** + * + * @param {module} do DO SDK + * @param {object} options SDK options + */ + constructor(dosdk, dotoken) { + this._DO = dosdk; + this._instance = new this._DO(dotoken); + this._loadBalancers = this._instance.loadBalancers; + } + /** + * Trigers the create function of LoadBalancers + * @param {LoadBalancerCreationOptions} options - Data required for create + * @returns {Promise} + */ + create(options) { + return new Promise((resolve, reject) => { + this._loadBalancers + .create(options) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the getAll function of LoadBalancers + * @returns {Promise} + */ + list() { + return new Promise((resolve, reject) => { + this._loadBalancers + .getAll() + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the update function of LoadBalancers + * @param {StringKeyword} loadBalancerId - Data required for update + * @param {AnyKeyword} options - Data required for update + * @returns {Promise} + */ + update(loadBalancerId, options) { + return new Promise((resolve, reject) => { + this._loadBalancers + .update(loadBalancerId, options) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the delete function of LoadBalancers + * @param {StringKeyword} loadBalancerId - Data required for delete + * @returns {Promise} + */ + delete(loadBalancerId) { + return new Promise((resolve, reject) => { + this._loadBalancers + .delete(loadBalancerId) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } } module.exports = DO_LoadBalancer; diff --git a/generator/generatedClasses/DO/storage/do-blockStorage.js b/generator/generatedClasses/DO/storage/do-blockStorage.js index 2a2c86f5..ce6bc60e 100644 --- a/generator/generatedClasses/DO/storage/do-blockStorage.js +++ b/generator/generatedClasses/DO/storage/do-blockStorage.js @@ -4,67 +4,67 @@ * @category Digital Ocean */ class DO_BlockStorage { - /** - * - * @param {module} do DO SDK - * @param {object} options SDK options - */ - constructor(dosdk, dotoken) { - this._DO = dosdk; - this._instance = new this._DO(dotoken); - this._volumes = this._instance.volumes; - } - /** - * Trigers the getAll function of Volumes - * @param {StringKeyword} region - Data required for getAll - * @returns {Promise} - */ - list(region) { - return new Promise((resolve, reject) => { - this._volumes - .getAll(region) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the create function of Volumes - * @param {VolumeCreationOptions} options - Data required for create - * @returns {Promise} - */ - create(options) { - return new Promise((resolve, reject) => { - this._volumes - .create(options) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the getById function of Volumes - * @param {StringKeyword} volumeId - Data required for getById - * @returns {Promise} - */ - describe(volumeId) { - return new Promise((resolve, reject) => { - this._volumes - .getById(volumeId) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } - /** - * Trigers the deleteById function of Volumes - * @param {StringKeyword} volumeId - Data required for deleteById - * @returns {Promise} - */ - delete(volumeId) { - return new Promise((resolve, reject) => { - this._volumes - .deleteById(volumeId) - .then(data => resolve(data)) - .catch(err => reject(err)); - }); - } + /** + * + * @param {module} do DO SDK + * @param {object} options SDK options + */ + constructor(dosdk, dotoken) { + this._DO = dosdk; + this._instance = new this._DO(dotoken); + this._volumes = this._instance.volumes; + } + /** + * Trigers the getAll function of Volumes + * @param {StringKeyword} region - Data required for getAll + * @returns {Promise} + */ + list(region) { + return new Promise((resolve, reject) => { + this._volumes + .getAll(region) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the create function of Volumes + * @param {VolumeCreationOptions} options - Data required for create + * @returns {Promise} + */ + create(options) { + return new Promise((resolve, reject) => { + this._volumes + .create(options) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the getById function of Volumes + * @param {StringKeyword} volumeId - Data required for getById + * @returns {Promise} + */ + describe(volumeId) { + return new Promise((resolve, reject) => { + this._volumes + .getById(volumeId) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } + /** + * Trigers the deleteById function of Volumes + * @param {StringKeyword} volumeId - Data required for deleteById + * @returns {Promise} + */ + delete(volumeId) { + return new Promise((resolve, reject) => { + this._volumes + .deleteById(volumeId) + .then(data => resolve(data)) + .catch(err => reject(err)); + }); + } } module.exports = DO_BlockStorage; diff --git a/generator/generatedClasses/googleCloud/artificialinteligence/gcp-translation.js b/generator/generatedClasses/googleCloud/artificialinteligence/gcp-translation.js index bcc03216..5ff02a87 100644 --- a/generator/generatedClasses/googleCloud/artificialinteligence/gcp-translation.js +++ b/generator/generatedClasses/googleCloud/artificialinteligence/gcp-translation.js @@ -1,106 +1,106 @@ -const { TranslationServiceClient } = require("@google-cloud/translate"); +const { TranslationServiceClient } = require('@google-cloud/translate'); /*This is an auto generated class, please do not change.*/ /** * Class to create a Translation object * @category Google Cloud */ class GCP_Translation { - /** - * - * @param {object} config Configuration object - */ - constructor(config) { - this._translationServiceClient = new TranslationServiceClient(config); - } - /** - * Trigers the translateText function of undefined - * @param {TypeReference} request - Data required for translateText - * @param {TypeReference} [options] - Data required for translateText - * @returns {Promise} - */ - translate(request, options = undefined) { - return new Promise((resolve, reject) => { - this._translationServiceClient - .translateText(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the batchTranslateText function of undefined - * @param {TypeReference} request - Data required for batchTranslateText - * @param {TypeReference} [options] - Data required for batchTranslateText - * @returns {Promise} - */ - batchTranslate(request, options = undefined) { - return new Promise((resolve, reject) => { - this._translationServiceClient - .batchTranslateText(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the getGlossary function of undefined - * @param {TypeReference} request - Data required for getGlossary - * @param {TypeReference} [options] - Data required for getGlossary - * @returns {Promise} - */ - getGlossary(request, options = undefined) { - return new Promise((resolve, reject) => { - this._translationServiceClient - .getGlossary(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the createGlossary function of undefined - * @param {TypeReference} request - Data required for createGlossary - * @param {TypeReference} [options] - Data required for createGlossary - * @returns {Promise} - */ - createGlossary(request, options = undefined) { - return new Promise((resolve, reject) => { - this._translationServiceClient - .createGlossary(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the detectLanguage function of undefined - * @param {TypeReference} request - Data required for detectLanguage - * @param {TypeReference} [options] - Data required for detectLanguage - * @returns {Promise} - */ - detectLanguage(request, options = undefined) { - return new Promise((resolve, reject) => { - this._translationServiceClient - .detectLanguage(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } + /** + * + * @param {object} config Configuration object + */ + constructor(config) { + this._translationServiceClient = new TranslationServiceClient(config); + } + /** + * Trigers the translateText function of undefined + * @param {TypeReference} request - Data required for translateText + * @param {TypeReference} [options] - Data required for translateText + * @returns {Promise} + */ + translate(request, options = undefined) { + return new Promise((resolve, reject) => { + this._translationServiceClient + .translateText(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the batchTranslateText function of undefined + * @param {TypeReference} request - Data required for batchTranslateText + * @param {TypeReference} [options] - Data required for batchTranslateText + * @returns {Promise} + */ + batchTranslate(request, options = undefined) { + return new Promise((resolve, reject) => { + this._translationServiceClient + .batchTranslateText(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the getGlossary function of undefined + * @param {TypeReference} request - Data required for getGlossary + * @param {TypeReference} [options] - Data required for getGlossary + * @returns {Promise} + */ + getGlossary(request, options = undefined) { + return new Promise((resolve, reject) => { + this._translationServiceClient + .getGlossary(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the createGlossary function of undefined + * @param {TypeReference} request - Data required for createGlossary + * @param {TypeReference} [options] - Data required for createGlossary + * @returns {Promise} + */ + createGlossary(request, options = undefined) { + return new Promise((resolve, reject) => { + this._translationServiceClient + .createGlossary(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the detectLanguage function of undefined + * @param {TypeReference} request - Data required for detectLanguage + * @param {TypeReference} [options] - Data required for detectLanguage + * @returns {Promise} + */ + detectLanguage(request, options = undefined) { + return new Promise((resolve, reject) => { + this._translationServiceClient + .detectLanguage(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } } module.exports = GCP_Translation; diff --git a/generator/generatedClasses/googleCloud/compute/gcp-kubernetes.js b/generator/generatedClasses/googleCloud/compute/gcp-kubernetes.js index e0c08e67..8b2d00e5 100644 --- a/generator/generatedClasses/googleCloud/compute/gcp-kubernetes.js +++ b/generator/generatedClasses/googleCloud/compute/gcp-kubernetes.js @@ -1,178 +1,178 @@ -const { ClusterManagerClient } = require("@google-cloud/container"); +const { ClusterManagerClient } = require('@google-cloud/container'); /*This is an auto generated class, please do not change.*/ /** * Class to create a Kubernetes object * @category Google Cloud */ class GCP_Kubernetes { - /** - * - * @param {object} config Configuration object - */ - constructor(config) { - this._clusterManagerClient = new ClusterManagerClient(config); - } - /** - * Trigers the createCluster function of undefined - * @param {TypeReference} request - Data required for createCluster - * @param {TypeReference} [options] - Data required for createCluster - * @returns {Promise} - */ - create(request, options = undefined) { - return new Promise((resolve, reject) => { - this._clusterManagerClient - .createCluster(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteCluster function of undefined - * @param {TypeReference} request - Data required for deleteCluster - * @param {TypeReference} [options] - Data required for deleteCluster - * @returns {Promise} - */ - delete(request, options = undefined) { - return new Promise((resolve, reject) => { - this._clusterManagerClient - .deleteCluster(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the listClusters function of undefined - * @param {TypeReference} request - Data required for listClusters - * @param {TypeReference} [options] - Data required for listClusters - * @returns {Promise} - */ - listClusters(request, options = undefined) { - return new Promise((resolve, reject) => { - this._clusterManagerClient - .listClusters(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the getCluster function of undefined - * @param {TypeReference} request - Data required for getCluster - * @param {TypeReference} [options] - Data required for getCluster - * @returns {Promise} - */ - describeCluster(request, options = undefined) { - return new Promise((resolve, reject) => { - this._clusterManagerClient - .getCluster(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the createNodePool function of undefined - * @param {TypeReference} request - Data required for createNodePool - * @param {TypeReference} [options] - Data required for createNodePool - * @returns {Promise} - */ - createNodeGroup(request, options = undefined) { - return new Promise((resolve, reject) => { - this._clusterManagerClient - .createNodePool(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteNodePool function of undefined - * @param {TypeReference} request - Data required for deleteNodePool - * @param {TypeReference} [options] - Data required for deleteNodePool - * @returns {Promise} - */ - deleteNodegroup(request, options = undefined) { - return new Promise((resolve, reject) => { - this._clusterManagerClient - .deleteNodePool(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the getNodePool function of undefined - * @param {TypeReference} request - Data required for getNodePool - * @param {TypeReference} [options] - Data required for getNodePool - * @returns {Promise} - */ - describeNodeGroup(request, options = undefined) { - return new Promise((resolve, reject) => { - this._clusterManagerClient - .getNodePool(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the listNodePools function of undefined - * @param {TypeReference} request - Data required for listNodePools - * @param {TypeReference} [options] - Data required for listNodePools - * @returns {Promise} - */ - listNodegroups(request, options = undefined) { - return new Promise((resolve, reject) => { - this._clusterManagerClient - .listNodePools(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the setAddonsConfig function of undefined - * @param {TypeReference} request - Data required for setAddonsConfig - * @param {TypeReference} [options] - Data required for setAddonsConfig - * @returns {Promise} - */ - updateConfig(request, options = undefined) { - return new Promise((resolve, reject) => { - this._clusterManagerClient - .setAddonsConfig(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } + /** + * + * @param {object} config Configuration object + */ + constructor(config) { + this._clusterManagerClient = new ClusterManagerClient(config); + } + /** + * Trigers the createCluster function of undefined + * @param {TypeReference} request - Data required for createCluster + * @param {TypeReference} [options] - Data required for createCluster + * @returns {Promise} + */ + create(request, options = undefined) { + return new Promise((resolve, reject) => { + this._clusterManagerClient + .createCluster(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteCluster function of undefined + * @param {TypeReference} request - Data required for deleteCluster + * @param {TypeReference} [options] - Data required for deleteCluster + * @returns {Promise} + */ + delete(request, options = undefined) { + return new Promise((resolve, reject) => { + this._clusterManagerClient + .deleteCluster(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the listClusters function of undefined + * @param {TypeReference} request - Data required for listClusters + * @param {TypeReference} [options] - Data required for listClusters + * @returns {Promise} + */ + listClusters(request, options = undefined) { + return new Promise((resolve, reject) => { + this._clusterManagerClient + .listClusters(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the getCluster function of undefined + * @param {TypeReference} request - Data required for getCluster + * @param {TypeReference} [options] - Data required for getCluster + * @returns {Promise} + */ + describeCluster(request, options = undefined) { + return new Promise((resolve, reject) => { + this._clusterManagerClient + .getCluster(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the createNodePool function of undefined + * @param {TypeReference} request - Data required for createNodePool + * @param {TypeReference} [options] - Data required for createNodePool + * @returns {Promise} + */ + createNodeGroup(request, options = undefined) { + return new Promise((resolve, reject) => { + this._clusterManagerClient + .createNodePool(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteNodePool function of undefined + * @param {TypeReference} request - Data required for deleteNodePool + * @param {TypeReference} [options] - Data required for deleteNodePool + * @returns {Promise} + */ + deleteNodegroup(request, options = undefined) { + return new Promise((resolve, reject) => { + this._clusterManagerClient + .deleteNodePool(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the getNodePool function of undefined + * @param {TypeReference} request - Data required for getNodePool + * @param {TypeReference} [options] - Data required for getNodePool + * @returns {Promise} + */ + describeNodeGroup(request, options = undefined) { + return new Promise((resolve, reject) => { + this._clusterManagerClient + .getNodePool(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the listNodePools function of undefined + * @param {TypeReference} request - Data required for listNodePools + * @param {TypeReference} [options] - Data required for listNodePools + * @returns {Promise} + */ + listNodegroups(request, options = undefined) { + return new Promise((resolve, reject) => { + this._clusterManagerClient + .listNodePools(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the setAddonsConfig function of undefined + * @param {TypeReference} request - Data required for setAddonsConfig + * @param {TypeReference} [options] - Data required for setAddonsConfig + * @returns {Promise} + */ + updateConfig(request, options = undefined) { + return new Promise((resolve, reject) => { + this._clusterManagerClient + .setAddonsConfig(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } } module.exports = GCP_Kubernetes; diff --git a/generator/generatedClasses/googleCloud/database/gcp-RDBMS.js b/generator/generatedClasses/googleCloud/database/gcp-RDBMS.js index 46bbe942..e783c97f 100644 --- a/generator/generatedClasses/googleCloud/database/gcp-RDBMS.js +++ b/generator/generatedClasses/googleCloud/database/gcp-RDBMS.js @@ -1,134 +1,138 @@ -const { DatabaseAdminClient } = require("@google-cloud/spanner"); +const { DatabaseAdminClient } = require('@google-cloud/spanner'); /*This is an auto generated class, please do not change.*/ /** * Class to create a RDBMS object * @category Google Cloud */ class GCP_RDBMS { - /** - * - * @param {object} config Configuration object - */ - constructor(config) { - this._databaseAdminClient = new DatabaseAdminClient(config); - } - /** - * Trigers the createDatabase function of undefined - * @param {TypeReference} request - Data required for createDatabase - * @param {TypeReference} [options] - Data required for createDatabase - * @returns {Promise} - */ - createDatabse(request, options = undefined) { - return new Promise((resolve, reject) => { - this._databaseAdminClient - .createDatabase(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the dropDatabase function of undefined - * @param {TypeReference} request - Data required for dropDatabase - * @param {TypeReference} [options] - Data required for dropDatabase - * @returns {Promise} - */ - deleteDatabase(request, options = undefined) { - return new Promise((resolve, reject) => { - this._databaseAdminClient - .dropDatabase(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the createBackup function of undefined - * @param {TypeReference} request - Data required for createBackup - * @param {TypeReference} [options] - Data required for createBackup - * @returns {Promise} - */ - createSnapshots(request, options = undefined) { - return new Promise((resolve, reject) => { - this._databaseAdminClient - .createBackup(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the updateDatabaseDdl function of undefined - * @param {TypeReference} request - Data required for updateDatabaseDdl - * @param {TypeReference} [options] - Data required for updateDatabaseDdl - * @returns {Promise} - */ - modifyDB(request, options = undefined) { - return new Promise((resolve, reject) => { - this._databaseAdminClient - .updateDatabaseDdl(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the restoreDatabase function of undefined - * @param {TypeReference} request - Data required for restoreDatabase - * @param {TypeReference} [options] - Data required for restoreDatabase - * @returns {Promise} - */ - restoreDatabase(request, options = undefined) { - return new Promise((resolve, reject) => { - this._databaseAdminClient - .restoreDatabase(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteBackup function of undefined - * @param {TypeReference} request - Data required for deleteBackup - * @param {TypeReference} [options] - Data required for deleteBackup - * @returns {Promise} - */ - deleteDBSnapshot(request, options = undefined) { - return new Promise((resolve, reject) => { - this._databaseAdminClient - .deleteBackup(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the databasePath function of undefined - * @param {StringKeyword} project - Data required for databasePath - * @param {StringKeyword} instance - Data required for databasePath - * @param {StringKeyword} database - Data required for databasePath - * @returns {Promise} - */ - databasePath(project, instance, database) { - return this._databaseAdminClient.databasePath(project, instance, database); - } + /** + * + * @param {object} config Configuration object + */ + constructor(config) { + this._databaseAdminClient = new DatabaseAdminClient(config); + } + /** + * Trigers the createDatabase function of undefined + * @param {TypeReference} request - Data required for createDatabase + * @param {TypeReference} [options] - Data required for createDatabase + * @returns {Promise} + */ + createDatabse(request, options = undefined) { + return new Promise((resolve, reject) => { + this._databaseAdminClient + .createDatabase(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the dropDatabase function of undefined + * @param {TypeReference} request - Data required for dropDatabase + * @param {TypeReference} [options] - Data required for dropDatabase + * @returns {Promise} + */ + deleteDatabase(request, options = undefined) { + return new Promise((resolve, reject) => { + this._databaseAdminClient + .dropDatabase(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the createBackup function of undefined + * @param {TypeReference} request - Data required for createBackup + * @param {TypeReference} [options] - Data required for createBackup + * @returns {Promise} + */ + createSnapshots(request, options = undefined) { + return new Promise((resolve, reject) => { + this._databaseAdminClient + .createBackup(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the updateDatabaseDdl function of undefined + * @param {TypeReference} request - Data required for updateDatabaseDdl + * @param {TypeReference} [options] - Data required for updateDatabaseDdl + * @returns {Promise} + */ + modifyDB(request, options = undefined) { + return new Promise((resolve, reject) => { + this._databaseAdminClient + .updateDatabaseDdl(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the restoreDatabase function of undefined + * @param {TypeReference} request - Data required for restoreDatabase + * @param {TypeReference} [options] - Data required for restoreDatabase + * @returns {Promise} + */ + restoreDatabase(request, options = undefined) { + return new Promise((resolve, reject) => { + this._databaseAdminClient + .restoreDatabase(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteBackup function of undefined + * @param {TypeReference} request - Data required for deleteBackup + * @param {TypeReference} [options] - Data required for deleteBackup + * @returns {Promise} + */ + deleteDBSnapshot(request, options = undefined) { + return new Promise((resolve, reject) => { + this._databaseAdminClient + .deleteBackup(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the databasePath function of undefined + * @param {StringKeyword} project - Data required for databasePath + * @param {StringKeyword} instance - Data required for databasePath + * @param {StringKeyword} database - Data required for databasePath + * @returns {Promise} + */ + databasePath(project, instance, database) { + return this._databaseAdminClient.databasePath( + project, + instance, + database + ); + } } module.exports = GCP_RDBMS; diff --git a/generator/generatedClasses/googleCloud/database/gcp-noSql.js b/generator/generatedClasses/googleCloud/database/gcp-noSql.js index 7857a959..626a8256 100644 --- a/generator/generatedClasses/googleCloud/database/gcp-noSql.js +++ b/generator/generatedClasses/googleCloud/database/gcp-noSql.js @@ -1,79 +1,79 @@ -const { FirestoreClient } = require("@google-cloud/firestore"); +const { FirestoreClient } = require('@google-cloud/firestore'); /*This is an auto generated class, please do not change.*/ /** * Class to create a NoSql object * @category Google Cloud */ class GCP_NoSql { - /** - * - * @param {object} config Configuration object - */ - constructor(config) { - this._firestoreClient = new FirestoreClient(config); - } - /** - * Trigers the createDocument function of undefined - * @param {TypeReference} request - Data required for createDocument - * @param {TypeReference} [options] - Data required for createDocument - * @returns {Promise} - */ - createItem(request, options = undefined) { - return new Promise((resolve, reject) => { - this._firestoreClient - .createDocument(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteDocument function of undefined - * @param {TypeReference} request - Data required for deleteDocument - * @param {TypeReference} [options] - Data required for deleteDocument - * @returns {Promise} - */ - deleteItem(request, options = undefined) { - return new Promise((resolve, reject) => { - this._firestoreClient - .deleteDocument(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the updateDocument function of undefined - * @param {TypeReference} request - Data required for updateDocument - * @param {TypeReference} [options] - Data required for updateDocument - * @returns {Promise} - */ - updateItem(request, options = undefined) { - return new Promise((resolve, reject) => { - this._firestoreClient - .updateDocument(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the runQuery function of undefined - * @param {TypeReference} [request] - Data required for runQuery - * @param {TypeReference} [options] - Data required for runQuery - * @returns {Promise} - */ - query(request = undefined, options = undefined) { - return this._firestoreClient.runQuery(request, options); - } + /** + * + * @param {object} config Configuration object + */ + constructor(config) { + this._firestoreClient = new FirestoreClient(config); + } + /** + * Trigers the createDocument function of undefined + * @param {TypeReference} request - Data required for createDocument + * @param {TypeReference} [options] - Data required for createDocument + * @returns {Promise} + */ + createItem(request, options = undefined) { + return new Promise((resolve, reject) => { + this._firestoreClient + .createDocument(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteDocument function of undefined + * @param {TypeReference} request - Data required for deleteDocument + * @param {TypeReference} [options] - Data required for deleteDocument + * @returns {Promise} + */ + deleteItem(request, options = undefined) { + return new Promise((resolve, reject) => { + this._firestoreClient + .deleteDocument(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the updateDocument function of undefined + * @param {TypeReference} request - Data required for updateDocument + * @param {TypeReference} [options] - Data required for updateDocument + * @returns {Promise} + */ + updateItem(request, options = undefined) { + return new Promise((resolve, reject) => { + this._firestoreClient + .updateDocument(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the runQuery function of undefined + * @param {TypeReference} [request] - Data required for runQuery + * @param {TypeReference} [options] - Data required for runQuery + * @returns {Promise} + */ + query(request = undefined, options = undefined) { + return this._firestoreClient.runQuery(request, options); + } } module.exports = GCP_NoSql; diff --git a/generator/generatedClasses/googleCloud/management/gcp-keyManagement.js b/generator/generatedClasses/googleCloud/management/gcp-keyManagement.js index 8a106f5d..e90fee97 100644 --- a/generator/generatedClasses/googleCloud/management/gcp-keyManagement.js +++ b/generator/generatedClasses/googleCloud/management/gcp-keyManagement.js @@ -1,107 +1,109 @@ -const { KeyManagementServiceClient } = require("@google-cloud/kms"); +const { KeyManagementServiceClient } = require('@google-cloud/kms'); /*This is an auto generated class, please do not change.*/ /** * Class to create a KeyManagement object * @category Google Cloud */ class GCP_KeyManagement { - /** - * - * @param {object} config Configuration object - */ - constructor(config) { - this._keyManagementServiceClient = new KeyManagementServiceClient(config); - } - /** - * Trigers the createCryptoKey function of undefined - * @param {TypeReference} request - Data required for createCryptoKey - * @param {TypeReference} [options] - Data required for createCryptoKey - * @returns {Promise} - */ - createKey(request, options = undefined) { - return new Promise((resolve, reject) => { - this._keyManagementServiceClient - .createCryptoKey(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the destroyCryptoKeyVersion function of undefined - * @param {TypeReference} request - Data required for destroyCryptoKeyVersion - * @param {TypeReference} [options] - Data required for destroyCryptoKeyVersion - * @returns {Promise} - */ - deleteKey(request, options = undefined) { - return new Promise((resolve, reject) => { - this._keyManagementServiceClient - .destroyCryptoKeyVersion(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the updateCryptoKey function of undefined - * @param {TypeReference} request - Data required for updateCryptoKey - * @param {TypeReference} [options] - Data required for updateCryptoKey - * @returns {Promise} - */ - update(request, options = undefined) { - return new Promise((resolve, reject) => { - this._keyManagementServiceClient - .updateCryptoKey(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the getCryptoKey function of undefined - * @param {TypeReference} request - Data required for getCryptoKey - * @param {TypeReference} [options] - Data required for getCryptoKey - * @returns {Promise} - */ - describeKey(request, options = undefined) { - return new Promise((resolve, reject) => { - this._keyManagementServiceClient - .getCryptoKey(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the setIamPolicy function of undefined - * @param {TypeReference} request - Data required for setIamPolicy - * @param {UnionType} [options] - Data required for setIamPolicy - * @param {TypeReference} [callback] - Data required for setIamPolicy - * @returns {Promise} - */ - putKeyPolicy(request, options = undefined, callback = undefined) { - return new Promise((resolve, reject) => { - this._keyManagementServiceClient - .setIamPolicy(request, options, callback) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } + /** + * + * @param {object} config Configuration object + */ + constructor(config) { + this._keyManagementServiceClient = new KeyManagementServiceClient( + config + ); + } + /** + * Trigers the createCryptoKey function of undefined + * @param {TypeReference} request - Data required for createCryptoKey + * @param {TypeReference} [options] - Data required for createCryptoKey + * @returns {Promise} + */ + createKey(request, options = undefined) { + return new Promise((resolve, reject) => { + this._keyManagementServiceClient + .createCryptoKey(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the destroyCryptoKeyVersion function of undefined + * @param {TypeReference} request - Data required for destroyCryptoKeyVersion + * @param {TypeReference} [options] - Data required for destroyCryptoKeyVersion + * @returns {Promise} + */ + deleteKey(request, options = undefined) { + return new Promise((resolve, reject) => { + this._keyManagementServiceClient + .destroyCryptoKeyVersion(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the updateCryptoKey function of undefined + * @param {TypeReference} request - Data required for updateCryptoKey + * @param {TypeReference} [options] - Data required for updateCryptoKey + * @returns {Promise} + */ + update(request, options = undefined) { + return new Promise((resolve, reject) => { + this._keyManagementServiceClient + .updateCryptoKey(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the getCryptoKey function of undefined + * @param {TypeReference} request - Data required for getCryptoKey + * @param {TypeReference} [options] - Data required for getCryptoKey + * @returns {Promise} + */ + describeKey(request, options = undefined) { + return new Promise((resolve, reject) => { + this._keyManagementServiceClient + .getCryptoKey(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the setIamPolicy function of undefined + * @param {TypeReference} request - Data required for setIamPolicy + * @param {UnionType} [options] - Data required for setIamPolicy + * @param {TypeReference} [callback] - Data required for setIamPolicy + * @returns {Promise} + */ + putKeyPolicy(request, options = undefined, callback = undefined) { + return new Promise((resolve, reject) => { + this._keyManagementServiceClient + .setIamPolicy(request, options, callback) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } } module.exports = GCP_KeyManagement; diff --git a/generator/generatedClasses/googleCloud/management/gcp-monitoring.js b/generator/generatedClasses/googleCloud/management/gcp-monitoring.js index 8ea14029..4c03f5d1 100644 --- a/generator/generatedClasses/googleCloud/management/gcp-monitoring.js +++ b/generator/generatedClasses/googleCloud/management/gcp-monitoring.js @@ -1,116 +1,116 @@ -const { AlertPolicyServiceClient } = require("@google-cloud/monitoring"); -const { MetricServiceClient } = require("@google-cloud/monitoring"); +const { AlertPolicyServiceClient } = require('@google-cloud/monitoring'); +const { MetricServiceClient } = require('@google-cloud/monitoring'); /*This is an auto generated class, please do not change.*/ /** * Class to create a Monitoring object * @category Google Cloud */ class GCP_Monitoring { - /** - * - * @param {object} config Configuration object - */ - constructor(config) { - this._alertPolicyServiceClient = new AlertPolicyServiceClient(config); - this._metricServiceClient = new MetricServiceClient(config); - } - /** - * Trigers the createAlertPolicy function of undefined - * @param {TypeReference} request - Data required for createAlertPolicy - * @param {TypeReference} [options] - Data required for createAlertPolicy - * @returns {Promise} - */ - createAlarm(request, options = undefined) { - return new Promise((resolve, reject) => { - this._alertPolicyServiceClient - .createAlertPolicy(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteAlertPolicy function of undefined - * @param {TypeReference} request - Data required for deleteAlertPolicy - * @param {TypeReference} [options] - Data required for deleteAlertPolicy - * @returns {Promise} - */ - deleteAlarm(request, options = undefined) { - return new Promise((resolve, reject) => { - this._alertPolicyServiceClient - .deleteAlertPolicy(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the updateAlertPolicy function of undefined - * @param {TypeReference} request - Data required for updateAlertPolicy - * @param {TypeReference} [options] - Data required for updateAlertPolicy - * @returns {Promise} - */ - updateAlarm(request, options = undefined) { - return new Promise((resolve, reject) => { - this._alertPolicyServiceClient - .updateAlertPolicy(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the listAlertPolicies function of undefined - * @param {TypeReference} request - Data required for listAlertPolicies - * @param {TypeReference} [options] - Data required for listAlertPolicies - * @returns {Promise} - */ - listAlarms(request, options = undefined) { - return new Promise((resolve, reject) => { - this._alertPolicyServiceClient - .listAlertPolicies(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the getMetricDescriptor function of undefined - * @param {TypeReference} request - Data required for getMetricDescriptor - * @param {TypeReference} [options] - Data required for getMetricDescriptor - * @returns {Promise} - */ - getMetricData(request, options = undefined) { - return new Promise((resolve, reject) => { - this._metricServiceClient - .getMetricDescriptor(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the projectPath function of undefined - * @param {StringKeyword} project - Data required for projectPath - * @returns {Promise} - */ - projectPath(project) { - return this._alertPolicyServiceClient.projectPath(project); - } + /** + * + * @param {object} config Configuration object + */ + constructor(config) { + this._alertPolicyServiceClient = new AlertPolicyServiceClient(config); + this._metricServiceClient = new MetricServiceClient(config); + } + /** + * Trigers the createAlertPolicy function of undefined + * @param {TypeReference} request - Data required for createAlertPolicy + * @param {TypeReference} [options] - Data required for createAlertPolicy + * @returns {Promise} + */ + createAlarm(request, options = undefined) { + return new Promise((resolve, reject) => { + this._alertPolicyServiceClient + .createAlertPolicy(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteAlertPolicy function of undefined + * @param {TypeReference} request - Data required for deleteAlertPolicy + * @param {TypeReference} [options] - Data required for deleteAlertPolicy + * @returns {Promise} + */ + deleteAlarm(request, options = undefined) { + return new Promise((resolve, reject) => { + this._alertPolicyServiceClient + .deleteAlertPolicy(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the updateAlertPolicy function of undefined + * @param {TypeReference} request - Data required for updateAlertPolicy + * @param {TypeReference} [options] - Data required for updateAlertPolicy + * @returns {Promise} + */ + updateAlarm(request, options = undefined) { + return new Promise((resolve, reject) => { + this._alertPolicyServiceClient + .updateAlertPolicy(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the listAlertPolicies function of undefined + * @param {TypeReference} request - Data required for listAlertPolicies + * @param {TypeReference} [options] - Data required for listAlertPolicies + * @returns {Promise} + */ + listAlarms(request, options = undefined) { + return new Promise((resolve, reject) => { + this._alertPolicyServiceClient + .listAlertPolicies(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the getMetricDescriptor function of undefined + * @param {TypeReference} request - Data required for getMetricDescriptor + * @param {TypeReference} [options] - Data required for getMetricDescriptor + * @returns {Promise} + */ + getMetricData(request, options = undefined) { + return new Promise((resolve, reject) => { + this._metricServiceClient + .getMetricDescriptor(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the projectPath function of undefined + * @param {StringKeyword} project - Data required for projectPath + * @returns {Promise} + */ + projectPath(project) { + return this._alertPolicyServiceClient.projectPath(project); + } } module.exports = GCP_Monitoring; diff --git a/generator/generatedClasses/googleCloud/management/gcp-notificationService.js b/generator/generatedClasses/googleCloud/management/gcp-notificationService.js index ff4ee74f..447558f5 100644 --- a/generator/generatedClasses/googleCloud/management/gcp-notificationService.js +++ b/generator/generatedClasses/googleCloud/management/gcp-notificationService.js @@ -1,162 +1,162 @@ -const { PublisherClient } = require("@google-cloud/pubsub"); -const { SubscriberClient } = require("@google-cloud/pubsub"); +const { PublisherClient } = require('@google-cloud/pubsub'); +const { SubscriberClient } = require('@google-cloud/pubsub'); /*This is an auto generated class, please do not change.*/ /** * Class to create a NotificationService object * @category Google Cloud */ class GCP_NotificationService { - /** - * - * @param {object} config Configuration object - */ - constructor(config) { - this._publisherClient = new PublisherClient(config); - this._subscriberClient = new SubscriberClient(config); - } - /** - * Trigers the createTopic function of undefined - * @param {TypeReference} request - Data required for createTopic - * @param {TypeReference} [options] - Data required for createTopic - * @returns {Promise} - */ - createTopic(request, options = undefined) { - return new Promise((resolve, reject) => { - this._publisherClient - .createTopic(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteTopic function of undefined - * @param {TypeReference} request - Data required for deleteTopic - * @param {TypeReference} [options] - Data required for deleteTopic - * @returns {Promise} - */ - deleteTopic(request, options = undefined) { - return new Promise((resolve, reject) => { - this._publisherClient - .deleteTopic(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the getTopic function of undefined - * @param {TypeReference} request - Data required for getTopic - * @param {TypeReference} [options] - Data required for getTopic - * @returns {Promise} - */ - getTopicAttributes(request, options = undefined) { - return new Promise((resolve, reject) => { - this._publisherClient - .getTopic(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the listTopicSubscriptions function of undefined - * @param {TypeReference} request - Data required for listTopicSubscriptions - * @param {TypeReference} [options] - Data required for listTopicSubscriptions - * @returns {Promise} - */ - listSubscriptions(request, options = undefined) { - return new Promise((resolve, reject) => { - this._publisherClient - .listTopicSubscriptions(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the createSubscription function of undefined - * @param {TypeReference} request - Data required for createSubscription - * @param {TypeReference} [options] - Data required for createSubscription - * @returns {Promise} - */ - subscribe(request, options = undefined) { - return new Promise((resolve, reject) => { - this._subscriberClient - .createSubscription(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the publish function of undefined - * @param {TypeReference} request - Data required for publish - * @param {TypeReference} [options] - Data required for publish - * @returns {Promise} - */ - publish(request, options = undefined) { - return new Promise((resolve, reject) => { - this._publisherClient - .publish(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the listTopics function of undefined - * @param {TypeReference} request - Data required for listTopics - * @param {TypeReference} [options] - Data required for listTopics - * @returns {Promise} - */ - listTopics(request, options = undefined) { - return new Promise((resolve, reject) => { - this._publisherClient - .listTopics(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the deleteSubscription function of undefined - * @param {TypeReference} request - Data required for deleteSubscription - * @param {TypeReference} [options] - Data required for deleteSubscription - * @returns {Promise} - */ - unsubscribe(request, options = undefined) { - return new Promise((resolve, reject) => { - this._subscriberClient - .deleteSubscription(request, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } + /** + * + * @param {object} config Configuration object + */ + constructor(config) { + this._publisherClient = new PublisherClient(config); + this._subscriberClient = new SubscriberClient(config); + } + /** + * Trigers the createTopic function of undefined + * @param {TypeReference} request - Data required for createTopic + * @param {TypeReference} [options] - Data required for createTopic + * @returns {Promise} + */ + createTopic(request, options = undefined) { + return new Promise((resolve, reject) => { + this._publisherClient + .createTopic(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteTopic function of undefined + * @param {TypeReference} request - Data required for deleteTopic + * @param {TypeReference} [options] - Data required for deleteTopic + * @returns {Promise} + */ + deleteTopic(request, options = undefined) { + return new Promise((resolve, reject) => { + this._publisherClient + .deleteTopic(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the getTopic function of undefined + * @param {TypeReference} request - Data required for getTopic + * @param {TypeReference} [options] - Data required for getTopic + * @returns {Promise} + */ + getTopicAttributes(request, options = undefined) { + return new Promise((resolve, reject) => { + this._publisherClient + .getTopic(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the listTopicSubscriptions function of undefined + * @param {TypeReference} request - Data required for listTopicSubscriptions + * @param {TypeReference} [options] - Data required for listTopicSubscriptions + * @returns {Promise} + */ + listSubscriptions(request, options = undefined) { + return new Promise((resolve, reject) => { + this._publisherClient + .listTopicSubscriptions(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the createSubscription function of undefined + * @param {TypeReference} request - Data required for createSubscription + * @param {TypeReference} [options] - Data required for createSubscription + * @returns {Promise} + */ + subscribe(request, options = undefined) { + return new Promise((resolve, reject) => { + this._subscriberClient + .createSubscription(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the publish function of undefined + * @param {TypeReference} request - Data required for publish + * @param {TypeReference} [options] - Data required for publish + * @returns {Promise} + */ + publish(request, options = undefined) { + return new Promise((resolve, reject) => { + this._publisherClient + .publish(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the listTopics function of undefined + * @param {TypeReference} request - Data required for listTopics + * @param {TypeReference} [options] - Data required for listTopics + * @returns {Promise} + */ + listTopics(request, options = undefined) { + return new Promise((resolve, reject) => { + this._publisherClient + .listTopics(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the deleteSubscription function of undefined + * @param {TypeReference} request - Data required for deleteSubscription + * @param {TypeReference} [options] - Data required for deleteSubscription + * @returns {Promise} + */ + unsubscribe(request, options = undefined) { + return new Promise((resolve, reject) => { + this._subscriberClient + .deleteSubscription(request, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } } module.exports = GCP_NotificationService; diff --git a/generator/generatedClasses/googleCloud/network/gcp-DNS.js b/generator/generatedClasses/googleCloud/network/gcp-DNS.js index acb9acd3..eadb0c8a 100644 --- a/generator/generatedClasses/googleCloud/network/gcp-DNS.js +++ b/generator/generatedClasses/googleCloud/network/gcp-DNS.js @@ -1,104 +1,101 @@ -const { DNS } = require("@google-cloud/dns"); +const { DNS } = require('@google-cloud/dns'); /*This is an auto generated class, please do not change.*/ /** * Class to create a dns object * @category Google Cloud */ class GCP_dns { - /** - * - * @param {object} config Configuration object - */ - constructor(config) { - this._dns = new DNS(config); - } - /** - * Trigers the getZones function of dns - * @param {TypeReference} [query] - Optional parameter - * @returns {Promise} - */ - listZones(query = undefined) { - return new Promise((resolve, reject) => { - this._dns - .getZones(query) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the create function of dns - * @param {string} [identifier] - Optional parameter - * @param {DNS} dns - Mandatory parameter - * @param {TypeReference} config - Mandatory parameter - * @returns {Promise} - */ - createZone(dns, config, identifier = undefined) { - return new Promise((resolve, reject) => { - dns - .zone(identifier) - .create(config) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the createChange function of dns - * @param {string} [identifier] - Optional parameter - * @param {DNS} dns - Mandatory parameter - * @param {TypeReference} config - Mandatory parameter - * @returns {Promise} - */ - changeRecordSets(dns, config, identifier = undefined) { - return new Promise((resolve, reject) => { - dns - .zone(identifier) - .createChange(config) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the delete function of dns - * @param {string} [identifier] - Optional parameter - * @param {DNS} dns - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - deleteZone(dns, options = undefined, identifier = undefined) { - return new Promise((resolve, reject) => { - dns - .zone(identifier) - .delete(options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the record function of dns - * @param {string} [identifier] - Optional parameter - * @param {DNS} dns - Mandatory parameter - * @param {StringKeyword} type - Mandatory parameter - * @param {TypeReference} metadata - Mandatory parameter - * @returns {Promise} - */ - record(dns, type, metadata) { - return this.dns.record(type, metadata); - } + /** + * + * @param {object} config Configuration object + */ + constructor(config) { + this._dns = new DNS(config); + } + /** + * Trigers the getZones function of dns + * @param {TypeReference} [query] - Optional parameter + * @returns {Promise} + */ + listZones(query = undefined) { + return new Promise((resolve, reject) => { + this._dns + .getZones(query) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the create function of dns + * @param {string} [identifier] - Optional parameter + * @param {DNS} dns - Mandatory parameter + * @param {TypeReference} config - Mandatory parameter + * @returns {Promise} + */ + createZone(dns, config, identifier = undefined) { + return new Promise((resolve, reject) => { + dns.zone(identifier) + .create(config) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the createChange function of dns + * @param {string} [identifier] - Optional parameter + * @param {DNS} dns - Mandatory parameter + * @param {TypeReference} config - Mandatory parameter + * @returns {Promise} + */ + changeRecordSets(dns, config, identifier = undefined) { + return new Promise((resolve, reject) => { + dns.zone(identifier) + .createChange(config) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the delete function of dns + * @param {string} [identifier] - Optional parameter + * @param {DNS} dns - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + deleteZone(dns, options = undefined, identifier = undefined) { + return new Promise((resolve, reject) => { + dns.zone(identifier) + .delete(options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the record function of dns + * @param {string} [identifier] - Optional parameter + * @param {DNS} dns - Mandatory parameter + * @param {StringKeyword} type - Mandatory parameter + * @param {TypeReference} metadata - Mandatory parameter + * @returns {Promise} + */ + record(dns, type, metadata) { + return this.dns.record(type, metadata); + } } module.exports = GCP_dns; diff --git a/generator/generatedClasses/googleCloud/storage/gcp-archivalStorage.js b/generator/generatedClasses/googleCloud/storage/gcp-archivalStorage.js index a51af327..75ab8af4 100644 --- a/generator/generatedClasses/googleCloud/storage/gcp-archivalStorage.js +++ b/generator/generatedClasses/googleCloud/storage/gcp-archivalStorage.js @@ -1,111 +1,111 @@ -const { Storage } = require("@google-cloud/storage"); +const { Storage } = require('@google-cloud/storage'); /*This is an auto generated class, please do not change.*/ /** * Class to create a storage object * @category Google Cloud */ class GCP_storage { - /** - * - * @param {object} config Configuration object - */ - constructor(config) { - this._storage = new Storage(config); - } - /** - * Trigers the deleteFiles function of storage - * @param {string} [identifier] - Optional parameter - * @param {Storage} storage - Mandatory parameter - * @param {TypeReference} [query] - Optional parameter - * @returns {Promise} - */ - deleteFiles(storage, query = undefined, identifier = undefined) { - return new Promise((resolve, reject) => { - storage - .bucket(identifier) - .deleteFiles(query) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the upload function of storage - * @param {string} [identifier] - Optional parameter - * @param {Storage} storage - Mandatory parameter - * @param {StringKeyword} pathString - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - upload(storage, pathString, options = undefined, identifier = undefined) { - return new Promise((resolve, reject) => { - storage - .bucket(identifier) - .upload(pathString, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the makePublic function of storage - * @param {string} [identifier] - Optional parameter - * @param {Bucket} bucket - Mandatory parameter - * @returns {Promise} - */ - makePublic(bucket, identifier = undefined) { - return new Promise((resolve, reject) => { - bucket - .file(identifier) - .makePublic() - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the createBucket function of storage - * @param {StringKeyword} name - Mandatory parameter - * @param {TypeReference} [metadata] - Optional parameter - * @returns {Promise} - */ - create(name, metadata = undefined) { - return new Promise((resolve, reject) => { - this._storage - .createBucket(name, metadata) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the getBuckets function of storage - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - list(options = undefined) { - return new Promise((resolve, reject) => { - this._storage - .getBuckets(options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } + /** + * + * @param {object} config Configuration object + */ + constructor(config) { + this._storage = new Storage(config); + } + /** + * Trigers the deleteFiles function of storage + * @param {string} [identifier] - Optional parameter + * @param {Storage} storage - Mandatory parameter + * @param {TypeReference} [query] - Optional parameter + * @returns {Promise} + */ + deleteFiles(storage, query = undefined, identifier = undefined) { + return new Promise((resolve, reject) => { + storage + .bucket(identifier) + .deleteFiles(query) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the upload function of storage + * @param {string} [identifier] - Optional parameter + * @param {Storage} storage - Mandatory parameter + * @param {StringKeyword} pathString - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + upload(storage, pathString, options = undefined, identifier = undefined) { + return new Promise((resolve, reject) => { + storage + .bucket(identifier) + .upload(pathString, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the makePublic function of storage + * @param {string} [identifier] - Optional parameter + * @param {Bucket} bucket - Mandatory parameter + * @returns {Promise} + */ + makePublic(bucket, identifier = undefined) { + return new Promise((resolve, reject) => { + bucket + .file(identifier) + .makePublic() + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the createBucket function of storage + * @param {StringKeyword} name - Mandatory parameter + * @param {TypeReference} [metadata] - Optional parameter + * @returns {Promise} + */ + create(name, metadata = undefined) { + return new Promise((resolve, reject) => { + this._storage + .createBucket(name, metadata) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the getBuckets function of storage + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + list(options = undefined) { + return new Promise((resolve, reject) => { + this._storage + .getBuckets(options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } } module.exports = GCP_storage; diff --git a/generator/generatedClasses/googleCloud/storage/gcp-storageBucket.js b/generator/generatedClasses/googleCloud/storage/gcp-storageBucket.js index a51af327..75ab8af4 100644 --- a/generator/generatedClasses/googleCloud/storage/gcp-storageBucket.js +++ b/generator/generatedClasses/googleCloud/storage/gcp-storageBucket.js @@ -1,111 +1,111 @@ -const { Storage } = require("@google-cloud/storage"); +const { Storage } = require('@google-cloud/storage'); /*This is an auto generated class, please do not change.*/ /** * Class to create a storage object * @category Google Cloud */ class GCP_storage { - /** - * - * @param {object} config Configuration object - */ - constructor(config) { - this._storage = new Storage(config); - } - /** - * Trigers the deleteFiles function of storage - * @param {string} [identifier] - Optional parameter - * @param {Storage} storage - Mandatory parameter - * @param {TypeReference} [query] - Optional parameter - * @returns {Promise} - */ - deleteFiles(storage, query = undefined, identifier = undefined) { - return new Promise((resolve, reject) => { - storage - .bucket(identifier) - .deleteFiles(query) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the upload function of storage - * @param {string} [identifier] - Optional parameter - * @param {Storage} storage - Mandatory parameter - * @param {StringKeyword} pathString - Mandatory parameter - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - upload(storage, pathString, options = undefined, identifier = undefined) { - return new Promise((resolve, reject) => { - storage - .bucket(identifier) - .upload(pathString, options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the makePublic function of storage - * @param {string} [identifier] - Optional parameter - * @param {Bucket} bucket - Mandatory parameter - * @returns {Promise} - */ - makePublic(bucket, identifier = undefined) { - return new Promise((resolve, reject) => { - bucket - .file(identifier) - .makePublic() - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the createBucket function of storage - * @param {StringKeyword} name - Mandatory parameter - * @param {TypeReference} [metadata] - Optional parameter - * @returns {Promise} - */ - create(name, metadata = undefined) { - return new Promise((resolve, reject) => { - this._storage - .createBucket(name, metadata) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } - /** - * Trigers the getBuckets function of storage - * @param {TypeReference} [options] - Optional parameter - * @returns {Promise} - */ - list(options = undefined) { - return new Promise((resolve, reject) => { - this._storage - .getBuckets(options) - .then(result => { - resolve(result); - }) - .catch(err => { - reject(err); - }); - }); - } + /** + * + * @param {object} config Configuration object + */ + constructor(config) { + this._storage = new Storage(config); + } + /** + * Trigers the deleteFiles function of storage + * @param {string} [identifier] - Optional parameter + * @param {Storage} storage - Mandatory parameter + * @param {TypeReference} [query] - Optional parameter + * @returns {Promise} + */ + deleteFiles(storage, query = undefined, identifier = undefined) { + return new Promise((resolve, reject) => { + storage + .bucket(identifier) + .deleteFiles(query) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the upload function of storage + * @param {string} [identifier] - Optional parameter + * @param {Storage} storage - Mandatory parameter + * @param {StringKeyword} pathString - Mandatory parameter + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + upload(storage, pathString, options = undefined, identifier = undefined) { + return new Promise((resolve, reject) => { + storage + .bucket(identifier) + .upload(pathString, options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the makePublic function of storage + * @param {string} [identifier] - Optional parameter + * @param {Bucket} bucket - Mandatory parameter + * @returns {Promise} + */ + makePublic(bucket, identifier = undefined) { + return new Promise((resolve, reject) => { + bucket + .file(identifier) + .makePublic() + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the createBucket function of storage + * @param {StringKeyword} name - Mandatory parameter + * @param {TypeReference} [metadata] - Optional parameter + * @returns {Promise} + */ + create(name, metadata = undefined) { + return new Promise((resolve, reject) => { + this._storage + .createBucket(name, metadata) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } + /** + * Trigers the getBuckets function of storage + * @param {TypeReference} [options] - Optional parameter + * @returns {Promise} + */ + list(options = undefined) { + return new Promise((resolve, reject) => { + this._storage + .getBuckets(options) + .then(result => { + resolve(result); + }) + .catch(err => { + reject(err); + }); + }); + } } module.exports = GCP_storage; diff --git a/generator/generators/oracle/generator.js b/generator/generators/oracle/generator.js new file mode 100644 index 00000000..b33d9440 --- /dev/null +++ b/generator/generators/oracle/generator.js @@ -0,0 +1,230 @@ +'use strict'; +var __awaiter = + (this && this.__awaiter) || + function(thisArg, _arguments, P, generator) { + function adopt(value) { + return value instanceof P + ? value + : new P(function(resolve) { + resolve(value); + }); + } + return new (P || (P = Promise))(function(resolve, reject) { + function fulfilled(value) { + try { + step(generator.next(value)); + } catch (e) { + reject(e); + } + } + function rejected(value) { + try { + step(generator['throw'](value)); + } catch (e) { + reject(e); + } + } + function step(result) { + result.done + ? resolve(result.value) + : adopt(result.value).then(fulfilled, rejected); + } + step( + (generator = generator.apply(thisArg, _arguments || [])).next() + ); + }); + }; +var __generator = + (this && this.__generator) || + function(thisArg, body) { + var _ = { + label: 0, + sent: function() { + if (t[0] & 1) throw t[1]; + return t[1]; + }, + trys: [], + ops: [], + }, + f, + y, + t, + g; + return ( + (g = { next: verb(0), throw: verb(1), return: verb(2) }), + typeof Symbol === 'function' && + (g[Symbol.iterator] = function() { + return this; + }), + g + ); + function verb(n) { + return function(v) { + return step([n, v]); + }; + } + function step(op) { + if (f) throw new TypeError('Generator is already executing.'); + while (_) + try { + if ( + ((f = 1), + y && + (t = + op[0] & 2 + ? y['return'] + : op[0] + ? y['throw'] || + ((t = y['return']) && t.call(y), 0) + : y.next) && + !(t = t.call(y, op[1])).done) + ) + return t; + if (((y = 0), t)) op = [op[0] & 2, t.value]; + switch (op[0]) { + case 0: + case 1: + t = op; + break; + case 4: + _.label++; + return { value: op[1], done: false }; + case 5: + _.label++; + y = op[1]; + op = [0]; + continue; + case 7: + op = _.ops.pop(); + _.trys.pop(); + continue; + default: + if ( + !((t = _.trys), + (t = t.length > 0 && t[t.length - 1])) && + (op[0] === 6 || op[0] === 2) + ) { + _ = 0; + continue; + } + if ( + op[0] === 3 && + (!t || (op[1] > t[0] && op[1] < t[3])) + ) { + _.label = op[1]; + break; + } + if (op[0] === 6 && _.label < t[1]) { + _.label = t[1]; + t = op; + break; + } + if (t && _.label < t[2]) { + _.label = t[2]; + _.ops.push(op); + break; + } + if (t[2]) _.ops.pop(); + _.trys.pop(); + continue; + } + op = body.call(thisArg, _); + } catch (e) { + op = [6, e]; + y = 0; + } finally { + f = t = 0; + } + if (op[0] & 5) throw op[1]; + return { value: op[0] ? op[1] : void 0, done: true }; + } + }; +exports.__esModule = true; +exports.generateOracleClass = exports.extractSDKData = void 0; +// import { getAST } from '../../parsers/oracle/parser'; +var typescript_1 = require('typescript'); +var parser_1 = require('../../parsers/oracle/parser'); +// interface ClassData { +// className: string; +// functions: FunctionData[]; +// serviceName: string; +// } +function extractSDKData(sdkClassAst, serviceClass) { + var methods = []; + var functions = []; + Object.keys(serviceClass).map(function(key, index) { + functions.push(serviceClass[key].split(' ')[1]); + }); + // console.log(functions); + // console.log(sdkClassAst); + // console.log(Array.from(sdkClassAst.members)[0]); + // Array.from(sdkClassAst.members).map(method=>{ + // // console.log(method.name.escapedText); + // }) + // console.log(Object.keys(sdkClassAst.members)); + // console.log(sdkClassAst.members['99']); + // Object.keys(sdkClassAst.members).map((key,index)=>{ + // console.log(key); + // // const member = sdkClassAst.members[key]; + // // console.log(member.name.text); + // }) + sdkClassAst.members.map(function(method) { + if (method.name && functions.includes(method.name.text)) { + var name_1; + Object.keys(serviceClass).map(function(key, index) { + if (serviceClass[key].split(' ')[1] === method.name.text) { + name_1 = key; + } + }); + var parameters_1 = []; + method.parameters.map(function(param) { + if (param.name.text !== 'callback') { + var parameter = { + name: param.name.text, + optional: param.questionToken ? true : false, + type: typescript_1.SyntaxKind[param.type.kind], + typeName: null, + }; + if ( + parameter.type === 'TypeReference' && + param.type.typeName + ) { + parameter.typeName = param.type.typeName.right.text; + } + parameters_1.push(parameter); + } + }); + methods.push({ + functionName: name_1.toString(), + SDKFunctionName: method.name.text.toString(), + params: parameters_1, + }); + } + }); + var classData = { + className: sdkClassAst.name.text, + functions: methods, + serviceName: null, + }; + console.log(classData); +} +exports.extractSDKData = extractSDKData; +function generateOracleClass(serviceClass, serviceName) { + var _this = this; + var sdkFile = serviceClass[Object.keys(serviceClass)[0]].split(' ')[0]; + console.log(sdkFile); + parser_1.getAST(sdkFile).then(function(result) { + return __awaiter(_this, void 0, void 0, function() { + var sdkClassAst; + return __generator(this, function(_a) { + sdkClassAst = result; + try { + // const classData: ClassData = extractSDKData(sdkClassAst,serviceClass) + extractSDKData(sdkClassAst, serviceClass); + } catch (error) {} + return [2 /*return*/]; + }); + }); + }); +} +exports.generateOracleClass = generateOracleClass; diff --git a/generator/generators/oracle/generator.ts b/generator/generators/oracle/generator.ts new file mode 100644 index 00000000..2c3e54f6 --- /dev/null +++ b/generator/generators/oracle/generator.ts @@ -0,0 +1,82 @@ +import { SyntaxKind } from 'typescript'; +// import { getAST } from '../../parsers/oracle/parser'; +// import { getAST } from '../../parsers/oracle/parser'; + +interface FunctionData { + functionName: string; + SDKFunctionName: string; + params: param[]; +} + +interface param { + name: string; + type: string; + typeName: string; +} +interface ClassData { + className: string; + functions: FunctionData[]; + serviceName: string; +} + +export function extractSDKData(sdkClassAst, serviceClass) { + let methods: FunctionData[] = []; + const functions = []; + Object.keys(serviceClass).map((key, index) => { + functions.push(serviceClass[key].split(' ')[1]); + }); + sdkClassAst.members.map(method => { + if (method.name && functions.includes(method.name.text)) { + let name; + Object.keys(serviceClass).map((key, index) => { + if (serviceClass[key].split(' ')[1] === method.name.text) { + name = key; + } + }); + const parameters = []; + method.parameters.map(param => { + if (param.name.text !== 'callback') { + const parameter = { + name: param.name.text, + optional: param.questionToken ? true : false, + type: SyntaxKind[param.type.kind], + typeName: null, + }; + + if ( + parameter.type === 'TypeReference' && + param.type.typeName + ) { + parameter.typeName = param.type.typeName.right.text; + } + parameters.push(parameter); + } + }); + + methods.push({ + functionName: name.toString(), + SDKFunctionName: method.name.text.toString(), + params: parameters, + }); + } + }); + const classData: ClassData = { + className: sdkClassAst.name.text, + functions: methods, + serviceName: null, + }; + console.log(classData); + return classData; +} + +export function generateOracleClass(serviceClass, serviceName) { + const sdkFile = serviceClass[Object.keys(serviceClass)[0]].split(' ')[0]; + console.log(sdkFile); + // getAST(sdkFile).then(async result => { + // const sdkClassAst = result; + // try { + // // const classData: ClassData = extractSDKData(sdkClassAst,serviceClass) + // extractSDKData(sdkClassAst, serviceClass); + // } catch (error) {} + // }); +} diff --git a/generator/main.js b/generator/main.js index ad7af81c..8d4cf2c2 100644 --- a/generator/main.js +++ b/generator/main.js @@ -2,16 +2,15 @@ exports.__esModule = true; var fs = require('fs'); var yaml = require('js-yaml'); +var generator_5 = require('./generators/oracle/generator'); var generator_1 = require('./generators/aws/generator'); var generator_2 = require('./generators/azure/generator'); var generator_3 = require('./generators/do/generator'); var generator_4 = require('./generators/googleCloud/generator'); -var generator_5 = require('./generators/oracle/generator'); try { var services_1 = yaml.safeLoad(fs.readFileSync('node-cloud.yml', 'utf8')); Object.keys(services_1).map(function(service, index) { Object.keys(services_1[service]).map(function(provider, index1) { - console.log(provider); if (provider === 'Azure') { generator_2.generateAzureClass( services_1[service][provider], @@ -33,7 +32,6 @@ try { service ); } else if (provider == 'Oracle') { - console.log('yo'); generator_5.generateOracleClass( services_1[service][provider], service diff --git a/generator/main.ts b/generator/main.ts index e33d51cf..4e8cbfd4 100644 --- a/generator/main.ts +++ b/generator/main.ts @@ -5,6 +5,7 @@ import { generateAWSClass } from './generators/aws/generator'; import { generateAzureClass } from './generators/azure/generator'; import { generateDOClass } from './generators/do/generator'; import { generateGCPClass } from './generators/googleCloud/generator'; +import { generateOracleClass } from './generators/oracle/generator'; try { const services = yaml.safeLoad(fs.readFileSync('node-cloud.yml', 'utf8')); @@ -18,7 +19,9 @@ try { generateGCPClass(services[service][provider], service); } else if (provider == "DO") { generateDOClass(services[service][provider], service); - } + } else if (provider == "Oracle") { + generateOracleClass(services[service][provider], service); + } }); }); } catch (error) { diff --git a/generator/node-cloud.yml b/generator/node-cloud.yml index 619ca383..e43990c9 100644 --- a/generator/node-cloud.yml +++ b/generator/node-cloud.yml @@ -277,7 +277,7 @@ DNS: createZone: dns createZone deleteZone: dns deleteZone listZones: dns listZones - changeRecordSets: dns updateDomainRecords + changeRecordSets: dns updateDomainRecords LoadBalancer: AWS: @@ -303,7 +303,6 @@ LoadBalancer: list: loadbalancer listLoadBalancers update: loadbalancer updateLoadBalancer get: loadbalancer getLoadBalancer - IAM: AWS: createGroup: iam.d.ts createGroup @@ -401,7 +400,6 @@ NotificationService: subscribe: ons createSubscription listSubscriptions: ons listSubscriptions unsubscribe: ons deleteSubscription - BlockStorage: AWS: create: ec2.d.ts createVolume @@ -418,4 +416,4 @@ BlockStorage: create: volumes.d.ts create delete: volumes.d.ts deleteById list: volumes.d.ts getAll - describe: volumes.d.ts getById \ No newline at end of file + describe: volumes.d.ts getById