Fix for Penetration test _ Session and cookie management
[vid.git] / vid-app-common / src / main / java / org / onap / vid / aai / model / AaiGetPnfs / Pnf.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * VID
4  * ================================================================================
5  * Copyright (C) 2017 - 2019 AT&T Intellectual Property. All rights reserved.
6  * Modifications Copyright (C) 2019 Nokia.
7  * ================================================================================
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *      http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  * ============LICENSE_END=========================================================
20  */
21
22 package org.onap.vid.aai.model.AaiGetPnfs;
23
24 import com.fasterxml.jackson.annotation.JsonCreator;
25 import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
26 import com.fasterxml.jackson.annotation.JsonProperty;
27 import org.onap.vid.aai.model.AaiRelationResponse;
28
29 @JsonIgnoreProperties(ignoreUnknown = true)
30 public final class Pnf extends AaiRelationResponse {
31
32     private final String pnfId;
33     private final String pnfName;
34     private final String pnfName2;
35     private final String pnfName2Source;
36     private final String equipType;
37     private final String equipVendor;
38     private final String equipModel;
39
40     @JsonCreator
41     public Pnf(
42             @JsonProperty("pnf-id") String pnfId, @JsonProperty("pnf-name") String pnfName,
43             @JsonProperty("pnf-name2") String pnfName2, @JsonProperty("pnf-name2-source") String pnfName2Source,
44             @JsonProperty("equip-type") String equipType, @JsonProperty("equip-vendor") String equipVendor,
45             @JsonProperty("equip-model") String equipModel) {
46
47         this.pnfId = pnfId;
48         this.pnfName = pnfName;
49         this.pnfName2 = pnfName2;
50         this.pnfName2Source = pnfName2Source;
51         this.equipType = equipType;
52         this.equipVendor = equipVendor;
53         this.equipModel = equipModel;
54     }
55
56     public static Builder builder() {
57         return new Builder();
58     }
59
60     public String getPnfId() {
61         return pnfId;
62     }
63
64     public String getPnfName() {
65         return pnfName;
66     }
67
68     public String getPnfName2() {
69         return pnfName2;
70     }
71
72     public String getPnfName2Source() {
73         return pnfName2Source;
74     }
75
76     public String getEquipType() {
77         return equipType;
78     }
79
80     public String getEquipVendor() {
81         return equipVendor;
82     }
83
84     public String getEquipModel() {
85         return equipModel;
86     }
87
88     public static class Builder {
89
90         private String pnfId;
91         private String pnfName;
92         private String pnfName2;
93         private String pnfName2Source;
94         private String equipType;
95         private String equipVendor;
96         private String equipModel;
97
98         public Builder withPnfId(String pnfId) {
99             this.pnfId = pnfId;
100             return this;
101         }
102
103         public Builder withPnfName(String pnfName) {
104             this.pnfName = pnfName;
105             return this;
106         }
107
108         public Builder withPnfName2(String pnfName2) {
109             this.pnfName2 = pnfName2;
110             return this;
111         }
112
113         public Builder withPnfName2Source(String pnfName2Source) {
114             this.pnfName2Source = pnfName2Source;
115             return this;
116         }
117
118         public Builder withEquipType(String equipType) {
119             this.equipType = equipType;
120             return this;
121         }
122
123         public Builder withEquipVendor(String equipVendor) {
124             this.equipVendor = equipVendor;
125             return this;
126         }
127
128         public Builder withEquipModel(String equipModel) {
129             this.equipModel = equipModel;
130             return this;
131         }
132
133         public Pnf build() {
134             return new Pnf(pnfId, pnfName, pnfName2, pnfName2Source, equipType, equipVendor, equipModel);
135         }
136     }
137 }
138