package com.bocloud.ims.interfaces.resource.azure.ddos;

import com.alibaba.fastjson.JSONObject;
import com.bocloud.common.model.BocloudResult;
import com.bocloud.common.model.Param;
import com.bocloud.common.model.RequestContext;
import com.bocloud.ims.entity.resource.azure.ddos.DdosCustomPolicie;

import java.util.List;
import java.util.Map;

/**
 * @author wangyu
 * @version 5.0.0-SNAPSHOT
 * @since 2021/3/8
 */
public interface AzureDdosCustomPolicieService {

    /**
     * 查询列表
     *
     * @param page
     * @param rows
     * @param params
     * @param sorter
     * @param simple
     * @param condition
     * @param context
     * @return
     */
    BocloudResult list(int page, int rows, List<Param> params, Map<String, String> sorter, boolean simple,
                       String condition, RequestContext context);

    /**
     * 创建DDOS策略
     *
     * @param policie
     * @param context
     * @return
     */
    BocloudResult create(DdosCustomPolicie policie, RequestContext context);

    /**
     * 修改DDOS策略
     *
     * @param policie
     * @param context
     * @return
     */
    BocloudResult modify(DdosCustomPolicie policie, RequestContext context);

    /**
     * 查询DDOS策略详情
     *
     * @param id
     * @return
     */
    BocloudResult detail(Long id);

    /**
     * 删除DDOS策略
     *
     * @param id
     * @param context
     * @return
     */
    BocloudResult remove(Long id, RequestContext context);

    /**
     * 批量删除DDOS策略
     *
     * @param params
     * @param context
     * @return
     */
    BocloudResult batchRemove(String params, RequestContext context);

    /**
     * 资源分配
     *
     * @param object
     * @param context
     * @return
     */
    BocloudResult assign(JSONObject object, RequestContext context);
}
