1 /* Copyright (c) 2019 AT&T Intellectual Property. #
\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
7 # http://www.apache.org/licenses/LICENSE-2.0 #
\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
17 package org.oran.otf.common.model;
\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
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
31 @Document(collection = "testHeads")
\r
32 public class TestHead implements Serializable {
\r
34 private static final long serialVersionUID = 1L;
\r
37 private ObjectId _id;
\r
39 //@Indexed(unique = true)
\r
41 private String testHeadName;
\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
62 String testHeadName,
\r
63 String testHeadDescription,
\r
66 String resourcePath,
\r
69 String authorizationType,
\r
70 String authorizationCredential,
\r
71 boolean authorizationEnabled,
\r
72 Map<String, Object> vthInputTemplate,
\r
78 this.testHeadName = testHeadName;
\r
79 this.testHeadDescription = testHeadDescription;
\r
80 this.hostname = hostname;
\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
95 public ObjectId get_id() {
\r
99 public void set_id(ObjectId _id) {
\r
103 public String getTestHeadName() {
\r
104 return testHeadName;
\r
107 public void setTestHeadName(String testHeadName) {
\r
108 this.testHeadName = testHeadName;
\r
111 public String getTestHeadDescription() {
\r
112 return testHeadDescription;
\r
115 public void setTestHeadDescription(String testHeadDescription) {
\r
116 this.testHeadDescription = testHeadDescription;
\r
119 public String getHostname() {
\r
123 public void setHostname(String hostname) {
\r
124 this.hostname = hostname;
\r
127 public String getPort() {
\r
131 public void setPort(String port) {
\r
135 public String getResourcePath() {
\r
136 return resourcePath;
\r
139 public void setResourcePath(String resourcePath) {
\r
140 this.resourcePath = resourcePath;
\r
143 public ObjectId getCreatorId() {
\r
147 public void setCreatorId(ObjectId creatorId) {
\r
148 this.creatorId = creatorId;
\r
151 public ObjectId getGroupId() {
\r
155 public void setGroupId(ObjectId groupId) {
\r
156 this.groupId = groupId;
\r
159 public String getAuthorizationCredential() {
\r
160 return authorizationCredential;
\r
163 public String getAuthorizationType() {
\r
164 return authorizationType;
\r
167 public void setAuthorizationType(String authorizationType) {
\r
168 this.authorizationType = authorizationType;
\r
171 public void setAuthorizationCredential(String authorizationCredential) {
\r
172 this.authorizationCredential = authorizationCredential;
\r
175 public Boolean getAuthorizationEnabled() {
\r
176 return authorizationEnabled;
\r
179 public void setAuthorizationEnabled(Boolean authorizationEnabled) {
\r
180 this.authorizationEnabled = authorizationEnabled;
\r
183 public Map<String, Object> getVthInputTemplate() {
\r
184 return vthInputTemplate;
\r
187 public void setVthInputTemplate(Map<String, Object> vthInputTemplate) {
\r
188 this.vthInputTemplate = vthInputTemplate;
\r
191 public Date getCreatedAt() {
\r
195 public void setCreatedAt(Date createdAt) {
\r
196 this.createdAt = createdAt;
\r
199 public Date getUpdatedAt() {
\r
203 public void setUpdatedAt(Date updatedAt) {
\r
204 this.updatedAt = updatedAt;
\r
207 public ObjectId getUpdatedBy() {
\r
211 public void setUpdatedBy(ObjectId updatedBy) {
\r
212 this.updatedBy = updatedBy;
\r
215 public Boolean isPublic() {
\r
219 public void setPublic(Boolean aPublic) {
\r
220 isPublic = aPublic;
\r
224 public String toString() {
\r
225 return Convert.objectToJson(this);
\r