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}/license-key-groups/{licenseKeyGroupId}/limits")
21 @Produces(MediaType.APPLICATION_JSON)
22 @Consumes(MediaType.APPLICATION_JSON)
23 @Api(value = "Vendor License Model - License Key Group Limits")
25 public interface LicenseKeyGroupLimits {
29 @ApiOperation(value = "Create vendor license key group limit")
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 License Key Group Id")
37 @PathParam("licenseKeyGroupId")
38 String licenseKeyGroupId,
39 @NotNull(message = USER_MISSING_ERROR_MSG)
40 @HeaderParam(USER_ID_HEADER_PARAM) String user);
44 @ApiOperation(value = "List vendor license key group limits",
45 response = LimitEntityDto.class,
46 responseContainer = "List")
48 @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
49 @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
50 @ApiParam(value = "Vendor license model License Key Group Id") @PathParam("licenseKeyGroupId")
51 String licenseKeyGroupId,
52 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
56 @ApiOperation(value = "Update vendor license key group limit")
57 Response updateLimit(@Valid LimitRequestDto request,
58 @ApiParam(value = "Vendor license model Id") @PathParam("vlmId")
60 @ApiParam(value = "Vendor license model version Id") @PathParam
63 @ApiParam(value = "Vendor license model License Key Group Id")
64 @PathParam("licenseKeyGroupId")
65 String licenseKeyGroupId,
66 @NotNull(message = USER_MISSING_ERROR_MSG)
67 @PathParam("limitId") String limitId,
68 @HeaderParam(USER_ID_HEADER_PARAM) String user);
72 @ApiOperation(value = "Get vendor entitlement pool limit",
73 response = LimitEntityDto.class)
75 @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
76 @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
77 @ApiParam(value = "Vendor license model License Key Group") @PathParam
78 ("licenseKeyGroupId") String entitlementPoolId,
79 @ApiParam(value = "Vendor license model License Key Group Limit Id") @PathParam("limitId")
81 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);
85 @ApiOperation(value = "Delete vendor license key group limit")
87 @ApiParam(value = "Vendor license model Id") @PathParam("vlmId") String vlmId,
88 @ApiParam(value = "Vendor license model version Id") @PathParam("versionId") String versionId,
89 @ApiParam(value = "Vendor license model license key group Id") @PathParam("licenseKeyGroupId")
90 String licenseKeyGroupId,
91 @PathParam("limitId") String limitId,
92 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);