package com.sonic.cow.client.input.asr;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

public class AsrInput {

    /**
     * 构造函数
     * @param uid
     * @param data
     */
    public AsrInput(String uid, String data) {
        this.user.uid = uid;
        this.audio.data = data;
    }

    /**
     * 用户相关配置
     */
    private User user = new User();

    /**
     * 音频相关配置
     */
    private Audio audio = new Audio();

    /**
     * 请求相关配置
     */
    private Request request = new Request();

    public User getUser() {
        return user;
    }

    public void setUser(User user) {
        this.user = user;
    }

    public Audio getAudio() {
        return audio;
    }

    public void setAudio(Audio audio) {
        this.audio = audio;
    }

    public Request getRequest() {
        return request;
    }

    public void setRequest(Request request) {
        this.request = request;
    }

    @AllArgsConstructor
    @NoArgsConstructor
    @Data
    public static class User {
        /**
         * 用户标识，必需，可传任意非空字符串，传入值可通过服务端日志追溯
         */
        private String uid;
    }

    @AllArgsConstructor
    @NoArgsConstructor
    @Data
    public static class Audio {

        /**
         * 语音文件地址
         */
        private String url;

        /**
         * base64编码音频内容
         */
        private String data;

    }

    @AllArgsConstructor
    @NoArgsConstructor
    @Data
    public static class Request {

        /**
         * 模型名称
         */
        private String model_name = "bigmodel";

    }
}