Added oparent to sdc main
[sdc.git] / openecomp-be / backend / openecomp-sdc-healthcheck-manager / src / main / java / org / openecomp / sdc / health / data / HealthInfo.java
1 /*-
2  * ============LICENSE_START=======================================================
3  * SDC
4  * ================================================================================
5  * Copyright (C) 2019 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.openecomp.sdc.health.data;
22
23 /**
24  * {
25    "sdcVersion": "<SERVER_FULL_VERSION>"
26    "componentsInfo": [
27      {
28        "healthCheckComponent": "<COMPONENT_NAME>",
29        "healthCheckStatus": "<UP_OR_DOWN>",
30        "version": "<COMPONENT_VERSION>",
31        "description": "<OK_OR_ERROR_VERSION>"
32      }
33    ]
34  }
35  */
36 public class HealthInfo {
37     private MonitoredModules healthCheckComponent;
38     private HealthCheckStatus healthCheckStatus;
39     private String version;
40     private String description;
41
42     public HealthInfo() {
43     }
44
45     public HealthInfo(MonitoredModules healthCheckComponent, HealthCheckStatus healthCheckStatus, String version, String description) {
46         this.healthCheckComponent = healthCheckComponent;
47         this.healthCheckStatus = healthCheckStatus;
48         this.version = version;
49         this.description = description;
50     }
51
52     public MonitoredModules getHealthCheckComponent() {
53         return healthCheckComponent;
54     }
55
56     public void setHealthCheckComponent(MonitoredModules healthCheckComponent) {
57         this.healthCheckComponent = healthCheckComponent;
58     }
59
60     public HealthCheckStatus getHealthCheckStatus() {
61         return healthCheckStatus;
62     }
63
64     public void setHealthCheckStatus(HealthCheckStatus healthCheckStatus) {
65         this.healthCheckStatus = healthCheckStatus;
66     }
67
68     public String getVersion() {
69         return version;
70     }
71
72     public void setVersion(String version) {
73         this.version = version;
74     }
75
76     public String getDescription() {
77         return description;
78     }
79
80     public void setDescription(String description) {
81         this.description = description;
82     }
83
84     @Override
85     public String toString() {
86         return "HealthInfo{" +
87                 "healthCheckComponent='" + healthCheckComponent + '\'' +
88                 ", healthCheckStatus=" + healthCheckStatus +
89                 ", version='" + version + '\'' +
90                 ", description='" + description + '\'' +
91                 '}';
92     }
93 }