package queryDeviceRealTimeDataByPsKeys

import (
	"GoSungrow/iSolarCloud/api"
	"GoSungrow/iSolarCloud/api/GoStruct"
	"GoSungrow/iSolarCloud/api/GoStruct/valueTypes"

	"fmt"
	"github.com/MickMake/GoUnify/Only"
)

const Url = "/v1/devService/queryDeviceRealTimeDataByPsKeys"
const Disabled = false
const EndPointName = "AppService.queryDeviceRealTimeDataByPsKeys"

type RequestData struct {
	PsKeyList valueTypes.String `json:"ps_key_list" required:"true"`
}

func (rd *RequestData) IsValid() error {
	rd.PsKeyList = valueTypes.SetStringValue("1171348_11_0_0")
	return GoStruct.VerifyOptionsRequired(*rd)
}

func (rd RequestData) Help() string {
	ret := fmt.Sprintf("")
	return ret
}


type ResultData struct {
	// Dummy valueTypes.String `json:"dummy"`
}

func (e *ResultData) IsValid() error {
	var err error
	return err
}

func (e *EndPoint) GetData() api.DataMap {
	entries := api.NewDataMap()

	for range Only.Once {
		entries.StructToDataMap(*e, "", GoStruct.EndPointPath{})
	}

	return entries
}
