aboutsummaryrefslogtreecommitdiffstats
path: root/plans/so/integration-etsi-testing/so-simulators/sdc-simulator/src/main/java/org/onap/so/sdcsimulator/models/ResourceAssetInfo.java
diff options
context:
space:
mode:
Diffstat (limited to 'plans/so/integration-etsi-testing/so-simulators/sdc-simulator/src/main/java/org/onap/so/sdcsimulator/models/ResourceAssetInfo.java')
-rw-r--r--plans/so/integration-etsi-testing/so-simulators/sdc-simulator/src/main/java/org/onap/so/sdcsimulator/models/ResourceAssetInfo.java81
1 files changed, 81 insertions, 0 deletions
diff --git a/plans/so/integration-etsi-testing/so-simulators/sdc-simulator/src/main/java/org/onap/so/sdcsimulator/models/ResourceAssetInfo.java b/plans/so/integration-etsi-testing/so-simulators/sdc-simulator/src/main/java/org/onap/so/sdcsimulator/models/ResourceAssetInfo.java
new file mode 100644
index 00000000..352070a7
--- /dev/null
+++ b/plans/so/integration-etsi-testing/so-simulators/sdc-simulator/src/main/java/org/onap/so/sdcsimulator/models/ResourceAssetInfo.java
@@ -0,0 +1,81 @@
+/*-
+ * ============LICENSE_START=======================================================
+ * Copyright (C) 2021 Nordix Foundation.
+ * ================================================================================
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ * SPDX-License-Identifier: Apache-2.0
+ * ============LICENSE_END=========================================================
+ */
+package org.onap.so.sdcsimulator.models;
+
+import org.springframework.util.ObjectUtils;
+import com.fasterxml.jackson.annotation.JsonProperty;
+
+/**
+ *
+ * @author Waqas Ikram (waqas.ikram@est.tech)
+ *
+ */
+public class ResourceAssetInfo extends AssetInfo {
+
+ private static final long serialVersionUID = -6812049917047990700L;
+
+ @JsonProperty("subCategory")
+ private String subCategory;
+
+ public String getSubCategory() {
+ return subCategory;
+ }
+
+ public void setSubCategory(final String subCategory) {
+ this.subCategory = subCategory;
+ }
+
+ public ResourceAssetInfo subCategory(final String subCategory) {
+ this.subCategory = subCategory;
+ return this;
+ }
+
+ @Override
+ public int hashCode() {
+ final int prime = 31;
+ int result = 1;
+ result = prime * result + super.hashCode();
+ result = prime * result + ((subCategory == null) ? 0 : subCategory.hashCode());
+
+ return result;
+ }
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj instanceof ResourceAssetInfo) {
+ final ResourceAssetInfo other = (ResourceAssetInfo) obj;
+ return super.equals(obj) && ObjectUtils.nullSafeEquals(subCategory, other.subCategory);
+
+ }
+ return false;
+ }
+
+ @Override
+ public String toString() {
+ final StringBuilder sb = new StringBuilder();
+ sb.append(super.toString());
+ sb.deleteCharAt(sb.length() - 1);
+ sb.append(" subCategory: ").append(subCategory).append("\n");
+
+ sb.append("}");
+ return sb.toString();
+ }
+
+}