if (getStackName() != null) sb.append("StackName: ").append(getStackName()).append(","); if (getLogicalResourceId() != null) sb.append("LogicalResourceId: ").append(getLogicalResourceId()).append(","); if (getPhysicalResourceId() != null) sb.append("PhysicalResourceId: ").append(getPhysicalResourceId()).append(",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); hashCode = prime * hashCode + ((getEventId() == null) ? 0 : getEventId().hashCode()); hashCode = prime * hashCode + ((getStackName() == null) ? 0 : getStackName().hashCode()); hashCode = prime * hashCode + ((getLogicalResourceId() == null) ? 0 : getLogicalResourceId().hashCode()); hashCode = prime * hashCode + ((getPhysicalResourceId() == null) ? 0 : getPhysicalResourceId().hashCode()); hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); hashCode = prime * hashCode + ((getResourceStatus() == null) ? 0 : getResourceStatus().hashCode()); hashCode = prime * hashCode + ((getResourceStatusReason() == null) ? 0 : getResourceStatusReason().hashCode()); hashCode = prime * hashCode + ((getResourceProperties() == null) ? 0 : getResourceProperties().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); return hashCode; }
if (other.getStackName() != null && other.getStackName().equals(this.getStackName()) == false) return false; if (other.getLogicalResourceId() == null ^ this.getLogicalResourceId() == null) return false; if (other.getLogicalResourceId() != null && other.getLogicalResourceId().equals(this.getLogicalResourceId()) == false) return false; if (other.getPhysicalResourceId() == null ^ this.getPhysicalResourceId() == null)
private void printEvent(SimpleDateFormat sdf, StackEvent event) { String time = this.padRight(sdf.format(event.getTimestamp()), 25); String logicalResourceId = this.padRight(event.getLogicalResourceId(), 20); String resourceStatus = this.padRight(event.getResourceStatus(), 36); String resourceStatusReason = this.padRight(event.getResourceStatusReason(), 140); this.listener.getLogger().format("| %s | %s | %s | %s |%n", time, logicalResourceId, resourceStatus, resourceStatusReason); }
if (getStackName() != null) sb.append("StackName: ").append(getStackName()).append(","); if (getLogicalResourceId() != null) sb.append("LogicalResourceId: ").append(getLogicalResourceId()).append(","); if (getPhysicalResourceId() != null) sb.append("PhysicalResourceId: ").append(getPhysicalResourceId()).append(",");
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getStackId() == null) ? 0 : getStackId().hashCode()); hashCode = prime * hashCode + ((getEventId() == null) ? 0 : getEventId().hashCode()); hashCode = prime * hashCode + ((getStackName() == null) ? 0 : getStackName().hashCode()); hashCode = prime * hashCode + ((getLogicalResourceId() == null) ? 0 : getLogicalResourceId().hashCode()); hashCode = prime * hashCode + ((getPhysicalResourceId() == null) ? 0 : getPhysicalResourceId().hashCode()); hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); hashCode = prime * hashCode + ((getTimestamp() == null) ? 0 : getTimestamp().hashCode()); hashCode = prime * hashCode + ((getResourceStatus() == null) ? 0 : getResourceStatus().hashCode()); hashCode = prime * hashCode + ((getResourceStatusReason() == null) ? 0 : getResourceStatusReason().hashCode()); hashCode = prime * hashCode + ((getResourceProperties() == null) ? 0 : getResourceProperties().hashCode()); hashCode = prime * hashCode + ((getClientRequestToken() == null) ? 0 : getClientRequestToken().hashCode()); return hashCode; }
private void printEvents(List<StackEvent> stackEvents) { if (printedEvents.isEmpty()) { getLogger().info("==== Events ===="); } stackEvents.stream() .forEach(o -> { String eventId = o.getEventId(); // If we haven't printed the event, then print it and add to list of printed events so we won't print again if (!printedEvents.contains(eventId)) { getLogger().info("{} {} {}: {} {}", o.getTimestamp(), o.getResourceStatus(), o.getResourceType(), o.getLogicalResourceId(), (o.getResourceStatusReason() == null) ? "" : o.getResourceStatusReason()); printedEvents.add(eventId); } }); }
"Resource Type: ", stackEvent.getResourceType(), ", ")); stringBuilder.append(StringUtil.concatStrings( "Logical ID: ", stackEvent.getLogicalResourceId(), ", ")); stringBuilder.append(StringUtil.concatStrings( "Status Reason: ", Optional.ofNullable(stackEvent.getResourceStatusReason()).orElse("-")));
if (other.getStackName() != null && other.getStackName().equals(this.getStackName()) == false) return false; if (other.getLogicalResourceId() == null ^ this.getLogicalResourceId() == null) return false; if (other.getLogicalResourceId() != null && other.getLogicalResourceId().equals(this.getLogicalResourceId()) == false) return false; if (other.getPhysicalResourceId() == null ^ this.getPhysicalResourceId() == null)