package com.bocloud.ims.interfaces.resource;

import com.bocloud.cmp.model.ElasticIpGenericParam;
import com.bocloud.cmp.model.common.ApplicationParam;
import com.bocloud.cmp.model.common.CancelationParam;
import com.bocloud.cmp.model.common.ExtensionParam;
import com.bocloud.common.model.BocloudResult;
import com.bocloud.common.model.GridBean;
import com.bocloud.common.model.Pager;
import com.bocloud.common.model.RequestContext;
import com.bocloud.ims.entity.resource.ElasticIp;

public interface ElasticIpService {

	/**
	 * 列表展示
	 *
	 * @param pager
	 * @param context
	 * @return
	 */
	BocloudResult<GridBean<ElasticIp>> list(Pager pager, RequestContext context);

	/**
	 * 分配
	 *
	 * @return
	 */
	BocloudResult<ElasticIp> allocate(ElasticIp elasticIp, RequestContext context);

	/**
	 * 释放
	 *
	 * @return
	 */
	BocloudResult release(Long id, RequestContext context);

	/**
	 * 取消关联IP
	 *
	 * @return
	 */
	BocloudResult disassociate(Long vendorId, RequestContext context);

	/**
	 * 详情
	 *
	 * @param id
	 * @return
	 */
	BocloudResult<ElasticIp> detail(Long id);

	/**
	 * 详情
	 *
	 * @return
	 */
	BocloudResult<ElasticIp> modify(ElasticIp elasticIp, RequestContext context);

	BocloudResult listAvailableEipsForNatGateway(String params);

	/**
	 * 修改带宽
	 *
	 * @return
	 */
	BocloudResult<ElasticIp> modifyBandwidth(ElasticIp elasticIp, RequestContext context);

	/***
	 * 查询EIPs
	 *
	 * @param object
	 * @return
	 */
	BocloudResult listFrees(Long vendorId, String regionId, RequestContext context);

	/**
	 * 关联IP
	 *
	 * @return
	 */
	BocloudResult associate(ElasticIpGenericParam elasticIpGenericParam, RequestContext context);

	/**
	 * 浮动IP申请
	 * 
	 * @param param
	 * @return
	 */
	BocloudResult apply(ApplicationParam param);

	/**
	 * 浮动IP退订
	 * 
	 * @param param
	 * @return
	 */
	BocloudResult cancelation(CancelationParam param);

	/**
	 * 延期
	 * @param param
	 * @return
	 */
	BocloudResult extension(ExtensionParam param);

}
