35e6f31e28ffc18d0cfbf7ef3647b19794f794c6
[sdc.git] /
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 package org.openecomp.sdcrests.vendorlicense.types;
21
22 import io.swagger.v3.oas.annotations.media.Schema;
23 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
24 import org.hibernate.validator.constraints.NotBlank;
25 import org.openecomp.sdc.vendorlicense.dao.types.EntitlementPoolType;
26 import org.openecomp.sdc.vendorlicense.dao.types.OperationalScope;
27 import org.openecomp.sdc.vendorlicense.dao.types.ThresholdUnit;
28 import javax.validation.Valid;
29 import javax.validation.constraints.NotNull;
30 import javax.validation.constraints.Size;
31
32 @Schema(description = "EntitlementPoolRequest")
33 @JsonIgnoreProperties({"time", "aggregationFunction", "entitlementMetric"})
34 public class EntitlementPoolRequestDto {
35
36     @NotNull
37     @Size(max = 120)
38     private String name;
39     @NotBlank(message = "is mandatory and should not be empty")
40     @Size(max = 100)
41     private String manufacturerReferenceNumber;
42     @Size(max = 1000)
43     private String description;
44     @NotNull
45     private EntitlementPoolType type;
46     private Integer thresholdValue;
47     private ThresholdUnit thresholdUnits;
48     @Size(max = 120)
49     private String increments;
50     @Valid
51     private MultiChoiceOrOtherDto<OperationalScope> operationalScope;
52     private String startDate;
53     private String expiryDate;
54
55     public String getName() {
56         return name;
57     }
58
59     public void setName(String name) {
60         this.name = name;
61     }
62
63     public String getManufacturerReferenceNumber() {
64         return manufacturerReferenceNumber;
65     }
66
67     public void setManufacturerReferenceNumber(String manufacturerReferenceNumber) {
68         this.manufacturerReferenceNumber = manufacturerReferenceNumber;
69     }
70
71     public String getDescription() {
72         return description;
73     }
74
75     public void setDescription(String description) {
76         this.description = description;
77     }
78
79     public EntitlementPoolType getType() {
80         return type;
81     }
82
83     public void setType(EntitlementPoolType type) {
84         this.type = type;
85     }
86
87     public Integer getThresholdValue() {
88         return thresholdValue;
89     }
90
91     public void setThresholdValue(Integer thresholdValue) {
92         this.thresholdValue = thresholdValue;
93     }
94
95     public ThresholdUnit getThresholdUnits() {
96         return thresholdUnits;
97     }
98
99     public void setThresholdUnits(ThresholdUnit thresholdUnits) {
100         this.thresholdUnits = thresholdUnits;
101     }
102
103     public String getIncrements() {
104         return increments;
105     }
106
107     public void setIncrements(String increments) {
108         this.increments = increments;
109     }
110
111     public MultiChoiceOrOtherDto<OperationalScope> getOperationalScope() {
112         return operationalScope;
113     }
114
115     public void setOperationalScope(MultiChoiceOrOtherDto<OperationalScope> operationalScope) {
116         this.operationalScope = operationalScope;
117     }
118
119     public String getStartDate() {
120         return startDate;
121     }
122
123     public void setStartDate(String startDate) {
124         this.startDate = startDate;
125     }
126
127     public String getExpiryDate() {
128         return expiryDate;
129     }
130
131     public void setExpiryDate(String expiryDate) {
132         this.expiryDate = expiryDate;
133     }
134 }