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 org.oran.otf.common.utility.gson.Convert;
\r
20 import java.io.Serializable;
\r
21 import java.util.Date;
\r
22 import java.util.Map;
\r
24 import org.bson.types.ObjectId;
\r
25 import org.springframework.data.annotation.Id;
\r
26 import org.springframework.data.mongodb.core.index.Indexed;
\r
27 import org.springframework.data.mongodb.core.mapping.Document;
\r
29 @Document(collection = "testHeads")
\r
30 public class TestHead implements Serializable {
\r
32 private static final long serialVersionUID = 1L;
\r
35 private ObjectId _id;
\r
37 @Indexed(unique = true)
\r
38 private String testHeadName;
\r
40 private String testHeadDescription;
\r
41 private String hostname;
\r
42 private String port;
\r
43 private String resourcePath;
\r
44 private ObjectId creatorId;
\r
45 private ObjectId groupId;
\r
46 private String authorizationType;
\r
47 private String authorizationCredential;
\r
48 private Boolean authorizationEnabled;
\r
49 private Map<String, Object> vthInputTemplate;
\r
50 private Date createdAt;
\r
51 private Date updatedAt;
\r
52 private ObjectId updatedBy;
\r
53 private Boolean isPublic;
\r
59 String testHeadName,
\r
60 String testHeadDescription,
\r
63 String resourcePath,
\r
66 String authorizationType,
\r
67 String authorizationCredential,
\r
68 boolean authorizationEnabled,
\r
69 Map<String, Object> vthInputTemplate,
\r
75 this.testHeadName = testHeadName;
\r
76 this.testHeadDescription = testHeadDescription;
\r
77 this.hostname = hostname;
\r
79 this.resourcePath = resourcePath;
\r
80 this.creatorId = creatorId;
\r
81 this.groupId = groupId;
\r
82 this.authorizationType = authorizationType;
\r
83 this.authorizationCredential = authorizationCredential;
\r
84 this.authorizationEnabled = authorizationEnabled;
\r
85 this.vthInputTemplate = vthInputTemplate;
\r
86 this.createdAt = createdAt;
\r
87 this.updatedAt = updatedAt;
\r
88 this.updatedBy = updatedBy;
\r
89 this.isPublic = isPublic;
\r
92 public ObjectId get_id() {
\r
96 public void set_id(ObjectId _id) {
\r
100 public String getTestHeadName() {
\r
101 return testHeadName;
\r
104 public void setTestHeadName(String testHeadName) {
\r
105 this.testHeadName = testHeadName;
\r
108 public String getTestHeadDescription() {
\r
109 return testHeadDescription;
\r
112 public void setTestHeadDescription(String testHeadDescription) {
\r
113 this.testHeadDescription = testHeadDescription;
\r
116 public String getHostname() {
\r
120 public void setHostname(String hostname) {
\r
121 this.hostname = hostname;
\r
124 public String getPort() {
\r
128 public void setPort(String port) {
\r
132 public String getResourcePath() {
\r
133 return resourcePath;
\r
136 public void setResourcePath(String resourcePath) {
\r
137 this.resourcePath = resourcePath;
\r
140 public ObjectId getCreatorId() {
\r
144 public void setCreatorId(ObjectId creatorId) {
\r
145 this.creatorId = creatorId;
\r
148 public ObjectId getGroupId() {
\r
152 public void setGroupId(ObjectId groupId) {
\r
153 this.groupId = groupId;
\r
156 public String getAuthorizationCredential() {
\r
157 return authorizationCredential;
\r
160 public String getAuthorizationType() {
\r
161 return authorizationType;
\r
164 public void setAuthorizationType(String authorizationType) {
\r
165 this.authorizationType = authorizationType;
\r
168 public void setAuthorizationCredential(String authorizationCredential) {
\r
169 this.authorizationCredential = authorizationCredential;
\r
172 public Boolean getAuthorizationEnabled() {
\r
173 return authorizationEnabled;
\r
176 public void setAuthorizationEnabled(Boolean authorizationEnabled) {
\r
177 this.authorizationEnabled = authorizationEnabled;
\r
180 public Map<String, Object> getVthInputTemplate() {
\r
181 return vthInputTemplate;
\r
184 public void setVthInputTemplate(Map<String, Object> vthInputTemplate) {
\r
185 this.vthInputTemplate = vthInputTemplate;
\r
188 public Date getCreatedAt() {
\r
192 public void setCreatedAt(Date createdAt) {
\r
193 this.createdAt = createdAt;
\r
196 public Date getUpdatedAt() {
\r
200 public void setUpdatedAt(Date updatedAt) {
\r
201 this.updatedAt = updatedAt;
\r
204 public ObjectId getUpdatedBy() {
\r
208 public void setUpdatedBy(ObjectId updatedBy) {
\r
209 this.updatedBy = updatedBy;
\r
212 public Boolean isPublic() {
\r
216 public void setPublic(Boolean aPublic) {
\r
217 isPublic = aPublic;
\r
221 public String toString() {
\r
222 return Convert.objectToJson(this);
\r