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;
13 import javax.ws.rs.core.MediaType;
14 import javax.ws.rs.core.Response;
16 import static org.openecomp.sdcrests.common.RestConstants.USER_ID_HEADER_PARAM;
17 import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG;
20 "/v1.0/vendor-license-models/{vlmId}/versions/{versionId}/entitlement-pools/{entitlementPoolId}/limits")
21 @Produces(MediaType.APPLICATION_JSON)
22 @Consumes(MediaType.APPLICATION_JSON)
23 @Api(value = "Vendor License Model - Entitlement Pool Limits")
25 public interface EntitlementPoolLimits {
29 @ApiOperation(value = "Create vendor entitlement pool limits")
30 Response createLimit(@Valid LimitRequestDto request,
31 @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
33 @ApiParam(value = "Vendor license model version Id") @PathParam
36 @ApiParam(value = "Vendor license model Entitlement Pool Id")
37 @PathParam("entitlementPoolId")
38 String entitlementPoolId,
39 @NotNull(message = USER_MISSING_ERROR_MSG)
40 @HeaderParam(USER_ID_HEADER_PARAM) String user);
45 @ApiOperation(value = "List vendor entitlement pool limits",
46 response = LimitRequestDto.class,
47 responseContainer = "List")
49 @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
50 @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
51 @ApiParam(value = "Vendor license model Entitlement Pool Id") @PathParam("entitlementPoolId")
52 String entitlementPoolId,
53 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
57 @ApiOperation(value = "Update vendor entitlement pool limit")
58 Response updateLimit(@Valid LimitRequestDto request,
59 @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
61 @ApiParam(value = "Vendor license model version Id") @PathParam
64 @ApiParam(value = "Vendor license model Entitlement Pool Id")
65 @PathParam("entitlementPoolId")
66 String entitlementPoolId,
67 @NotNull(message = USER_MISSING_ERROR_MSG)
68 @PathParam("limitId") String limitId,
69 @HeaderParam(USER_ID_HEADER_PARAM) String user);
73 @ApiOperation(value = "Get vendor entitlement pool limit",
74 response = LimitEntityDto.class)
76 @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
77 @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
78 @ApiParam(value = "Vendor license model Entitlement Pool Id") @PathParam
79 ("entitlementPoolId") String entitlementPoolId,
80 @ApiParam(value = "Vendor license model Entitlement Pool Limit Id") @PathParam("limitId")
82 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
86 @ApiOperation(value = "Delete vendor entitlement pool limit")
88 @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
89 @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
90 @ApiParam(value = "Vendor license model Entitlement pool Id") @PathParam("entitlementPoolId")
91 String entitlementPoolId,
92 @PathParam("limitId") String limitId,
93 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);