1 /*******************************************************************************
3 * Copyright © 2019 AT&T Intellectual Property.
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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
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
20 * https://creativecommons.org/licenses/by/4.0/
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 ******************************************************************************/
28 package org.onap.optf.cmso.optimizer.clients.topology.models;
30 import io.swagger.annotations.ApiModel;
31 import io.swagger.annotations.ApiModelProperty;
32 import java.io.Serializable;
33 import java.util.List;
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;
40 public enum AvailabilityMatrixScope {
41 NONE, GLOBAL, ELEMENT,
44 @ApiModelProperty(value = "Element identifier")
45 private String elementId;
47 @ApiModelProperty(value = "Type of constraint.")
48 private String constraintType;
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;
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;
60 @ApiModelProperty(value = "Availability matrix scope global or scoped per elementId.")
61 private AvailabilityMatrixScope availabilityMatrixScope = AvailabilityMatrixScope.NONE;
63 @ApiModelProperty(value = "Availability matrix is aggregated into element availability marrix.")
64 private boolean elementAvailabilityAggreagation = true;
66 @ApiModelProperty(value = "Elements ")
67 private List<String> elements;
69 public String getElementId() {
73 public void setElementId(String elementId) {
74 this.elementId = elementId;
77 public String getConstraintType() {
78 return constraintType;
81 public void setConstraintType(String constraintType) {
82 this.constraintType = constraintType;
85 public Integer getConstraintTypeMinimum() {
86 return constraintTypeMinimum;
89 public void setConstraintTypeMinimum(Integer constraintTypeMinimum) {
90 this.constraintTypeMinimum = constraintTypeMinimum;
93 public String getOptimizerAvailabilityMatrixName() {
94 return optimizerAvailabilityMatrixName;
97 public void setOptimizerAvailabilityMatrixName(String optimizerAvailabilityMatrixName) {
98 this.optimizerAvailabilityMatrixName = optimizerAvailabilityMatrixName;
101 public List<String> getElements() {
105 public void setElements(List<String> elements) {
106 this.elements = elements;
109 public AvailabilityMatrixScope getAvailabilityMatrixScope() {
110 return availabilityMatrixScope;
113 public void setAvailabilityMatrixScope(AvailabilityMatrixScope availabilityMatrixScope) {
114 this.availabilityMatrixScope = availabilityMatrixScope;
117 public boolean isElementAvailabilityAggreagation() {
118 return elementAvailabilityAggreagation;
121 public void setElementAvailabilityAggreagation(boolean elementAvailabilityAggreagation) {
122 this.elementAvailabilityAggreagation = elementAvailabilityAggreagation;