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.EntitlementPoolEntityDto;
10 import org.openecomp.sdcrests.vendorlicense.types.LimitEntityDto;
11 import org.openecomp.sdcrests.vendorlicense.types.LimitRequestDto;
12 import org.springframework.validation.annotation.Validated;
14 import javax.validation.Valid;
15 import javax.validation.constraints.NotNull;
16 import javax.ws.rs.Consumes;
17 import javax.ws.rs.DELETE;
18 import javax.ws.rs.GET;
19 import javax.ws.rs.HeaderParam;
20 import javax.ws.rs.POST;
21 import javax.ws.rs.PUT;
22 import javax.ws.rs.Path;
23 import javax.ws.rs.PathParam;
24 import javax.ws.rs.Produces;
25 import javax.ws.rs.core.MediaType;
26 import javax.ws.rs.core.Response;
28 @Path("/v1.0/vendor-license-models/{vlmId}/versions/{versionId}/license-key-groups" +
29 "/{licenseKeyGroupId}/limits")
30 @Produces(MediaType.APPLICATION_JSON)
31 @Consumes(MediaType.APPLICATION_JSON)
32 @Api(value = "Vendor License Model - License Key Group Limits")
34 public interface LicenseKeyGroupLimits {
38 @ApiOperation(value = "Create vendor license key group limit")
39 Response createLimit(@Valid LimitRequestDto request,
40 @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
42 @ApiParam(value = "Vendor license model version Id") @PathParam
45 @ApiParam(value = "Vendor license model License Key Group Id")
46 @PathParam("licenseKeyGroupId")
47 String licenseKeyGroupId ,
48 @NotNull(message = USER_MISSING_ERROR_MSG)
49 @HeaderParam(USER_ID_HEADER_PARAM) String user);
53 @ApiOperation(value = "List vendor license key group limits",
54 response = LimitEntityDto.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 License Key Group Id") @PathParam("licenseKeyGroupId")
60 String licenseKeyGroupId,
61 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
65 @ApiOperation(value = "Update vendor license key group 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 License Key Group Id")
73 @PathParam("licenseKeyGroupId")
74 String licenseKeyGroupId ,
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 License Key Group") @PathParam
87 ("licenseKeyGroupId") String entitlementPoolId,
88 @ApiParam(value = "Vendor license model License Key Group Limit Id") @PathParam("limitId")
90 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
94 @ApiOperation(value = "Delete vendor license key group 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 license key group Id") @PathParam("licenseKeyGroupId") String licenseKeyGroupId,
99 @PathParam("limitId") String limitId,
100 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);