X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=blobdiff_plain;f=otf-service-api%2Fsrc%2Fmain%2Fjava%2Forg%2Foran%2Fotf%2Fcommon%2Fmodel%2FTestInstance.java;fp=otf-service-api%2Fsrc%2Fmain%2Fjava%2Forg%2Foran%2Fotf%2Fcommon%2Fmodel%2FTestInstance.java;h=9b11fa4271b71bb893d0223d7c165f001a1dd37b;hb=14f6f95c84a4a1fa8774190db4a03fd0214ec55f;hp=0000000000000000000000000000000000000000;hpb=f49bd1efeaaddd4891c1f329b18d8cfb28b3e75b;p=it%2Fotf.git diff --git a/otf-service-api/src/main/java/org/oran/otf/common/model/TestInstance.java b/otf-service-api/src/main/java/org/oran/otf/common/model/TestInstance.java new file mode 100644 index 0000000..9b11fa4 --- /dev/null +++ b/otf-service-api/src/main/java/org/oran/otf/common/model/TestInstance.java @@ -0,0 +1,256 @@ +/* Copyright (c) 2019 AT&T Intellectual Property. # +# # +# Licensed under the Apache License, Version 2.0 (the "License"); # +# you may not use this file except in compliance with the License. # +# You may obtain a copy of the License at # +# # +# http://www.apache.org/licenses/LICENSE-2.0 # +# # +# Unless required by applicable law or agreed to in writing, software # +# distributed under the License is distributed on an "AS IS" BASIS, # +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # +# See the License for the specific language governing permissions and # +# limitations under the License. # +##############################################################################*/ + + +package org.oran.otf.common.model; + +import org.oran.otf.common.model.local.ParallelFlowInput; +import org.oran.otf.common.utility.gson.Convert; +import java.io.Serializable; +import java.util.Date; +import java.util.HashMap; +import org.bson.types.ObjectId; +import org.springframework.data.annotation.Id; +import org.springframework.data.mongodb.core.mapping.Document; + +@Document(collection = "testInstances") +public class TestInstance implements Serializable { + + private static final long serialVersionUID = 1L; + + private @Id ObjectId _id; + private String testInstanceName; + private String testInstanceDescription; + private ObjectId groupId; + private ObjectId testDefinitionId; + private String processDefinitionId; + private boolean useLatestTestDefinition; + private boolean disabled; + private boolean simulationMode; + private long maxExecutionTimeInMillis; + private HashMap pfloInput; + private HashMap internalTestData; + private HashMap simulationVthInput; + private HashMap testData; + private HashMap vthInput; + private Date createdAt; + private Date updatedAt; + private ObjectId createdBy; + private ObjectId updatedBy; + + public TestInstance() {} + + public TestInstance( + ObjectId _id, + String testInstanceName, + String testInstanceDescription, + ObjectId groupId, + ObjectId testDefinitionId, + String processDefinitionId, + boolean useLatestTestDefinition, + boolean disabled, + boolean simulationMode, + long maxExecutionTimeInMillis, + HashMap pfloInput, + HashMap internalTestData, + HashMap simulationVthInput, + HashMap testData, + HashMap vthInput, + Date createdAt, + Date updatedAt, + ObjectId createdBy, + ObjectId updatedBy) { + this._id = _id; + this.testInstanceName = testInstanceName; + this.testInstanceDescription = testInstanceDescription; + this.groupId = groupId; + this.testDefinitionId = testDefinitionId; + this.processDefinitionId = processDefinitionId; + this.useLatestTestDefinition = useLatestTestDefinition; + this.disabled = disabled; + this.simulationMode = simulationMode; + this.maxExecutionTimeInMillis = maxExecutionTimeInMillis; + this.pfloInput = pfloInput; + this.internalTestData = internalTestData; + this.simulationVthInput = simulationVthInput; + this.testData = testData; + this.vthInput = vthInput; + this.createdAt = createdAt; + this.updatedAt = updatedAt; + this.createdBy = createdBy; + this.updatedBy = updatedBy; + } + + public static long getSerialVersionUID() { + return serialVersionUID; + } + + public ObjectId get_id() { + return _id; + } + + public void set_id(ObjectId _id) { + this._id = _id; + } + + public String getTestInstanceName() { + return testInstanceName; + } + + public void setTestInstanceName(String testInstanceName) { + this.testInstanceName = testInstanceName; + } + + public String getTestInstanceDescription() { + return testInstanceDescription; + } + + public void setTestInstanceDescription(String testInstanceDescription) { + this.testInstanceDescription = testInstanceDescription; + } + + public ObjectId getGroupId() { + return groupId; + } + + public void setGroupId(ObjectId groupId) { + this.groupId = groupId; + } + + public ObjectId getTestDefinitionId() { + return testDefinitionId; + } + + public void setTestDefinitionId(ObjectId testDefinitionId) { + this.testDefinitionId = testDefinitionId; + } + + public String getProcessDefinitionId() { + return processDefinitionId; + } + + public void setProcessDefinitionId(String processDefinitionId) { + this.processDefinitionId = processDefinitionId; + } + + public boolean isUseLatestTestDefinition() { + return useLatestTestDefinition; + } + + public void setUseLatestTestDefinition(boolean useLatestTestDefinition) { + this.useLatestTestDefinition = useLatestTestDefinition; + } + + public boolean isDisabled() { + return disabled; + } + + public void setDisabled(boolean disabled) { + this.disabled = disabled; + } + + public boolean isSimulationMode() { + return simulationMode; + } + + public void setSimulationMode(boolean simulationMode) { + this.simulationMode = simulationMode; + } + + public long getMaxExecutionTimeInMillis() { + return maxExecutionTimeInMillis; + } + + public void setMaxExecutionTimeInMillis(long maxExecutionTimeInMillis) { + this.maxExecutionTimeInMillis = maxExecutionTimeInMillis; + } + + public HashMap getPfloInput() { + return pfloInput; + } + + public void setPfloInput(HashMap pfloInput) { + this.pfloInput = pfloInput; + } + + public HashMap getInternalTestData() { + return internalTestData; + } + + public void setInternalTestData(HashMap internalTestData) { + this.internalTestData = internalTestData; + } + + public HashMap getSimulationVthInput() { + return simulationVthInput; + } + + public void setSimulationVthInput(HashMap simulationVthInput) { + this.simulationVthInput = simulationVthInput; + } + + public HashMap getTestData() { + return testData; + } + + public void setTestData(HashMap testData) { + this.testData = testData; + } + + public HashMap getVthInput() { + return vthInput; + } + + public void setVthInput(HashMap vthInput) { + this.vthInput = vthInput; + } + + public Date getCreatedAt() { + return createdAt; + } + + public void setCreatedAt(Date createdAt) { + this.createdAt = createdAt; + } + + public Date getUpdatedAt() { + return updatedAt; + } + + public void setUpdatedAt(Date updatedAt) { + this.updatedAt = updatedAt; + } + + public ObjectId getCreatedBy() { + return createdBy; + } + + public void setCreatedBy(ObjectId createdBy) { + this.createdBy = createdBy; + } + + public ObjectId getUpdatedBy() { + return updatedBy; + } + + public void setUpdatedBy(ObjectId updatedBy) { + this.updatedBy = updatedBy; + } + + @Override + public String toString() { + return Convert.objectToJson(this); + } +}