if (getPhysicalResourceId() != null) sb.append("PhysicalResourceId: ").append(getPhysicalResourceId()).append(","); if (getResourceType() != null) sb.append("ResourceType: ").append(getResourceType()).append(","); if (getTimestamp() != null) sb.append("Timestamp: ").append(getTimestamp()).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.getPhysicalResourceId() != null && other.getPhysicalResourceId().equals(this.getPhysicalResourceId()) == false) return false; if (other.getResourceType() == null ^ this.getResourceType() == null) return false; if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false) return false; if (other.getTimestamp() == null ^ this.getTimestamp() == null)
if (getPhysicalResourceId() != null) sb.append("PhysicalResourceId: ").append(getPhysicalResourceId()).append(","); if (getResourceType() != null) sb.append("ResourceType: ").append(getResourceType()).append(","); if (getTimestamp() != null) sb.append("Timestamp: ").append(getTimestamp()).append(",");
resourceRequirement.setCfnMD5Hash(cfnMD5hash); if (EC2_RESOURCE_IDENTIFIER.equalsIgnoreCase(stackEvent.getResourceType()) && String.valueOf(CREATE_COMPLETE).equals(stackEvent.getResourceStatus())) { } else if (VPC_RESOURCE_IDENTIFIER.equalsIgnoreCase(stackEvent.getResourceType())) { resourceRequirement.setServiceName(NETWORKING_SERVICE_NAME); resourceRequirement.setLimitName(VPC_LIMIT_NAME);
private void printStackEvents() { DescribeStackEventsRequest r = new DescribeStackEventsRequest(); r.withStackName(getExpandedStackName()); DescribeStackEventsResult describeStackEvents = amazonClient.describeStackEvents(r); List<StackEvent> stackEvents = describeStackEvents.getStackEvents(); Collections.reverse(stackEvents); for (StackEvent event : stackEvents) { logger.println(event.getEventId() + " - " + event.getResourceType() + " - " + event.getResourceStatus() + " - " + event.getResourceStatusReason()); } }
@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); } }); }
"Status: ", stackEvent.getResourceStatus(), ", ")); stringBuilder.append(StringUtil.concatStrings( "Resource Type: ", stackEvent.getResourceType(), ", ")); stringBuilder.append(StringUtil.concatStrings( "Logical ID: ", stackEvent.getLogicalResourceId(), ", "));
if (other.getPhysicalResourceId() != null && other.getPhysicalResourceId().equals(this.getPhysicalResourceId()) == false) return false; if (other.getResourceType() == null ^ this.getResourceType() == null) return false; if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false) return false; if (other.getTimestamp() == null ^ this.getTimestamp() == null)