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}/license-key-groups/{licenseKeyGroupId}/limits")
29 @Produces(MediaType.APPLICATION_JSON)
30 @Consumes(MediaType.APPLICATION_JSON)
31 @Api(value = "Vendor License Model - License Key Group Limits")
33 public interface LicenseKeyGroupLimits {
37 @ApiOperation(value = "Create vendor license key group limit")
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 License Key Group Id")
45 @PathParam("licenseKeyGroupId")
46 String licenseKeyGroupId,
47 @NotNull(message = USER_MISSING_ERROR_MSG)
48 @HeaderParam(USER_ID_HEADER_PARAM) String user);
52 @ApiOperation(value = "List vendor license key group limits",
53 response = LimitEntityDto.class,
54 responseContainer = "List")
56 @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
57 @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
58 @ApiParam(value = "Vendor license model License Key Group Id") @PathParam("licenseKeyGroupId")
59 String licenseKeyGroupId,
60 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
64 @ApiOperation(value = "Update vendor license key group limit")
65 Response updateLimit(@Valid LimitRequestDto request,
66 @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
68 @ApiParam(value = "Vendor license model version Id") @PathParam
71 @ApiParam(value = "Vendor license model License Key Group Id")
72 @PathParam("licenseKeyGroupId")
73 String licenseKeyGroupId,
74 @NotNull(message = USER_MISSING_ERROR_MSG)
75 @PathParam("limitId") String limitId,
76 @HeaderParam(USER_ID_HEADER_PARAM) String user);
80 @ApiOperation(value = "Get vendor entitlement pool limit",
81 response = LimitEntityDto.class)
83 @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
84 @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
85 @ApiParam(value = "Vendor license model License Key Group") @PathParam
86 ("licenseKeyGroupId") String entitlementPoolId,
87 @ApiParam(value = "Vendor license model License Key Group Limit Id") @PathParam("limitId")
89 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
93 @ApiOperation(value = "Delete vendor license key group limit")
95 @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
96 @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
97 @ApiParam(value = "Vendor license model license key group Id") @PathParam("licenseKeyGroupId")
98 String licenseKeyGroupId,
99 @PathParam("limitId") String limitId,
100 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);