@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getHostedZones() == null) ? 0 : getHostedZones().hashCode()); hashCode = prime * hashCode + ((getMarker() == null) ? 0 : getMarker().hashCode()); hashCode = prime * hashCode + ((getIsTruncated() == null) ? 0 : getIsTruncated().hashCode()); hashCode = prime * hashCode + ((getNextMarker() == null) ? 0 : getNextMarker().hashCode()); hashCode = prime * hashCode + ((getMaxItems() == null) ? 0 : getMaxItems().hashCode()); return hashCode; }
private HostedZone getHostedZone(String domain) { ListHostedZonesRequest listHostedZoneRequest = new ListHostedZonesRequest(); listHostedZoneRequest.setMaxItems(String.valueOf(Integer.MAX_VALUE)); ListHostedZonesResult listHostedZonesResult = amazonRoute53Client.listHostedZones(listHostedZoneRequest); for(HostedZone hostedZone : listHostedZonesResult.getHostedZones()) { if (domain.endsWith(hostedZone.getName())) { return hostedZone; } } return null; }
@Override protected void doGlobalScan() { ListHostedZonesRequest request = new ListHostedZonesRequest(); ListHostedZonesResult result = new ListHostedZonesResult(); do { rateLimit(); result = getClient().listHostedZones(request); for (HostedZone zone : result.getHostedZones()) { scanHostedZoneById(zone.getId()); } request.setMarker(result.getMarker()); } while (result.isTruncated()); }
public ListHostedZonesResult unmarshall(StaxUnmarshallerContext context) throws Exception { ListHostedZonesResult listHostedZonesResult = new ListHostedZonesResult(); int originalDepth = context.getCurrentDepth(); int targetDepth = originalDepth + 1; listHostedZonesResult.withHostedZones(new ArrayList<HostedZone>()); continue; listHostedZonesResult.withHostedZones(HostedZoneStaxUnmarshaller.getInstance().unmarshall(context)); continue; listHostedZonesResult.setMarker(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; listHostedZonesResult.setIsTruncated(BooleanStaxUnmarshaller.getInstance().unmarshall(context)); continue; listHostedZonesResult.setNextMarker(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue; listHostedZonesResult.setMaxItems(StringStaxUnmarshaller.getInstance().unmarshall(context)); continue;
} else if (obj instanceof ListHostedZonesResult) { ListHostedZonesResult result = (ListHostedZonesResult)obj; for (HostedZone zone : result.getHostedZones()) removePrefix(zone); } else if (obj instanceof ListResourceRecordSetsResult) { ListResourceRecordSetsResult result = (ListResourceRecordSetsResult)obj;
return false; ListHostedZonesResult other = (ListHostedZonesResult) obj; if (other.getHostedZones() == null ^ this.getHostedZones() == null) return false; if (other.getHostedZones() != null && other.getHostedZones().equals(this.getHostedZones()) == false) return false; if (other.getMarker() == null ^ this.getMarker() == null) return false; if (other.getMarker() != null && other.getMarker().equals(this.getMarker()) == false) return false; if (other.getIsTruncated() == null ^ this.getIsTruncated() == null) return false; if (other.getIsTruncated() != null && other.getIsTruncated().equals(this.getIsTruncated()) == false) return false; if (other.getNextMarker() == null ^ this.getNextMarker() == null) return false; if (other.getNextMarker() != null && other.getNextMarker().equals(this.getNextMarker()) == false) return false; if (other.getMaxItems() == null ^ this.getMaxItems() == null) return false; if (other.getMaxItems() != null && other.getMaxItems().equals(this.getMaxItems()) == false) return false; return true;
private HostedZone getHostedZone(String domain) { ListHostedZonesRequest listHostedZoneRequest = new ListHostedZonesRequest(); listHostedZoneRequest.setMaxItems(String.valueOf(Integer.MAX_VALUE)); ListHostedZonesResult listHostedZonesResult = amazonRoute53Client.listHostedZones(listHostedZoneRequest); for(HostedZone hostedZone : listHostedZonesResult.getHostedZones()) { if (domain.endsWith(hostedZone.getName())) { return hostedZone; } } return null; }
/** * 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 (getHostedZones() != null) sb.append("HostedZones: ").append(getHostedZones()).append(","); if (getMarker() != null) sb.append("Marker: ").append(getMarker()).append(","); if (getIsTruncated() != null) sb.append("IsTruncated: ").append(getIsTruncated()).append(","); if (getNextMarker() != null) sb.append("NextMarker: ").append(getNextMarker()).append(","); if (getMaxItems() != null) sb.append("MaxItems: ").append(getMaxItems()); sb.append("}"); return sb.toString(); }
route53Client = (AmazonRoute53Client) map.get(PacmanSdkConstants.CLIENT); ListHostedZonesResult result = route53Client.listHostedZones(); if (!result.getHostedZones().isEmpty()) { failedType.put("hostedZones", "Found"); annotation = Annotation.buildAnnotation(ruleParam,Annotation.Type.ISSUE);
for (HostedZone hostedZone : r53.listHostedZones().getHostedZones()) { String id = hostedZone.getId(); String name = hostedZone.getName();