func NewBootNotificationRequest(reason BootReason, model string, vendorName string) *BootNotificationRequest {
	return &BootNotificationRequest{Reason: reason, ChargingStation: ChargingStationType{Model: model, VendorName: vendorName}}
}
Creates a new BootNotificationRequest, containing all required fields. Optional fields may be set afterwards.
package provisioning
import (
	"reflect"
	"gopkg.in/go-playground/validator.v9"
	"github.com/lorenzodonini/ocpp-go/ocpp2.0.1/types"
)
const BootNotificationFeatureName = "BootNotification"
type RegistrationStatus string
type BootReason string
const (
	RegistrationStatusAccepted RegistrationStatus = "Accepted"
	RegistrationStatusPending  RegistrationStatus = "Pending"
	RegistrationStatusRejected RegistrationStatus = "Rejected"
	BootReasonApplicationReset BootReason         = "ApplicationReset"
	BootReasonFirmwareUpdate   BootReason         = "FirmwareUpdate"
	BootReasonLocalReset       BootReason         = "LocalReset"
	BootReasonPowerUp          BootReason         = "PowerUp"
	BootReasonRemoteReset      BootReason         = "RemoteReset"
	BootReasonScheduledReset   BootReason         = "ScheduledReset"
	BootReasonTriggered        BootReason         = "Triggered"
	BootReasonUnknown          BootReason         = "Unknown"
	BootReasonWatchdog         BootReason         = "Watchdog"
)
func isValidRegistrationStatus(fl validator.FieldLevel) bool {
	status := RegistrationStatus(fl.Field().String())
	switch status {
	case RegistrationStatusAccepted, RegistrationStatusPending, RegistrationStatusRejected:
		return true
	default:
		return false
	}
}
func isValidBootReason(fl validator.FieldLevel) bool {
	reason := BootReason(fl.Field().String())
	switch reason {
	case BootReasonApplicationReset, BootReasonFirmwareUpdate, BootReasonLocalReset, BootReasonPowerUp, BootReasonRemoteReset, BootReasonScheduledReset, BootReasonTriggered, BootReasonUnknown, BootReasonWatchdog:
		return true
	default:
		return false
	}
}
type ModemType struct {
	Iccid string `json:"iccid,omitempty" validate:"max=20"`
	Imsi  string `json:"imsi,omitempty" validate:"max=20"`
}
type ChargingStationType struct {
	SerialNumber    string     `json:"serialNumber,omitempty" validate:"max=25"`
	Model           string     `json:"model" validate:"required,max=20"`
	VendorName      string     `json:"vendorName" validate:"required,max=50"`
	FirmwareVersion string     `json:"firmwareVersion,omitempty" validate:"max=50"`
	Modem           *ModemType `json:"modem,omitempty"`
}
type BootNotificationRequest struct {
	Reason          BootReason          `json:"reason" validate:"required,bootReason"`
	ChargingStation ChargingStationType `json:"chargingStation" validate:"required,dive"`
}
type BootNotificationResponse struct {
	CurrentTime *types.DateTime    `json:"currentTime" validate:"required"`
	Interval    int                `json:"interval" validate:"gte=0"`
	Status      RegistrationStatus `json:"status" validate:"required,registrationStatus"`
	StatusInfo  *types.StatusInfo  `json:"statusInfo,omitempty" validate:"omitempty"`
}
type BootNotificationFeature struct{}
func (f BootNotificationFeature) GetFeatureName() string {
	return BootNotificationFeatureName
}
func (f BootNotificationFeature) GetRequestType() reflect.Type {
	return reflect.TypeOf(BootNotificationRequest{})
}
func (f BootNotificationFeature) GetResponseType() reflect.Type {
	return reflect.TypeOf(BootNotificationResponse{})
}
func (r BootNotificationRequest) GetFeatureName() string {
	return BootNotificationFeatureName
}
func (c BootNotificationResponse) GetFeatureName() string {
	return BootNotificationFeatureName
}