2 * ============LICENSE_START=======================================================
4 * ================================================================================
5 * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved.
6 * Copyright (C) 2017 Huawei Technologies Co., Ltd. All rights reserved.
7 * ================================================================================
8 * Modifications Copyright (c) 2019 Samsung
9 * ================================================================================
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
14 * http://www.apache.org/licenses/LICENSE-2.0
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
21 * ============LICENSE_END=========================================================
24 package org.onap.so.openstack.utils;
26 import org.slf4j.Logger;
27 import org.slf4j.LoggerFactory;
29 public class MsoHeatEnvironmentResource {
31 private static final Logger logger = LoggerFactory.getLogger(MsoHeatEnvironmentResource.class);
36 public MsoHeatEnvironmentResource(String name, String value) {
42 public MsoHeatEnvironmentResource(String name) {
43 // Allow to initialize with a null value
47 public MsoHeatEnvironmentResource() {
51 public String getName() {
55 public void setName(String name) {
59 public String getValue() {
63 public void setValue(String value) {
68 public String toString() {
69 return "\"" + this.name + "\": " + this.value;
73 public boolean equals(Object o) {
74 if (!(o instanceof MsoHeatEnvironmentResource)) {
80 MsoHeatEnvironmentResource her = (MsoHeatEnvironmentResource) o;
81 // If the name of the parameter is the same, then they're equal
82 if (her.getName().equals(this.getName())) {
89 public int hashCode() {
92 result = this.name.hashCode();
93 } catch (Exception e) {
94 logger.debug("Exception:", e);