/**
* BeNomad BeMap JavaScript API - ChargingPoint (v1.5)
*
* One charging point (the physical outlet) inside a station. Mirrors the
* server DTO in
* `bemap_idea/.../service/v1_0_0/model/chargingStation/ChargingPoint.java`.
*
* Customer apps typically read `power`, `voltage`, `currentType` and the
* `connectorTypes[]` list to render a one-line summary of what the user
* can plug in.
*
* @public
* @constructor
* @param {Object} options Parsed JSON entry from the server response.
*/
bemap.ChargingPoint = function(options) {
var opts = options || {};
this.id = opts.id || null;
this.operatorId = opts.operatorId || null;
this.availabilityStatus = opts.availabilityStatus || null;
this.type = (typeof opts.type === 'number') ? opts.type : null;
this.connectorTypes = Array.isArray(opts.connectorTypes) ? opts.connectorTypes.slice() : null;
this.currentType = opts.currentType || null;
this.voltage = (typeof opts.voltage === 'number') ? opts.voltage : null;
this.ampere = (typeof opts.ampere === 'number') ? opts.ampere : null;
this.power = (typeof opts.power === 'number') ? opts.power : null;
this.maxPower = (typeof opts.maxPower === 'number') ? opts.maxPower : null;
this.reservable = (typeof opts.reservable === 'boolean') ? opts.reservable : null;
this.tags = Array.isArray(opts.tags) ? opts.tags.slice() : null;
};
bemap.ChargingPoint.prototype.getId = function() { return this.id; };
bemap.ChargingPoint.prototype.getOperatorId = function() { return this.operatorId; };
bemap.ChargingPoint.prototype.getAvailabilityStatus = function() { return this.availabilityStatus; };
bemap.ChargingPoint.prototype.getType = function() { return this.type; };
bemap.ChargingPoint.prototype.getConnectorTypes = function() { return this.connectorTypes; };
bemap.ChargingPoint.prototype.getCurrentType = function() { return this.currentType; };
bemap.ChargingPoint.prototype.getVoltage = function() { return this.voltage; };
bemap.ChargingPoint.prototype.getAmpere = function() { return this.ampere; };
bemap.ChargingPoint.prototype.getPower = function() { return this.power; };
bemap.ChargingPoint.prototype.getMaxPower = function() { return this.maxPower; };
bemap.ChargingPoint.prototype.isReservable = function() { return this.reservable; };
bemap.ChargingPoint.prototype.getTags = function() { return this.tags; };