dfd4fad85d9637a8c079ce4d026b8d7bd08ee00a
[optf/cmso.git] /
1 /*******************************************************************************
2  *
3  * Copyright © 2019 AT&T Intellectual Property.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
6  * in compliance with the License. You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software distributed under the License
11  * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12  * or implied. See the License for the specific language governing permissions and limitations under
13  * the License.
14  *
15  *
16  * Unless otherwise specified, all documentation contained herein is licensed under the Creative
17  * Commons License, Attribution 4.0 Intl. (the "License"); you may not use this documentation except
18  * in compliance with the License. You may obtain a copy of the License at
19  *
20  * https://creativecommons.org/licenses/by/4.0/
21  *
22  * Unless required by applicable law or agreed to in writing, documentation distributed under the
23  * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
24  * express or implied. See the License for the specific language governing permissions and
25  * limitations under the License.
26  ******************************************************************************/
27
28 package org.onap.optf.cmso.optimizer.clients.topology.models;
29
30 import io.swagger.annotations.ApiModel;
31 import io.swagger.annotations.ApiModelProperty;
32 import java.io.Serializable;
33 import java.util.List;
34
35 @ApiModel(value = "Topology Constraint ELements",
36                 description = "Constraining Element Information returned from TopologyRequuest.")
37 public class ConstraintElements implements Serializable {
38     private static final long serialVersionUID = 1L;
39
40     public enum AvailabilityMatrixScope {
41         NONE, GLOBAL, ELEMENT,
42     }
43
44     @ApiModelProperty(value = "Element identifier")
45     private String elementId;
46
47     @ApiModelProperty(value = "Type of constraint.")
48     private String constraintType;
49
50     @ApiModelProperty(
51                     value = "If more than one instance of constraintType,"
52                                     + " minimum number of available instances required."
53                                     + " Useful for identifying availableBackup elements, service paths.")
54     private Integer constraintTypeMinimum = 1;
55
56     @ApiModelProperty(value = "Availability matrix name. Availability matrix will not be passed to optimizer engine."
57                     + " Generally useful for global concurrency type constraints.")
58     private String optimizerAvailabilityMatrixName;
59
60     @ApiModelProperty(value = "Availability matrix scope global  or scoped per elementId.")
61     private AvailabilityMatrixScope availabilityMatrixScope = AvailabilityMatrixScope.NONE;
62
63     @ApiModelProperty(value = "Availability matrix is aggregated into element availability marrix.")
64     private boolean elementAvailabilityAggreagation = true;
65
66     @ApiModelProperty(value = "Elements ")
67     private List<String> elements;
68
69     public String getElementId() {
70         return elementId;
71     }
72
73     public void setElementId(String elementId) {
74         this.elementId = elementId;
75     }
76
77     public String getConstraintType() {
78         return constraintType;
79     }
80
81     public void setConstraintType(String constraintType) {
82         this.constraintType = constraintType;
83     }
84
85     public Integer getConstraintTypeMinimum() {
86         return constraintTypeMinimum;
87     }
88
89     public void setConstraintTypeMinimum(Integer constraintTypeMinimum) {
90         this.constraintTypeMinimum = constraintTypeMinimum;
91     }
92
93     public String getOptimizerAvailabilityMatrixName() {
94         return optimizerAvailabilityMatrixName;
95     }
96
97     public void setOptimizerAvailabilityMatrixName(String optimizerAvailabilityMatrixName) {
98         this.optimizerAvailabilityMatrixName = optimizerAvailabilityMatrixName;
99     }
100
101     public List<String> getElements() {
102         return elements;
103     }
104
105     public void setElements(List<String> elements) {
106         this.elements = elements;
107     }
108
109     public AvailabilityMatrixScope getAvailabilityMatrixScope() {
110         return availabilityMatrixScope;
111     }
112
113     public void setAvailabilityMatrixScope(AvailabilityMatrixScope availabilityMatrixScope) {
114         this.availabilityMatrixScope = availabilityMatrixScope;
115     }
116
117     public boolean isElementAvailabilityAggreagation() {
118         return elementAvailabilityAggreagation;
119     }
120
121     public void setElementAvailabilityAggreagation(boolean elementAvailabilityAggreagation) {
122         this.elementAvailabilityAggreagation = elementAvailabilityAggreagation;
123     }
124
125
126
127 }