0f1f60557c479b2a5cb18618eaf30f4319516b7d
[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 K8sRbInstanceHealthCheckSimple {
6
7     @get:JsonProperty("healthcheck-id")
8     var id: String? = null
9
10     @get:JsonProperty("status")
11     var status: String? = null
12
13     override fun toString(): String {
14         return "$id:$status"
15     }
16
17     override fun equals(other: Any?): Boolean {
18         if (this === other) return true
19         if (javaClass != other?.javaClass) return false
20         return true
21     }
22
23     override fun hashCode(): Int {
24         return javaClass.hashCode()
25     }
26 }
27
28 class K8sRbInstanceHealthCheckList {
29
30     @get:JsonProperty("instance-id")
31     var instanceId: String? = null
32
33     @get:JsonProperty("healthcheck-summary")
34     var healthcheckSummary: List<K8sRbInstanceHealthCheckSimple>? = null
35
36     @get:JsonProperty("hooks")
37     var hooks: List<K8sRbInstanceHealthCheckHook>? = null
38
39     override fun equals(other: Any?): Boolean {
40         if (this === other) return true
41         if (javaClass != other?.javaClass) return false
42         return true
43     }
44
45     override fun hashCode(): Int {
46         return javaClass.hashCode()
47     }
48 }
49
50 class K8sRbInstanceHealthCheck {
51
52     @get:JsonProperty("healthcheck-id")
53     var id: String? = null
54
55     @get:JsonProperty("instance-id")
56     var instanceId: String? = null
57
58     @get:JsonProperty("info")
59     var info: String? = null
60
61     @get:JsonProperty("status")
62     var status: String? = null
63
64     @get:JsonProperty("test-suite")
65     var testSuite: K8sHealthCheckTest? = null
66
67     override fun toString(): String {
68         return "$id:$status"
69     }
70
71     override fun equals(other: Any?): Boolean {
72         if (this === other) return true
73         if (javaClass != other?.javaClass) return false
74         return true
75     }
76
77     override fun hashCode(): Int {
78         return javaClass.hashCode()
79     }
80 }
81
82 class K8sHealthCheckTest {
83
84     @get:JsonProperty("StartedAt")
85     var startedAt: String? = null
86
87     @get:JsonProperty("CompletedAt")
88     var completedAt: String? = null
89
90     @get:JsonProperty("Status")
91     var status: String? = null
92
93     @get:JsonProperty("TestManifests")
94     var testManifests: List<String>? = null
95
96     @get:JsonProperty("Results")
97     var results: List<Any>? = null
98
99     override fun equals(other: Any?): Boolean {
100         if (this === other) return true
101         if (javaClass != other?.javaClass) return false
102         return true
103     }
104
105     override fun hashCode(): Int {
106         return javaClass.hashCode()
107     }
108 }
109
110 class K8sRbInstanceHealthCheckHook {
111
112     @get:JsonProperty("name")
113     var name: String? = null
114
115     @get:JsonProperty("kind")
116     var kind: String? = null
117
118     @get:JsonProperty("path")
119     var path: String? = null
120
121     @get:JsonProperty("manifest")
122     var manifest: String? = null
123
124     @get:JsonProperty("events")
125     var events: List<Any>? = null
126
127     override fun equals(other: Any?): Boolean {
128         if (this === other) return true
129         if (javaClass != other?.javaClass) return false
130         return true
131     }
132
133     override fun hashCode(): Int {
134         return javaClass.hashCode()
135     }
136 }