private function buildDestinations($destinations) 
    {
        $ret = array();
        foreach ($destinations as $dest) 
        {
            $d = [
                "Destination" => $this->buildDestination($dest["dest"]),
                "ReplacementTemplateData" => $this->buildReplacements($dest["data"])
            ];
            if (isset($dest["tags"]) && $dest["tags"])
                $d['ReplacementTags'] = $this->buildTags($dest["tags"]);
            $ret[] = $d;
        } 
        return $ret;
    }