3 * ============LICENSE_START=======================================================
4 * Copyright (C) 2022 Nordix Foundation.
5 * ================================================================================
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
18 * SPDX-License-Identifier: Apache-2.0
19 * ============LICENSE_END=========================================================
22 package org.openecomp.sdcrests.vsp.rest;
24 import static org.openecomp.sdcrests.common.RestConstants.USER_ID_HEADER_PARAM;
25 import static org.openecomp.sdcrests.common.RestConstants.USER_MISSING_ERROR_MSG;
26 import static org.openecomp.sdcrests.vsp.rest.OrchestrationTemplateCandidateUploadManagerController.URL;
28 import io.swagger.v3.oas.annotations.Parameter;
29 import io.swagger.v3.oas.annotations.tags.Tag;
30 import javax.validation.constraints.NotNull;
31 import javax.ws.rs.Consumes;
32 import javax.ws.rs.GET;
33 import javax.ws.rs.HeaderParam;
34 import javax.ws.rs.Path;
35 import javax.ws.rs.PathParam;
36 import javax.ws.rs.Produces;
37 import javax.ws.rs.core.MediaType;
38 import javax.ws.rs.core.Response;
39 import org.springframework.validation.annotation.Validated;
42 @Produces(MediaType.APPLICATION_JSON)
43 @Consumes(MediaType.APPLICATION_JSON)
44 @Tag(name = "SDCE-1 APIs")
45 @Tag(name = "Package Upload Manager")
47 public interface OrchestrationTemplateCandidateUploadManagerController extends VspEntities {
49 String URL = "/v1.0/vendor-software-products/{vspId}/versions/{versionId}/orchestration-template-candidate/upload";
52 * Gets the latest package upload status for a Vendor Software Product version.
54 * @param vspId the vsp id
55 * @param versionId the vsp version id
56 * @param user the username accessing the API
57 * @return if successful, an OK response with the latest VspUploadStatus information
61 Response getLatestStatus(@Parameter(description = "Vendor Software Product id") @PathParam("vspId") String vspId,
62 @Parameter(description = "Vendor Software Product version id") @PathParam("versionId") String versionId,
63 @NotNull(message = USER_MISSING_ERROR_MSG) @HeaderParam(USER_ID_HEADER_PARAM) String user);