@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResourceRecordSets() == null) ? 0 : getResourceRecordSets().hashCode()); hashCode = prime * hashCode + ((getIsTruncated() == null) ? 0 : getIsTruncated().hashCode()); hashCode = prime * hashCode + ((getNextRecordName() == null) ? 0 : getNextRecordName().hashCode()); hashCode = prime * hashCode + ((getNextRecordType() == null) ? 0 : getNextRecordType().hashCode()); hashCode = prime * hashCode + ((getNextRecordIdentifier() == null) ? 0 : getNextRecordIdentifier().hashCode()); hashCode = prime * hashCode + ((getMaxItems() == null) ? 0 : getMaxItems().hashCode()); 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. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getResourceRecordSets() != null) sb.append("ResourceRecordSets: ").append(getResourceRecordSets()).append(","); if (getIsTruncated() != null) sb.append("IsTruncated: ").append(getIsTruncated()).append(","); if (getNextRecordName() != null) sb.append("NextRecordName: ").append(getNextRecordName()).append(","); if (getNextRecordType() != null) sb.append("NextRecordType: ").append(getNextRecordType()).append(","); if (getNextRecordIdentifier() != null) sb.append("NextRecordIdentifier: ").append(getNextRecordIdentifier()).append(","); if (getMaxItems() != null) sb.append("MaxItems: ").append(getMaxItems()); sb.append("}"); return sb.toString(); }
if (other.getIsTruncated() != null && other.getIsTruncated().equals(this.getIsTruncated()) == false) return false; if (other.getNextRecordName() == null ^ this.getNextRecordName() == null) return false; if (other.getNextRecordName() != null && other.getNextRecordName().equals(this.getNextRecordName()) == false) return false; if (other.getNextRecordType() == null ^ this.getNextRecordType() == null)
protected void projectHostedZoneResult(GetHostedZoneResult hostedZoneResult) { HostedZone hz = hostedZoneResult.getHostedZone(); ObjectNode n = toJson(hostedZoneResult); getNeoRxClient().execCypher( "merge (a:AwsRoute53HostedZone {aws_id:{aws_id}}) set a+={props}, a.updateTs=timestamp() return a", "aws_id", n.get("aws_id").asText(), "props", n); ListResourceRecordSetsRequest request = new ListResourceRecordSetsRequest(); request.setHostedZoneId(hz.getId()); ListResourceRecordSetsResult result; long timestamp = System.currentTimeMillis(); do { rateLimit(); result = getClient().listResourceRecordSets(request); request.setStartRecordName(result.getNextRecordName()); for (ResourceRecordSet rs : result.getResourceRecordSets()) { projectResourceRecordSet(hz.getId(), rs, timestamp); } } while (result.isTruncated()); getNeoRxClient().execCypher( "match (z:AwsRoute53HostedZone {aws_id:{aws_id}})--(r:AwsRoute53RecordSet) where r.updateTs<{ts} detach delete r", "ts", timestamp, "aws_id", hz.getId()); getNeoRxClient().execCypher( "match (a:AwsRoute53RecordSet) where not (a)-[:CONTAINS]-(:AwsRoute53HostedZone) detach delete a"); }