func GetAliasDataAsTargetList(aliases types.Aliases) (targetList []Target, err error) {
	var fqdnList, uriList SetString
	prefixList := []Prefix{}
	for _, alias :=  range aliases.Alias {
		for _, prefix := range alias.TargetPrefix {
			targetPrefix, err := NewPrefix(prefix.String())
			if err != nil {
				return nil, err
			}
			prefixList = append(prefixList, targetPrefix)
		}
		fqdnList.AddList(alias.TargetFQDN)
		uriList.AddList(alias.TargetURI)
	}
	targetList, err = GetTelemetryTargetList(prefixList, fqdnList, uriList)
	if err != nil {
		return nil, err
	}
	return targetList, nil
}
Get alias data as TargetList
package models
import (
	"fmt"
	"errors"
	"github.com/nttdots/go-dots/dots_common/messages"
	log "github.com/sirupsen/logrus"
	types "github.com/nttdots/go-dots/dots_common/types/data"
)
type TelemetryPreMitigation struct {
	Cuid                       string
	Cdid                       string
	Tmid                       int
	Targets                    Targets
	TotalTraffic               []Traffic
	TotalTrafficProtocol       []TrafficPerProtocol
	TotalTrafficPort           []TrafficPerPort
	TotalAttackTraffic         []Traffic
	TotalAttackTrafficProtocol []TrafficPerProtocol
	TotalAttackTrafficPort     []TrafficPerPort
	TotalAttackConnection      TotalAttackConnection
	TotalAttackConnectionPort  TotalAttackConnectionPort
	AttackDetail               []AttackDetail
}
type UriFilteringTelemetryPreMitigation struct {
	Cuid       string
	Cdid       string
	Tmid       int
	TargetList []Target
}
type Targets struct {
	TargetPrefix    []Prefix
	TargetPortRange []PortRange
	TargetProtocol  SetInt
	FQDN            SetString
	URI             SetString
	AliasName       SetString
	TargetList      []Target
}
type TotalAttackConnection struct {
	LowPercentileL  []ConnectionProtocolPercentile
	MidPercentileL  []ConnectionProtocolPercentile
	HighPercentileL []ConnectionProtocolPercentile
	PeakL           []ConnectionProtocolPercentile
}
type TotalAttackConnectionPort struct {
	LowPercentileL  []ConnectionProtocolPortPercentile
	MidPercentileL  []ConnectionProtocolPortPercentile
	HighPercentileL []ConnectionProtocolPortPercentile
	PeakL           []ConnectionProtocolPortPercentile
}
type AttackDetail struct {
	VendorId       int
	AttackId       int
	AttackName     string
	AttackSeverity int
	StartTime      int
	EndTime        int
	SourceCount    SourceCount
	TopTalker      []TopTalker
}
type ConnectionProtocolPercentile struct {
	Protocol         int
	Connection       int
	Embryonic        int
	ConnectionPs     int
	RequestPs        int
	PartialRequestPs int
}
type ConnectionProtocolPortPercentile struct {
	Protocol         int
	Port             int
	Connection       int
	Embryonic        int
	ConnectionPs     int
	RequestPs        int
	PartialRequestPs int
}
type SourceCount struct {
	LowPercentileG  int
	MidPercentileG  int
	HighPercentileG int
	PeakG           int
}
type TopTalker struct {
	SpoofedStatus         bool
	SourcePrefix          Prefix
	SourcePortRange       []PortRange
	SourceIcmpTypeRange   []ICMPTypeRange
	TotalAttackTraffic    []Traffic
	TotalAttackConnection TotalAttackConnection
}
type TelemetryTotalAttackConnection struct {
	LowPercentileC  ConnectionPercentile
	MidPercentileC  ConnectionPercentile
	HighPercentileC ConnectionPercentile
	PeakC           ConnectionPercentile
}
type ConnectionPercentile struct {
	Connection       int
	Embryonic        int
	ConnectionPs     int
	RequestPs        int
	PartialRequestPs int
}
type TelemetryAttackDetail struct {
	VendorId       int
	AttackId       int
	AttackName     string
	AttackSeverity int
	StartTime      int
	EndTime        int
	SourceCount    SourceCount
	TopTalker      []TelemetryTopTalker
}
type TelemetryTopTalker struct {
	SpoofedStatus         bool
	SourcePrefix          Prefix
	SourcePortRange       []PortRange
	SourceIcmpTypeRange   []ICMPTypeRange
	TotalAttackTraffic    []Traffic
	TotalAttackConnection TelemetryTotalAttackConnection
}
type AttackSeverity int
const (
	None AttackSeverity = iota + 1
	Low
	Medium
	High
	Unknown
)
type QueryType int
const (
	TargetPrefix QueryType = iota + 1
	TargetPort
	TargetProtocol
	TargetFqdn
	TargetUri
	TargetAlias
	Mid
	SourcePrefix
	SourcePort
	SourceIcmpType
	Content
)
func NewTelemetryPreMitigation(customer *Customer, cuid string, dataRequest messages.PreOrOngoingMitigation, aliases types.Aliases) (preMitigation *TelemetryPreMitigation, err error) {
	preMitigation = &TelemetryPreMitigation{}
	preMitigation.Targets, err = NewTarget(customer, cuid, dataRequest.Target, aliases)
	if err != nil {
		return
	}
	preMitigation.TotalTraffic = NewTraffic(dataRequest.TotalTraffic)
	preMitigation.TotalTrafficProtocol = NewTrafficPerProtocol(dataRequest.TotalTrafficProtocol)
	preMitigation.TotalTrafficPort = NewTrafficPerPort(dataRequest.TotalTrafficPort)
	preMitigation.TotalAttackTraffic = NewTraffic(dataRequest.TotalAttackTraffic)
	preMitigation.TotalAttackTrafficProtocol = NewTrafficPerProtocol(dataRequest.TotalAttackTrafficProtocol)
	preMitigation.TotalAttackTrafficPort = NewTrafficPerPort(dataRequest.TotalAttackTrafficPort)
	if dataRequest.TotalAttackConnection != nil {
		preMitigation.TotalAttackConnection = NewTotalAttackConnection(*dataRequest.TotalAttackConnection)
	}
	if dataRequest.TotalAttackConnectionPort != nil {
		preMitigation.TotalAttackConnectionPort = NewTotalAttackConnectionPerPort(*dataRequest.TotalAttackConnectionPort)
	}
	preMitigation.AttackDetail, err = NewAttackDetail(dataRequest.AttackDetail)
	if err != nil {
		return
	}
	return
}
func NewTarget(customer *Customer, cuid string, targetRequest *messages.Target, aliases types.Aliases) (target Targets, err error) {
	target = Targets{make([]Prefix, 0),make([]PortRange, 0),NewSetInt(),NewSetString(),NewSetString(),NewSetString(), make([]Target, 0)}
	target.TargetPrefix, err = NewTelemetryPrefix(targetRequest.TargetPrefix)
	if err != nil {
		return
	}
	target.TargetPortRange = NewTargetPortRange(targetRequest.TargetPortRange)
	target.TargetProtocol.AddList(targetRequest.TargetProtocol)
	target.FQDN.AddList(targetRequest.FQDN)
	target.URI.AddList(targetRequest.URI)
	target.AliasName.AddList(targetRequest.AliasName)
	target.TargetList, err = GetTelemetryTargetList(target.TargetPrefix, target.FQDN, target.URI)
	if err != nil {
		log.Errorf ("Failed to get telemetry target list. Error: %+v", err)
		return
	}
	aliasTargetList, err := GetAliasDataAsTargetList(aliases)
	if err != nil {
		log.Errorf ("Failed to get alias data as target list. Error: %+v", err)
		return
	}
	target.TargetList = append(target.TargetList, aliasTargetList...)
	return
}