Near-RT-RIC Simualator & README files
[nonrtric.git] / near-rt-ric-simulator / nearric-simulator / nearric-service / src / main / java / org / onap / nearric / simulator / controller / A1PApi.java
1 /**
2  * NOTE: This class is auto generated by the swagger code generator program (3.0.8).
3  * https://github.com/swagger-api/swagger-codegen
4  * Do not edit the class manually.
5  */
6 package org.onap.nearric.simulator.controller;
7
8 import org.oransc.ric.a1med.api.model.InlineResponse200;
9 import org.oransc.ric.a1med.api.model.PolicyTypeSchema;
10 import io.swagger.annotations.*;
11 import org.springframework.http.ResponseEntity;
12 import org.springframework.validation.annotation.Validated;
13 import org.springframework.web.bind.annotation.PathVariable;
14 import org.springframework.web.bind.annotation.RequestBody;
15 import org.springframework.web.bind.annotation.RequestHeader;
16 import org.springframework.web.bind.annotation.RequestMapping;
17 import org.springframework.web.bind.annotation.RequestMethod;
18 import org.springframework.web.bind.annotation.RequestParam;
19 import org.springframework.web.bind.annotation.RequestPart;
20 import org.springframework.web.multipart.MultipartFile;
21
22 import javax.validation.Valid;
23 import javax.validation.constraints.*;
24 import java.util.List;
25 import java.util.Map;
26 @javax.annotation.Generated(value = "io.swagger.codegen.v3.generators.java.SpringCodegen", date = "2019-10-04T13:41:42.802+01:00[Europe/Dublin]")
27 @Api(value = "a1-p", description = "the a1-p API")
28 public interface A1PApi {
29
30     @ApiOperation(value = "", nickname = "a1ControllerCreateOrReplacePolicyInstance", notes = "Create or replace a policy instance of type policy_type_id. The schema of the PUT body is defined by the create_schema field of the policy type. ", tags={ "A1 Mediator", })
31     @ApiResponses(value = { 
32         @ApiResponse(code = 201, message = "Policy instance created "),
33         @ApiResponse(code = 400, message = "Bad PUT body for this policy instance "),
34         @ApiResponse(code = 404, message = "There is no policy type with this policy_type_id ") })
35     @RequestMapping(value = "/a1-p/policytypes/{policy_type_id}/policies/{policy_instance_id}",
36         consumes = { "application/json" },
37         method = RequestMethod.PUT)
38     ResponseEntity<Void> a1ControllerCreateOrReplacePolicyInstance(@ApiParam(value = "",required=true) @PathVariable("policy_type_id") Integer policyTypeId,@ApiParam(value = "",required=true) @PathVariable("policy_instance_id") String policyInstanceId,@ApiParam(value = ""  )  @Valid @RequestBody Object body);
39
40
41     @ApiOperation(value = "", nickname = "a1ControllerCreatePolicyType", notes = "Create a new policy type . Replace is not currently allowed; to replace, for now do a DELETE and then a PUT again. ", tags={ "A1 Mediator", })
42     @ApiResponses(value = { 
43         @ApiResponse(code = 201, message = "policy type successfully created"),
44         @ApiResponse(code = 400, message = "illegal ID, or object already existed") })
45     @RequestMapping(value = "/a1-p/policytypes/{policy_type_id}",
46         consumes = { "application/json" },
47         method = RequestMethod.PUT)
48     ResponseEntity<Void> a1ControllerCreatePolicyType(@ApiParam(value = "",required=true) @PathVariable("policy_type_id") Integer policyTypeId,@ApiParam(value = ""  )  @Valid @RequestBody PolicyTypeSchema body);
49
50
51     @ApiOperation(value = "", nickname = "a1ControllerDeletePolicyInstance", notes = "Delete this policy instance ", tags={ "A1 Mediator", })
52     @ApiResponses(value = { 
53         @ApiResponse(code = 204, message = "policy instance successfully deleted "),
54         @ApiResponse(code = 404, message = "there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id ") })
55     @RequestMapping(value = "/a1-p/policytypes/{policy_type_id}/policies/{policy_instance_id}",
56         method = RequestMethod.DELETE)
57     ResponseEntity<Void> a1ControllerDeletePolicyInstance(@ApiParam(value = "",required=true) @PathVariable("policy_type_id") Integer policyTypeId,@ApiParam(value = "",required=true) @PathVariable("policy_instance_id") String policyInstanceId);
58
59
60     @ApiOperation(value = "", nickname = "a1ControllerDeletePolicyType", notes = "Delete this policy type. Can only be performed if there are no instances of this type ", tags={ "A1 Mediator", })
61     @ApiResponses(value = { 
62         @ApiResponse(code = 204, message = "policy type successfully deleted "),
63         @ApiResponse(code = 400, message = "Policy type cannot be deleted because there are instances All instances must be removed before a policy type can be deleted "),
64         @ApiResponse(code = 404, message = "policy type not found ") })
65     @RequestMapping(value = "/a1-p/policytypes/{policy_type_id}",
66         method = RequestMethod.DELETE)
67     ResponseEntity<Void> a1ControllerDeletePolicyType(@ApiParam(value = "",required=true) @PathVariable("policy_type_id") Integer policyTypeId);
68
69
70     @ApiOperation(value = "", nickname = "a1ControllerGetAllInstancesForType", notes = "get a list of all policy instance ids for this policy type id", response = String.class, responseContainer = "List", tags={ "A1 Mediator", })
71     @ApiResponses(value = { 
72         @ApiResponse(code = 200, message = "list of all policy instance ids for this policy type id", response = String.class, responseContainer = "List") })
73     @RequestMapping(value = "/a1-p/policytypes/{policy_type_id}/policies",
74         produces = { "application/json" }, 
75         method = RequestMethod.GET)
76     ResponseEntity<List<String>> a1ControllerGetAllInstancesForType(@ApiParam(value = "",required=true) @PathVariable("policy_type_id") Integer policyTypeId);
77
78
79     @ApiOperation(value = "", nickname = "a1ControllerGetAllPolicyTypes", notes = "Get a list of all registered policy type ids", response = Integer.class, responseContainer = "List", tags={ "A1 Mediator", })
80     @ApiResponses(value = { 
81         @ApiResponse(code = 200, message = "list of all registered policy type ids", response = Integer.class, responseContainer = "List") })
82     @RequestMapping(value = "/a1-p/policytypes/",
83         produces = { "application/json" }, 
84         method = RequestMethod.GET)
85     ResponseEntity<List<Integer>> a1ControllerGetAllPolicyTypes();
86
87
88     @ApiOperation(value = "", nickname = "a1ControllerGetHealthcheck", notes = "Perform a healthcheck on a1 ", tags={ "A1 Mediator", })
89     @ApiResponses(value = { 
90         @ApiResponse(code = 200, message = "A1 is healthy. Anything other than a 200 should be considered a1 as failing ") })
91     @RequestMapping(value = "/a1-p/healthcheck",
92         method = RequestMethod.GET)
93     ResponseEntity<Void> a1ControllerGetHealthcheck();
94
95
96     @ApiOperation(value = "", nickname = "a1ControllerGetPolicyInstance", notes = "Retrieve the policy instance ", response = Object.class, tags={ "A1 Mediator", })
97     @ApiResponses(value = { 
98         @ApiResponse(code = 200, message = "The policy instance. the schema of this object is defined by the create_schema field of the policy type ", response = Object.class),
99         @ApiResponse(code = 404, message = "there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id ") })
100     @RequestMapping(value = "/a1-p/policytypes/{policy_type_id}/policies/{policy_instance_id}",
101         produces = { "application/json" }, 
102         method = RequestMethod.GET)
103     ResponseEntity<Object> a1ControllerGetPolicyInstance(@ApiParam(value = "",required=true) @PathVariable("policy_type_id") Integer policyTypeId,@ApiParam(value = "",required=true) @PathVariable("policy_instance_id") String policyInstanceId);
104
105
106     @ApiOperation(value = "", nickname = "a1ControllerGetPolicyInstanceStatus", notes = "Retrieve the policy instance status across all handlers of the policy ", response = InlineResponse200.class, responseContainer = "List", tags={ "A1 Mediator", })
107     @ApiResponses(value = { 
108         @ApiResponse(code = 200, message = "The policy instance status. Returns a vector of statuses, where each contains a handler_id (opaque id of a RIC component that implements this policy) and the policy status as returned by that handler ", response = InlineResponse200.class, responseContainer = "List"),
109         @ApiResponse(code = 404, message = "there is no policy instance with this policy_instance_id or there is no policy type with this policy_type_id ") })
110     @RequestMapping(value = "/a1-p/policytypes/{policy_type_id}/policies/{policy_instance_id}/status",
111         produces = { "application/json" }, 
112         method = RequestMethod.GET)
113     ResponseEntity<List<InlineResponse200>> a1ControllerGetPolicyInstanceStatus(@ApiParam(value = "",required=true) @PathVariable("policy_type_id") Integer policyTypeId,@ApiParam(value = "",required=true) @PathVariable("policy_instance_id") String policyInstanceId);
114
115
116     @ApiOperation(value = "", nickname = "a1ControllerGetPolicyType", notes = "Get this policy type ", response = PolicyTypeSchema.class, tags={ "A1 Mediator", })
117     @ApiResponses(value = { 
118         @ApiResponse(code = 200, message = "policy type successfully found", response = PolicyTypeSchema.class),
119         @ApiResponse(code = 404, message = "policy type not found ") })
120     @RequestMapping(value = "/a1-p/policytypes/{policy_type_id}",
121         produces = { "application/json" }, 
122         method = RequestMethod.GET)
123     ResponseEntity<PolicyTypeSchema> a1ControllerGetPolicyType(@ApiParam(value = "",required=true) @PathVariable("policy_type_id") Integer policyTypeId);
124
125 }