diff options
Diffstat (limited to 'appc/src/main/java/org/openecomp/policy/appc/ResponseStatus.java')
-rw-r--r-- | appc/src/main/java/org/openecomp/policy/appc/ResponseStatus.java | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/appc/src/main/java/org/openecomp/policy/appc/ResponseStatus.java b/appc/src/main/java/org/openecomp/policy/appc/ResponseStatus.java new file mode 100644 index 000000000..f8adb21da --- /dev/null +++ b/appc/src/main/java/org/openecomp/policy/appc/ResponseStatus.java @@ -0,0 +1,70 @@ +/*- + * ============LICENSE_START======================================================= + * appc + * ================================================================================ + * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * ================================================================================ + * 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. + * ============LICENSE_END========================================================= + */ + +package org.openecomp.policy.appc; + +import java.io.Serializable; + +public class ResponseStatus implements Serializable { + + private static final long serialVersionUID = 2421770469587860452L; + + public int Code; + public String Value; + public String Description; + + @Override + public String toString() { + return "ResponseStatus [Code=" + Code + ", Value=" + Value + ", Description=" + Description + "]"; + } + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + Code; + result = prime * result + ((Description == null) ? 0 : Description.hashCode()); + result = prime * result + ((Value == null) ? 0 : Value.hashCode()); + return result; + } + @Override + public boolean equals(Object obj) { + if (this == obj) + return true; + if (obj == null) + return false; + if (getClass() != obj.getClass()) + return false; + ResponseStatus other = (ResponseStatus) obj; + if (Code != other.Code) + return false; + if (Description == null) { + if (other.Description != null) + return false; + } else if (!Description.equals(other.Description)) + return false; + if (Value == null) { + if (other.Value != null) + return false; + } else if (!Value.equals(other.Value)) + return false; + return true; + } + +} |