Initial cloud-services repo - gateway service + pkg modules

This commit is contained in:
Chris Rai
2026-01-30 23:14:52 -05:00
commit fbb820d7b3
1037 changed files with 171318 additions and 0 deletions

View File

@@ -0,0 +1,53 @@
// 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"
)
// BackgroundCarTrack background car track
//
// swagger:model background.CarTrack
type BackgroundCarTrack struct {
// 0: unlock, 1: lock
Immobilize bool `json:"immobilize,omitempty"`
// times modified
TimesModified int64 `json:"times_modified,omitempty"`
}
// Validate validates this background car track
func (m *BackgroundCarTrack) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this background car track based on context it is used
func (m *BackgroundCarTrack) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *BackgroundCarTrack) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *BackgroundCarTrack) UnmarshalBinary(b []byte) error {
var res BackgroundCarTrack
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,133 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonAddCarRequest common add car request
//
// swagger:model common.AddCarRequest
type CommonAddCarRequest struct {
// canbus
Canbus *CommonCANBus `json:"canbus,omitempty"`
// idps enabled
IdpsEnabled bool `json:"idps_enabled,omitempty"`
// log level
LogLevel string `json:"log_level,omitempty"`
// vin
// Required: true
Vin *string `json:"vin"`
}
// Validate validates this common add car request
func (m *CommonAddCarRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCanbus(formats); err != nil {
res = append(res, err)
}
if err := m.validateVin(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonAddCarRequest) validateCanbus(formats strfmt.Registry) error {
if swag.IsZero(m.Canbus) { // not required
return nil
}
if m.Canbus != nil {
if err := m.Canbus.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("canbus")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("canbus")
}
return err
}
}
return nil
}
func (m *CommonAddCarRequest) validateVin(formats strfmt.Registry) error {
if err := validate.Required("vin", "body", m.Vin); err != nil {
return err
}
return nil
}
// ContextValidate validate this common add car request based on the context it is used
func (m *CommonAddCarRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateCanbus(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonAddCarRequest) contextValidateCanbus(ctx context.Context, formats strfmt.Registry) error {
if m.Canbus != nil {
if swag.IsZero(m.Canbus) { // not required
return nil
}
if err := m.Canbus.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("canbus")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("canbus")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonAddCarRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonAddCarRequest) UnmarshalBinary(b []byte) error {
var res CommonAddCarRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// CommonAmbientTemperature common ambient temperature
//
// swagger:model common.AmbientTemperature
type CommonAmbientTemperature struct {
// temperature
Temperature int64 `json:"temperature,omitempty"`
}
// Validate validates this common ambient temperature
func (m *CommonAmbientTemperature) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common ambient temperature based on context it is used
func (m *CommonAmbientTemperature) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonAmbientTemperature) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonAmbientTemperature) UnmarshalBinary(b []byte) error {
var res CommonAmbientTemperature
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,62 @@
// 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"
)
// CommonAPICall common API call
//
// swagger:model common.APICall
type CommonAPICall struct {
// Check allowed access types above.
AccessType string `json:"access_type,omitempty"`
// ClientID can be email or api_token.
ClientID string `json:"client_id,omitempty"`
// created at
CreatedAt string `json:"created_at,omitempty"`
// endpoint
Endpoint string `json:"endpoint,omitempty"`
// method
Method string `json:"method,omitempty"`
}
// Validate validates this common API call
func (m *CommonAPICall) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common API call based on context it is used
func (m *CommonAPICall) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonAPICall) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonAPICall) UnmarshalBinary(b []byte) error {
var res CommonAPICall
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,123 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonAPIToken common API token
//
// swagger:model common.APIToken
type CommonAPIToken struct {
// description
// Required: true
// Max Length: 1000
Description *string `json:"description"`
// expires at
ExpiresAt string `json:"expires_at,omitempty"`
// roles
// Required: true
// Max Length: 10000
Roles *string `json:"roles"`
// token
// Required: true
// Max Length: 1000
Token *string `json:"token"`
}
// Validate validates this common API token
func (m *CommonAPIToken) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateDescription(formats); err != nil {
res = append(res, err)
}
if err := m.validateRoles(formats); err != nil {
res = append(res, err)
}
if err := m.validateToken(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonAPIToken) validateDescription(formats strfmt.Registry) error {
if err := validate.Required("description", "body", m.Description); err != nil {
return err
}
if err := validate.MaxLength("description", "body", *m.Description, 1000); err != nil {
return err
}
return nil
}
func (m *CommonAPIToken) validateRoles(formats strfmt.Registry) error {
if err := validate.Required("roles", "body", m.Roles); err != nil {
return err
}
if err := validate.MaxLength("roles", "body", *m.Roles, 10000); err != nil {
return err
}
return nil
}
func (m *CommonAPIToken) validateToken(formats strfmt.Registry) error {
if err := validate.Required("token", "body", m.Token); err != nil {
return err
}
if err := validate.MaxLength("token", "body", *m.Token, 1000); err != nil {
return err
}
return nil
}
// ContextValidate validates this common API token based on context it is used
func (m *CommonAPIToken) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonAPIToken) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonAPIToken) UnmarshalBinary(b []byte) error {
var res CommonAPIToken
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,71 @@
// 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
}

View File

@@ -0,0 +1,105 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonBulkCarCommands common bulk car commands
//
// swagger:model common.BulkCarCommands
type CommonBulkCarCommands struct {
// command
// Required: true
// Max Length: 100
Command *string `json:"command"`
// data
Data string `json:"data,omitempty"`
// end
End string `json:"end,omitempty"`
// start
Start string `json:"start,omitempty"`
// timestamp
Timestamp string `json:"timestamp,omitempty"`
// vins
// Required: true
Vins []string `json:"vins"`
}
// Validate validates this common bulk car commands
func (m *CommonBulkCarCommands) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCommand(formats); err != nil {
res = append(res, err)
}
if err := m.validateVins(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonBulkCarCommands) validateCommand(formats strfmt.Registry) error {
if err := validate.Required("command", "body", m.Command); err != nil {
return err
}
if err := validate.MaxLength("command", "body", *m.Command, 100); err != nil {
return err
}
return nil
}
func (m *CommonBulkCarCommands) validateVins(formats strfmt.Registry) error {
if err := validate.Required("vins", "body", m.Vins); err != nil {
return err
}
return nil
}
// ContextValidate validates this common bulk car commands based on context it is used
func (m *CommonBulkCarCommands) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonBulkCarCommands) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonBulkCarCommands) UnmarshalBinary(b []byte) error {
var res CommonBulkCarCommands
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,181 @@
// 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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonCANBus common c a n bus
//
// swagger:model common.CANBus
type CommonCANBus struct {
// data logger enabled
DataLoggerEnabled bool `json:"data_logger_enabled,omitempty"`
// dtc enabled
DtcEnabled bool `json:"dtc_enabled,omitempty"`
// enabled
Enabled bool `json:"enabled,omitempty"`
// filters
Filters []*CommonCANFilter `json:"filters"`
// max disk buffer size
// Maximum: 1.7179869184e+10
// Minimum: 0
MaxDiskBufferSize *int64 `json:"max_disk_buffer_size,omitempty"`
// max mem buffer size
// Maximum: 1.073741824e+09
// Minimum: 0
MaxMemBufferSize *int64 `json:"max_mem_buffer_size,omitempty"`
}
// Validate validates this common c a n bus
func (m *CommonCANBus) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateFilters(formats); err != nil {
res = append(res, err)
}
if err := m.validateMaxDiskBufferSize(formats); err != nil {
res = append(res, err)
}
if err := m.validateMaxMemBufferSize(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonCANBus) validateFilters(formats strfmt.Registry) error {
if swag.IsZero(m.Filters) { // not required
return nil
}
for i := 0; i < len(m.Filters); i++ {
if swag.IsZero(m.Filters[i]) { // not required
continue
}
if m.Filters[i] != nil {
if err := m.Filters[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("filters" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("filters" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CommonCANBus) validateMaxDiskBufferSize(formats strfmt.Registry) error {
if swag.IsZero(m.MaxDiskBufferSize) { // not required
return nil
}
if err := validate.MinimumInt("max_disk_buffer_size", "body", *m.MaxDiskBufferSize, 0, false); err != nil {
return err
}
if err := validate.MaximumInt("max_disk_buffer_size", "body", *m.MaxDiskBufferSize, 1.7179869184e+10, false); err != nil {
return err
}
return nil
}
func (m *CommonCANBus) validateMaxMemBufferSize(formats strfmt.Registry) error {
if swag.IsZero(m.MaxMemBufferSize) { // not required
return nil
}
if err := validate.MinimumInt("max_mem_buffer_size", "body", *m.MaxMemBufferSize, 0, false); err != nil {
return err
}
if err := validate.MaximumInt("max_mem_buffer_size", "body", *m.MaxMemBufferSize, 1.073741824e+09, false); err != nil {
return err
}
return nil
}
// ContextValidate validate this common c a n bus based on the context it is used
func (m *CommonCANBus) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateFilters(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonCANBus) contextValidateFilters(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Filters); i++ {
if m.Filters[i] != nil {
if swag.IsZero(m.Filters[i]) { // not required
return nil
}
if err := m.Filters[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("filters" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("filters" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonCANBus) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonCANBus) UnmarshalBinary(b []byte) error {
var res CommonCANBus
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,113 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonCANFilter common c a n filter
//
// swagger:model common.CANFilter
type CommonCANFilter struct {
// can id
// Required: true
CanID *string `json:"can_id"`
// edge mask
// Max Items: 10000
EdgeMask []int64 `json:"edge_mask"`
// interval
// Minimum: 0
Interval *int64 `json:"interval,omitempty"`
}
// Validate validates this common c a n filter
func (m *CommonCANFilter) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCanID(formats); err != nil {
res = append(res, err)
}
if err := m.validateEdgeMask(formats); err != nil {
res = append(res, err)
}
if err := m.validateInterval(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonCANFilter) validateCanID(formats strfmt.Registry) error {
if err := validate.Required("can_id", "body", m.CanID); err != nil {
return err
}
return nil
}
func (m *CommonCANFilter) validateEdgeMask(formats strfmt.Registry) error {
if swag.IsZero(m.EdgeMask) { // not required
return nil
}
iEdgeMaskSize := int64(len(m.EdgeMask))
if err := validate.MaxItems("edge_mask", "body", iEdgeMaskSize, 10000); err != nil {
return err
}
return nil
}
func (m *CommonCANFilter) validateInterval(formats strfmt.Registry) error {
if swag.IsZero(m.Interval) { // not required
return nil
}
if err := validate.MinimumInt("interval", "body", *m.Interval, 0, false); err != nil {
return err
}
return nil
}
// ContextValidate validates this common c a n filter based on context it is used
func (m *CommonCANFilter) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonCANFilter) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonCANFilter) UnmarshalBinary(b []byte) error {
var res CommonCANFilter
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// CommonCANSignalNameList common c a n signal name list
//
// swagger:model common.CANSignalNameList
type CommonCANSignalNameList struct {
// signal name
SignalName string `json:"signal_name,omitempty"`
}
// Validate validates this common c a n signal name list
func (m *CommonCANSignalNameList) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common c a n signal name list based on context it is used
func (m *CommonCANSignalNameList) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonCANSignalNameList) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonCANSignalNameList) UnmarshalBinary(b []byte) error {
var res CommonCANSignalNameList
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,53 @@
// 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"
)
// CommonCabinClimate common cabin climate
//
// swagger:model common.CabinClimate
type CommonCabinClimate struct {
// cabin temperature
CabinTemperature int64 `json:"cabin_temperature,omitempty"`
// internal temperature
InternalTemperature int64 `json:"internal_temperature,omitempty"`
}
// Validate validates this common cabin climate
func (m *CommonCabinClimate) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common cabin climate based on context it is used
func (m *CommonCabinClimate) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonCabinClimate) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonCabinClimate) UnmarshalBinary(b []byte) error {
var res CommonCabinClimate
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,415 @@
// 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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonCar common car
//
// swagger:model common.Car
type CommonCar struct {
// body type
// Max Length: 256
BodyType string `json:"body_type,omitempty"`
// country
// Max Length: 256
Country string `json:"country,omitempty"`
// document
Document string `json:"document,omitempty"`
// drivers
Drivers []*CommonCarToDriver `json:"drivers"`
// ecu list
EcuList string `json:"ecu_list,omitempty"`
// flashpack
Flashpack string `json:"flashpack,omitempty"`
// iccid
// Max Length: 50
Iccid string `json:"iccid,omitempty"`
// manifests
Manifests []*CommonStatusManifest `json:"manifests"`
// model
// Required: true
// Max Length: 256
Model *string `json:"model"`
// os version
OsVersion string `json:"os_version,omitempty"`
// powertrain
// Max Length: 256
Powertrain string `json:"powertrain,omitempty"`
// region
Region string `json:"region,omitempty"`
// restraint
// Max Length: 256
Restraint string `json:"restraint,omitempty"`
// sold status
SoldStatus string `json:"sold_status,omitempty"`
// sums version
SumsVersion string `json:"sums_version,omitempty"`
// tags
// Max Items: 50
Tags []string `json:"tags"`
// trim
// Required: true
// Max Length: 256
Trim *string `json:"trim"`
// vin
// Required: true
Vin *string `json:"vin"`
// year
// Required: true
// Maximum: 9999
// Minimum: 1000
Year *int64 `json:"year"`
}
// Validate validates this common car
func (m *CommonCar) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateBodyType(formats); err != nil {
res = append(res, err)
}
if err := m.validateCountry(formats); err != nil {
res = append(res, err)
}
if err := m.validateDrivers(formats); err != nil {
res = append(res, err)
}
if err := m.validateIccid(formats); err != nil {
res = append(res, err)
}
if err := m.validateManifests(formats); err != nil {
res = append(res, err)
}
if err := m.validateModel(formats); err != nil {
res = append(res, err)
}
if err := m.validatePowertrain(formats); err != nil {
res = append(res, err)
}
if err := m.validateRestraint(formats); err != nil {
res = append(res, err)
}
if err := m.validateTags(formats); err != nil {
res = append(res, err)
}
if err := m.validateTrim(formats); err != nil {
res = append(res, err)
}
if err := m.validateVin(formats); err != nil {
res = append(res, err)
}
if err := m.validateYear(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonCar) validateBodyType(formats strfmt.Registry) error {
if swag.IsZero(m.BodyType) { // not required
return nil
}
if err := validate.MaxLength("body_type", "body", m.BodyType, 256); err != nil {
return err
}
return nil
}
func (m *CommonCar) validateCountry(formats strfmt.Registry) error {
if swag.IsZero(m.Country) { // not required
return nil
}
if err := validate.MaxLength("country", "body", m.Country, 256); err != nil {
return err
}
return nil
}
func (m *CommonCar) validateDrivers(formats strfmt.Registry) error {
if swag.IsZero(m.Drivers) { // not required
return nil
}
for i := 0; i < len(m.Drivers); i++ {
if swag.IsZero(m.Drivers[i]) { // not required
continue
}
if m.Drivers[i] != nil {
if err := m.Drivers[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("drivers" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("drivers" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CommonCar) validateIccid(formats strfmt.Registry) error {
if swag.IsZero(m.Iccid) { // not required
return nil
}
if err := validate.MaxLength("iccid", "body", m.Iccid, 50); err != nil {
return err
}
return nil
}
func (m *CommonCar) validateManifests(formats strfmt.Registry) error {
if swag.IsZero(m.Manifests) { // not required
return nil
}
for i := 0; i < len(m.Manifests); i++ {
if swag.IsZero(m.Manifests[i]) { // not required
continue
}
if m.Manifests[i] != nil {
if err := m.Manifests[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("manifests" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("manifests" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CommonCar) validateModel(formats strfmt.Registry) error {
if err := validate.Required("model", "body", m.Model); err != nil {
return err
}
if err := validate.MaxLength("model", "body", *m.Model, 256); err != nil {
return err
}
return nil
}
func (m *CommonCar) validatePowertrain(formats strfmt.Registry) error {
if swag.IsZero(m.Powertrain) { // not required
return nil
}
if err := validate.MaxLength("powertrain", "body", m.Powertrain, 256); err != nil {
return err
}
return nil
}
func (m *CommonCar) validateRestraint(formats strfmt.Registry) error {
if swag.IsZero(m.Restraint) { // not required
return nil
}
if err := validate.MaxLength("restraint", "body", m.Restraint, 256); err != nil {
return err
}
return nil
}
func (m *CommonCar) validateTags(formats strfmt.Registry) error {
if swag.IsZero(m.Tags) { // not required
return nil
}
iTagsSize := int64(len(m.Tags))
if err := validate.MaxItems("tags", "body", iTagsSize, 50); err != nil {
return err
}
return nil
}
func (m *CommonCar) validateTrim(formats strfmt.Registry) error {
if err := validate.Required("trim", "body", m.Trim); err != nil {
return err
}
if err := validate.MaxLength("trim", "body", *m.Trim, 256); err != nil {
return err
}
return nil
}
func (m *CommonCar) validateVin(formats strfmt.Registry) error {
if err := validate.Required("vin", "body", m.Vin); err != nil {
return err
}
return nil
}
func (m *CommonCar) validateYear(formats strfmt.Registry) error {
if err := validate.Required("year", "body", m.Year); err != nil {
return err
}
if err := validate.MinimumInt("year", "body", *m.Year, 1000, false); err != nil {
return err
}
if err := validate.MaximumInt("year", "body", *m.Year, 9999, false); err != nil {
return err
}
return nil
}
// ContextValidate validate this common car based on the context it is used
func (m *CommonCar) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateDrivers(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateManifests(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonCar) contextValidateDrivers(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Drivers); i++ {
if m.Drivers[i] != nil {
if swag.IsZero(m.Drivers[i]) { // not required
return nil
}
if err := m.Drivers[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("drivers" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("drivers" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CommonCar) contextValidateManifests(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Manifests); i++ {
if m.Manifests[i] != nil {
if swag.IsZero(m.Manifests[i]) { // not required
return nil
}
if err := m.Manifests[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("manifests" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("manifests" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonCar) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonCar) UnmarshalBinary(b []byte) error {
var res CommonCar
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,195 @@
// 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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonCarFlashpackVersionAddRequest common car flashpack version add request
//
// swagger:model common.CarFlashpackVersionAddRequest
type CommonCarFlashpackVersionAddRequest struct {
// car model
// Required: true
CarModel *string `json:"car_model"`
// car trim
// Required: true
CarTrim *string `json:"car_trim"`
// car year
// Required: true
CarYear *int64 `json:"car_year"`
// ecu versions
// Required: true
EcuVersions []*CommonECUVersionRequest `json:"ecu_versions"`
// flashpack
// Required: true
Flashpack *string `json:"flashpack"`
// os version
OsVersion string `json:"os_version,omitempty"`
}
// Validate validates this common car flashpack version add request
func (m *CommonCarFlashpackVersionAddRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCarModel(formats); err != nil {
res = append(res, err)
}
if err := m.validateCarTrim(formats); err != nil {
res = append(res, err)
}
if err := m.validateCarYear(formats); err != nil {
res = append(res, err)
}
if err := m.validateEcuVersions(formats); err != nil {
res = append(res, err)
}
if err := m.validateFlashpack(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonCarFlashpackVersionAddRequest) validateCarModel(formats strfmt.Registry) error {
if err := validate.Required("car_model", "body", m.CarModel); err != nil {
return err
}
return nil
}
func (m *CommonCarFlashpackVersionAddRequest) validateCarTrim(formats strfmt.Registry) error {
if err := validate.Required("car_trim", "body", m.CarTrim); err != nil {
return err
}
return nil
}
func (m *CommonCarFlashpackVersionAddRequest) validateCarYear(formats strfmt.Registry) error {
if err := validate.Required("car_year", "body", m.CarYear); err != nil {
return err
}
return nil
}
func (m *CommonCarFlashpackVersionAddRequest) validateEcuVersions(formats strfmt.Registry) error {
if err := validate.Required("ecu_versions", "body", m.EcuVersions); err != nil {
return err
}
for i := 0; i < len(m.EcuVersions); i++ {
if swag.IsZero(m.EcuVersions[i]) { // not required
continue
}
if m.EcuVersions[i] != nil {
if err := m.EcuVersions[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ecu_versions" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("ecu_versions" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CommonCarFlashpackVersionAddRequest) validateFlashpack(formats strfmt.Registry) error {
if err := validate.Required("flashpack", "body", m.Flashpack); err != nil {
return err
}
return nil
}
// ContextValidate validate this common car flashpack version add request based on the context it is used
func (m *CommonCarFlashpackVersionAddRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateEcuVersions(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonCarFlashpackVersionAddRequest) contextValidateEcuVersions(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.EcuVersions); i++ {
if m.EcuVersions[i] != nil {
if swag.IsZero(m.EcuVersions[i]) { // not required
return nil
}
if err := m.EcuVersions[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ecu_versions" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("ecu_versions" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonCarFlashpackVersionAddRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonCarFlashpackVersionAddRequest) UnmarshalBinary(b []byte) error {
var res CommonCarFlashpackVersionAddRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,122 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonCarFlashpackVersionRequest common car flashpack version request
//
// swagger:model common.CarFlashpackVersionRequest
type CommonCarFlashpackVersionRequest struct {
// car model
// Required: true
CarModel *string `json:"car_model"`
// car trim
// Required: true
CarTrim *string `json:"car_trim"`
// car year
// Required: true
CarYear *int64 `json:"car_year"`
// flashpack
// Required: true
Flashpack *string `json:"flashpack"`
}
// Validate validates this common car flashpack version request
func (m *CommonCarFlashpackVersionRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCarModel(formats); err != nil {
res = append(res, err)
}
if err := m.validateCarTrim(formats); err != nil {
res = append(res, err)
}
if err := m.validateCarYear(formats); err != nil {
res = append(res, err)
}
if err := m.validateFlashpack(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonCarFlashpackVersionRequest) validateCarModel(formats strfmt.Registry) error {
if err := validate.Required("car_model", "body", m.CarModel); err != nil {
return err
}
return nil
}
func (m *CommonCarFlashpackVersionRequest) validateCarTrim(formats strfmt.Registry) error {
if err := validate.Required("car_trim", "body", m.CarTrim); err != nil {
return err
}
return nil
}
func (m *CommonCarFlashpackVersionRequest) validateCarYear(formats strfmt.Registry) error {
if err := validate.Required("car_year", "body", m.CarYear); err != nil {
return err
}
return nil
}
func (m *CommonCarFlashpackVersionRequest) validateFlashpack(formats strfmt.Registry) error {
if err := validate.Required("flashpack", "body", m.Flashpack); err != nil {
return err
}
return nil
}
// ContextValidate validates this common car flashpack version request based on context it is used
func (m *CommonCarFlashpackVersionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonCarFlashpackVersionRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonCarFlashpackVersionRequest) UnmarshalBinary(b []byte) error {
var res CommonCarFlashpackVersionRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,56 @@
// 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"
)
// CommonCarSetting common car setting
//
// swagger:model common.CarSetting
type CommonCarSetting struct {
// name
Name string `json:"name,omitempty"`
// type
Type string `json:"type,omitempty"`
// value
Value string `json:"value,omitempty"`
}
// Validate validates this common car setting
func (m *CommonCarSetting) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common car setting based on context it is used
func (m *CommonCarSetting) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonCarSetting) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonCarSetting) UnmarshalBinary(b []byte) error {
var res CommonCarSetting
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,251 @@
// 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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonCarToDriver common car to driver
//
// swagger:model common.CarToDriver
type CommonCarToDriver struct {
// ble key
BleKey string `json:"ble_key,omitempty"`
// driverid
// Required: true
// Max Length: 256
Driverid *string `json:"driverid"`
// id
ID int64 `json:"id,omitempty"`
// role
// Required: true
// Max Length: 100
Role *string `json:"role"`
// settings
Settings []*CommonCarSetting `json:"settings"`
// subscriptions
Subscriptions []*CommonSubscription `json:"subscriptions"`
// vin
// Required: true
Vin *string `json:"vin"`
}
// Validate validates this common car to driver
func (m *CommonCarToDriver) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateDriverid(formats); err != nil {
res = append(res, err)
}
if err := m.validateRole(formats); err != nil {
res = append(res, err)
}
if err := m.validateSettings(formats); err != nil {
res = append(res, err)
}
if err := m.validateSubscriptions(formats); err != nil {
res = append(res, err)
}
if err := m.validateVin(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonCarToDriver) validateDriverid(formats strfmt.Registry) error {
if err := validate.Required("driverid", "body", m.Driverid); err != nil {
return err
}
if err := validate.MaxLength("driverid", "body", *m.Driverid, 256); err != nil {
return err
}
return nil
}
func (m *CommonCarToDriver) validateRole(formats strfmt.Registry) error {
if err := validate.Required("role", "body", m.Role); err != nil {
return err
}
if err := validate.MaxLength("role", "body", *m.Role, 100); err != nil {
return err
}
return nil
}
func (m *CommonCarToDriver) validateSettings(formats strfmt.Registry) error {
if swag.IsZero(m.Settings) { // not required
return nil
}
for i := 0; i < len(m.Settings); i++ {
if swag.IsZero(m.Settings[i]) { // not required
continue
}
if m.Settings[i] != nil {
if err := m.Settings[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("settings" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("settings" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CommonCarToDriver) validateSubscriptions(formats strfmt.Registry) error {
if swag.IsZero(m.Subscriptions) { // not required
return nil
}
for i := 0; i < len(m.Subscriptions); i++ {
if swag.IsZero(m.Subscriptions[i]) { // not required
continue
}
if m.Subscriptions[i] != nil {
if err := m.Subscriptions[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("subscriptions" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("subscriptions" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CommonCarToDriver) validateVin(formats strfmt.Registry) error {
if err := validate.Required("vin", "body", m.Vin); err != nil {
return err
}
return nil
}
// ContextValidate validate this common car to driver based on the context it is used
func (m *CommonCarToDriver) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateSettings(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateSubscriptions(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonCarToDriver) contextValidateSettings(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Settings); i++ {
if m.Settings[i] != nil {
if swag.IsZero(m.Settings[i]) { // not required
return nil
}
if err := m.Settings[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("settings" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("settings" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CommonCarToDriver) contextValidateSubscriptions(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Subscriptions); i++ {
if m.Subscriptions[i] != nil {
if swag.IsZero(m.Subscriptions[i]) { // not required
return nil
}
if err := m.Subscriptions[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("subscriptions" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("subscriptions" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonCarToDriver) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonCarToDriver) UnmarshalBinary(b []byte) error {
var res CommonCarToDriver
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,215 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonCarUpdate common car update
//
// swagger:model common.CarUpdate
type CommonCarUpdate struct {
// err
Err int64 `json:"err,omitempty"`
// id
ID int64 `json:"id,omitempty"`
// info
// Max Length: 1000
Info string `json:"info,omitempty"`
// manifest id
// Required: true
ManifestID *int64 `json:"manifest_id"`
// status
// Max Length: 100
Status string `json:"status,omitempty"`
// update source
UpdateSource string `json:"updateSource,omitempty"`
// updatemanifest
Updatemanifest *CommonUpdateManifest `json:"updatemanifest,omitempty"`
// username
// Required: true
Username *string `json:"username"`
// vin
// Required: true
// Max Length: 17
Vin *string `json:"vin"`
}
// Validate validates this common car update
func (m *CommonCarUpdate) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateInfo(formats); err != nil {
res = append(res, err)
}
if err := m.validateManifestID(formats); err != nil {
res = append(res, err)
}
if err := m.validateStatus(formats); err != nil {
res = append(res, err)
}
if err := m.validateUpdatemanifest(formats); err != nil {
res = append(res, err)
}
if err := m.validateUsername(formats); err != nil {
res = append(res, err)
}
if err := m.validateVin(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonCarUpdate) validateInfo(formats strfmt.Registry) error {
if swag.IsZero(m.Info) { // not required
return nil
}
if err := validate.MaxLength("info", "body", m.Info, 1000); err != nil {
return err
}
return nil
}
func (m *CommonCarUpdate) validateManifestID(formats strfmt.Registry) error {
if err := validate.Required("manifest_id", "body", m.ManifestID); err != nil {
return err
}
return nil
}
func (m *CommonCarUpdate) validateStatus(formats strfmt.Registry) error {
if swag.IsZero(m.Status) { // not required
return nil
}
if err := validate.MaxLength("status", "body", m.Status, 100); err != nil {
return err
}
return nil
}
func (m *CommonCarUpdate) validateUpdatemanifest(formats strfmt.Registry) error {
if swag.IsZero(m.Updatemanifest) { // not required
return nil
}
if m.Updatemanifest != nil {
if err := m.Updatemanifest.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("updatemanifest")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("updatemanifest")
}
return err
}
}
return nil
}
func (m *CommonCarUpdate) validateUsername(formats strfmt.Registry) error {
if err := validate.Required("username", "body", m.Username); err != nil {
return err
}
return nil
}
func (m *CommonCarUpdate) validateVin(formats strfmt.Registry) error {
if err := validate.Required("vin", "body", m.Vin); err != nil {
return err
}
if err := validate.MaxLength("vin", "body", *m.Vin, 17); err != nil {
return err
}
return nil
}
// ContextValidate validate this common car update based on the context it is used
func (m *CommonCarUpdate) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateUpdatemanifest(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonCarUpdate) contextValidateUpdatemanifest(ctx context.Context, formats strfmt.Registry) error {
if m.Updatemanifest != nil {
if swag.IsZero(m.Updatemanifest) { // not required
return nil
}
if err := m.Updatemanifest.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("updatemanifest")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("updatemanifest")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonCarUpdate) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonCarUpdate) UnmarshalBinary(b []byte) error {
var res CommonCarUpdate
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,138 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonCarUpdateProgress common car update progress
//
// swagger:model common.CarUpdateProgress
type CommonCarUpdateProgress struct {
// car update id
CarUpdateID int64 `json:"car_update_id,omitempty"`
// ecu
// Max Length: 100
Ecu string `json:"ecu,omitempty"`
// err
Err int64 `json:"err,omitempty"`
// extra info
// Max Length: 1000
ExtraInfo string `json:"extra_info,omitempty"`
// file current
FileCurrent int64 `json:"file_current,omitempty"`
// file total
FileTotal int64 `json:"file_total,omitempty"`
// installed
Installed int64 `json:"installed,omitempty"`
// msg
// Max Length: 1000
Msg string `json:"msg,omitempty"`
// package current
PackageCurrent int64 `json:"package_current,omitempty"`
// package total
PackageTotal int64 `json:"package_total,omitempty"`
// total files
TotalFiles int64 `json:"total_files,omitempty"`
}
// Validate validates this common car update progress
func (m *CommonCarUpdateProgress) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateEcu(formats); err != nil {
res = append(res, err)
}
if err := m.validateExtraInfo(formats); err != nil {
res = append(res, err)
}
if err := m.validateMsg(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonCarUpdateProgress) validateEcu(formats strfmt.Registry) error {
if swag.IsZero(m.Ecu) { // not required
return nil
}
if err := validate.MaxLength("ecu", "body", m.Ecu, 100); err != nil {
return err
}
return nil
}
func (m *CommonCarUpdateProgress) validateExtraInfo(formats strfmt.Registry) error {
if swag.IsZero(m.ExtraInfo) { // not required
return nil
}
if err := validate.MaxLength("extra_info", "body", m.ExtraInfo, 1000); err != nil {
return err
}
return nil
}
func (m *CommonCarUpdateProgress) validateMsg(formats strfmt.Registry) error {
if swag.IsZero(m.Msg) { // not required
return nil
}
if err := validate.MaxLength("msg", "body", m.Msg, 1000); err != nil {
return err
}
return nil
}
// ContextValidate validates this common car update progress based on context it is used
func (m *CommonCarUpdateProgress) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonCarUpdateProgress) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonCarUpdateProgress) UnmarshalBinary(b []byte) error {
var res CommonCarUpdateProgress
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,62 @@
// 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"
)
// CommonCarVersionLogs common car version logs
//
// swagger:model common.CarVersionLogs
type CommonCarVersionLogs struct {
// created at
CreatedAt string `json:"created_at,omitempty"`
// id
ID int64 `json:"id,omitempty"`
// version
Version string `json:"version,omitempty"`
// version source
VersionSource string `json:"version_source,omitempty"`
// vin
Vin string `json:"vin,omitempty"`
}
// Validate validates this common car version logs
func (m *CommonCarVersionLogs) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common car version logs based on context it is used
func (m *CommonCarVersionLogs) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonCarVersionLogs) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonCarVersionLogs) UnmarshalBinary(b []byte) error {
var res CommonCarVersionLogs
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// CommonCellTemperature common cell temperature
//
// swagger:model common.CellTemperature
type CommonCellTemperature struct {
// avg battery temp
AvgBatteryTemp int64 `json:"avg_battery_temp,omitempty"`
}
// Validate validates this common cell temperature
func (m *CommonCellTemperature) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common cell temperature based on context it is used
func (m *CommonCellTemperature) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonCellTemperature) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonCellTemperature) UnmarshalBinary(b []byte) error {
var res CommonCellTemperature
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,59 @@
// 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"
)
// CommonCertificate common certificate
//
// swagger:model common.Certificate
type CommonCertificate struct {
// private key
PrivateKey string `json:"private_key,omitempty"`
// public key
PublicKey string `json:"public_key,omitempty"`
// serial number
SerialNumber string `json:"serial_number,omitempty"`
// type
Type string `json:"type,omitempty"`
}
// Validate validates this common certificate
func (m *CommonCertificate) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common certificate based on context it is used
func (m *CommonCertificate) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonCertificate) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonCertificate) UnmarshalBinary(b []byte) error {
var res CommonCertificate
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,56 @@
// 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"
)
// CommonClickHouseSignal common click house signal
//
// swagger:model common.ClickHouseSignal
type CommonClickHouseSignal struct {
// name
Name string `json:"name,omitempty"`
// timestamp
Timestamp string `json:"timestamp,omitempty"`
// value
Value float64 `json:"value,omitempty"`
}
// Validate validates this common click house signal
func (m *CommonClickHouseSignal) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common click house signal based on context it is used
func (m *CommonClickHouseSignal) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonClickHouseSignal) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonClickHouseSignal) UnmarshalBinary(b []byte) error {
var res CommonClickHouseSignal
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,195 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonCreateUpdateManifest common create update manifest
//
// swagger:model common.CreateUpdateManifest
type CommonCreateUpdateManifest struct {
// active
Active bool `json:"active,omitempty"`
// body type
BodyType string `json:"body_type,omitempty"`
// country
Country string `json:"country,omitempty"`
// description
// Max Length: 5120
Description string `json:"description,omitempty"`
// id
ID int64 `json:"id,omitempty"`
// max attempts
MaxAttempts int64 `json:"max_attempts,omitempty"`
// model
Model string `json:"model,omitempty"`
// name
// Required: true
// Max Length: 255
Name *string `json:"name"`
// notify sap
NotifySap bool `json:"notify_sap,omitempty"`
// powertrain
Powertrain string `json:"powertrain,omitempty"`
// release notes
// Max Length: 32768
ReleaseNotes string `json:"release_notes,omitempty"`
// restraint
Restraint string `json:"restraint,omitempty"`
// rollback
Rollback bool `json:"rollback,omitempty"`
// trim
Trim string `json:"trim,omitempty"`
// type
// Max Length: 100
Type string `json:"type,omitempty"`
// Duration of update in minutes
UpdateDuration int64 `json:"update_duration,omitempty"`
// version
// Max Length: 255
Version string `json:"version,omitempty"`
// year
Year int64 `json:"year,omitempty"`
}
// Validate validates this common create update manifest
func (m *CommonCreateUpdateManifest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateDescription(formats); err != nil {
res = append(res, err)
}
if err := m.validateName(formats); err != nil {
res = append(res, err)
}
if err := m.validateReleaseNotes(formats); err != nil {
res = append(res, err)
}
if err := m.validateType(formats); err != nil {
res = append(res, err)
}
if err := m.validateVersion(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonCreateUpdateManifest) validateDescription(formats strfmt.Registry) error {
if swag.IsZero(m.Description) { // not required
return nil
}
if err := validate.MaxLength("description", "body", m.Description, 5120); err != nil {
return err
}
return nil
}
func (m *CommonCreateUpdateManifest) validateName(formats strfmt.Registry) error {
if err := validate.Required("name", "body", m.Name); err != nil {
return err
}
if err := validate.MaxLength("name", "body", *m.Name, 255); err != nil {
return err
}
return nil
}
func (m *CommonCreateUpdateManifest) validateReleaseNotes(formats strfmt.Registry) error {
if swag.IsZero(m.ReleaseNotes) { // not required
return nil
}
if err := validate.MaxLength("release_notes", "body", m.ReleaseNotes, 32768); err != nil {
return err
}
return nil
}
func (m *CommonCreateUpdateManifest) validateType(formats strfmt.Registry) error {
if swag.IsZero(m.Type) { // not required
return nil
}
if err := validate.MaxLength("type", "body", m.Type, 100); err != nil {
return err
}
return nil
}
func (m *CommonCreateUpdateManifest) validateVersion(formats strfmt.Registry) error {
if swag.IsZero(m.Version) { // not required
return nil
}
if err := validate.MaxLength("version", "body", m.Version, 255); err != nil {
return err
}
return nil
}
// ContextValidate validates this common create update manifest based on context it is used
func (m *CommonCreateUpdateManifest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonCreateUpdateManifest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonCreateUpdateManifest) UnmarshalBinary(b []byte) error {
var res CommonCreateUpdateManifest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,112 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonCustomerOtaEmailsRequest common customer ota emails request
//
// swagger:model common.CustomerOtaEmailsRequest
type CommonCustomerOtaEmailsRequest struct {
// email body
// Required: true
EmailBody *string `json:"email_body"`
// email subject
// Required: true
EmailSubject *string `json:"email_subject"`
// vins
// Required: true
// Min Items: 1
Vins []string `json:"vins"`
}
// Validate validates this common customer ota emails request
func (m *CommonCustomerOtaEmailsRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateEmailBody(formats); err != nil {
res = append(res, err)
}
if err := m.validateEmailSubject(formats); err != nil {
res = append(res, err)
}
if err := m.validateVins(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonCustomerOtaEmailsRequest) validateEmailBody(formats strfmt.Registry) error {
if err := validate.Required("email_body", "body", m.EmailBody); err != nil {
return err
}
return nil
}
func (m *CommonCustomerOtaEmailsRequest) validateEmailSubject(formats strfmt.Registry) error {
if err := validate.Required("email_subject", "body", m.EmailSubject); err != nil {
return err
}
return nil
}
func (m *CommonCustomerOtaEmailsRequest) validateVins(formats strfmt.Registry) error {
if err := validate.Required("vins", "body", m.Vins); err != nil {
return err
}
iVinsSize := int64(len(m.Vins))
if err := validate.MinItems("vins", "body", iVinsSize, 1); err != nil {
return err
}
return nil
}
// ContextValidate validates this common customer ota emails request based on context it is used
func (m *CommonCustomerOtaEmailsRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonCustomerOtaEmailsRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonCustomerOtaEmailsRequest) UnmarshalBinary(b []byte) error {
var res CommonCustomerOtaEmailsRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,160 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonDTCECU common d t c e c u
//
// swagger:model common.DTC_ECU
type CommonDTCECU struct {
// created at
CreatedAt string `json:"created_at,omitempty"`
// ecu name
// Required: true
EcuName *string `json:"ecu_name"`
// epoch usec
EpochUsec string `json:"epoch_usec,omitempty"`
// id
ID int64 `json:"id,omitempty"`
// mileage
Mileage int64 `json:"mileage,omitempty"`
// snapshot
Snapshot string `json:"snapshot,omitempty"`
// speed
Speed int64 `json:"speed,omitempty"`
// status byte
StatusByte int64 `json:"status_byte,omitempty"`
// status byte meaning
StatusByteMeaning []string `json:"status_byte_meaning"`
// trouble code
TroubleCode int64 `json:"trouble_code,omitempty"`
// trouble code information
TroubleCodeInformation *CommonDTCInformation `json:"trouble_code_information,omitempty"`
// vin
Vin string `json:"vin,omitempty"`
// voltage
Voltage int64 `json:"voltage,omitempty"`
}
// Validate validates this common d t c e c u
func (m *CommonDTCECU) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateEcuName(formats); err != nil {
res = append(res, err)
}
if err := m.validateTroubleCodeInformation(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonDTCECU) validateEcuName(formats strfmt.Registry) error {
if err := validate.Required("ecu_name", "body", m.EcuName); err != nil {
return err
}
return nil
}
func (m *CommonDTCECU) validateTroubleCodeInformation(formats strfmt.Registry) error {
if swag.IsZero(m.TroubleCodeInformation) { // not required
return nil
}
if m.TroubleCodeInformation != nil {
if err := m.TroubleCodeInformation.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("trouble_code_information")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("trouble_code_information")
}
return err
}
}
return nil
}
// ContextValidate validate this common d t c e c u based on the context it is used
func (m *CommonDTCECU) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateTroubleCodeInformation(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonDTCECU) contextValidateTroubleCodeInformation(ctx context.Context, formats strfmt.Registry) error {
if m.TroubleCodeInformation != nil {
if swag.IsZero(m.TroubleCodeInformation) { // not required
return nil
}
if err := m.TroubleCodeInformation.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("trouble_code_information")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("trouble_code_information")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonDTCECU) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonDTCECU) UnmarshalBinary(b []byte) error {
var res CommonDTCECU
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,460 @@
// 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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// CommonDTCInformation common d t c information
//
// swagger:model common.DTCInformation
type CommonDTCInformation struct {
// display trouble code
DisplayTroubleCode string `json:"displayTroubleCode,omitempty"`
// error text
ErrorText *CommonDTCInformationErrorText `json:"errorText,omitempty"`
// short name
ShortName string `json:"shortName,omitempty"`
// spl data groups
SplDataGroups *CommonDTCInformationSplDataGroups `json:"splDataGroups,omitempty"`
// trouble code
TroubleCode int64 `json:"troubleCode,omitempty"`
// trouble code hex
TroubleCodeHex string `json:"troubleCodeHex,omitempty"`
}
// Validate validates this common d t c information
func (m *CommonDTCInformation) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateErrorText(formats); err != nil {
res = append(res, err)
}
if err := m.validateSplDataGroups(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonDTCInformation) validateErrorText(formats strfmt.Registry) error {
if swag.IsZero(m.ErrorText) { // not required
return nil
}
if m.ErrorText != nil {
if err := m.ErrorText.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("errorText")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("errorText")
}
return err
}
}
return nil
}
func (m *CommonDTCInformation) validateSplDataGroups(formats strfmt.Registry) error {
if swag.IsZero(m.SplDataGroups) { // not required
return nil
}
if m.SplDataGroups != nil {
if err := m.SplDataGroups.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("splDataGroups")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("splDataGroups")
}
return err
}
}
return nil
}
// ContextValidate validate this common d t c information based on the context it is used
func (m *CommonDTCInformation) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateErrorText(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateSplDataGroups(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonDTCInformation) contextValidateErrorText(ctx context.Context, formats strfmt.Registry) error {
if m.ErrorText != nil {
if swag.IsZero(m.ErrorText) { // not required
return nil
}
if err := m.ErrorText.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("errorText")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("errorText")
}
return err
}
}
return nil
}
func (m *CommonDTCInformation) contextValidateSplDataGroups(ctx context.Context, formats strfmt.Registry) error {
if m.SplDataGroups != nil {
if swag.IsZero(m.SplDataGroups) { // not required
return nil
}
if err := m.SplDataGroups.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("splDataGroups")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("splDataGroups")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonDTCInformation) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonDTCInformation) UnmarshalBinary(b []byte) error {
var res CommonDTCInformation
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// CommonDTCInformationErrorText common d t c information error text
//
// swagger:model CommonDTCInformationErrorText
type CommonDTCInformationErrorText struct {
// text
Text string `json:"text,omitempty"`
// ti
Ti string `json:"ti,omitempty"`
}
// Validate validates this common d t c information error text
func (m *CommonDTCInformationErrorText) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common d t c information error text based on context it is used
func (m *CommonDTCInformationErrorText) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonDTCInformationErrorText) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonDTCInformationErrorText) UnmarshalBinary(b []byte) error {
var res CommonDTCInformationErrorText
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// CommonDTCInformationSplDataGroups common d t c information spl data groups
//
// swagger:model CommonDTCInformationSplDataGroups
type CommonDTCInformationSplDataGroups struct {
// spl data group
SplDataGroup *CommonDTCInformationSplDataGroupsSplDataGroup `json:"splDataGroup,omitempty"`
}
// Validate validates this common d t c information spl data groups
func (m *CommonDTCInformationSplDataGroups) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateSplDataGroup(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonDTCInformationSplDataGroups) validateSplDataGroup(formats strfmt.Registry) error {
if swag.IsZero(m.SplDataGroup) { // not required
return nil
}
if m.SplDataGroup != nil {
if err := m.SplDataGroup.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("splDataGroups" + "." + "splDataGroup")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("splDataGroups" + "." + "splDataGroup")
}
return err
}
}
return nil
}
// ContextValidate validate this common d t c information spl data groups based on the context it is used
func (m *CommonDTCInformationSplDataGroups) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateSplDataGroup(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonDTCInformationSplDataGroups) contextValidateSplDataGroup(ctx context.Context, formats strfmt.Registry) error {
if m.SplDataGroup != nil {
if swag.IsZero(m.SplDataGroup) { // not required
return nil
}
if err := m.SplDataGroup.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("splDataGroups" + "." + "splDataGroup")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("splDataGroups" + "." + "splDataGroup")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonDTCInformationSplDataGroups) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonDTCInformationSplDataGroups) UnmarshalBinary(b []byte) error {
var res CommonDTCInformationSplDataGroups
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// CommonDTCInformationSplDataGroupsSplDataGroup common d t c information spl data groups spl data group
//
// swagger:model CommonDTCInformationSplDataGroupsSplDataGroup
type CommonDTCInformationSplDataGroupsSplDataGroup struct {
// spl data
SplData []*CommonDTCInformationSplDataGroupsSplDataGroupSplDataItems0 `json:"splData"`
// spl data group caption
SplDataGroupCaption interface{} `json:"splDataGroupCaption,omitempty"`
}
// Validate validates this common d t c information spl data groups spl data group
func (m *CommonDTCInformationSplDataGroupsSplDataGroup) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateSplData(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonDTCInformationSplDataGroupsSplDataGroup) validateSplData(formats strfmt.Registry) error {
if swag.IsZero(m.SplData) { // not required
return nil
}
for i := 0; i < len(m.SplData); i++ {
if swag.IsZero(m.SplData[i]) { // not required
continue
}
if m.SplData[i] != nil {
if err := m.SplData[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("splDataGroups" + "." + "splDataGroup" + "." + "splData" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("splDataGroups" + "." + "splDataGroup" + "." + "splData" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// ContextValidate validate this common d t c information spl data groups spl data group based on the context it is used
func (m *CommonDTCInformationSplDataGroupsSplDataGroup) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateSplData(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonDTCInformationSplDataGroupsSplDataGroup) contextValidateSplData(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.SplData); i++ {
if m.SplData[i] != nil {
if swag.IsZero(m.SplData[i]) { // not required
return nil
}
if err := m.SplData[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("splDataGroups" + "." + "splDataGroup" + "." + "splData" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("splDataGroups" + "." + "splDataGroup" + "." + "splData" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonDTCInformationSplDataGroupsSplDataGroup) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonDTCInformationSplDataGroupsSplDataGroup) UnmarshalBinary(b []byte) error {
var res CommonDTCInformationSplDataGroupsSplDataGroup
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}
// CommonDTCInformationSplDataGroupsSplDataGroupSplDataItems0 common d t c information spl data groups spl data group spl data items0
//
// swagger:model CommonDTCInformationSplDataGroupsSplDataGroupSplDataItems0
type CommonDTCInformationSplDataGroupsSplDataGroupSplDataItems0 struct {
// semantic information
SemanticInformation string `json:"semanticInformation,omitempty"`
// text
Text string `json:"text,omitempty"`
// ti
Ti string `json:"ti,omitempty"`
}
// Validate validates this common d t c information spl data groups spl data group spl data items0
func (m *CommonDTCInformationSplDataGroupsSplDataGroupSplDataItems0) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common d t c information spl data groups spl data group spl data items0 based on context it is used
func (m *CommonDTCInformationSplDataGroupsSplDataGroupSplDataItems0) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonDTCInformationSplDataGroupsSplDataGroupSplDataItems0) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonDTCInformationSplDataGroupsSplDataGroupSplDataItems0) UnmarshalBinary(b []byte) error {
var res CommonDTCInformationSplDataGroupsSplDataGroupSplDataItems0
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,65 @@
// 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"
)
// CommonDoors common doors
//
// swagger:model common.Doors
type CommonDoors struct {
// hood
Hood bool `json:"hood,omitempty"`
// left front
LeftFront bool `json:"left_front,omitempty"`
// left rear
LeftRear bool `json:"left_rear,omitempty"`
// right front
RightFront bool `json:"right_front,omitempty"`
// right rear
RightRear bool `json:"right_rear,omitempty"`
// trunk
Trunk bool `json:"trunk,omitempty"`
}
// Validate validates this common doors
func (m *CommonDoors) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common doors based on context it is used
func (m *CommonDoors) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonDoors) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonDoors) UnmarshalBinary(b []byte) error {
var res CommonDoors
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// CommonDriverSeatHeat common driver seat heat
//
// swagger:model common.DriverSeatHeat
type CommonDriverSeatHeat struct {
// level
Level int64 `json:"level,omitempty"`
}
// Validate validates this common driver seat heat
func (m *CommonDriverSeatHeat) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common driver seat heat based on context it is used
func (m *CommonDriverSeatHeat) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonDriverSeatHeat) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonDriverSeatHeat) UnmarshalBinary(b []byte) error {
var res CommonDriverSeatHeat
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,77 @@
// 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"
)
// CommonECCKeys common e c c keys
//
// swagger:model common.ECCKeys
type CommonECCKeys struct {
// ecu
Ecu string `json:"ecu,omitempty"`
// env
Env string `json:"env,omitempty"`
// level 1
// Example: 407f59557fb64ae98bc30b5370fab138f4827e14784d79bcf707dbe35ba2b85d
Level1 string `json:"level_1,omitempty"`
// level 2
// Example: 407f59557fb64ae98bc30b5370fab138f4827e14784d79bcf707dbe35ba2b85d
Level2 string `json:"level_2,omitempty"`
// level 3
// Example: 407f59557fb64ae98bc30b5370fab138f4827e14784d79bcf707dbe35ba2b85d
Level3 string `json:"level_3,omitempty"`
// pub key level 1
// Example: 9a1a6949d7f8a511df6e2e2771e444dbd6de97e7d98bdecbb5adc4b8965ce3bef353f523dbea123d7882dc043d415cda02810bad1b6f1b8c6202234a424b7d5b
PubKeyLevel1 string `json:"pub_key_level_1,omitempty"`
// pub key level 2
// Example: 9a1a6949d7f8a511df6e2e2771e444dbd6de97e7d98bdecbb5adc4b8965ce3bef353f523dbea123d7882dc043d415cda02810bad1b6f1b8c6202234a424b7d5b
PubKeyLevel2 string `json:"pub_key_level_2,omitempty"`
// pub key level 3
// Example: 9a1a6949d7f8a511df6e2e2771e444dbd6de97e7d98bdecbb5adc4b8965ce3bef353f523dbea123d7882dc043d415cda02810bad1b6f1b8c6202234a424b7d5b
PubKeyLevel3 string `json:"pub_key_level_3,omitempty"`
}
// Validate validates this common e c c keys
func (m *CommonECCKeys) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common e c c keys based on context it is used
func (m *CommonECCKeys) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonECCKeys) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonECCKeys) UnmarshalBinary(b []byte) error {
var res CommonECCKeys
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,68 @@
// 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"
)
// CommonECUStat common e c u stat
//
// swagger:model common.ECUStat
type CommonECUStat struct {
// ecu name
EcuName string `json:"ecu_name,omitempty"`
// incorrect val signal pct
IncorrectValSignalPct float64 `json:"incorrect_val_signal_pct,omitempty"`
// number of ecu signals
NumberOfEcuSignals int64 `json:"number_of_ecu_signals,omitempty"`
// signals all zero
SignalsAllZero int64 `json:"signals_all_zero,omitempty"`
// signals w incorrect values
SignalswIncorrectValues int64 `json:"signals_w_incorrect_values,omitempty"`
// total signal records
TotalSignalRecords int64 `json:"total_signal_records,omitempty"`
// zero signals pct
ZeroSignalsPct float64 `json:"zero_signals_pct,omitempty"`
}
// Validate validates this common e c u stat
func (m *CommonECUStat) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common e c u stat based on context it is used
func (m *CommonECUStat) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonECUStat) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonECUStat) UnmarshalBinary(b []byte) error {
var res CommonECUStat
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,88 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonECUVersionRequest common e c u version request
//
// swagger:model common.ECUVersionRequest
type CommonECUVersionRequest struct {
// car ecu name
// Required: true
CarEcuName *string `json:"car_ecu_name"`
// car ecu version
// Required: true
CarEcuVersion *string `json:"car_ecu_version"`
}
// Validate validates this common e c u version request
func (m *CommonECUVersionRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCarEcuName(formats); err != nil {
res = append(res, err)
}
if err := m.validateCarEcuVersion(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonECUVersionRequest) validateCarEcuName(formats strfmt.Registry) error {
if err := validate.Required("car_ecu_name", "body", m.CarEcuName); err != nil {
return err
}
return nil
}
func (m *CommonECUVersionRequest) validateCarEcuVersion(formats strfmt.Registry) error {
if err := validate.Required("car_ecu_version", "body", m.CarEcuVersion); err != nil {
return err
}
return nil
}
// ContextValidate validates this common e c u version request based on context it is used
func (m *CommonECUVersionRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonECUVersionRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonECUVersionRequest) UnmarshalBinary(b []byte) error {
var res CommonECUVersionRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,78 @@
// 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"
)
// CommonExpandedSignals common expanded signals
//
// swagger:model common.ExpandedSignals
type CommonExpandedSignals struct {
// bcm tot milg o d o
BcmTotMilgODO float64 `json:"bcm_TotMilg_ODO,omitempty"`
// bms accue chrg tot ah
BmsAccueChrgTotAh int64 `json:"bms_AccueChrgTotAh,omitempty"`
// bms accue dcha tot ah
BmsAccueDchaTotAh int64 `json:"bms_AccueDchaTotAh,omitempty"`
// bms sw vers
BmsSwVers int64 `json:"bms_SwVers,omitempty"`
// bms sw vers m
BmsSwVersM int64 `json:"bms_SwVersM,omitempty"`
// bms sw vers s
BmsSwVersS int64 `json:"bms_SwVersS,omitempty"`
// ibs available capacity
IbsAvailableCapacity int64 `json:"ibs_AvailableCapacity,omitempty"`
// ibs nominal capacity
IbsNominalCapacity int64 `json:"ibs_NominalCapacity,omitempty"`
// IBS_SOCUpperTolerance *float64 //unconfirmed
// IBS_SOCLowerTolerance *float64 //unconfirmed
IbsStateOfCharge float64 `json:"ibs_StateOfCharge,omitempty"`
// ibs state of health
IbsStateOfHealth int64 `json:"ibs_StateOfHealth,omitempty"`
}
// Validate validates this common expanded signals
func (m *CommonExpandedSignals) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common expanded signals based on context it is used
func (m *CommonExpandedSignals) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonExpandedSignals) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonExpandedSignals) UnmarshalBinary(b []byte) error {
var res CommonExpandedSignals
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,125 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonFileKeyResponse common file key response
//
// swagger:model common.FileKeyResponse
type CommonFileKeyResponse struct {
// auth
// Required: true
Auth *string `json:"auth"`
// error
Error string `json:"error,omitempty"`
// file id
// Required: true
FileID *string `json:"file_id"`
// key
// Required: true
Key *string `json:"key"`
// nonce
// Required: true
Nonce *string `json:"nonce"`
}
// Validate validates this common file key response
func (m *CommonFileKeyResponse) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAuth(formats); err != nil {
res = append(res, err)
}
if err := m.validateFileID(formats); err != nil {
res = append(res, err)
}
if err := m.validateKey(formats); err != nil {
res = append(res, err)
}
if err := m.validateNonce(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonFileKeyResponse) validateAuth(formats strfmt.Registry) error {
if err := validate.Required("auth", "body", m.Auth); err != nil {
return err
}
return nil
}
func (m *CommonFileKeyResponse) validateFileID(formats strfmt.Registry) error {
if err := validate.Required("file_id", "body", m.FileID); err != nil {
return err
}
return nil
}
func (m *CommonFileKeyResponse) validateKey(formats strfmt.Registry) error {
if err := validate.Required("key", "body", m.Key); err != nil {
return err
}
return nil
}
func (m *CommonFileKeyResponse) validateNonce(formats strfmt.Registry) error {
if err := validate.Required("nonce", "body", m.Nonce); err != nil {
return err
}
return nil
}
// ContextValidate validates this common file key response based on context it is used
func (m *CommonFileKeyResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonFileKeyResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonFileKeyResponse) UnmarshalBinary(b []byte) error {
var res CommonFileKeyResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// CommonGear common gear
//
// swagger:model common.Gear
type CommonGear struct {
// in park
InPark bool `json:"in_park,omitempty"`
}
// Validate validates this common gear
func (m *CommonGear) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common gear based on context it is used
func (m *CommonGear) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonGear) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonGear) UnmarshalBinary(b []byte) error {
var res CommonGear
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,27 @@
// 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"
)
// CommonGpsPaths common gps paths
//
// swagger:model common.GpsPaths
type CommonGpsPaths map[string][][]float64
// Validate validates this common gps paths
func (m CommonGpsPaths) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common gps paths based on context it is used
func (m CommonGpsPaths) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}

View File

@@ -0,0 +1,206 @@
// 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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonIssue common issue
//
// swagger:model common.Issue
type CommonIssue struct {
// description
// Required: true
// Max Length: 1024
Description *string `json:"description"`
// driver id
DriverID string `json:"driver_id,omitempty"`
// id
ID int64 `json:"id,omitempty"`
// images
Images []*CommonIssueImage `json:"images"`
// timestamp
// Required: true
Timestamp *string `json:"timestamp"`
// title
// Required: true
// Max Length: 256
Title *string `json:"title"`
// vin
// Required: true
Vin *string `json:"vin"`
}
// Validate validates this common issue
func (m *CommonIssue) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateDescription(formats); err != nil {
res = append(res, err)
}
if err := m.validateImages(formats); err != nil {
res = append(res, err)
}
if err := m.validateTimestamp(formats); err != nil {
res = append(res, err)
}
if err := m.validateTitle(formats); err != nil {
res = append(res, err)
}
if err := m.validateVin(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonIssue) validateDescription(formats strfmt.Registry) error {
if err := validate.Required("description", "body", m.Description); err != nil {
return err
}
if err := validate.MaxLength("description", "body", *m.Description, 1024); err != nil {
return err
}
return nil
}
func (m *CommonIssue) validateImages(formats strfmt.Registry) error {
if swag.IsZero(m.Images) { // not required
return nil
}
for i := 0; i < len(m.Images); i++ {
if swag.IsZero(m.Images[i]) { // not required
continue
}
if m.Images[i] != nil {
if err := m.Images[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("images" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("images" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CommonIssue) validateTimestamp(formats strfmt.Registry) error {
if err := validate.Required("timestamp", "body", m.Timestamp); err != nil {
return err
}
return nil
}
func (m *CommonIssue) validateTitle(formats strfmt.Registry) error {
if err := validate.Required("title", "body", m.Title); err != nil {
return err
}
if err := validate.MaxLength("title", "body", *m.Title, 256); err != nil {
return err
}
return nil
}
func (m *CommonIssue) validateVin(formats strfmt.Registry) error {
if err := validate.Required("vin", "body", m.Vin); err != nil {
return err
}
return nil
}
// ContextValidate validate this common issue based on the context it is used
func (m *CommonIssue) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateImages(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonIssue) contextValidateImages(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Images); i++ {
if m.Images[i] != nil {
if swag.IsZero(m.Images[i]) { // not required
return nil
}
if err := m.Images[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("images" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("images" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonIssue) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonIssue) UnmarshalBinary(b []byte) error {
var res CommonIssue
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,56 @@
// 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"
)
// CommonIssueImage common issue image
//
// swagger:model common.IssueImage
type CommonIssueImage struct {
// id
ID int64 `json:"id,omitempty"`
// image
Image []int64 `json:"image"`
// issue id
IssueID int64 `json:"issue_id,omitempty"`
}
// Validate validates this common issue image
func (m *CommonIssueImage) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common issue image based on context it is used
func (m *CommonIssueImage) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonIssueImage) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonIssueImage) UnmarshalBinary(b []byte) error {
var res CommonIssueImage
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,59 @@
// 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"
)
// CommonJSONBlobReadResult common JSON blob read result
//
// swagger:model common.JSONBlobReadResult
type CommonJSONBlobReadResult struct {
// blob size
BlobSize int64 `json:"blobSize,omitempty"`
// bytes read
BytesRead int64 `json:"bytesRead,omitempty"`
// data
Data interface{} `json:"data,omitempty"`
// real offset
RealOffset int64 `json:"realOffset,omitempty"`
}
// Validate validates this common JSON blob read result
func (m *CommonJSONBlobReadResult) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common JSON blob read result based on context it is used
func (m *CommonJSONBlobReadResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonJSONBlobReadResult) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonJSONBlobReadResult) UnmarshalBinary(b []byte) error {
var res CommonJSONBlobReadResult
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,53 @@
// 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"
)
// CommonJSONDBQueryResult common JSON d b query result
//
// swagger:model common.JSONDBQueryResult
type CommonJSONDBQueryResult struct {
// data
Data interface{} `json:"data,omitempty"`
// total
Total int64 `json:"total,omitempty"`
}
// Validate validates this common JSON d b query result
func (m *CommonJSONDBQueryResult) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common JSON d b query result based on context it is used
func (m *CommonJSONDBQueryResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonJSONDBQueryResult) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonJSONDBQueryResult) UnmarshalBinary(b []byte) error {
var res CommonJSONDBQueryResult
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,53 @@
// 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"
)
// CommonJSONError common JSON error
//
// swagger:model common.JSONError
type CommonJSONError struct {
// error
Error string `json:"error,omitempty"`
// message
Message string `json:"message,omitempty"`
}
// Validate validates this common JSON error
func (m *CommonJSONError) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common JSON error based on context it is used
func (m *CommonJSONError) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonJSONError) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonJSONError) UnmarshalBinary(b []byte) error {
var res CommonJSONError
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,53 @@
// 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"
)
// CommonJSONMessage common JSON message
//
// swagger:model common.JSONMessage
type CommonJSONMessage struct {
// data
Data interface{} `json:"data,omitempty"`
// message
Message string `json:"message,omitempty"`
}
// Validate validates this common JSON message
func (m *CommonJSONMessage) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common JSON message based on context it is used
func (m *CommonJSONMessage) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonJSONMessage) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonJSONMessage) UnmarshalBinary(b []byte) error {
var res CommonJSONMessage
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,59 @@
// 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"
)
// CommonLocation common location
//
// swagger:model common.Location
type CommonLocation struct {
// altitude
Altitude float64 `json:"altitude,omitempty"`
// heading
Heading float64 `json:"heading,omitempty"`
// latitude
Latitude float64 `json:"latitude,omitempty"`
// longitude
Longitude float64 `json:"longitude,omitempty"`
}
// Validate validates this common location
func (m *CommonLocation) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common location based on context it is used
func (m *CommonLocation) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonLocation) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonLocation) UnmarshalBinary(b []byte) error {
var res CommonLocation
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,53 @@
// 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"
)
// CommonLocks common locks
//
// swagger:model common.Locks
type CommonLocks struct {
// all
All bool `json:"all,omitempty"`
// driver
Driver bool `json:"driver,omitempty"`
}
// Validate validates this common locks
func (m *CommonLocks) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common locks based on context it is used
func (m *CommonLocks) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonLocks) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonLocks) UnmarshalBinary(b []byte) error {
var res CommonLocks
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,68 @@
// 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"
)
// CommonLogTrexLog common log trex log
//
// swagger:model common.LogTrexLog
type CommonLogTrexLog struct {
// channel
Channel string `json:"channel,omitempty"`
// filename
Filename string `json:"filename,omitempty"`
// level
Level int64 `json:"level,omitempty"`
// line number
LineNumber int64 `json:"line_number,omitempty"`
// msg
Msg string `json:"msg,omitempty"`
// received timestamp
ReceivedTimestamp string `json:"received_timestamp,omitempty"`
// timestamp
Timestamp string `json:"timestamp,omitempty"`
}
// Validate validates this common log trex log
func (m *CommonLogTrexLog) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common log trex log based on context it is used
func (m *CommonLogTrexLog) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonLogTrexLog) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonLogTrexLog) UnmarshalBinary(b []byte) error {
var res CommonLogTrexLog
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// CommonMaxRange common max range
//
// swagger:model common.MaxRange
type CommonMaxRange struct {
// max miles
MaxMiles int64 `json:"max_miles,omitempty"`
}
// Validate validates this common max range
func (m *CommonMaxRange) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common max range based on context it is used
func (m *CommonMaxRange) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonMaxRange) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonMaxRange) UnmarshalBinary(b []byte) error {
var res CommonMaxRange
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,53 @@
// 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"
)
// CommonMemoryRegion common memory region
//
// swagger:model common.MemoryRegion
type CommonMemoryRegion struct {
// length
Length int64 `json:"length,omitempty"`
// offset
Offset int64 `json:"offset,omitempty"`
}
// Validate validates this common memory region
func (m *CommonMemoryRegion) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common memory region based on context it is used
func (m *CommonMemoryRegion) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonMemoryRegion) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonMemoryRegion) UnmarshalBinary(b []byte) error {
var res CommonMemoryRegion
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,56 @@
// 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"
)
// CommonMiscWindows common misc windows
//
// swagger:model common.MiscWindows
type CommonMiscWindows struct {
// left rear quarter
LeftRearQuarter int64 `json:"left_rear_quarter,omitempty"`
// rear windshield
RearWindshield int64 `json:"rear_windshield,omitempty"`
// right rear quarter
RightRearQuarter int64 `json:"right_rear_quarter,omitempty"`
}
// Validate validates this common misc windows
func (m *CommonMiscWindows) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common misc windows based on context it is used
func (m *CommonMiscWindows) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonMiscWindows) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonMiscWindows) UnmarshalBinary(b []byte) error {
var res CommonMiscWindows
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// CommonPassengerSeatHeat common passenger seat heat
//
// swagger:model common.PassengerSeatHeat
type CommonPassengerSeatHeat struct {
// level
Level int64 `json:"level,omitempty"`
}
// Validate validates this common passenger seat heat
func (m *CommonPassengerSeatHeat) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common passenger seat heat based on context it is used
func (m *CommonPassengerSeatHeat) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonPassengerSeatHeat) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonPassengerSeatHeat) UnmarshalBinary(b []byte) error {
var res CommonPassengerSeatHeat
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// CommonRearDefrost common rear defrost
//
// swagger:model common.RearDefrost
type CommonRearDefrost struct {
// on
On bool `json:"on,omitempty"`
}
// Validate validates this common rear defrost
func (m *CommonRearDefrost) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common rear defrost based on context it is used
func (m *CommonRearDefrost) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonRearDefrost) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonRearDefrost) UnmarshalBinary(b []byte) error {
var res CommonRearDefrost
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,145 @@
// 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"
"encoding/json"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonRemoteDiagnosticCommandRequest common remote diagnostic command request
//
// swagger:model common.RemoteDiagnosticCommandRequest
type CommonRemoteDiagnosticCommandRequest struct {
// can net action
CanNetAction string `json:"can_net_action,omitempty"`
// command
// Required: true
// Enum: ["remote_reset","can_network","remote_ignition","read_ecu_versions","write_secoc_key"]
Command *string `json:"command"`
// ecu name
EcuName string `json:"ecu_name,omitempty"`
// ignition action
IgnitionAction string `json:"ignition_action,omitempty"`
// timeout
Timeout int64 `json:"timeout,omitempty"`
// vins
// Required: true
Vins []string `json:"vins"`
}
// Validate validates this common remote diagnostic command request
func (m *CommonRemoteDiagnosticCommandRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCommand(formats); err != nil {
res = append(res, err)
}
if err := m.validateVins(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
var commonRemoteDiagnosticCommandRequestTypeCommandPropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["remote_reset","can_network","remote_ignition","read_ecu_versions","write_secoc_key"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
commonRemoteDiagnosticCommandRequestTypeCommandPropEnum = append(commonRemoteDiagnosticCommandRequestTypeCommandPropEnum, v)
}
}
const (
// CommonRemoteDiagnosticCommandRequestCommandRemoteReset captures enum value "remote_reset"
CommonRemoteDiagnosticCommandRequestCommandRemoteReset string = "remote_reset"
// CommonRemoteDiagnosticCommandRequestCommandCanNetwork captures enum value "can_network"
CommonRemoteDiagnosticCommandRequestCommandCanNetwork string = "can_network"
// CommonRemoteDiagnosticCommandRequestCommandRemoteIgnition captures enum value "remote_ignition"
CommonRemoteDiagnosticCommandRequestCommandRemoteIgnition string = "remote_ignition"
// CommonRemoteDiagnosticCommandRequestCommandReadEcuVersions captures enum value "read_ecu_versions"
CommonRemoteDiagnosticCommandRequestCommandReadEcuVersions string = "read_ecu_versions"
// CommonRemoteDiagnosticCommandRequestCommandWriteSecocKey captures enum value "write_secoc_key"
CommonRemoteDiagnosticCommandRequestCommandWriteSecocKey string = "write_secoc_key"
)
// prop value enum
func (m *CommonRemoteDiagnosticCommandRequest) validateCommandEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, commonRemoteDiagnosticCommandRequestTypeCommandPropEnum, true); err != nil {
return err
}
return nil
}
func (m *CommonRemoteDiagnosticCommandRequest) validateCommand(formats strfmt.Registry) error {
if err := validate.Required("command", "body", m.Command); err != nil {
return err
}
// value enum
if err := m.validateCommandEnum("command", "body", *m.Command); err != nil {
return err
}
return nil
}
func (m *CommonRemoteDiagnosticCommandRequest) validateVins(formats strfmt.Registry) error {
if err := validate.Required("vins", "body", m.Vins); err != nil {
return err
}
return nil
}
// ContextValidate validates this common remote diagnostic command request based on context it is used
func (m *CommonRemoteDiagnosticCommandRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonRemoteDiagnosticCommandRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonRemoteDiagnosticCommandRequest) UnmarshalBinary(b []byte) error {
var res CommonRemoteDiagnosticCommandRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,53 @@
// 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"
)
// CommonSUMSVersion common s u m s version
//
// swagger:model common.SUMSVersion
type CommonSUMSVersion struct {
// os version
OsVersion string `json:"os_version,omitempty"`
// version
Version string `json:"version,omitempty"`
}
// Validate validates this common s u m s version
func (m *CommonSUMSVersion) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common s u m s version based on context it is used
func (m *CommonSUMSVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonSUMSVersion) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonSUMSVersion) UnmarshalBinary(b []byte) error {
var res CommonSUMSVersion
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,121 @@
// 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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// CommonSUMSVersionCreate common s u m s version create
//
// swagger:model common.SUMSVersionCreate
type CommonSUMSVersionCreate struct {
// sumsversions
Sumsversions []*CommonSUMSVersion `json:"sumsversions"`
}
// Validate validates this common s u m s version create
func (m *CommonSUMSVersionCreate) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateSumsversions(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonSUMSVersionCreate) validateSumsversions(formats strfmt.Registry) error {
if swag.IsZero(m.Sumsversions) { // not required
return nil
}
for i := 0; i < len(m.Sumsversions); i++ {
if swag.IsZero(m.Sumsversions[i]) { // not required
continue
}
if m.Sumsversions[i] != nil {
if err := m.Sumsversions[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("sumsversions" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("sumsversions" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// ContextValidate validate this common s u m s version create based on the context it is used
func (m *CommonSUMSVersionCreate) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateSumsversions(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonSUMSVersionCreate) contextValidateSumsversions(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Sumsversions); i++ {
if m.Sumsversions[i] != nil {
if swag.IsZero(m.Sumsversions[i]) { // not required
return nil
}
if err := m.Sumsversions[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("sumsversions" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("sumsversions" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonSUMSVersionCreate) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonSUMSVersionCreate) UnmarshalBinary(b []byte) error {
var res CommonSUMSVersionCreate
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,68 @@
// 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"
)
// CommonSafeState common safe state
//
// swagger:model common.SafeState
type CommonSafeState struct {
// mcu front inverter error
McuFrontInverterError bool `json:"mcu_front_inverter_error,omitempty"`
// mcu front safe state
McuFrontSafeState bool `json:"mcu_front_safe_state,omitempty"`
// mcu rear decoup state
McuRearDecoupState bool `json:"mcu_rear_decoup_state,omitempty"`
// mcu rear inverter error
McuRearInverterError bool `json:"mcu_rear_inverter_error,omitempty"`
// mcu rear safe state
McuRearSafeState bool `json:"mcu_rear_safe_state,omitempty"`
// vcu safe state
VcuSafeState bool `json:"vcu_safe_state,omitempty"`
// vehicle safe state
VehicleSafeState bool `json:"vehicle_safe_state,omitempty"`
}
// Validate validates this common safe state
func (m *CommonSafeState) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common safe state based on context it is used
func (m *CommonSafeState) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonSafeState) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonSafeState) UnmarshalBinary(b []byte) error {
var res CommonSafeState
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,110 @@
// 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"
)
// CommonSignalDescWithECU common signal desc with e c u
//
// swagger:model common.SignalDescWithECU
type CommonSignalDescWithECU struct {
// IsBigEndian is true if the signal is big-endian.
BigEndian bool `json:"big_endian,omitempty"`
// dbc hash
DbcHash string `json:"dbc_hash,omitempty"`
// DefaultValue of the signal.
DefaultValue int64 `json:"default_value,omitempty"`
// Description of the signal.
Description string `json:"description,omitempty"`
// ecu name
EcuName string `json:"ecu_name,omitempty"`
// ECUName is a name of an ECU.
Ecuname string `json:"ecuname,omitempty"`
// Length in bits.
Length int64 `json:"length,omitempty"`
// Max real-world value.
Max float64 `json:"max,omitempty"`
// message id
MessageID int64 `json:"message_id,omitempty"`
// Min real-world value.
Min float64 `json:"min,omitempty"`
// IsMultiplexed is true if the signal is multiplexed.
Multiplexed bool `json:"multiplexed,omitempty"`
// IsMultiplexer is true if the signal is the multiplexor of a multiplexed message.
Multiplexer bool `json:"multiplexer,omitempty"`
// MultiplexerValue is the value of the multiplexer when this signal is present.
MultiplexerValue int64 `json:"multiplexer_value,omitempty"`
// Description of the signal.
Name string `json:"name,omitempty"`
// Offset for real-world transform.
Offset float64 `json:"offset,omitempty"`
// ReceiverNodes is the list of names of the nodes receiving the signal.
ReceiverNodes []string `json:"receiver_nodes"`
// Scale for real-world transform.
Scale float64 `json:"scale,omitempty"`
// IsSigned is true if the signal uses raw signed values.
Signed bool `json:"signed,omitempty"`
// Start bit.
Start int64 `json:"start,omitempty"`
// Unit of the signal.
Unit string `json:"unit,omitempty"`
// ValueDescriptions of the signal.
ValueDescriptions []string `json:"value_descriptions"`
}
// Validate validates this common signal desc with e c u
func (m *CommonSignalDescWithECU) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common signal desc with e c u based on context it is used
func (m *CommonSignalDescWithECU) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonSignalDescWithECU) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonSignalDescWithECU) UnmarshalBinary(b []byte) error {
var res CommonSignalDescWithECU
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,53 @@
// 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"
)
// CommonStateOfCharge common state of charge
//
// swagger:model common.StateOfCharge
type CommonStateOfCharge struct {
// health
Health int64 `json:"health,omitempty"`
// usable
Usable int64 `json:"usable,omitempty"`
}
// Validate validates this common state of charge
func (m *CommonStateOfCharge) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common state of charge based on context it is used
func (m *CommonStateOfCharge) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonStateOfCharge) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonStateOfCharge) UnmarshalBinary(b []byte) error {
var res CommonStateOfCharge
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,311 @@
// 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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonStatusManifest common status manifest
//
// swagger:model common.StatusManifest
type CommonStatusManifest struct {
// Use a pointer so we know when we want to change the value
Active bool `json:"active,omitempty"`
// body type
BodyType string `json:"body_type,omitempty"`
// car update id
CarUpdateID int64 `json:"car_update_id,omitempty"`
// country
Country string `json:"country,omitempty"`
// description
// Max Length: 5120
Description string `json:"description,omitempty"`
// ecu list
EcuList string `json:"ecu_list,omitempty"`
// ecu updates
// Min Items: 1
EcuUpdates []*CommonUpdateManifestECU `json:"ecu_updates"`
// Environment of ECC keys to include
Env string `json:"env,omitempty"`
// fingerprint
// Max Length: 5000
Fingerprint string `json:"fingerprint,omitempty"`
// id
ID int64 `json:"id,omitempty"`
// manifest created
ManifestCreated string `json:"manifest_created,omitempty"`
// max attempts
MaxAttempts int64 `json:"max_attempts,omitempty"`
// model
Model string `json:"model,omitempty"`
// name
// Required: true
// Max Length: 255
Name *string `json:"name"`
// powertrain
Powertrain string `json:"powertrain,omitempty"`
// release notes
// Max Length: 32768
ReleaseNotes string `json:"release_notes,omitempty"`
// restraint
Restraint string `json:"restraint,omitempty"`
// rollback
Rollback bool `json:"rollback,omitempty"`
// status
Status string `json:"status,omitempty"`
// status updated
StatusUpdated string `json:"status_updated,omitempty"`
// Software Update Management System
Sums string `json:"sums,omitempty"`
// trim
Trim string `json:"trim,omitempty"`
// type
// Max Length: 100
Type string `json:"type,omitempty"`
// Duration of update in minutes
UpdateDuration int64 `json:"update_duration,omitempty"`
// version
// Max Length: 255
Version string `json:"version,omitempty"`
// vod
Vod string `json:"vod,omitempty"`
// year
Year int64 `json:"year,omitempty"`
}
// Validate validates this common status manifest
func (m *CommonStatusManifest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateDescription(formats); err != nil {
res = append(res, err)
}
if err := m.validateEcuUpdates(formats); err != nil {
res = append(res, err)
}
if err := m.validateFingerprint(formats); err != nil {
res = append(res, err)
}
if err := m.validateName(formats); err != nil {
res = append(res, err)
}
if err := m.validateReleaseNotes(formats); err != nil {
res = append(res, err)
}
if err := m.validateType(formats); err != nil {
res = append(res, err)
}
if err := m.validateVersion(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonStatusManifest) validateDescription(formats strfmt.Registry) error {
if swag.IsZero(m.Description) { // not required
return nil
}
if err := validate.MaxLength("description", "body", m.Description, 5120); err != nil {
return err
}
return nil
}
func (m *CommonStatusManifest) validateEcuUpdates(formats strfmt.Registry) error {
if swag.IsZero(m.EcuUpdates) { // not required
return nil
}
iEcuUpdatesSize := int64(len(m.EcuUpdates))
if err := validate.MinItems("ecu_updates", "body", iEcuUpdatesSize, 1); err != nil {
return err
}
for i := 0; i < len(m.EcuUpdates); i++ {
if swag.IsZero(m.EcuUpdates[i]) { // not required
continue
}
if m.EcuUpdates[i] != nil {
if err := m.EcuUpdates[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ecu_updates" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("ecu_updates" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CommonStatusManifest) validateFingerprint(formats strfmt.Registry) error {
if swag.IsZero(m.Fingerprint) { // not required
return nil
}
if err := validate.MaxLength("fingerprint", "body", m.Fingerprint, 5000); err != nil {
return err
}
return nil
}
func (m *CommonStatusManifest) validateName(formats strfmt.Registry) error {
if err := validate.Required("name", "body", m.Name); err != nil {
return err
}
if err := validate.MaxLength("name", "body", *m.Name, 255); err != nil {
return err
}
return nil
}
func (m *CommonStatusManifest) validateReleaseNotes(formats strfmt.Registry) error {
if swag.IsZero(m.ReleaseNotes) { // not required
return nil
}
if err := validate.MaxLength("release_notes", "body", m.ReleaseNotes, 32768); err != nil {
return err
}
return nil
}
func (m *CommonStatusManifest) validateType(formats strfmt.Registry) error {
if swag.IsZero(m.Type) { // not required
return nil
}
if err := validate.MaxLength("type", "body", m.Type, 100); err != nil {
return err
}
return nil
}
func (m *CommonStatusManifest) validateVersion(formats strfmt.Registry) error {
if swag.IsZero(m.Version) { // not required
return nil
}
if err := validate.MaxLength("version", "body", m.Version, 255); err != nil {
return err
}
return nil
}
// ContextValidate validate this common status manifest based on the context it is used
func (m *CommonStatusManifest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateEcuUpdates(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonStatusManifest) contextValidateEcuUpdates(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.EcuUpdates); i++ {
if m.EcuUpdates[i] != nil {
if swag.IsZero(m.EcuUpdates[i]) { // not required
return nil
}
if err := m.EcuUpdates[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ecu_updates" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("ecu_updates" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonStatusManifest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonStatusManifest) UnmarshalBinary(b []byte) error {
var res CommonStatusManifest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// CommonSteeringWheelHeat common steering wheel heat
//
// swagger:model common.SteeringWheelHeat
type CommonSteeringWheelHeat struct {
// on
On bool `json:"on,omitempty"`
}
// Validate validates this common steering wheel heat
func (m *CommonSteeringWheelHeat) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common steering wheel heat based on context it is used
func (m *CommonSteeringWheelHeat) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonSteeringWheelHeat) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonSteeringWheelHeat) UnmarshalBinary(b []byte) error {
var res CommonSteeringWheelHeat
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,101 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonSubscription common subscription
//
// swagger:model common.Subscription
type CommonSubscription struct {
// destination
// Required: true
// Max Length: 10
Destination *string `json:"destination"`
// expires
Expires string `json:"expires,omitempty"`
// name
// Required: true
// Max Length: 256
Name *string `json:"name"`
}
// Validate validates this common subscription
func (m *CommonSubscription) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateDestination(formats); err != nil {
res = append(res, err)
}
if err := m.validateName(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonSubscription) validateDestination(formats strfmt.Registry) error {
if err := validate.Required("destination", "body", m.Destination); err != nil {
return err
}
if err := validate.MaxLength("destination", "body", *m.Destination, 10); err != nil {
return err
}
return nil
}
func (m *CommonSubscription) validateName(formats strfmt.Registry) error {
if err := validate.Required("name", "body", m.Name); err != nil {
return err
}
if err := validate.MaxLength("name", "body", *m.Name, 256); err != nil {
return err
}
return nil
}
// ContextValidate validates this common subscription based on context it is used
func (m *CommonSubscription) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonSubscription) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonSubscription) UnmarshalBinary(b []byte) error {
var res CommonSubscription
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,209 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonSubscriptionConfiguration common subscription configuration
//
// swagger:model common.SubscriptionConfiguration
type CommonSubscriptionConfiguration struct {
// configuration
// Example: 9a1a6949d7f8a511df6e2e2771e444dbd6de97e7d98bdecbb5adc4b8965ce3bef353f523dbea123d7882dc043d415cda02810bad1b6f1b8c6202234a424b7d5b
// Required: true
Configuration *string `json:"configuration"`
// did
// Example: 7d5b
// Required: true
Did *string `json:"did"`
// ecu
// Required: true
// Max Length: 100
Ecu *string `json:"ecu"`
// feature id
// Required: true
FeatureID *string `json:"feature_id"`
// hw version
// Required: true
// Max Length: 100
HwVersion *string `json:"hw_version"`
// mask
// Example: 7d5b
// Required: true
Mask *string `json:"mask"`
// pid
// Example: 7d5b
// Required: true
Pid *string `json:"pid"`
// sw version
// Required: true
// Max Length: 100
SwVersion *string `json:"sw_version"`
}
// Validate validates this common subscription configuration
func (m *CommonSubscriptionConfiguration) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateConfiguration(formats); err != nil {
res = append(res, err)
}
if err := m.validateDid(formats); err != nil {
res = append(res, err)
}
if err := m.validateEcu(formats); err != nil {
res = append(res, err)
}
if err := m.validateFeatureID(formats); err != nil {
res = append(res, err)
}
if err := m.validateHwVersion(formats); err != nil {
res = append(res, err)
}
if err := m.validateMask(formats); err != nil {
res = append(res, err)
}
if err := m.validatePid(formats); err != nil {
res = append(res, err)
}
if err := m.validateSwVersion(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonSubscriptionConfiguration) validateConfiguration(formats strfmt.Registry) error {
if err := validate.Required("configuration", "body", m.Configuration); err != nil {
return err
}
return nil
}
func (m *CommonSubscriptionConfiguration) validateDid(formats strfmt.Registry) error {
if err := validate.Required("did", "body", m.Did); err != nil {
return err
}
return nil
}
func (m *CommonSubscriptionConfiguration) validateEcu(formats strfmt.Registry) error {
if err := validate.Required("ecu", "body", m.Ecu); err != nil {
return err
}
if err := validate.MaxLength("ecu", "body", *m.Ecu, 100); err != nil {
return err
}
return nil
}
func (m *CommonSubscriptionConfiguration) validateFeatureID(formats strfmt.Registry) error {
if err := validate.Required("feature_id", "body", m.FeatureID); err != nil {
return err
}
return nil
}
func (m *CommonSubscriptionConfiguration) validateHwVersion(formats strfmt.Registry) error {
if err := validate.Required("hw_version", "body", m.HwVersion); err != nil {
return err
}
if err := validate.MaxLength("hw_version", "body", *m.HwVersion, 100); err != nil {
return err
}
return nil
}
func (m *CommonSubscriptionConfiguration) validateMask(formats strfmt.Registry) error {
if err := validate.Required("mask", "body", m.Mask); err != nil {
return err
}
return nil
}
func (m *CommonSubscriptionConfiguration) validatePid(formats strfmt.Registry) error {
if err := validate.Required("pid", "body", m.Pid); err != nil {
return err
}
return nil
}
func (m *CommonSubscriptionConfiguration) validateSwVersion(formats strfmt.Registry) error {
if err := validate.Required("sw_version", "body", m.SwVersion); err != nil {
return err
}
if err := validate.MaxLength("sw_version", "body", *m.SwVersion, 100); err != nil {
return err
}
return nil
}
// ContextValidate validates this common subscription configuration based on context it is used
func (m *CommonSubscriptionConfiguration) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonSubscriptionConfiguration) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonSubscriptionConfiguration) UnmarshalBinary(b []byte) error {
var res CommonSubscriptionConfiguration
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,169 @@
// 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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonSubscriptionFeature common subscription feature
//
// swagger:model common.SubscriptionFeature
type CommonSubscriptionFeature struct {
// configurations
Configurations []*CommonSubscriptionConfiguration `json:"configurations"`
// description
// Required: true
// Max Length: 5120
Description *string `json:"description"`
// id
ID string `json:"id,omitempty"`
// name
// Required: true
// Max Length: 256
Name *string `json:"name"`
}
// Validate validates this common subscription feature
func (m *CommonSubscriptionFeature) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateConfigurations(formats); err != nil {
res = append(res, err)
}
if err := m.validateDescription(formats); err != nil {
res = append(res, err)
}
if err := m.validateName(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonSubscriptionFeature) validateConfigurations(formats strfmt.Registry) error {
if swag.IsZero(m.Configurations) { // not required
return nil
}
for i := 0; i < len(m.Configurations); i++ {
if swag.IsZero(m.Configurations[i]) { // not required
continue
}
if m.Configurations[i] != nil {
if err := m.Configurations[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("configurations" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("configurations" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CommonSubscriptionFeature) validateDescription(formats strfmt.Registry) error {
if err := validate.Required("description", "body", m.Description); err != nil {
return err
}
if err := validate.MaxLength("description", "body", *m.Description, 5120); err != nil {
return err
}
return nil
}
func (m *CommonSubscriptionFeature) validateName(formats strfmt.Registry) error {
if err := validate.Required("name", "body", m.Name); err != nil {
return err
}
if err := validate.MaxLength("name", "body", *m.Name, 256); err != nil {
return err
}
return nil
}
// ContextValidate validate this common subscription feature based on the context it is used
func (m *CommonSubscriptionFeature) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateConfigurations(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonSubscriptionFeature) contextValidateConfigurations(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Configurations); i++ {
if m.Configurations[i] != nil {
if swag.IsZero(m.Configurations[i]) { // not required
return nil
}
if err := m.Configurations[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("configurations" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("configurations" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonSubscriptionFeature) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonSubscriptionFeature) UnmarshalBinary(b []byte) error {
var res CommonSubscriptionFeature
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,147 @@
// 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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonSubscriptionPackage common subscription package
//
// swagger:model common.SubscriptionPackage
type CommonSubscriptionPackage struct {
// features
Features []*CommonSubscriptionFeature `json:"features"`
// id
ID string `json:"id,omitempty"`
// name
// Required: true
// Max Length: 256
Name *string `json:"name"`
}
// Validate validates this common subscription package
func (m *CommonSubscriptionPackage) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateFeatures(formats); err != nil {
res = append(res, err)
}
if err := m.validateName(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonSubscriptionPackage) validateFeatures(formats strfmt.Registry) error {
if swag.IsZero(m.Features) { // not required
return nil
}
for i := 0; i < len(m.Features); i++ {
if swag.IsZero(m.Features[i]) { // not required
continue
}
if m.Features[i] != nil {
if err := m.Features[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("features" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("features" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CommonSubscriptionPackage) validateName(formats strfmt.Registry) error {
if err := validate.Required("name", "body", m.Name); err != nil {
return err
}
if err := validate.MaxLength("name", "body", *m.Name, 256); err != nil {
return err
}
return nil
}
// ContextValidate validate this common subscription package based on the context it is used
func (m *CommonSubscriptionPackage) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateFeatures(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonSubscriptionPackage) contextValidateFeatures(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Features); i++ {
if m.Features[i] != nil {
if swag.IsZero(m.Features[i]) { // not required
return nil
}
if err := m.Features[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("features" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("features" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonSubscriptionPackage) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonSubscriptionPackage) UnmarshalBinary(b []byte) error {
var res CommonSubscriptionPackage
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// CommonSunroof common sunroof
//
// swagger:model common.Sunroof
type CommonSunroof struct {
// sunroof
Sunroof int64 `json:"sunroof,omitempty"`
}
// Validate validates this common sunroof
func (m *CommonSunroof) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common sunroof based on context it is used
func (m *CommonSunroof) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonSunroof) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonSunroof) UnmarshalBinary(b []byte) error {
var res CommonSunroof
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,219 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonSupplierAccount common supplier account
//
// swagger:model common.SupplierAccount
type CommonSupplierAccount struct {
// address
// Required: true
// Max Length: 100
Address *string `json:"address"`
// company
// Required: true
// Max Length: 100
Company *string `json:"company"`
// contact
// Required: true
// Max Length: 50
Contact *string `json:"contact"`
// ecus
// Required: true
// Max Items: 100
// Min Items: 1
Ecus []string `json:"ecus"`
// email
// Required: true
// Max Length: 1000
Email *string `json:"email"`
// program
// Required: true
// Max Length: 100
Program *string `json:"program"`
// supplier organization id
// Example: 0
SupplierOrganizationID string `json:"supplier_organization_id,omitempty"`
// telephone
// Required: true
// Max Length: 20
Telephone *string `json:"telephone"`
}
// Validate validates this common supplier account
func (m *CommonSupplierAccount) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateAddress(formats); err != nil {
res = append(res, err)
}
if err := m.validateCompany(formats); err != nil {
res = append(res, err)
}
if err := m.validateContact(formats); err != nil {
res = append(res, err)
}
if err := m.validateEcus(formats); err != nil {
res = append(res, err)
}
if err := m.validateEmail(formats); err != nil {
res = append(res, err)
}
if err := m.validateProgram(formats); err != nil {
res = append(res, err)
}
if err := m.validateTelephone(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonSupplierAccount) validateAddress(formats strfmt.Registry) error {
if err := validate.Required("address", "body", m.Address); err != nil {
return err
}
if err := validate.MaxLength("address", "body", *m.Address, 100); err != nil {
return err
}
return nil
}
func (m *CommonSupplierAccount) validateCompany(formats strfmt.Registry) error {
if err := validate.Required("company", "body", m.Company); err != nil {
return err
}
if err := validate.MaxLength("company", "body", *m.Company, 100); err != nil {
return err
}
return nil
}
func (m *CommonSupplierAccount) validateContact(formats strfmt.Registry) error {
if err := validate.Required("contact", "body", m.Contact); err != nil {
return err
}
if err := validate.MaxLength("contact", "body", *m.Contact, 50); err != nil {
return err
}
return nil
}
func (m *CommonSupplierAccount) validateEcus(formats strfmt.Registry) error {
if err := validate.Required("ecus", "body", m.Ecus); err != nil {
return err
}
iEcusSize := int64(len(m.Ecus))
if err := validate.MinItems("ecus", "body", iEcusSize, 1); err != nil {
return err
}
if err := validate.MaxItems("ecus", "body", iEcusSize, 100); err != nil {
return err
}
return nil
}
func (m *CommonSupplierAccount) validateEmail(formats strfmt.Registry) error {
if err := validate.Required("email", "body", m.Email); err != nil {
return err
}
if err := validate.MaxLength("email", "body", *m.Email, 1000); err != nil {
return err
}
return nil
}
func (m *CommonSupplierAccount) validateProgram(formats strfmt.Registry) error {
if err := validate.Required("program", "body", m.Program); err != nil {
return err
}
if err := validate.MaxLength("program", "body", *m.Program, 100); err != nil {
return err
}
return nil
}
func (m *CommonSupplierAccount) validateTelephone(formats strfmt.Registry) error {
if err := validate.Required("telephone", "body", m.Telephone); err != nil {
return err
}
if err := validate.MaxLength("telephone", "body", *m.Telephone, 20); err != nil {
return err
}
return nil
}
// ContextValidate validates this common supplier account based on context it is used
func (m *CommonSupplierAccount) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonSupplierAccount) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonSupplierAccount) UnmarshalBinary(b []byte) error {
var res CommonSupplierAccount
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,53 @@
// 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"
)
// CommonSwVersionRxSwin common sw version rx swin
//
// swagger:model common.SwVersionRxSwin
type CommonSwVersionRxSwin struct {
// rxswin
Rxswin string `json:"rxswin,omitempty"`
// version
Version string `json:"version,omitempty"`
}
// Validate validates this common sw version rx swin
func (m *CommonSwVersionRxSwin) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common sw version rx swin based on context it is used
func (m *CommonSwVersionRxSwin) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonSwVersionRxSwin) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonSwVersionRxSwin) UnmarshalBinary(b []byte) error {
var res CommonSwVersionRxSwin
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,121 @@
// 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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// CommonSwVersionRxSwinCreate common sw version rx swin create
//
// swagger:model common.SwVersionRxSwinCreate
type CommonSwVersionRxSwinCreate struct {
// swversion rxswins
SwversionRxswins []*CommonSwVersionRxSwin `json:"swversion_rxswins"`
}
// Validate validates this common sw version rx swin create
func (m *CommonSwVersionRxSwinCreate) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateSwversionRxswins(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonSwVersionRxSwinCreate) validateSwversionRxswins(formats strfmt.Registry) error {
if swag.IsZero(m.SwversionRxswins) { // not required
return nil
}
for i := 0; i < len(m.SwversionRxswins); i++ {
if swag.IsZero(m.SwversionRxswins[i]) { // not required
continue
}
if m.SwversionRxswins[i] != nil {
if err := m.SwversionRxswins[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("swversion_rxswins" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("swversion_rxswins" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// ContextValidate validate this common sw version rx swin create based on the context it is used
func (m *CommonSwVersionRxSwinCreate) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateSwversionRxswins(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonSwVersionRxSwinCreate) contextValidateSwversionRxswins(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.SwversionRxswins); i++ {
if m.SwversionRxswins[i] != nil {
if swag.IsZero(m.SwversionRxswins[i]) { // not required
return nil
}
if err := m.SwversionRxswins[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("swversion_rxswins" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("swversion_rxswins" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonSwVersionRxSwinCreate) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonSwVersionRxSwinCreate) UnmarshalBinary(b []byte) error {
var res CommonSwVersionRxSwinCreate
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,361 @@
// 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"
"encoding/json"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonUpdateCarRequest common update car request
//
// swagger:model common.UpdateCarRequest
type CommonUpdateCarRequest struct {
// body type
// Max Length: 256
BodyType string `json:"body_type,omitempty"`
// canbus
Canbus *CommonCANBus `json:"canbus,omitempty"`
// country
// Max Length: 256
Country string `json:"country,omitempty"`
// debug mask
DebugMask string `json:"debug_mask,omitempty"`
// dlt enabled
DltEnabled bool `json:"dlt_enabled,omitempty"`
// dlt level
// Enum: [0,1,2,3,4,5,6,255]
DltLevel int64 `json:"dlt_level,omitempty"`
// dtc ttl
DtcTTL int64 `json:"dtc_ttl,omitempty"`
// iccid
// Max Length: 50
Iccid string `json:"iccid,omitempty"`
// idps enabled
IdpsEnabled bool `json:"idps_enabled,omitempty"`
// log level
LogLevel string `json:"log_level,omitempty"`
// model
// Required: true
// Max Length: 256
Model *string `json:"model"`
// powertrain
// Max Length: 256
Powertrain string `json:"powertrain,omitempty"`
// restraint
// Max Length: 256
Restraint string `json:"restraint,omitempty"`
// sums version
SumsVersion string `json:"sums_version,omitempty"`
// tags
Tags []string `json:"tags"`
// trim
// Required: true
// Max Length: 256
Trim *string `json:"trim"`
// vin
// Required: true
Vin *string `json:"vin"`
// year
// Required: true
// Maximum: 9999
// Minimum: 1000
Year *int64 `json:"year"`
}
// Validate validates this common update car request
func (m *CommonUpdateCarRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateBodyType(formats); err != nil {
res = append(res, err)
}
if err := m.validateCanbus(formats); err != nil {
res = append(res, err)
}
if err := m.validateCountry(formats); err != nil {
res = append(res, err)
}
if err := m.validateDltLevel(formats); err != nil {
res = append(res, err)
}
if err := m.validateIccid(formats); err != nil {
res = append(res, err)
}
if err := m.validateModel(formats); err != nil {
res = append(res, err)
}
if err := m.validatePowertrain(formats); err != nil {
res = append(res, err)
}
if err := m.validateRestraint(formats); err != nil {
res = append(res, err)
}
if err := m.validateTrim(formats); err != nil {
res = append(res, err)
}
if err := m.validateVin(formats); err != nil {
res = append(res, err)
}
if err := m.validateYear(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonUpdateCarRequest) validateBodyType(formats strfmt.Registry) error {
if swag.IsZero(m.BodyType) { // not required
return nil
}
if err := validate.MaxLength("body_type", "body", m.BodyType, 256); err != nil {
return err
}
return nil
}
func (m *CommonUpdateCarRequest) validateCanbus(formats strfmt.Registry) error {
if swag.IsZero(m.Canbus) { // not required
return nil
}
if m.Canbus != nil {
if err := m.Canbus.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("canbus")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("canbus")
}
return err
}
}
return nil
}
func (m *CommonUpdateCarRequest) validateCountry(formats strfmt.Registry) error {
if swag.IsZero(m.Country) { // not required
return nil
}
if err := validate.MaxLength("country", "body", m.Country, 256); err != nil {
return err
}
return nil
}
var commonUpdateCarRequestTypeDltLevelPropEnum []interface{}
func init() {
var res []int64
if err := json.Unmarshal([]byte(`[0,1,2,3,4,5,6,255]`), &res); err != nil {
panic(err)
}
for _, v := range res {
commonUpdateCarRequestTypeDltLevelPropEnum = append(commonUpdateCarRequestTypeDltLevelPropEnum, v)
}
}
// prop value enum
func (m *CommonUpdateCarRequest) validateDltLevelEnum(path, location string, value int64) error {
if err := validate.EnumCase(path, location, value, commonUpdateCarRequestTypeDltLevelPropEnum, true); err != nil {
return err
}
return nil
}
func (m *CommonUpdateCarRequest) validateDltLevel(formats strfmt.Registry) error {
if swag.IsZero(m.DltLevel) { // not required
return nil
}
// value enum
if err := m.validateDltLevelEnum("dlt_level", "body", m.DltLevel); err != nil {
return err
}
return nil
}
func (m *CommonUpdateCarRequest) validateIccid(formats strfmt.Registry) error {
if swag.IsZero(m.Iccid) { // not required
return nil
}
if err := validate.MaxLength("iccid", "body", m.Iccid, 50); err != nil {
return err
}
return nil
}
func (m *CommonUpdateCarRequest) validateModel(formats strfmt.Registry) error {
if err := validate.Required("model", "body", m.Model); err != nil {
return err
}
if err := validate.MaxLength("model", "body", *m.Model, 256); err != nil {
return err
}
return nil
}
func (m *CommonUpdateCarRequest) validatePowertrain(formats strfmt.Registry) error {
if swag.IsZero(m.Powertrain) { // not required
return nil
}
if err := validate.MaxLength("powertrain", "body", m.Powertrain, 256); err != nil {
return err
}
return nil
}
func (m *CommonUpdateCarRequest) validateRestraint(formats strfmt.Registry) error {
if swag.IsZero(m.Restraint) { // not required
return nil
}
if err := validate.MaxLength("restraint", "body", m.Restraint, 256); err != nil {
return err
}
return nil
}
func (m *CommonUpdateCarRequest) validateTrim(formats strfmt.Registry) error {
if err := validate.Required("trim", "body", m.Trim); err != nil {
return err
}
if err := validate.MaxLength("trim", "body", *m.Trim, 256); err != nil {
return err
}
return nil
}
func (m *CommonUpdateCarRequest) validateVin(formats strfmt.Registry) error {
if err := validate.Required("vin", "body", m.Vin); err != nil {
return err
}
return nil
}
func (m *CommonUpdateCarRequest) validateYear(formats strfmt.Registry) error {
if err := validate.Required("year", "body", m.Year); err != nil {
return err
}
if err := validate.MinimumInt("year", "body", *m.Year, 1000, false); err != nil {
return err
}
if err := validate.MaximumInt("year", "body", *m.Year, 9999, false); err != nil {
return err
}
return nil
}
// ContextValidate validate this common update car request based on the context it is used
func (m *CommonUpdateCarRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateCanbus(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonUpdateCarRequest) contextValidateCanbus(ctx context.Context, formats strfmt.Registry) error {
if m.Canbus != nil {
if swag.IsZero(m.Canbus) { // not required
return nil
}
if err := m.Canbus.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("canbus")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("canbus")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonUpdateCarRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonUpdateCarRequest) UnmarshalBinary(b []byte) error {
var res CommonUpdateCarRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,155 @@
// 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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonUpdateConfigManifest common update config manifest
//
// swagger:model common.UpdateConfigManifest
type CommonUpdateConfigManifest struct {
// car update id
CarUpdateID int64 `json:"car_update_id,omitempty"`
// ecu updates
// Min Items: 1
EcuUpdates []*CommonUpdateConfigManifestECU `json:"ecu_updates"`
// This can be maybe removed, since only one type of update will be sent with this\
// Max Length: 100
Type string `json:"type,omitempty"`
// vod
Vod string `json:"vod,omitempty"`
}
// Validate validates this common update config manifest
func (m *CommonUpdateConfigManifest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateEcuUpdates(formats); err != nil {
res = append(res, err)
}
if err := m.validateType(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonUpdateConfigManifest) validateEcuUpdates(formats strfmt.Registry) error {
if swag.IsZero(m.EcuUpdates) { // not required
return nil
}
iEcuUpdatesSize := int64(len(m.EcuUpdates))
if err := validate.MinItems("ecu_updates", "body", iEcuUpdatesSize, 1); err != nil {
return err
}
for i := 0; i < len(m.EcuUpdates); i++ {
if swag.IsZero(m.EcuUpdates[i]) { // not required
continue
}
if m.EcuUpdates[i] != nil {
if err := m.EcuUpdates[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ecu_updates" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("ecu_updates" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CommonUpdateConfigManifest) validateType(formats strfmt.Registry) error {
if swag.IsZero(m.Type) { // not required
return nil
}
if err := validate.MaxLength("type", "body", m.Type, 100); err != nil {
return err
}
return nil
}
// ContextValidate validate this common update config manifest based on the context it is used
func (m *CommonUpdateConfigManifest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateEcuUpdates(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonUpdateConfigManifest) contextValidateEcuUpdates(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.EcuUpdates); i++ {
if m.EcuUpdates[i] != nil {
if swag.IsZero(m.EcuUpdates[i]) { // not required
return nil
}
if err := m.EcuUpdates[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ecu_updates" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("ecu_updates" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonUpdateConfigManifest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonUpdateConfigManifest) UnmarshalBinary(b []byte) error {
var res CommonUpdateConfigManifest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,101 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonUpdateConfigManifestECU common update config manifest e c u
//
// swagger:model common.UpdateConfigManifestECU
type CommonUpdateConfigManifestECU struct {
// configuration
// Max Length: 5000
Configuration string `json:"configuration,omitempty"`
// name
// Required: true
// Max Length: 10
// Min Length: 2
Name *string `json:"name"`
}
// Validate validates this common update config manifest e c u
func (m *CommonUpdateConfigManifestECU) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateConfiguration(formats); err != nil {
res = append(res, err)
}
if err := m.validateName(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonUpdateConfigManifestECU) validateConfiguration(formats strfmt.Registry) error {
if swag.IsZero(m.Configuration) { // not required
return nil
}
if err := validate.MaxLength("configuration", "body", m.Configuration, 5000); err != nil {
return err
}
return nil
}
func (m *CommonUpdateConfigManifestECU) validateName(formats strfmt.Registry) error {
if err := validate.Required("name", "body", m.Name); err != nil {
return err
}
if err := validate.MinLength("name", "body", *m.Name, 2); err != nil {
return err
}
if err := validate.MaxLength("name", "body", *m.Name, 10); err != nil {
return err
}
return nil
}
// ContextValidate validates this common update config manifest e c u based on context it is used
func (m *CommonUpdateConfigManifestECU) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonUpdateConfigManifestECU) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonUpdateConfigManifestECU) UnmarshalBinary(b []byte) error {
var res CommonUpdateConfigManifestECU
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,302 @@
// 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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonUpdateManifest common update manifest
//
// swagger:model common.UpdateManifest
type CommonUpdateManifest struct {
// Use a pointer so we know when we want to change the value
Active bool `json:"active,omitempty"`
// body type
BodyType string `json:"body_type,omitempty"`
// car update id
CarUpdateID int64 `json:"car_update_id,omitempty"`
// country
Country string `json:"country,omitempty"`
// description
// Max Length: 5120
Description string `json:"description,omitempty"`
// ecu list
EcuList string `json:"ecu_list,omitempty"`
// ecu updates
// Min Items: 1
EcuUpdates []*CommonUpdateManifestECU `json:"ecu_updates"`
// Environment of ECC keys to include
Env string `json:"env,omitempty"`
// fingerprint
// Max Length: 5000
Fingerprint string `json:"fingerprint,omitempty"`
// id
ID int64 `json:"id,omitempty"`
// max attempts
MaxAttempts int64 `json:"max_attempts,omitempty"`
// model
Model string `json:"model,omitempty"`
// name
// Required: true
// Max Length: 255
Name *string `json:"name"`
// powertrain
Powertrain string `json:"powertrain,omitempty"`
// release notes
// Max Length: 32768
ReleaseNotes string `json:"release_notes,omitempty"`
// restraint
Restraint string `json:"restraint,omitempty"`
// rollback
Rollback bool `json:"rollback,omitempty"`
// Software Update Management System
Sums string `json:"sums,omitempty"`
// trim
Trim string `json:"trim,omitempty"`
// type
// Max Length: 100
Type string `json:"type,omitempty"`
// Duration of update in minutes
UpdateDuration int64 `json:"update_duration,omitempty"`
// version
// Max Length: 255
Version string `json:"version,omitempty"`
// vod
Vod string `json:"vod,omitempty"`
// year
Year int64 `json:"year,omitempty"`
}
// Validate validates this common update manifest
func (m *CommonUpdateManifest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateDescription(formats); err != nil {
res = append(res, err)
}
if err := m.validateEcuUpdates(formats); err != nil {
res = append(res, err)
}
if err := m.validateFingerprint(formats); err != nil {
res = append(res, err)
}
if err := m.validateName(formats); err != nil {
res = append(res, err)
}
if err := m.validateReleaseNotes(formats); err != nil {
res = append(res, err)
}
if err := m.validateType(formats); err != nil {
res = append(res, err)
}
if err := m.validateVersion(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonUpdateManifest) validateDescription(formats strfmt.Registry) error {
if swag.IsZero(m.Description) { // not required
return nil
}
if err := validate.MaxLength("description", "body", m.Description, 5120); err != nil {
return err
}
return nil
}
func (m *CommonUpdateManifest) validateEcuUpdates(formats strfmt.Registry) error {
if swag.IsZero(m.EcuUpdates) { // not required
return nil
}
iEcuUpdatesSize := int64(len(m.EcuUpdates))
if err := validate.MinItems("ecu_updates", "body", iEcuUpdatesSize, 1); err != nil {
return err
}
for i := 0; i < len(m.EcuUpdates); i++ {
if swag.IsZero(m.EcuUpdates[i]) { // not required
continue
}
if m.EcuUpdates[i] != nil {
if err := m.EcuUpdates[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ecu_updates" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("ecu_updates" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CommonUpdateManifest) validateFingerprint(formats strfmt.Registry) error {
if swag.IsZero(m.Fingerprint) { // not required
return nil
}
if err := validate.MaxLength("fingerprint", "body", m.Fingerprint, 5000); err != nil {
return err
}
return nil
}
func (m *CommonUpdateManifest) validateName(formats strfmt.Registry) error {
if err := validate.Required("name", "body", m.Name); err != nil {
return err
}
if err := validate.MaxLength("name", "body", *m.Name, 255); err != nil {
return err
}
return nil
}
func (m *CommonUpdateManifest) validateReleaseNotes(formats strfmt.Registry) error {
if swag.IsZero(m.ReleaseNotes) { // not required
return nil
}
if err := validate.MaxLength("release_notes", "body", m.ReleaseNotes, 32768); err != nil {
return err
}
return nil
}
func (m *CommonUpdateManifest) validateType(formats strfmt.Registry) error {
if swag.IsZero(m.Type) { // not required
return nil
}
if err := validate.MaxLength("type", "body", m.Type, 100); err != nil {
return err
}
return nil
}
func (m *CommonUpdateManifest) validateVersion(formats strfmt.Registry) error {
if swag.IsZero(m.Version) { // not required
return nil
}
if err := validate.MaxLength("version", "body", m.Version, 255); err != nil {
return err
}
return nil
}
// ContextValidate validate this common update manifest based on the context it is used
func (m *CommonUpdateManifest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateEcuUpdates(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonUpdateManifest) contextValidateEcuUpdates(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.EcuUpdates); i++ {
if m.EcuUpdates[i] != nil {
if swag.IsZero(m.EcuUpdates[i]) { // not required
return nil
}
if err := m.EcuUpdates[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ecu_updates" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("ecu_updates" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonUpdateManifest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonUpdateManifest) UnmarshalBinary(b []byte) error {
var res CommonUpdateManifest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,74 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonUpdateManifestArchiveRequest common update manifest archive request
//
// swagger:model common.UpdateManifestArchiveRequest
type CommonUpdateManifestArchiveRequest struct {
// active
Active bool `json:"active,omitempty"`
// ids
// Required: true
Ids []int64 `json:"ids"`
}
// Validate validates this common update manifest archive request
func (m *CommonUpdateManifestArchiveRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateIds(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonUpdateManifestArchiveRequest) validateIds(formats strfmt.Registry) error {
if err := validate.Required("ids", "body", m.Ids); err != nil {
return err
}
return nil
}
// ContextValidate validates this common update manifest archive request based on context it is used
func (m *CommonUpdateManifestArchiveRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonUpdateManifestArchiveRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonUpdateManifestArchiveRequest) UnmarshalBinary(b []byte) error {
var res CommonUpdateManifestArchiveRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,386 @@
// 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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonUpdateManifestECU common update manifest e c u
//
// swagger:model common.UpdateManifestECU
type CommonUpdateManifestECU struct {
// configuration
// Max Length: 5000
Configuration string `json:"configuration,omitempty"`
// configuration mask
// Max Length: 5000
ConfigurationMask string `json:"configuration_mask,omitempty"`
// current version
CurrentVersion string `json:"current_version,omitempty"`
// ecc keys
EccKeys *CommonECCKeys `json:"ecc_keys,omitempty"`
// files
Files []*CommonUpdateManifestFile `json:"files"`
// hw version
HwVersion string `json:"hw_version,omitempty"`
// hw versions
HwVersions []string `json:"hw_versions"`
// id
ID int64 `json:"id,omitempty"`
// install priority
InstallPriority int64 `json:"install_priority,omitempty"`
// manifest id
// Required: true
// Minimum: 0
ManifestID *int64 `json:"manifest_id"`
// mode
// Required: true
// Max Length: 4
Mode *string `json:"mode"`
// name
// Required: true
// Max Length: 10
// Min Length: 2
Name *string `json:"name"`
// rollback
Rollback []*CommonUpdateManifestECU `json:"rollback"`
// self download
SelfDownload bool `json:"self_download,omitempty"`
// version
// Required: true
// Max Length: 255
Version *string `json:"version"`
}
// Validate validates this common update manifest e c u
func (m *CommonUpdateManifestECU) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateConfiguration(formats); err != nil {
res = append(res, err)
}
if err := m.validateConfigurationMask(formats); err != nil {
res = append(res, err)
}
if err := m.validateEccKeys(formats); err != nil {
res = append(res, err)
}
if err := m.validateFiles(formats); err != nil {
res = append(res, err)
}
if err := m.validateManifestID(formats); err != nil {
res = append(res, err)
}
if err := m.validateMode(formats); err != nil {
res = append(res, err)
}
if err := m.validateName(formats); err != nil {
res = append(res, err)
}
if err := m.validateRollback(formats); err != nil {
res = append(res, err)
}
if err := m.validateVersion(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonUpdateManifestECU) validateConfiguration(formats strfmt.Registry) error {
if swag.IsZero(m.Configuration) { // not required
return nil
}
if err := validate.MaxLength("configuration", "body", m.Configuration, 5000); err != nil {
return err
}
return nil
}
func (m *CommonUpdateManifestECU) validateConfigurationMask(formats strfmt.Registry) error {
if swag.IsZero(m.ConfigurationMask) { // not required
return nil
}
if err := validate.MaxLength("configuration_mask", "body", m.ConfigurationMask, 5000); err != nil {
return err
}
return nil
}
func (m *CommonUpdateManifestECU) validateEccKeys(formats strfmt.Registry) error {
if swag.IsZero(m.EccKeys) { // not required
return nil
}
if m.EccKeys != nil {
if err := m.EccKeys.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ecc_keys")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("ecc_keys")
}
return err
}
}
return nil
}
func (m *CommonUpdateManifestECU) validateFiles(formats strfmt.Registry) error {
if swag.IsZero(m.Files) { // not required
return nil
}
for i := 0; i < len(m.Files); i++ {
if swag.IsZero(m.Files[i]) { // not required
continue
}
if m.Files[i] != nil {
if err := m.Files[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("files" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("files" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CommonUpdateManifestECU) validateManifestID(formats strfmt.Registry) error {
if err := validate.Required("manifest_id", "body", m.ManifestID); err != nil {
return err
}
if err := validate.MinimumInt("manifest_id", "body", *m.ManifestID, 0, false); err != nil {
return err
}
return nil
}
func (m *CommonUpdateManifestECU) validateMode(formats strfmt.Registry) error {
if err := validate.Required("mode", "body", m.Mode); err != nil {
return err
}
if err := validate.MaxLength("mode", "body", *m.Mode, 4); err != nil {
return err
}
return nil
}
func (m *CommonUpdateManifestECU) validateName(formats strfmt.Registry) error {
if err := validate.Required("name", "body", m.Name); err != nil {
return err
}
if err := validate.MinLength("name", "body", *m.Name, 2); err != nil {
return err
}
if err := validate.MaxLength("name", "body", *m.Name, 10); err != nil {
return err
}
return nil
}
func (m *CommonUpdateManifestECU) validateRollback(formats strfmt.Registry) error {
if swag.IsZero(m.Rollback) { // not required
return nil
}
for i := 0; i < len(m.Rollback); i++ {
if swag.IsZero(m.Rollback[i]) { // not required
continue
}
if m.Rollback[i] != nil {
if err := m.Rollback[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("rollback" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("rollback" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CommonUpdateManifestECU) validateVersion(formats strfmt.Registry) error {
if err := validate.Required("version", "body", m.Version); err != nil {
return err
}
if err := validate.MaxLength("version", "body", *m.Version, 255); err != nil {
return err
}
return nil
}
// ContextValidate validate this common update manifest e c u based on the context it is used
func (m *CommonUpdateManifestECU) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateEccKeys(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateFiles(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateRollback(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonUpdateManifestECU) contextValidateEccKeys(ctx context.Context, formats strfmt.Registry) error {
if m.EccKeys != nil {
if swag.IsZero(m.EccKeys) { // not required
return nil
}
if err := m.EccKeys.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("ecc_keys")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("ecc_keys")
}
return err
}
}
return nil
}
func (m *CommonUpdateManifestECU) contextValidateFiles(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Files); i++ {
if m.Files[i] != nil {
if swag.IsZero(m.Files[i]) { // not required
return nil
}
if err := m.Files[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("files" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("files" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *CommonUpdateManifestECU) contextValidateRollback(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Rollback); i++ {
if m.Rollback[i] != nil {
if swag.IsZero(m.Rollback[i]) { // not required
return nil
}
if err := m.Rollback[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("rollback" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("rollback" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonUpdateManifestECU) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonUpdateManifestECU) UnmarshalBinary(b []byte) error {
var res CommonUpdateManifestECU
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,350 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonUpdateManifestFile common update manifest file
//
// swagger:model common.UpdateManifestFile
type CommonUpdateManifestFile struct {
// checksum
// Max Length: 8
Checksum string `json:"checksum,omitempty"`
// compatible drive sides
CompatibleDriveSides []string `json:"compatible_drive_sides"`
// compatible trims
CompatibleTrims []string `json:"compatible_trims"`
// erase region
EraseRegion *CommonMemoryRegion `json:"erase_region,omitempty"`
// file id
FileID string `json:"file_id,omitempty"`
// file key
FileKey *CommonFileKeyResponse `json:"file_key,omitempty"`
// file size
FileSize int64 `json:"file_size,omitempty"`
// filename
// Max Length: 512
Filename string `json:"filename,omitempty"`
// manifest ecu id
// Minimum: 0
ManifestEcuID *int64 `json:"manifest_ecu_id,omitempty"`
// order
Order int64 `json:"order,omitempty"`
// parsed file
ParsedFile bool `json:"parsed_file,omitempty"`
// signature
// Max Length: 129
Signature string `json:"signature,omitempty"`
// type
// Max Length: 255
Type string `json:"type,omitempty"`
// url
// Max Length: 32768
URL string `json:"url,omitempty"`
// write region
WriteRegion *CommonMemoryRegion `json:"write_region,omitempty"`
}
// Validate validates this common update manifest file
func (m *CommonUpdateManifestFile) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateChecksum(formats); err != nil {
res = append(res, err)
}
if err := m.validateEraseRegion(formats); err != nil {
res = append(res, err)
}
if err := m.validateFileKey(formats); err != nil {
res = append(res, err)
}
if err := m.validateFilename(formats); err != nil {
res = append(res, err)
}
if err := m.validateManifestEcuID(formats); err != nil {
res = append(res, err)
}
if err := m.validateSignature(formats); err != nil {
res = append(res, err)
}
if err := m.validateType(formats); err != nil {
res = append(res, err)
}
if err := m.validateURL(formats); err != nil {
res = append(res, err)
}
if err := m.validateWriteRegion(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonUpdateManifestFile) validateChecksum(formats strfmt.Registry) error {
if swag.IsZero(m.Checksum) { // not required
return nil
}
if err := validate.MaxLength("checksum", "body", m.Checksum, 8); err != nil {
return err
}
return nil
}
func (m *CommonUpdateManifestFile) validateEraseRegion(formats strfmt.Registry) error {
if swag.IsZero(m.EraseRegion) { // not required
return nil
}
if m.EraseRegion != nil {
if err := m.EraseRegion.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("erase_region")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("erase_region")
}
return err
}
}
return nil
}
func (m *CommonUpdateManifestFile) validateFileKey(formats strfmt.Registry) error {
if swag.IsZero(m.FileKey) { // not required
return nil
}
if m.FileKey != nil {
if err := m.FileKey.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("file_key")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("file_key")
}
return err
}
}
return nil
}
func (m *CommonUpdateManifestFile) validateFilename(formats strfmt.Registry) error {
if swag.IsZero(m.Filename) { // not required
return nil
}
if err := validate.MaxLength("filename", "body", m.Filename, 512); err != nil {
return err
}
return nil
}
func (m *CommonUpdateManifestFile) validateManifestEcuID(formats strfmt.Registry) error {
if swag.IsZero(m.ManifestEcuID) { // not required
return nil
}
if err := validate.MinimumInt("manifest_ecu_id", "body", *m.ManifestEcuID, 0, false); err != nil {
return err
}
return nil
}
func (m *CommonUpdateManifestFile) validateSignature(formats strfmt.Registry) error {
if swag.IsZero(m.Signature) { // not required
return nil
}
if err := validate.MaxLength("signature", "body", m.Signature, 129); err != nil {
return err
}
return nil
}
func (m *CommonUpdateManifestFile) validateType(formats strfmt.Registry) error {
if swag.IsZero(m.Type) { // not required
return nil
}
if err := validate.MaxLength("type", "body", m.Type, 255); err != nil {
return err
}
return nil
}
func (m *CommonUpdateManifestFile) validateURL(formats strfmt.Registry) error {
if swag.IsZero(m.URL) { // not required
return nil
}
if err := validate.MaxLength("url", "body", m.URL, 32768); err != nil {
return err
}
return nil
}
func (m *CommonUpdateManifestFile) validateWriteRegion(formats strfmt.Registry) error {
if swag.IsZero(m.WriteRegion) { // not required
return nil
}
if m.WriteRegion != nil {
if err := m.WriteRegion.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("write_region")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("write_region")
}
return err
}
}
return nil
}
// ContextValidate validate this common update manifest file based on the context it is used
func (m *CommonUpdateManifestFile) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateEraseRegion(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateFileKey(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateWriteRegion(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonUpdateManifestFile) contextValidateEraseRegion(ctx context.Context, formats strfmt.Registry) error {
if m.EraseRegion != nil {
if swag.IsZero(m.EraseRegion) { // not required
return nil
}
if err := m.EraseRegion.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("erase_region")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("erase_region")
}
return err
}
}
return nil
}
func (m *CommonUpdateManifestFile) contextValidateFileKey(ctx context.Context, formats strfmt.Registry) error {
if m.FileKey != nil {
if swag.IsZero(m.FileKey) { // not required
return nil
}
if err := m.FileKey.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("file_key")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("file_key")
}
return err
}
}
return nil
}
func (m *CommonUpdateManifestFile) contextValidateWriteRegion(ctx context.Context, formats strfmt.Registry) error {
if m.WriteRegion != nil {
if swag.IsZero(m.WriteRegion) { // not required
return nil
}
if err := m.WriteRegion.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("write_region")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("write_region")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *CommonUpdateManifestFile) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonUpdateManifestFile) UnmarshalBinary(b []byte) error {
var res CommonUpdateManifestFile
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,191 @@
// 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"
"encoding/json"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonUpdateManifestUpdateRequest common update manifest update request
//
// swagger:model common.UpdateManifestUpdateRequest
type CommonUpdateManifestUpdateRequest struct {
// active
Active bool `json:"active,omitempty"`
// body type
BodyType string `json:"body_type,omitempty"`
// country
Country string `json:"country,omitempty"`
// env
Env string `json:"env,omitempty"`
// id
ID int64 `json:"id,omitempty"`
// max attempts
MaxAttempts int64 `json:"max_attempts,omitempty"`
// model
Model string `json:"model,omitempty"`
// name
// Required: true
// Max Length: 255
Name *string `json:"name"`
// powertrain
Powertrain string `json:"powertrain,omitempty"`
// release notes
// Max Length: 32768
ReleaseNotes string `json:"release_notes,omitempty"`
// restraint
Restraint string `json:"restraint,omitempty"`
// rollback
Rollback bool `json:"rollback,omitempty"`
// sums
Sums string `json:"sums,omitempty"`
// trim
Trim string `json:"trim,omitempty"`
// type
// Required: true
// Enum: ["standard","forced"]
Type *string `json:"type"`
// update duration
UpdateDuration int64 `json:"update_duration,omitempty"`
// year
Year int64 `json:"year,omitempty"`
}
// Validate validates this common update manifest update request
func (m *CommonUpdateManifestUpdateRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateName(formats); err != nil {
res = append(res, err)
}
if err := m.validateReleaseNotes(formats); err != nil {
res = append(res, err)
}
if err := m.validateType(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonUpdateManifestUpdateRequest) validateName(formats strfmt.Registry) error {
if err := validate.Required("name", "body", m.Name); err != nil {
return err
}
if err := validate.MaxLength("name", "body", *m.Name, 255); err != nil {
return err
}
return nil
}
func (m *CommonUpdateManifestUpdateRequest) validateReleaseNotes(formats strfmt.Registry) error {
if swag.IsZero(m.ReleaseNotes) { // not required
return nil
}
if err := validate.MaxLength("release_notes", "body", m.ReleaseNotes, 32768); err != nil {
return err
}
return nil
}
var commonUpdateManifestUpdateRequestTypeTypePropEnum []interface{}
func init() {
var res []string
if err := json.Unmarshal([]byte(`["standard","forced"]`), &res); err != nil {
panic(err)
}
for _, v := range res {
commonUpdateManifestUpdateRequestTypeTypePropEnum = append(commonUpdateManifestUpdateRequestTypeTypePropEnum, v)
}
}
const (
// CommonUpdateManifestUpdateRequestTypeStandard captures enum value "standard"
CommonUpdateManifestUpdateRequestTypeStandard string = "standard"
// CommonUpdateManifestUpdateRequestTypeForced captures enum value "forced"
CommonUpdateManifestUpdateRequestTypeForced string = "forced"
)
// prop value enum
func (m *CommonUpdateManifestUpdateRequest) validateTypeEnum(path, location string, value string) error {
if err := validate.EnumCase(path, location, value, commonUpdateManifestUpdateRequestTypeTypePropEnum, true); err != nil {
return err
}
return nil
}
func (m *CommonUpdateManifestUpdateRequest) validateType(formats strfmt.Registry) error {
if err := validate.Required("type", "body", m.Type); err != nil {
return err
}
// value enum
if err := m.validateTypeEnum("type", "body", *m.Type); err != nil {
return err
}
return nil
}
// ContextValidate validates this common update manifest update request based on context it is used
func (m *CommonUpdateManifestUpdateRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonUpdateManifestUpdateRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonUpdateManifestUpdateRequest) UnmarshalBinary(b []byte) error {
var res CommonUpdateManifestUpdateRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// CommonVCU0x260Descriptor common v c u0x260 descriptor
//
// swagger:model common.VCU0x260Descriptor
type CommonVCU0x260Descriptor struct {
// charge type
ChargeType string `json:"charge_type,omitempty"`
}
// Validate validates this common v c u0x260 descriptor
func (m *CommonVCU0x260Descriptor) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common v c u0x260 descriptor based on context it is used
func (m *CommonVCU0x260Descriptor) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonVCU0x260Descriptor) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonVCU0x260Descriptor) UnmarshalBinary(b []byte) error {
var res CommonVCU0x260Descriptor
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,53 @@
// 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"
)
// CommonVCUChargingMetrics common v c u charging metrics
//
// swagger:model common.VCUChargingMetrics
type CommonVCUChargingMetrics struct {
// remaining charging time
RemainingChargingTime int64 `json:"remaining_charging_time,omitempty"`
// remaining charging time full
RemainingChargingTimeFull int64 `json:"remaining_charging_time_full,omitempty"`
}
// Validate validates this common v c u charging metrics
func (m *CommonVCUChargingMetrics) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common v c u charging metrics based on context it is used
func (m *CommonVCUChargingMetrics) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonVCUChargingMetrics) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonVCUChargingMetrics) UnmarshalBinary(b []byte) error {
var res CommonVCUChargingMetrics
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// CommonVCUChargingStatus common v c u charging status
//
// swagger:model common.VCUChargingStatus
type CommonVCUChargingStatus struct {
// charging status
ChargingStatus string `json:"charging_status,omitempty"`
}
// Validate validates this common v c u charging status
func (m *CommonVCUChargingStatus) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common v c u charging status based on context it is used
func (m *CommonVCUChargingStatus) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonVCUChargingStatus) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonVCUChargingStatus) UnmarshalBinary(b []byte) error {
var res CommonVCUChargingStatus
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,78 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// CommonVINs common v i ns
//
// swagger:model common.VINs
type CommonVINs struct {
// vins
// Required: true
// Min Items: 1
Vins []string `json:"vins"`
}
// Validate validates this common v i ns
func (m *CommonVINs) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateVins(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *CommonVINs) validateVins(formats strfmt.Registry) error {
if err := validate.Required("vins", "body", m.Vins); err != nil {
return err
}
iVinsSize := int64(len(m.Vins))
if err := validate.MinItems("vins", "body", iVinsSize, 1); err != nil {
return err
}
return nil
}
// ContextValidate validates this common v i ns based on context it is used
func (m *CommonVINs) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonVINs) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonVINs) UnmarshalBinary(b []byte) error {
var res CommonVINs
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// CommonVehicleReadyState common vehicle ready state
//
// swagger:model common.VehicleReadyState
type CommonVehicleReadyState struct {
// is vehicle ready
IsVehicleReady bool `json:"is_vehicle_ready,omitempty"`
}
// Validate validates this common vehicle ready state
func (m *CommonVehicleReadyState) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common vehicle ready state based on context it is used
func (m *CommonVehicleReadyState) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonVehicleReadyState) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonVehicleReadyState) UnmarshalBinary(b []byte) error {
var res CommonVehicleReadyState
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// CommonVehicleSpeed common vehicle speed
//
// swagger:model common.VehicleSpeed
type CommonVehicleSpeed struct {
// speed
Speed float64 `json:"speed,omitempty"`
}
// Validate validates this common vehicle speed
func (m *CommonVehicleSpeed) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common vehicle speed based on context it is used
func (m *CommonVehicleSpeed) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonVehicleSpeed) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonVehicleSpeed) UnmarshalBinary(b []byte) error {
var res CommonVehicleSpeed
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,59 @@
// 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"
)
// CommonWindows common windows
//
// swagger:model common.Windows
type CommonWindows struct {
// left front
LeftFront int64 `json:"left_front,omitempty"`
// left rear
LeftRear int64 `json:"left_rear,omitempty"`
// right front
RightFront int64 `json:"right_front,omitempty"`
// right rear
RightRear int64 `json:"right_rear,omitempty"`
}
// Validate validates this common windows
func (m *CommonWindows) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this common windows based on context it is used
func (m *CommonWindows) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *CommonWindows) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *CommonWindows) UnmarshalBinary(b []byte) error {
var res CommonWindows
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// HandlersApproveResponse handlers approve response
//
// swagger:model handlers.ApproveResponse
type HandlersApproveResponse struct {
// activate
Activate string `json:"activate,omitempty"`
}
// Validate validates this handlers approve response
func (m *HandlersApproveResponse) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this handlers approve response based on context it is used
func (m *HandlersApproveResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *HandlersApproveResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *HandlersApproveResponse) UnmarshalBinary(b []byte) error {
var res HandlersApproveResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,121 @@
// 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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// HandlersCarUpdateStatuses handlers car update statuses
//
// swagger:model handlers.CarUpdateStatuses
type HandlersCarUpdateStatuses struct {
// statuses
Statuses []*CommonCarUpdateProgress `json:"statuses"`
}
// Validate validates this handlers car update statuses
func (m *HandlersCarUpdateStatuses) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateStatuses(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *HandlersCarUpdateStatuses) validateStatuses(formats strfmt.Registry) error {
if swag.IsZero(m.Statuses) { // not required
return nil
}
for i := 0; i < len(m.Statuses); i++ {
if swag.IsZero(m.Statuses[i]) { // not required
continue
}
if m.Statuses[i] != nil {
if err := m.Statuses[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("statuses" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("statuses" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// ContextValidate validate this handlers car update statuses based on the context it is used
func (m *HandlersCarUpdateStatuses) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateStatuses(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *HandlersCarUpdateStatuses) contextValidateStatuses(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Statuses); i++ {
if m.Statuses[i] != nil {
if swag.IsZero(m.Statuses[i]) { // not required
return nil
}
if err := m.Statuses[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("statuses" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("statuses" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *HandlersCarUpdateStatuses) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *HandlersCarUpdateStatuses) UnmarshalBinary(b []byte) error {
var res HandlersCarUpdateStatuses
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,118 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// HandlersFleetRequest handlers fleet request
//
// swagger:model handlers.FleetRequest
type HandlersFleetRequest struct {
// canbus
Canbus *CommonCANBus `json:"canbus,omitempty"`
// idps enabled
IdpsEnabled bool `json:"idps_enabled,omitempty"`
// log level
LogLevel int64 `json:"log_level,omitempty"`
// name
Name string `json:"name,omitempty"`
}
// Validate validates this handlers fleet request
func (m *HandlersFleetRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCanbus(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *HandlersFleetRequest) validateCanbus(formats strfmt.Registry) error {
if swag.IsZero(m.Canbus) { // not required
return nil
}
if m.Canbus != nil {
if err := m.Canbus.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("canbus")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("canbus")
}
return err
}
}
return nil
}
// ContextValidate validate this handlers fleet request based on the context it is used
func (m *HandlersFleetRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateCanbus(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *HandlersFleetRequest) contextValidateCanbus(ctx context.Context, formats strfmt.Registry) error {
if m.Canbus != nil {
if swag.IsZero(m.Canbus) { // not required
return nil
}
if err := m.Canbus.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("canbus")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("canbus")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *HandlersFleetRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *HandlersFleetRequest) UnmarshalBinary(b []byte) error {
var res HandlersFleetRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,121 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// HandlersFleetVehicleParams handlers fleet vehicle params
//
// swagger:model handlers.FleetVehicleParams
type HandlersFleetVehicleParams struct {
// canbus
Canbus *CommonCANBus `json:"canbus,omitempty"`
// idps enabled
IdpsEnabled bool `json:"idps_enabled,omitempty"`
// log level
LogLevel string `json:"log_level,omitempty"`
// vin
Vin string `json:"vin,omitempty"`
// vins
Vins []string `json:"vins"`
}
// Validate validates this handlers fleet vehicle params
func (m *HandlersFleetVehicleParams) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateCanbus(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *HandlersFleetVehicleParams) validateCanbus(formats strfmt.Registry) error {
if swag.IsZero(m.Canbus) { // not required
return nil
}
if m.Canbus != nil {
if err := m.Canbus.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("canbus")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("canbus")
}
return err
}
}
return nil
}
// ContextValidate validate this handlers fleet vehicle params based on the context it is used
func (m *HandlersFleetVehicleParams) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateCanbus(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *HandlersFleetVehicleParams) contextValidateCanbus(ctx context.Context, formats strfmt.Registry) error {
if m.Canbus != nil {
if swag.IsZero(m.Canbus) { // not required
return nil
}
if err := m.Canbus.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("canbus")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("canbus")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *HandlersFleetVehicleParams) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *HandlersFleetVehicleParams) UnmarshalBinary(b []byte) error {
var res HandlersFleetVehicleParams
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// HandlersGuestTokenResp handlers guest token resp
//
// swagger:model handlers.GuestTokenResp
type HandlersGuestTokenResp struct {
// token
Token string `json:"token,omitempty"`
}
// Validate validates this handlers guest token resp
func (m *HandlersGuestTokenResp) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this handlers guest token resp based on context it is used
func (m *HandlersGuestTokenResp) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *HandlersGuestTokenResp) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *HandlersGuestTokenResp) UnmarshalBinary(b []byte) error {
var res HandlersGuestTokenResp
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,53 @@
// 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"
)
// HandlersHandleImmobilizerBody handlers handle immobilizer body
//
// swagger:model handlers.HandleImmobilizerBody
type HandlersHandleImmobilizerBody struct {
// True: Immobilize cars, False: Mobilize the car
Immobilize bool `json:"immobilize,omitempty"`
// vins
Vins []string `json:"vins"`
}
// Validate validates this handlers handle immobilizer body
func (m *HandlersHandleImmobilizerBody) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this handlers handle immobilizer body based on context it is used
func (m *HandlersHandleImmobilizerBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *HandlersHandleImmobilizerBody) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *HandlersHandleImmobilizerBody) UnmarshalBinary(b []byte) error {
var res HandlersHandleImmobilizerBody
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,62 @@
// 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"
)
// HandlersJSONCarLocation handlers JSON car location
//
// swagger:model handlers.JSONCarLocation
type HandlersJSONCarLocation struct {
// altitude
Altitude float64 `json:"altitude,omitempty"`
// heading
Heading float64 `json:"heading,omitempty"`
// latitude
Latitude float64 `json:"latitude,omitempty"`
// longitude
Longitude float64 `json:"longitude,omitempty"`
// vin
Vin string `json:"vin,omitempty"`
}
// Validate validates this handlers JSON car location
func (m *HandlersJSONCarLocation) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this handlers JSON car location based on context it is used
func (m *HandlersJSONCarLocation) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *HandlersJSONCarLocation) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *HandlersJSONCarLocation) UnmarshalBinary(b []byte) error {
var res HandlersJSONCarLocation
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,124 @@
// 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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// HandlersJSONCarLocations handlers JSON car locations
//
// swagger:model handlers.JSONCarLocations
type HandlersJSONCarLocations struct {
// data
Data []*HandlersJSONCarLocation `json:"data"`
// total
Total int64 `json:"total,omitempty"`
}
// Validate validates this handlers JSON car locations
func (m *HandlersJSONCarLocations) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateData(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *HandlersJSONCarLocations) validateData(formats strfmt.Registry) error {
if swag.IsZero(m.Data) { // not required
return nil
}
for i := 0; i < len(m.Data); i++ {
if swag.IsZero(m.Data[i]) { // not required
continue
}
if m.Data[i] != nil {
if err := m.Data[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// ContextValidate validate this handlers JSON car locations based on the context it is used
func (m *HandlersJSONCarLocations) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateData(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *HandlersJSONCarLocations) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.Data); i++ {
if m.Data[i] != nil {
if swag.IsZero(m.Data[i]) { // not required
return nil
}
if err := m.Data[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("data" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *HandlersJSONCarLocations) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *HandlersJSONCarLocations) UnmarshalBinary(b []byte) error {
var res HandlersJSONCarLocations
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,109 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// HandlersJSONCarStateMessage handlers JSON car state message
//
// swagger:model handlers.JSONCarStateMessage
type HandlersJSONCarStateMessage struct {
// data
Data *CommonCarState `json:"data,omitempty"`
}
// Validate validates this handlers JSON car state message
func (m *HandlersJSONCarStateMessage) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateData(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *HandlersJSONCarStateMessage) validateData(formats strfmt.Registry) error {
if swag.IsZero(m.Data) { // not required
return nil
}
if m.Data != nil {
if err := m.Data.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("data")
}
return err
}
}
return nil
}
// ContextValidate validate this handlers JSON car state message based on the context it is used
func (m *HandlersJSONCarStateMessage) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateData(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *HandlersJSONCarStateMessage) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
if m.Data != nil {
if swag.IsZero(m.Data) { // not required
return nil
}
if err := m.Data.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("data")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *HandlersJSONCarStateMessage) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *HandlersJSONCarStateMessage) UnmarshalBinary(b []byte) error {
var res HandlersJSONCarStateMessage
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,114 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// HandlersJSONCarStateMultiMessage handlers JSON car state multi message
//
// swagger:model handlers.JSONCarStateMultiMessage
type HandlersJSONCarStateMultiMessage struct {
// data
Data map[string]CommonCarState `json:"data,omitempty"`
// error list
ErrorList []string `json:"errorList"`
}
// Validate validates this handlers JSON car state multi message
func (m *HandlersJSONCarStateMultiMessage) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateData(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *HandlersJSONCarStateMultiMessage) validateData(formats strfmt.Registry) error {
if swag.IsZero(m.Data) { // not required
return nil
}
for k := range m.Data {
if err := validate.Required("data"+"."+k, "body", m.Data[k]); err != nil {
return err
}
if val, ok := m.Data[k]; ok {
if err := val.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("data" + "." + k)
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("data" + "." + k)
}
return err
}
}
}
return nil
}
// ContextValidate validate this handlers JSON car state multi message based on the context it is used
func (m *HandlersJSONCarStateMultiMessage) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateData(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *HandlersJSONCarStateMultiMessage) contextValidateData(ctx context.Context, formats strfmt.Registry) error {
for k := range m.Data {
if val, ok := m.Data[k]; ok {
if err := val.ContextValidate(ctx, formats); err != nil {
return err
}
}
}
return nil
}
// MarshalBinary interface implementation
func (m *HandlersJSONCarStateMultiMessage) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *HandlersJSONCarStateMultiMessage) UnmarshalBinary(b []byte) error {
var res HandlersJSONCarStateMultiMessage
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// HandlersJSONModelsResult handlers JSON models result
//
// swagger:model handlers.JSONModelsResult
type HandlersJSONModelsResult struct {
// data
Data []string `json:"data"`
}
// Validate validates this handlers JSON models result
func (m *HandlersJSONModelsResult) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this handlers JSON models result based on context it is used
func (m *HandlersJSONModelsResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *HandlersJSONModelsResult) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *HandlersJSONModelsResult) UnmarshalBinary(b []byte) error {
var res HandlersJSONModelsResult
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// HandlersJSONYearsResult handlers JSON years result
//
// swagger:model handlers.JSONYearsResult
type HandlersJSONYearsResult struct {
// data
Data []int64 `json:"data"`
}
// Validate validates this handlers JSON years result
func (m *HandlersJSONYearsResult) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this handlers JSON years result based on context it is used
func (m *HandlersJSONYearsResult) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *HandlersJSONYearsResult) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *HandlersJSONYearsResult) UnmarshalBinary(b []byte) error {
var res HandlersJSONYearsResult
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// HandlersLinkResponse handlers link response
//
// swagger:model handlers.LinkResponse
type HandlersLinkResponse struct {
// link
Link string `json:"link,omitempty"`
}
// Validate validates this handlers link response
func (m *HandlersLinkResponse) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this handlers link response based on context it is used
func (m *HandlersLinkResponse) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *HandlersLinkResponse) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *HandlersLinkResponse) UnmarshalBinary(b []byte) error {
var res HandlersLinkResponse
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,172 @@
// 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"
"strconv"
"github.com/go-openapi/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// HandlersManifestMigrateBody handlers manifest migrate body
//
// swagger:model handlers.ManifestMigrateBody
type HandlersManifestMigrateBody struct {
// file keys
FileKeys []*CommonFileKeyResponse `json:"fileKeys"`
// migrated manifest
MigratedManifest *CommonUpdateManifest `json:"migratedManifest,omitempty"`
}
// Validate validates this handlers manifest migrate body
func (m *HandlersManifestMigrateBody) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateFileKeys(formats); err != nil {
res = append(res, err)
}
if err := m.validateMigratedManifest(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *HandlersManifestMigrateBody) validateFileKeys(formats strfmt.Registry) error {
if swag.IsZero(m.FileKeys) { // not required
return nil
}
for i := 0; i < len(m.FileKeys); i++ {
if swag.IsZero(m.FileKeys[i]) { // not required
continue
}
if m.FileKeys[i] != nil {
if err := m.FileKeys[i].Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("fileKeys" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("fileKeys" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *HandlersManifestMigrateBody) validateMigratedManifest(formats strfmt.Registry) error {
if swag.IsZero(m.MigratedManifest) { // not required
return nil
}
if m.MigratedManifest != nil {
if err := m.MigratedManifest.Validate(formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("migratedManifest")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("migratedManifest")
}
return err
}
}
return nil
}
// ContextValidate validate this handlers manifest migrate body based on the context it is used
func (m *HandlersManifestMigrateBody) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
var res []error
if err := m.contextValidateFileKeys(ctx, formats); err != nil {
res = append(res, err)
}
if err := m.contextValidateMigratedManifest(ctx, formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *HandlersManifestMigrateBody) contextValidateFileKeys(ctx context.Context, formats strfmt.Registry) error {
for i := 0; i < len(m.FileKeys); i++ {
if m.FileKeys[i] != nil {
if swag.IsZero(m.FileKeys[i]) { // not required
return nil
}
if err := m.FileKeys[i].ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("fileKeys" + "." + strconv.Itoa(i))
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("fileKeys" + "." + strconv.Itoa(i))
}
return err
}
}
}
return nil
}
func (m *HandlersManifestMigrateBody) contextValidateMigratedManifest(ctx context.Context, formats strfmt.Registry) error {
if m.MigratedManifest != nil {
if swag.IsZero(m.MigratedManifest) { // not required
return nil
}
if err := m.MigratedManifest.ContextValidate(ctx, formats); err != nil {
if ve, ok := err.(*errors.Validation); ok {
return ve.ValidateName("migratedManifest")
} else if ce, ok := err.(*errors.CompositeError); ok {
return ce.ValidateName("migratedManifest")
}
return err
}
}
return nil
}
// MarshalBinary interface implementation
func (m *HandlersManifestMigrateBody) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *HandlersManifestMigrateBody) UnmarshalBinary(b []byte) error {
var res HandlersManifestMigrateBody
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,50 @@
// 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"
)
// HandlersManifestMigrateVersion handlers manifest migrate version
//
// swagger:model handlers.ManifestMigrateVersion
type HandlersManifestMigrateVersion struct {
// version
Version int64 `json:"version,omitempty"`
}
// Validate validates this handlers manifest migrate version
func (m *HandlersManifestMigrateVersion) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this handlers manifest migrate version based on context it is used
func (m *HandlersManifestMigrateVersion) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *HandlersManifestMigrateVersion) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *HandlersManifestMigrateVersion) UnmarshalBinary(b []byte) error {
var res HandlersManifestMigrateVersion
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,71 @@
// 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"
)
// HandlersSubConfigRequest handlers sub config request
//
// swagger:model handlers.SubConfigRequest
type HandlersSubConfigRequest struct {
// configuration
Configuration []int64 `json:"configuration"`
// did
Did []int64 `json:"did"`
// feature id
FeatureID string `json:"feature_id,omitempty"`
// hw version
HwVersion string `json:"hw_version,omitempty"`
// mask
Mask []int64 `json:"mask"`
// name
Name string `json:"name,omitempty"`
// pid
Pid []int64 `json:"pid"`
// sw version
SwVersion string `json:"sw_version,omitempty"`
}
// Validate validates this handlers sub config request
func (m *HandlersSubConfigRequest) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this handlers sub config request based on context it is used
func (m *HandlersSubConfigRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *HandlersSubConfigRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *HandlersSubConfigRequest) UnmarshalBinary(b []byte) error {
var res HandlersSubConfigRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,88 @@
// 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/errors"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
"github.com/go-openapi/validate"
)
// HandlersSubFeatureAssignRequest handlers sub feature assign request
//
// swagger:model handlers.SubFeatureAssignRequest
type HandlersSubFeatureAssignRequest struct {
// feature id
// Required: true
FeatureID *string `json:"feature_id"`
// package id
// Required: true
PackageID *string `json:"package_id"`
}
// Validate validates this handlers sub feature assign request
func (m *HandlersSubFeatureAssignRequest) Validate(formats strfmt.Registry) error {
var res []error
if err := m.validateFeatureID(formats); err != nil {
res = append(res, err)
}
if err := m.validatePackageID(formats); err != nil {
res = append(res, err)
}
if len(res) > 0 {
return errors.CompositeValidationError(res...)
}
return nil
}
func (m *HandlersSubFeatureAssignRequest) validateFeatureID(formats strfmt.Registry) error {
if err := validate.Required("feature_id", "body", m.FeatureID); err != nil {
return err
}
return nil
}
func (m *HandlersSubFeatureAssignRequest) validatePackageID(formats strfmt.Registry) error {
if err := validate.Required("package_id", "body", m.PackageID); err != nil {
return err
}
return nil
}
// ContextValidate validates this handlers sub feature assign request based on context it is used
func (m *HandlersSubFeatureAssignRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *HandlersSubFeatureAssignRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *HandlersSubFeatureAssignRequest) UnmarshalBinary(b []byte) error {
var res HandlersSubFeatureAssignRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,53 @@
// 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"
)
// HandlersSubFeatureRequest handlers sub feature request
//
// swagger:model handlers.SubFeatureRequest
type HandlersSubFeatureRequest struct {
// description
Description string `json:"description,omitempty"`
// name
Name string `json:"name,omitempty"`
}
// Validate validates this handlers sub feature request
func (m *HandlersSubFeatureRequest) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this handlers sub feature request based on context it is used
func (m *HandlersSubFeatureRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *HandlersSubFeatureRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *HandlersSubFeatureRequest) UnmarshalBinary(b []byte) error {
var res HandlersSubFeatureRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

View File

@@ -0,0 +1,56 @@
// 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"
)
// HandlersSubFeatureUpdateRequest handlers sub feature update request
//
// swagger:model handlers.SubFeatureUpdateRequest
type HandlersSubFeatureUpdateRequest struct {
// description
Description string `json:"description,omitempty"`
// name
Name string `json:"name,omitempty"`
// uuid
UUID string `json:"uuid,omitempty"`
}
// Validate validates this handlers sub feature update request
func (m *HandlersSubFeatureUpdateRequest) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this handlers sub feature update request based on context it is used
func (m *HandlersSubFeatureUpdateRequest) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *HandlersSubFeatureUpdateRequest) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *HandlersSubFeatureUpdateRequest) UnmarshalBinary(b []byte) error {
var res HandlersSubFeatureUpdateRequest
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}

Some files were not shown because too many files have changed in this diff Show More