-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Partik SIngh <[email protected]>
- Loading branch information
Showing
48 changed files
with
4,413 additions
and
4,042 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
130 changes: 67 additions & 63 deletions
130
generator/generatedClasses/Linode/compute/linode-computeInstance.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,68 +1,72 @@ | ||
/*This is an auto generated class, please do not change.*/ | ||
/** | ||
* Class to create a ComputeInstanceLinodeClass object | ||
* @category Linode | ||
*/ | ||
* Class to create a ComputeInstanceLinodeClass object | ||
* @category Linode | ||
*/ | ||
class Linode_ComputeInstance { | ||
/** | ||
* | ||
* @param {module} linodeSdk Linode SDK | ||
* @param {string} linodeToken Linode Token | ||
*/ | ||
constructor(linodeSdk, linodeToken) { | ||
this._linode = linodeSdk; | ||
this._linodeToken = linodeToken; | ||
this._linode.setToken(this._linodeToken); | ||
} | ||
/** | ||
* Trigers the getLinodes function of ComputeInstanceLinodeClass | ||
* @param {Params} params - Data required for getLinodes | ||
* @param {Filter} filter - Data required for getLinodes | ||
* @returns {Promise<getLinodesResponse>} | ||
*/ | ||
list(params = undefined, filter = undefined) { | ||
return new Promise((resolve, reject) => { | ||
this._linode.getLinodes(params, filter) | ||
.then(data => resolve(data)) | ||
.catch(err => reject(err)); | ||
}); | ||
} | ||
/** | ||
* Trigers the createLinode function of ComputeInstanceLinodeClass | ||
* @param {CreateLinodeRequest} data - Data required for createLinode | ||
* @returns {Promise<createLinodeResponse>} | ||
*/ | ||
create(data) { | ||
return new Promise((resolve, reject) => { | ||
this._linode.createLinode(data) | ||
.then(data => resolve(data)) | ||
.catch(err => reject(err)); | ||
}); | ||
} | ||
/** | ||
* Trigers the updateLinode function of ComputeInstanceLinodeClass | ||
* @param {NumberKeyword} linodeId - Data required for updateLinode | ||
* @param {DeepPartial} values - Data required for updateLinode | ||
* @returns {Promise<updateLinodeResponse>} | ||
*/ | ||
update(linodeId, values) { | ||
return new Promise((resolve, reject) => { | ||
this._linode.updateLinode(linodeId, values) | ||
.then(data => resolve(data)) | ||
.catch(err => reject(err)); | ||
}); | ||
} | ||
/** | ||
* Trigers the deleteLinode function of ComputeInstanceLinodeClass | ||
* @param {NumberKeyword} linodeId - Data required for deleteLinode | ||
* @returns {Promise<deleteLinodeResponse>} | ||
*/ | ||
delete(linodeId) { | ||
return new Promise((resolve, reject) => { | ||
this._linode.deleteLinode(linodeId) | ||
.then(data => resolve(data)) | ||
.catch(err => reject(err)); | ||
}); | ||
} | ||
/** | ||
* | ||
* @param {module} linodeSdk Linode SDK | ||
* @param {string} linodeToken Linode Token | ||
*/ | ||
constructor(linodeSdk, linodeToken) { | ||
this._linode = linodeSdk; | ||
this._linodeToken = linodeToken; | ||
this._linode.setToken(this._linodeToken); | ||
} | ||
/** | ||
* Trigers the getLinodes function of ComputeInstanceLinodeClass | ||
* @param {Params} params - Data required for getLinodes | ||
* @param {Filter} filter - Data required for getLinodes | ||
* @returns {Promise<getLinodesResponse>} | ||
*/ | ||
list(params = undefined, filter = undefined) { | ||
return new Promise((resolve, reject) => { | ||
this._linode | ||
.getLinodes(params, filter) | ||
.then(data => resolve(data)) | ||
.catch(err => reject(err)); | ||
}); | ||
} | ||
/** | ||
* Trigers the createLinode function of ComputeInstanceLinodeClass | ||
* @param {CreateLinodeRequest} data - Data required for createLinode | ||
* @returns {Promise<createLinodeResponse>} | ||
*/ | ||
create(data) { | ||
return new Promise((resolve, reject) => { | ||
this._linode | ||
.createLinode(data) | ||
.then(data => resolve(data)) | ||
.catch(err => reject(err)); | ||
}); | ||
} | ||
/** | ||
* Trigers the updateLinode function of ComputeInstanceLinodeClass | ||
* @param {NumberKeyword} linodeId - Data required for updateLinode | ||
* @param {DeepPartial} values - Data required for updateLinode | ||
* @returns {Promise<updateLinodeResponse>} | ||
*/ | ||
update(linodeId, values) { | ||
return new Promise((resolve, reject) => { | ||
this._linode | ||
.updateLinode(linodeId, values) | ||
.then(data => resolve(data)) | ||
.catch(err => reject(err)); | ||
}); | ||
} | ||
/** | ||
* Trigers the deleteLinode function of ComputeInstanceLinodeClass | ||
* @param {NumberKeyword} linodeId - Data required for deleteLinode | ||
* @returns {Promise<deleteLinodeResponse>} | ||
*/ | ||
delete(linodeId) { | ||
return new Promise((resolve, reject) => { | ||
this._linode | ||
.deleteLinode(linodeId) | ||
.then(data => resolve(data)) | ||
.catch(err => reject(err)); | ||
}); | ||
} | ||
} | ||
module.exports = Linode_ComputeInstance; |
Oops, something went wrong.