Containerization feature of SO
[so.git] / mso-api-handlers / mso-api-handler-common / src / main / java / org / onap / so / apihandlerinfra / logging / AlarmLoggerInfo.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * ONAP - SO
4  * ================================================================================
5  * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6  * ================================================================================
7  * Licensed under the Apache License, Version 2.0 (the "License");
8  * you may not use this file except in compliance with the License.
9  * You may obtain a copy of the License at
10  * 
11  *      http://www.apache.org/licenses/LICENSE-2.0
12  * 
13  * Unless required by applicable law or agreed to in writing, software
14  * distributed under the License is distributed on an "AS IS" BASIS,
15  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  * See the License for the specific language governing permissions and
17  * limitations under the License.
18  * ============LICENSE_END=========================================================
19  */
20
21 package org.onap.so.apihandlerinfra.logging;
22
23 import java.io.Serializable;
24
25 public class AlarmLoggerInfo implements Serializable{
26     /**
27          * 
28          */
29         private static final long serialVersionUID = -6730979289437576112L;
30         private String alarm;
31     private int state;
32     private String detail;
33
34
35     private AlarmLoggerInfo(String alarm, int state, String detail){
36         this.alarm = alarm;
37         this.state = state;
38         this.detail = detail;
39     }
40
41     public int getState() {
42         return state;
43     }
44
45     public String getAlarm() {
46         return alarm;
47     }
48
49     public String getDetail() {
50         return detail;
51     }
52
53     public static class Builder{
54         private String alarm = "";
55         private int state;
56         private String detail = "";
57
58         public Builder(String alarm, int state, String detail){
59             this.alarm = alarm;
60             this.state = state;
61             this.detail = detail;
62         }
63
64         public Builder alarm(String alarm){
65             this.alarm = alarm;
66             return this;
67         }
68
69         public Builder state(int state){
70             this.state = state;
71             return this;
72         }
73
74         public Builder detail(String detail){
75             this.detail = detail;
76             return this;
77         }
78
79         public AlarmLoggerInfo build(){
80             return new AlarmLoggerInfo(alarm, state, detail);
81         }
82
83     }
84 }