Line data Source code
1 : // Copyright (C) 2018 The Android Open Source Project 2 : // 3 : // Licensed under the Apache License, Version 2.0 (the "License"); 4 : // you may not use this file except in compliance with the License. 5 : // You may obtain a copy of the License at 6 : // 7 : // http://www.apache.org/licenses/LICENSE-2.0 8 : // 9 : // Unless required by applicable law or agreed to in writing, software 10 : // distributed under the License is distributed on an "AS IS" BASIS, 11 : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 : // See the License for the specific language governing permissions and 13 : // limitations under the License. 14 : 15 : package com.google.gerrit.extensions.common; 16 : 17 : import com.google.common.base.MoreObjects; 18 : import java.util.Objects; 19 : 20 : public class LegacySubmitRequirementInfo { 21 : public String status; 22 : public String fallbackText; 23 : public String type; 24 : 25 3 : public LegacySubmitRequirementInfo(String status, String fallbackText, String type) { 26 3 : this.status = status; 27 3 : this.fallbackText = fallbackText; 28 3 : this.type = type; 29 3 : } 30 : 31 : @Override 32 : public boolean equals(Object o) { 33 2 : if (this == o) { 34 0 : return true; 35 : } 36 2 : if (!(o instanceof LegacySubmitRequirementInfo)) { 37 0 : return false; 38 : } 39 2 : LegacySubmitRequirementInfo that = (LegacySubmitRequirementInfo) o; 40 2 : return Objects.equals(status, that.status) 41 2 : && Objects.equals(fallbackText, that.fallbackText) 42 2 : && Objects.equals(type, that.type); 43 : } 44 : 45 : @Override 46 : public int hashCode() { 47 0 : return Objects.hash(status, fallbackText, type); 48 : } 49 : 50 : @Override 51 : public String toString() { 52 0 : return MoreObjects.toStringHelper(this) 53 0 : .add("status", status) 54 0 : .add("fallbackText", fallbackText) 55 0 : .add("type", type) 56 0 : .toString(); 57 : } 58 : 59 1 : protected LegacySubmitRequirementInfo() {} 60 : }