package cooper

import (
	"errors"
	"net/url"
)


func (that *CooperClient) NewUsrK3LightLineCmdByModRequest() *UsrK3LightLineCmdByModRequest {
	return &UsrK3LightLineCmdByModRequest{
		Request: Request{
			Client:     that,
			apiAddress: "/usrK3/lightLineCmdByMod",
		},
	}
}

//UsrK3LightLineCmdByModRequest ...
type UsrK3LightLineCmdByModRequest struct {
	Request
}

//LineIds
func (that *UsrK3LightLineCmdByModRequest) SetLineIds(value string) *UsrK3LightLineCmdByModRequest {
	that.initParams()
	that.params.Set("line_ids", value)
	return that
}

//ActionType
func (that *UsrK3LightLineCmdByModRequest) SetActionType(value string) *UsrK3LightLineCmdByModRequest {
	that.initParams()
	that.params.Set("action_type", value)
	return that
}

//Params ...
func (that *UsrK3LightLineCmdByModRequest) Params() (url.Values, error) {
	that.initParams()
	_params := that.params
	if that.publicParamsSlice != nil {
		for _, _v := range that.publicParamsSlice {
			if _params.Get(_v) == "" {
				return nil, errors.New(that.apiAddress + "缺少参数:" + _v)
			}
		}
	}
	return _params, nil
}

//Do ...
func (that *UsrK3LightLineCmdByModRequest) Do() (interface{}, error) {
	//返回data
	_data, _err := that.Client.Post(that.apiAddress, that)
	if _err != nil {
		return nil, _err
	}
	return _data, nil
}
