package com.bocloud.ims.booter.controller.resource.compute;

import com.bocloud.common.annotations.Log;
import com.bocloud.common.enums.BoCloudService;
import com.bocloud.common.model.BocloudResult;
import com.bocloud.common.model.GridBean;
import com.bocloud.common.model.Pager;
import com.bocloud.ims.entity.resource.ResourceProtocol;
import com.bocloud.ims.interfaces.resource.ResourceProtocolService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/v1/resources/protocol")
@Api(value = "平台资源访问协议", tags = "平台资源访问协议")
public class ResourceProtocolController {

    @Autowired
    private ResourceProtocolService resourceProtocolService;

    @ApiOperation(tags={"CMC","CSC"},value = "查询平台资源访问协议列表",  httpMethod = "GET")
    @Log(module = BoCloudService.IMS, target = "平台资源访问协议", operation = "查询平台资源访问协议列表")
    @GetMapping
    public BocloudResult<GridBean<ResourceProtocol>> list(Pager pager) {
        return resourceProtocolService.list(pager);
    }
}
