1 package org.openecomp.sdcrests.vendorlicense.rest;
3 import io.swagger.annotations.Api;
4 import io.swagger.annotations.ApiOperation;
5 import io.swagger.annotations.ApiParam;
6 import org.openecomp.sdcrests.vendorlicense.types.LimitEntityDto;
7 import org.openecomp.sdcrests.vendorlicense.types.LimitRequestDto;
8 import org.springframework.validation.annotation.Validated;
10 import javax.validation.Valid;
11 import javax.validation.constraints.NotNull;
12 import javax.ws.rs.Consumes;
13 import javax.ws.rs.DELETE;
14 import javax.ws.rs.GET;
15 import javax.ws.rs.HeaderParam;
16 import javax.ws.rs.POST;
17 import javax.ws.rs.PUT;
18 import javax.ws.rs.Path;
19 import javax.ws.rs.PathParam;
20 import javax.ws.rs.Produces;
21 import javax.ws.rs.core.MediaType;
22 import javax.ws.rs.core.Response;
24 import static org.openecomp.sdcrests.common.RestConstants.USER_ID_HEADER_PARAM;
25 import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG;
28 "/v1.0/vendor-license-models/{vlmId}/versions/{versionId}/entitlement-pools/{entitlementPoolId}/limits")
29 @Produces(MediaType.APPLICATION_JSON)
30 @Consumes(MediaType.APPLICATION_JSON)
31 @Api(value = "Vendor License Model - Entitlement Pool Limits")
33 public interface EntitlementPoolLimits {
37 @ApiOperation(value = "Create vendor entitlement pool limits")
38 Response createLimit(@Valid LimitRequestDto request,
39 @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
41 @ApiParam(value = "Vendor license model version Id") @PathParam
44 @ApiParam(value = "Vendor license model Entitlement Pool Id")
45 @PathParam("entitlementPoolId")
46 String entitlementPoolId,
47 @NotNull(message = USER_MISSING_ERROR_MSG)
48 @HeaderParam(USER_ID_HEADER_PARAM) String user);
53 @ApiOperation(value = "List vendor entitlement pool limits",
54 response = LimitRequestDto.class,
55 responseContainer = "List")
57 @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
58 @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
59 @ApiParam(value = "Vendor license model Entitlement Pool Id") @PathParam("entitlementPoolId")
60 String entitlementPoolId,
61 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
65 @ApiOperation(value = "Update vendor entitlement pool limit")
66 Response updateLimit(@Valid LimitRequestDto request,
67 @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
69 @ApiParam(value = "Vendor license model version Id") @PathParam
72 @ApiParam(value = "Vendor license model Entitlement Pool Id")
73 @PathParam("entitlementPoolId")
74 String entitlementPoolId,
75 @NotNull(message = USER_MISSING_ERROR_MSG)
76 @PathParam("limitId") String limitId,
77 @HeaderParam(USER_ID_HEADER_PARAM) String user);
81 @ApiOperation(value = "Get vendor entitlement pool limit",
82 response = LimitEntityDto.class)
84 @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
85 @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
86 @ApiParam(value = "Vendor license model Entitlement Pool Id") @PathParam
87 ("entitlementPoolId") String entitlementPoolId,
88 @ApiParam(value = "Vendor license model Entitlement Pool Limit Id") @PathParam("limitId")
90 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
94 @ApiOperation(value = "Delete vendor entitlement pool limit")
96 @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
97 @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
98 @ApiParam(value = "Vendor license model Entitlement pool Id") @PathParam("entitlementPoolId")
99 String entitlementPoolId,
100 @PathParam("limitId") String limitId,
101 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);