/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public String toString() { return ToString.builder("InvokeResponse").add("StatusCode", statusCode()).add("FunctionError", functionError()) .add("LogResult", logResult()).add("Payload", payload() == null ? null : "*** Sensitive Data Redacted ***") .add("ExecutedVersion", executedVersion()).build(); }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(statusCode()); hashCode = 31 * hashCode + Objects.hashCode(functionError()); hashCode = 31 * hashCode + Objects.hashCode(logResult()); hashCode = 31 * hashCode + Objects.hashCode(payload()); hashCode = 31 * hashCode + Objects.hashCode(executedVersion()); return hashCode; }
/** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. */ @Override public String toString() { return ToString.builder("InvokeResponse").add("StatusCode", statusCode()).add("FunctionError", functionError()) .add("LogResult", logResult()).add("Payload", payload() == null ? null : "*** Sensitive Data Redacted ***") .add("ExecutedVersion", executedVersion()).build(); }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "StatusCode": return Optional.ofNullable(clazz.cast(statusCode())); case "FunctionError": return Optional.ofNullable(clazz.cast(functionError())); case "LogResult": return Optional.ofNullable(clazz.cast(logResult())); case "Payload": return Optional.ofNullable(clazz.cast(payload())); case "ExecutedVersion": return Optional.ofNullable(clazz.cast(executedVersion())); default: return Optional.empty(); } }
public <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) { switch (fieldName) { case "StatusCode": return Optional.ofNullable(clazz.cast(statusCode())); case "FunctionError": return Optional.ofNullable(clazz.cast(functionError())); case "LogResult": return Optional.ofNullable(clazz.cast(logResult())); case "Payload": return Optional.ofNullable(clazz.cast(payload())); case "ExecutedVersion": return Optional.ofNullable(clazz.cast(executedVersion())); default: return Optional.empty(); } }
@Override public int hashCode() { int hashCode = 1; hashCode = 31 * hashCode + Objects.hashCode(statusCode()); hashCode = 31 * hashCode + Objects.hashCode(functionError()); hashCode = 31 * hashCode + Objects.hashCode(logResult()); hashCode = 31 * hashCode + Objects.hashCode(payload()); hashCode = 31 * hashCode + Objects.hashCode(executedVersion()); return hashCode; }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof InvokeResponse)) { return false; } InvokeResponse other = (InvokeResponse) obj; return Objects.equals(statusCode(), other.statusCode()) && Objects.equals(functionError(), other.functionError()) && Objects.equals(logResult(), other.logResult()) && Objects.equals(payload(), other.payload()) && Objects.equals(executedVersion(), other.executedVersion()); }
@Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null) { return false; } if (!(obj instanceof InvokeResponse)) { return false; } InvokeResponse other = (InvokeResponse) obj; return Objects.equals(statusCode(), other.statusCode()) && Objects.equals(functionError(), other.functionError()) && Objects.equals(logResult(), other.logResult()) && Objects.equals(payload(), other.payload()) && Objects.equals(executedVersion(), other.executedVersion()); }