garage-admin-sdk-js/src/model/NodeNetworkInfo.js

112 lines
3.6 KiB
JavaScript
Raw Normal View History

2022-11-13 11:28:54 +00:00
/**
2023-11-22 17:30:42 +00:00
* Garage Administration API v0+garage-v0.9.0
2022-11-13 11:28:54 +00:00
* 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!*
*
2023-11-22 17:30:42 +00:00
* The version of the OpenAPI document: v0.9.0
2022-11-13 11:28:54 +00:00
*
*
* 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';
/**
* The NodeNetworkInfo model module.
* @module model/NodeNetworkInfo
2023-11-22 17:30:42 +00:00
* @version v0.9.0
2022-11-13 11:28:54 +00:00
*/
class NodeNetworkInfo {
/**
* Constructs a new <code>NodeNetworkInfo</code>.
* @alias module:model/NodeNetworkInfo
* @param addr {String}
* @param isUp {Boolean}
* @param lastSeenSecsAgo {Number}
* @param hostname {String}
*/
constructor(addr, isUp, lastSeenSecsAgo, hostname) {
NodeNetworkInfo.initialize(this, addr, isUp, lastSeenSecsAgo, hostname);
}
/**
* 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, addr, isUp, lastSeenSecsAgo, hostname) {
obj['addr'] = addr;
2023-11-22 17:30:42 +00:00
obj['isUp'] = isUp;
obj['lastSeenSecsAgo'] = lastSeenSecsAgo;
2022-11-13 11:28:54 +00:00
obj['hostname'] = hostname;
}
/**
* Constructs a <code>NodeNetworkInfo</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/NodeNetworkInfo} obj Optional instance to populate.
* @return {module:model/NodeNetworkInfo} The populated <code>NodeNetworkInfo</code> instance.
*/
static constructFromObject(data, obj) {
if (data) {
obj = obj || new NodeNetworkInfo();
2023-11-22 17:30:42 +00:00
if (data.hasOwnProperty('id')) {
obj['id'] = ApiClient.convertToType(data['id'], 'String');
}
2022-11-13 11:28:54 +00:00
if (data.hasOwnProperty('addr')) {
obj['addr'] = ApiClient.convertToType(data['addr'], 'String');
}
2023-11-22 17:30:42 +00:00
if (data.hasOwnProperty('isUp')) {
obj['isUp'] = ApiClient.convertToType(data['isUp'], 'Boolean');
2022-11-13 11:28:54 +00:00
}
2023-11-22 17:30:42 +00:00
if (data.hasOwnProperty('lastSeenSecsAgo')) {
obj['lastSeenSecsAgo'] = ApiClient.convertToType(data['lastSeenSecsAgo'], 'Number');
2022-11-13 11:28:54 +00:00
}
if (data.hasOwnProperty('hostname')) {
obj['hostname'] = ApiClient.convertToType(data['hostname'], 'String');
}
}
return obj;
}
}
2023-11-22 17:30:42 +00:00
/**
* @member {String} id
*/
NodeNetworkInfo.prototype['id'] = undefined;
2022-11-13 11:28:54 +00:00
/**
* @member {String} addr
*/
NodeNetworkInfo.prototype['addr'] = undefined;
/**
2023-11-22 17:30:42 +00:00
* @member {Boolean} isUp
2022-11-13 11:28:54 +00:00
*/
2023-11-22 17:30:42 +00:00
NodeNetworkInfo.prototype['isUp'] = undefined;
2022-11-13 11:28:54 +00:00
/**
2023-11-22 17:30:42 +00:00
* @member {Number} lastSeenSecsAgo
2022-11-13 11:28:54 +00:00
*/
2023-11-22 17:30:42 +00:00
NodeNetworkInfo.prototype['lastSeenSecsAgo'] = undefined;
2022-11-13 11:28:54 +00:00
/**
* @member {String} hostname
*/
NodeNetworkInfo.prototype['hostname'] = undefined;
export default NodeNetworkInfo;