72 lines
1.7 KiB
Go
72 lines
1.7 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package models
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/go-openapi/strfmt"
|
|
"github.com/go-openapi/swag"
|
|
)
|
|
|
|
// CommonBattery common battery
|
|
//
|
|
// swagger:model common.Battery
|
|
type CommonBattery struct {
|
|
|
|
// battery current
|
|
BatteryCurrent float64 `json:"battery_current,omitempty"`
|
|
|
|
// battery voltage
|
|
BatteryVoltage float64 `json:"battery_voltage,omitempty"`
|
|
|
|
// capacity loss bottom
|
|
CapacityLossBottom float64 `json:"capacity_loss_bottom,omitempty"`
|
|
|
|
// capacity loss top
|
|
CapacityLossTop float64 `json:"capacity_loss_top,omitempty"`
|
|
|
|
// percent
|
|
Percent int64 `json:"percent,omitempty"`
|
|
|
|
// state of charge
|
|
StateOfCharge float64 `json:"state_of_charge,omitempty"`
|
|
|
|
// state of health
|
|
StateOfHealth float64 `json:"state_of_health,omitempty"`
|
|
|
|
// total mileage odometer
|
|
TotalMileageOdometer int64 `json:"total_mileage_odometer,omitempty"`
|
|
}
|
|
|
|
// Validate validates this common battery
|
|
func (m *CommonBattery) Validate(formats strfmt.Registry) error {
|
|
return nil
|
|
}
|
|
|
|
// ContextValidate validates this common battery based on context it is used
|
|
func (m *CommonBattery) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
|
|
return nil
|
|
}
|
|
|
|
// MarshalBinary interface implementation
|
|
func (m *CommonBattery) MarshalBinary() ([]byte, error) {
|
|
if m == nil {
|
|
return nil, nil
|
|
}
|
|
return swag.WriteJSON(m)
|
|
}
|
|
|
|
// UnmarshalBinary interface implementation
|
|
func (m *CommonBattery) UnmarshalBinary(b []byte) error {
|
|
var res CommonBattery
|
|
if err := swag.ReadJSON(b, &res); err != nil {
|
|
return err
|
|
}
|
|
*m = res
|
|
return nil
|
|
}
|