1 package org.openecomp.sdcrests.vendorlicense.rest;
3 import static org.openecomp.sdcrests.common.RestConstants.USER_ID_HEADER_PARAM;
4 import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG;
6 import io.swagger.annotations.Api;
7 import io.swagger.annotations.ApiOperation;
8 import io.swagger.annotations.ApiParam;
9 import org.openecomp.sdcrests.vendorlicense.types.LimitEntityDto;
10 import org.openecomp.sdcrests.vendorlicense.types.LimitRequestDto;
11 import org.springframework.validation.annotation.Validated;
13 import javax.validation.Valid;
14 import javax.validation.constraints.NotNull;
15 import javax.ws.rs.Consumes;
16 import javax.ws.rs.DELETE;
17 import javax.ws.rs.GET;
18 import javax.ws.rs.HeaderParam;
19 import javax.ws.rs.POST;
20 import javax.ws.rs.PUT;
21 import javax.ws.rs.Path;
22 import javax.ws.rs.PathParam;
23 import javax.ws.rs.Produces;
24 import javax.ws.rs.core.MediaType;
25 import javax.ws.rs.core.Response;
27 @Path("/v1.0/vendor-license-models/{vlmId}/versions/{versionId}/license-key-groups" +
28 "/{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") String licenseKeyGroupId,
98 @PathParam("limitId") String limitId,
99 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);