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

import com.alibaba.fastjson.JSONObject;
import com.bocloud.cmp.params.azure.AzureContainerParams;
import com.bocloud.common.model.*;
import com.bocloud.ims.entity.resource.azure.blob.Container;

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

/**
 * azure存储容器业务接口
 *
 * @author wangyu
 * @version 5.0.0-SNAPSHOT
 * @since 2021/2/2
 */
public interface ContainerService {

    /**
     * 查询列表
     *
     * @param context
     * @return
     */
    BocloudResult<GridBean<Container>> list(Pager pager, RequestContext context);

    /**
     * 创建容器
     *
     * @param container
     * @param context
     * @return
     */
    BocloudResult<Void> create(Container container, RequestContext context);

    /**
     * 修改容器
     *
     * @param container
     * @param context
     * @return
     */
    BocloudResult<Void> modify(Container container, RequestContext context);

    /**
     * 查询容器详情
     *
     * @param id
     * @param context
     * @return
     */
    BocloudResult<Container> detail(Long id, RequestContext context);

    /**
     * 删除容器
     *
     * @param id
     * @param context
     * @return
     */
    BocloudResult<Void> remove(Long id, RequestContext context);

    /**
     * 批量删除容器
     *
     * @param params
     * @param context
     * @return
     */
    BocloudResult<Void> batchRemove(AzureContainerParams params, RequestContext context);

    /**
     * 更新元数据
     *
     * @param id
     * @param metadata
     * @param context
     * @return
     */
    BocloudResult<Void> updateMetadata(Long id, Map<String, String> metadata, RequestContext context);

    /**
     * 资源分配
     *
     * @param object
     * @param context
     * @return
     */
    BocloudResult<Container> assign(AzureContainerParams object, RequestContext context);

    /**
     * 容器操作
     *
     * @param params
     * @param context
     * @return
     */
    BocloudResult<Void> operations(AzureContainerParams params, RequestContext context);
}
