added azure related code
[it/otf.git] / otf-camunda / src / main / java / org / oran / otf / common / model / TestHead.java
1 /*  Copyright (c) 2019 AT&T Intellectual Property.                             #\r
2 #                                                                              #\r
3 #   Licensed under the Apache License, Version 2.0 (the "License");            #\r
4 #   you may not use this file except in compliance with the License.           #\r
5 #   You may obtain a copy of the License at                                    #\r
6 #                                                                              #\r
7 #       http://www.apache.org/licenses/LICENSE-2.0                             #\r
8 #                                                                              #\r
9 #   Unless required by applicable law or agreed to in writing, software        #\r
10 #   distributed under the License is distributed on an "AS IS" BASIS,          #\r
11 #   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.   #\r
12 #   See the License for the specific language governing permissions and        #\r
13 #   limitations under the License.                                             #\r
14 ##############################################################################*/\r
15 \r
16 \r
17 package org.oran.otf.common.model;\r
18 \r
19 import javax.validation.constraints.NotNull;\r
20 import org.oran.otf.common.utility.gson.Convert;\r
21 import java.io.Serializable;\r
22 import java.util.Date;\r
23 import java.util.Map;\r
24 \r
25 import org.bson.types.ObjectId;\r
26 import org.springframework.data.annotation.Id;\r
27 import org.springframework.data.mongodb.core.index.CompoundIndex;\r
28 import org.springframework.data.mongodb.core.index.Indexed;\r
29 import org.springframework.data.mongodb.core.mapping.Document;\r
30 \r
31 @Document(collection = "testHeads")\r
32 public class TestHead implements Serializable {\r
33 \r
34   private static final long serialVersionUID = 1L;\r
35 \r
36   @Id\r
37   private ObjectId _id;\r
38 \r
39   //@Indexed(unique = true)\r
40   @NotNull\r
41   private String testHeadName;\r
42 \r
43   private String testHeadDescription;\r
44   private String hostname;\r
45   private String port;\r
46   private String resourcePath;\r
47   private ObjectId creatorId;\r
48   private ObjectId groupId;\r
49   private String authorizationType;\r
50   private String authorizationCredential;\r
51   private Boolean authorizationEnabled;\r
52   private Map<String, Object> vthInputTemplate;\r
53   private Date createdAt;\r
54   private Date updatedAt;\r
55   private ObjectId updatedBy;\r
56   private Boolean isPublic;\r
57   public TestHead() {\r
58   }\r
59 \r
60   public TestHead(\r
61           ObjectId _id,\r
62           String testHeadName,\r
63           String testHeadDescription,\r
64           String hostname,\r
65           String port,\r
66           String resourcePath,\r
67           ObjectId creatorId,\r
68           ObjectId groupId,\r
69           String authorizationType,\r
70           String authorizationCredential,\r
71           boolean authorizationEnabled,\r
72           Map<String, Object> vthInputTemplate,\r
73           Date createdAt,\r
74           Date updatedAt,\r
75           ObjectId updatedBy,\r
76           Boolean isPublic) {\r
77     this._id = _id;\r
78     this.testHeadName = testHeadName;\r
79     this.testHeadDescription = testHeadDescription;\r
80     this.hostname = hostname;\r
81     this.port = port;\r
82     this.resourcePath = resourcePath;\r
83     this.creatorId = creatorId;\r
84     this.groupId = groupId;\r
85     this.authorizationType = authorizationType;\r
86     this.authorizationCredential = authorizationCredential;\r
87     this.authorizationEnabled = authorizationEnabled;\r
88     this.vthInputTemplate = vthInputTemplate;\r
89     this.createdAt = createdAt;\r
90     this.updatedAt = updatedAt;\r
91     this.updatedBy = updatedBy;\r
92     this.isPublic = isPublic;\r
93   }\r
94 \r
95   public ObjectId get_id() {\r
96     return _id;\r
97   }\r
98 \r
99   public void set_id(ObjectId _id) {\r
100     this._id = _id;\r
101   }\r
102 \r
103   public String getTestHeadName() {\r
104     return testHeadName;\r
105   }\r
106 \r
107   public void setTestHeadName(String testHeadName) {\r
108     this.testHeadName = testHeadName;\r
109   }\r
110 \r
111   public String getTestHeadDescription() {\r
112     return testHeadDescription;\r
113   }\r
114 \r
115   public void setTestHeadDescription(String testHeadDescription) {\r
116     this.testHeadDescription = testHeadDescription;\r
117   }\r
118 \r
119   public String getHostname() {\r
120     return hostname;\r
121   }\r
122 \r
123   public void setHostname(String hostname) {\r
124     this.hostname = hostname;\r
125   }\r
126 \r
127   public String getPort() {\r
128     return port;\r
129   }\r
130 \r
131   public void setPort(String port) {\r
132     this.port = port;\r
133   }\r
134 \r
135   public String getResourcePath() {\r
136     return resourcePath;\r
137   }\r
138 \r
139   public void setResourcePath(String resourcePath) {\r
140     this.resourcePath = resourcePath;\r
141   }\r
142 \r
143   public ObjectId getCreatorId() {\r
144     return creatorId;\r
145   }\r
146 \r
147   public void setCreatorId(ObjectId creatorId) {\r
148     this.creatorId = creatorId;\r
149   }\r
150 \r
151   public ObjectId getGroupId() {\r
152     return groupId;\r
153   }\r
154 \r
155   public void setGroupId(ObjectId groupId) {\r
156     this.groupId = groupId;\r
157   }\r
158 \r
159   public String getAuthorizationCredential() {\r
160     return authorizationCredential;\r
161   }\r
162 \r
163   public String getAuthorizationType() {\r
164     return authorizationType;\r
165   }\r
166 \r
167   public void setAuthorizationType(String authorizationType) {\r
168     this.authorizationType = authorizationType;\r
169   }\r
170 \r
171   public void setAuthorizationCredential(String authorizationCredential) {\r
172     this.authorizationCredential = authorizationCredential;\r
173   }\r
174 \r
175   public Boolean getAuthorizationEnabled() {\r
176     return authorizationEnabled;\r
177   }\r
178 \r
179   public void setAuthorizationEnabled(Boolean authorizationEnabled) {\r
180     this.authorizationEnabled = authorizationEnabled;\r
181   }\r
182 \r
183   public Map<String, Object> getVthInputTemplate() {\r
184     return vthInputTemplate;\r
185   }\r
186 \r
187   public void setVthInputTemplate(Map<String, Object> vthInputTemplate) {\r
188     this.vthInputTemplate = vthInputTemplate;\r
189   }\r
190 \r
191   public Date getCreatedAt() {\r
192     return createdAt;\r
193   }\r
194 \r
195   public void setCreatedAt(Date createdAt) {\r
196     this.createdAt = createdAt;\r
197   }\r
198 \r
199   public Date getUpdatedAt() {\r
200     return updatedAt;\r
201   }\r
202 \r
203   public void setUpdatedAt(Date updatedAt) {\r
204     this.updatedAt = updatedAt;\r
205   }\r
206 \r
207   public ObjectId getUpdatedBy() {\r
208     return updatedBy;\r
209   }\r
210 \r
211   public void setUpdatedBy(ObjectId updatedBy) {\r
212     this.updatedBy = updatedBy;\r
213   }\r
214 \r
215   public Boolean isPublic() {\r
216     return isPublic;\r
217   }\r
218 \r
219   public void setPublic(Boolean aPublic) {\r
220     isPublic = aPublic;\r
221   }\r
222 \r
223   @Override\r
224   public String toString() {\r
225     return Convert.objectToJson(this);\r
226   }\r
227 }\r