toString, equals, and hashCode
// Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.vespa.hosted.controller.api.integration.billing;
+import java.util.Objects;
import java.util.Optional;
/**
@@ -31,4 +32,24 @@ public class CollectionResult {
public Optional<String> getErrorMessage() {
return errorMessage;
}
+
+ @Override
+ public String toString() {
+ return "CollectionResult{" +
+ "errorMessage=" + errorMessage +
+ '}';
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) return true;
+ if (o == null || getClass() != o.getClass()) return false;
+ CollectionResult that = (CollectionResult) o;
+ return Objects.equals(errorMessage, that.errorMessage);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(errorMessage);
+ }
}
\ No newline at end of file
