b8e7e835eb8e3c72094962247ce67525c8bb3b06
[ccsdk/cds.git] /
1 package org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.instance.healthcheck
2
3 import com.fasterxml.jackson.annotation.JsonProperty
4
5 class K8sRbInstanceHealthCheck {
6
7     @get:JsonProperty("Id")
8     var id: String? = null
9
10     @get:JsonProperty("StartedAt")
11     var startedAt: String? = null
12
13     @get:JsonProperty("CompletedAt")
14     var completedAt: String? = null
15
16     @get:JsonProperty("Status")
17     var status: String? = null
18
19     @get:JsonProperty("Tests")
20     var tests: List<K8sHealthCheckTest>? = null
21
22     override fun toString(): String {
23         return "$id:$status"
24     }
25
26     override fun equals(other: Any?): Boolean {
27         if (this === other) return true
28         if (javaClass != other?.javaClass) return false
29         return true
30     }
31
32     override fun hashCode(): Int {
33         return javaClass.hashCode()
34     }
35 }
36
37 class K8sHealthCheckTest {
38
39     @get:JsonProperty("Name")
40     var name: String? = null
41
42     @get:JsonProperty("StartedAt")
43     var startedAt: String? = null
44
45     @get:JsonProperty("CompletedAt")
46     var completedAt: String? = null
47
48     @get:JsonProperty("Status")
49     var status: String? = null
50
51     @get:JsonProperty("Info")
52     var info: String? = null
53
54     override fun toString(): String {
55         return "$name:$status"
56     }
57
58     override fun equals(other: Any?): Boolean {
59         if (this === other) return true
60         if (javaClass != other?.javaClass) return false
61         return true
62     }
63
64     override fun hashCode(): Int {
65         return javaClass.hashCode()
66     }
67 }