d0e84ae8c16238f8993c9f3ca4c8eb21d98544f6
[ccsdk/cds.git] /
1 /*
2  * Copyright © 2017-2018 AT&T Intellectual Property.
3  * Modifications Copyright © 2019 IBM.
4  * Modifications Copyright © 2022 Orange.
5  *
6  * Licensed under the Apache License, Version 2.0 (the "License");
7  * you may not use this file except in compliance with the License.
8  * You may obtain a copy of the License at
9  *
10  *     http://www.apache.org/licenses/LICENSE-2.0
11  *
12  * Unless required by applicable law or agreed to in writing, software
13  * distributed under the License is distributed on an "AS IS" BASIS,
14  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  * See the License for the specific language governing permissions and
16  * limitations under the License.
17  */
18
19 package org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.query
20
21 import org.onap.ccsdk.cds.blueprintsprocessor.functions.k8s.instance.K8sRbInstanceResourceStatus
22
23 import com.fasterxml.jackson.annotation.JsonIgnoreProperties
24 import com.fasterxml.jackson.annotation.JsonProperty
25
26 @JsonIgnoreProperties(ignoreUnknown = true)
27 class K8sResourceStatus {
28
29     @get:JsonProperty("resourceCount")
30     var resourceCount: Int = 0
31
32     @get:JsonProperty("resourcesStatus")
33     var resourcesStatus: List<K8sRbInstanceResourceStatus>? = null
34
35     override fun equals(other: Any?): Boolean {
36         if (this === other) return true
37         if (javaClass != other?.javaClass) return false
38         return true
39     }
40
41     override fun hashCode(): Int {
42         return javaClass.hashCode()
43     }
44 }