You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: output_request.rs
    path of file: ./repos/CYFS/src/component/cyfs-lib/src/trans
    
    the code of the file until where you have to start completion: use crate::*;
use cyfs_base::*;

use cyfs_bdt::{NdnTaskControlState, NdnTaskState};
use cyfs_core::TransContext;
use serde::{Deserialize, Serialize};
use std::fmt::Display;
use std::path::PathBuf;
use std::str::FromStr;

#[derive(Clone, Debug, Serialize, Deserialize)]
pub struct TransTaskOnAirState {
    pub download_percent: u32,
    pub download_speed: u32,
    pub upload_speed: u32,
}

#[derive(Clone, Debug, Serialize, Deserialize)]
pub enum TransTaskState {
    Pending,
    Downloading(TransTaskOnAirState),
    Paused,
    Canceled,
    Finished(u32/*upload_speed*/),
    Err(BuckyErrorCode),
}

#[derive(Clone, Debug, Serialize, Dese
    
    fn test_codec() {
        let gt = TransTaskGroupType::Download;
        let s = serde_json::to_string(&gt).unwrap();
        println!("{}", s);
        let s = s.trim_end_matches('"').trim_start_matches('"'); 
        assert_eq!(s, gt.as_str());

        let rs = TransTaskGroupType::from_str(&s).unwrap();
        assert_eq!(rs, gt);

        let req = TransGetTaskGroupStateOutputRequest {
            common: NDNOutputRequestCommon {
                req_path: None,
                dec_id: None,
                level: NDNAPILevel::Router,
                target: None,
                referer_object: vec![],
                flags: 0,
            },
            group_type: TransTaskGroupType::Download,
            group: "test".to_owned(),
            speed_when: None,
        };

        let s = serde_json::to_string(&req).unwrap();
        println!("{}", s);
    }