Entitlement Pool - Support Type Field
[sdc.git] / openecomp-be / api / openecomp-sdc-rest-webapp / vendor-license-rest / vendor-license-rest-types / src / main / java / org / openecomp / sdcrests / vendorlicense / types / EntitlementPoolRequestDto.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.openecomp.sdcrests.vendorlicense.types;
22
23
24 import io.swagger.v3.oas.annotations.media.Schema;
25 import org.codehaus.jackson.annotate.JsonIgnoreProperties;
26 import org.hibernate.validator.constraints.NotBlank;
27 import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolType;
28 import org.openecomp.sdc.vendorlicense.dao.types.OperationalScope;
29 import org.openecomp.sdc.vendorlicense.dao.types.ThresholdUnit;
30
31 import javax.validation.Valid;
32 import javax.validation.constraints.NotNull;
33 import javax.validation.constraints.Size;
34
35 @Schema(description = "EntitlementPoolRequest")
36 @JsonIgnoreProperties({"time", "aggregationFunction", "entitlementMetric"})
37 public class EntitlementPoolRequestDto {
38
39   @NotNull
40   @Size(max = 120)
41   private String name;
42
43   @NotBlank(message = "is mandatory and should not be empty")
44   @Size(max = 100)
45   private String manufacturerReferenceNumber;
46
47   @Size(max = 1000)
48   private String description;
49
50   @NotNull
51   private EntitlementPoolType type;
52
53   private Integer thresholdValue;
54
55   private ThresholdUnit thresholdUnits;
56   @Size(max = 120)
57   private String increments;
58
59   @Valid
60   private MultiChoiceOrOtherDto<OperationalScope> operationalScope;
61
62   private String startDate;
63   private String expiryDate;
64
65   public String getName() {
66     return name;
67   }
68
69   public void setName(String name) {
70     this.name = name;
71   }
72
73   public String getManufacturerReferenceNumber() {
74     return manufacturerReferenceNumber;
75   }
76
77   public void setManufacturerReferenceNumber(String manufacturerReferenceNumber) {
78     this.manufacturerReferenceNumber = manufacturerReferenceNumber;
79   }
80
81   public String getDescription() {
82     return description;
83   }
84
85   public void setDescription(String description) {
86     this.description = description;
87   }
88
89   public EntitlementPoolType getType() {
90     return type;
91   }
92
93   public void setType(EntitlementPoolType type) {
94     this.type = type;
95   }
96
97   public Integer getThresholdValue() {
98     return thresholdValue;
99   }
100
101   public void setThresholdValue(Integer thresholdValue) {
102     this.thresholdValue = thresholdValue;
103   }
104
105   public ThresholdUnit getThresholdUnits() {
106     return thresholdUnits;
107   }
108
109   public void setThresholdUnits(ThresholdUnit thresholdUnits) {
110     this.thresholdUnits = thresholdUnits;
111   }
112
113   public String getIncrements() {
114     return increments;
115   }
116
117   public void setIncrements(String increments) {
118     this.increments = increments;
119   }
120
121   public MultiChoiceOrOtherDto<OperationalScope> getOperationalScope() {
122     return operationalScope;
123   }
124
125   public void setOperationalScope(MultiChoiceOrOtherDto<OperationalScope> operationalScope) {
126     this.operationalScope = operationalScope;
127   }
128
129   public String getStartDate() {
130     return startDate;
131   }
132
133   public void setStartDate(String startDate) {
134     this.startDate = startDate;
135   }
136
137   public String getExpiryDate() {
138     return expiryDate;
139   }
140
141   public void setExpiryDate(String expiryDate) {
142     this.expiryDate = expiryDate;
143   }
144 }