package getAllPsIdByOrgIds

import (
	"GoSungrow/iSolarCloud/api"
	"GoSungrow/iSolarCloud/api/GoStruct"
	"GoSungrow/iSolarCloud/api/GoStruct/valueTypes"
	"fmt"
	"github.com/MickMake/GoUnify/Only"
)

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

type RequestData struct {
	OrgIds valueTypes.String `json:"orgIds" required:"true"`
}

func (rd RequestData) IsValid() error {
	return GoStruct.VerifyOptionsRequired(rd)
}

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


type ResultData []string

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

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

	for range Only.Once {
		// pkg := reflection.GetName("", *e)
		// dt := valueTypes.NewDateTime(valueTypes.Now)
		// name := pkg + "." + e.Request.OrgIds.String()
		entries.StructToDataMap(*e,  e.Request.OrgIds.String(), GoStruct.NewEndPointPath(e.Request.OrgIds.String()))
	}

	return entries
}
