106 lines
3.3 KiB
JavaScript
106 lines
3.3 KiB
JavaScript
|
/**
|
||
|
* Garage Administration API v0+garage-v0.8.0
|
||
|
* Administrate your Garage cluster programatically, including status, layout, keys, buckets, and maintainance tasks. *Disclaimer: The API is not stable yet, hence its v0 tag. The API can change at any time, and changes can include breaking backward compatibility. Read the changelog and upgrade your scripts before upgrading. Additionnaly, this specification is very early stage and can contain bugs, especially on error return codes/types that are not tested yet. Do not expect a well finished and polished product!*
|
||
|
*
|
||
|
* The version of the OpenAPI document: v0.8.0
|
||
|
*
|
||
|
*
|
||
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
||
|
* https://openapi-generator.tech
|
||
|
* Do not edit the class manually.
|
||
|
*
|
||
|
*/
|
||
|
|
||
|
import ApiClient from '../ApiClient';
|
||
|
import KeyInfoBucketsInner from './KeyInfoBucketsInner';
|
||
|
import KeyInfoPermissions from './KeyInfoPermissions';
|
||
|
|
||
|
/**
|
||
|
* The KeyInfo model module.
|
||
|
* @module model/KeyInfo
|
||
|
* @version v0.8.0
|
||
|
*/
|
||
|
class KeyInfo {
|
||
|
/**
|
||
|
* Constructs a new <code>KeyInfo</code>.
|
||
|
* @alias module:model/KeyInfo
|
||
|
*/
|
||
|
constructor() {
|
||
|
|
||
|
KeyInfo.initialize(this);
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Initializes the fields of this object.
|
||
|
* This method is used by the constructors of any subclasses, in order to implement multiple inheritance (mix-ins).
|
||
|
* Only for internal use.
|
||
|
*/
|
||
|
static initialize(obj) {
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* Constructs a <code>KeyInfo</code> from a plain JavaScript object, optionally creating a new instance.
|
||
|
* Copies all relevant properties from <code>data</code> to <code>obj</code> if supplied or a new instance if not.
|
||
|
* @param {Object} data The plain JavaScript object bearing properties of interest.
|
||
|
* @param {module:model/KeyInfo} obj Optional instance to populate.
|
||
|
* @return {module:model/KeyInfo} The populated <code>KeyInfo</code> instance.
|
||
|
*/
|
||
|
static constructFromObject(data, obj) {
|
||
|
if (data) {
|
||
|
obj = obj || new KeyInfo();
|
||
|
|
||
|
if (data.hasOwnProperty('name')) {
|
||
|
obj['name'] = ApiClient.convertToType(data['name'], 'String');
|
||
|
}
|
||
|
if (data.hasOwnProperty('accessKeyId')) {
|
||
|
obj['accessKeyId'] = ApiClient.convertToType(data['accessKeyId'], 'String');
|
||
|
}
|
||
|
if (data.hasOwnProperty('secretAccessKey')) {
|
||
|
obj['secretAccessKey'] = ApiClient.convertToType(data['secretAccessKey'], 'String');
|
||
|
}
|
||
|
if (data.hasOwnProperty('permissions')) {
|
||
|
obj['permissions'] = KeyInfoPermissions.constructFromObject(data['permissions']);
|
||
|
}
|
||
|
if (data.hasOwnProperty('buckets')) {
|
||
|
obj['buckets'] = ApiClient.convertToType(data['buckets'], [KeyInfoBucketsInner]);
|
||
|
}
|
||
|
}
|
||
|
return obj;
|
||
|
}
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
/**
|
||
|
* @member {String} name
|
||
|
*/
|
||
|
KeyInfo.prototype['name'] = undefined;
|
||
|
|
||
|
/**
|
||
|
* @member {String} accessKeyId
|
||
|
*/
|
||
|
KeyInfo.prototype['accessKeyId'] = undefined;
|
||
|
|
||
|
/**
|
||
|
* @member {String} secretAccessKey
|
||
|
*/
|
||
|
KeyInfo.prototype['secretAccessKey'] = undefined;
|
||
|
|
||
|
/**
|
||
|
* @member {module:model/KeyInfoPermissions} permissions
|
||
|
*/
|
||
|
KeyInfo.prototype['permissions'] = undefined;
|
||
|
|
||
|
/**
|
||
|
* @member {Array.<module:model/KeyInfoBucketsInner>} buckets
|
||
|
*/
|
||
|
KeyInfo.prototype['buckets'] = undefined;
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
export default KeyInfo;
|
||
|
|