/**
 * Copyright (c) 2025 Huawei Technologies Co., Ltd.
 * This program is free software, you can redistribute it and/or modify it under the terms and conditions of 
 * CANN Open Software License Agreement Version 2.0 (the "License").
 * Please refer to the License for details. You may not use this file except in compliance with the License.
 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, 
 * INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY, OR FITNESS FOR A PARTICULAR PURPOSE.
 * See LICENSE in the root of the software repository for the full text of the License.
 */

syntax = "proto3";
package udf;
import "udf_attr.proto";

message BufCfg {
    uint32 total_size = 1;
    uint32 blk_size = 2;
    uint32 max_buf_size = 3;
    string page_type = 4;
}

message UdfDef {
    message ListUint32 {
        repeated uint32 num = 1;
    }
    string name = 1;
    string bin_name = 2;
    string func_name =3;
    bytes bin = 4;
    map<string, AttrValue> attrs = 5;
    bytes release_pkg = 6;
    map<string, ListUint32> func_inputs_map = 7;
    map<string, ListUint32> func_outputs_map = 8;
    repeated BufCfg user_buf_cfg = 9;
    repeated string stream_input_func_name = 10;
}

message UdfModelDef {
    repeated UdfDef udf_def = 1;
}