2 * Copyright 2017-2023 ZTE Corporation.
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
16 package org.onap.holmes.common.api.entity;
\r
18 import com.google.gson.annotations.SerializedName;
\r
19 import lombok.Getter;
\r
20 import lombok.Setter;
\r
22 import java.util.Date;
\r
23 import java.util.Properties;
\r
27 public class CorrelationRule implements Cloneable {
\r
28 @SerializedName(value = "ruleid")
\r
30 @SerializedName(value = "rulename")
\r
31 private String name;
\r
32 private String description;
\r
33 private int enabled;
\r
34 private long templateID;
\r
35 private String engineID;
\r
36 private String engineType;
\r
37 private String creator;
\r
38 private String modifier;
\r
39 private Properties params;
\r
40 private String content;
\r
41 private String vendor;
\r
42 @SerializedName(value = "createtime")
\r
43 private Date createTime;
\r
44 @SerializedName(value = "updatetime")
\r
45 private Date updateTime;
\r
46 @SerializedName(value = "package")
\r
47 private String packageName;
\r
48 @SerializedName(value = "controlloopname")
\r
49 private String closedControlLoopName;
\r
50 @SerializedName(value = "engineinstance")
\r
51 private String engineInstance;
\r
54 public Object clone() {
\r
55 CorrelationRule r = null;
\r
57 r = (CorrelationRule) super.clone();
\r
58 } catch (CloneNotSupportedException e) {
\r
59 // This will never happen.
\r
60 throw new InternalError(e);
\r
65 r.description = description;
\r
66 r.enabled = enabled;
\r
67 r.templateID = templateID;
\r
68 r.engineID = engineID;
\r
69 r.engineType = engineType;
\r
70 r.creator = creator;
\r
71 r.modifier = modifier;
\r
72 r.params = params == null ? null : (Properties) params.clone();
\r
73 r.content = content;
\r
75 r.createTime = createTime == null ? null : (Date) createTime.clone();
\r
76 r.updateTime = updateTime == null ? null : (Date) updateTime.clone();
\r
77 r.packageName = packageName;
\r
78 r.closedControlLoopName = closedControlLoopName;
\r
79 r.engineInstance = engineInstance;
\r