func (lgc *Logic) UpdateInput(prms *graylog.InputUpdateParams) (*graylog.Input, int, error) {
	if prms == nil {
		return nil, 400, fmt.Errorf("input is nil")
	}
	if err := validator.UpdateValidator.Struct(prms); err != nil {
		return nil, 400, err
	}
	ok, err := lgc.HasInput(prms.ID)
	if err != nil {
		return nil, 500, err
	}
	if !ok {
		return nil, 404, fmt.Errorf("the input <%s> is not found", prms.ID)
	}

	input, err := lgc.store.UpdateInput(prms)
	if err != nil {
		return nil, 500, err
	}
	return input, 200, nil
}
// UpdateInput updates an input at the Server.
// Required: Title, Type, Attrs
// Allowed: Global, Node
UpdateInput updates an input at the Server.
Required: Title, Type, Attrs
Allowed: Global, Node
// UpdateInput updates an input at the Server . // Required : Title Type Attrs // Allowed : Global Node
func (lgc *Logic) UpdateInput(prms *graylog.InputUpdateParams) (*graylog.Input, int, error) {
	if prms == nil {
		return nil, 400, fmt.Errorf("input is nil")
	}
	if err := validator.UpdateValidator.Struct(prms); err != nil {
		return nil, 400, err
	}
	ok, err := lgc.HasInput(prms.ID)
	if err != nil {
		return nil, 500, err
	}
	if !ok {
		return nil, 404, fmt.Errorf("the input <%s> is not found", prms.ID)
	}
	input, err := lgc.store.UpdateInput(prms)
	if err != nil {
		return nil, 500, err
	}
	return input, 200, nil
}
func ( lgc * Logic ) UpdateInput ( prms * graylog . InputUpdateParams ) ( * graylog . Input , int , error ) { if prms == nil { return nil , 400 , fmt . Errorf ( " " ) } if err := validator . UpdateValidator . Struct ( prms ) ; err != nil { return nil , 400 , err } ok , err := lgc . HasInput ( prms . ID ) if err != nil { return nil , 500 , err } if ! ok { return nil , 404 , fmt . Errorf ( " " , prms . ID ) } input , err := lgc . store . UpdateInput ( prms ) if err != nil { return nil , 500 , err } return input , 200 , nil }
UpdateInput updates an input at the Server.
UpdateInput updates an input at the Server .