public class Route53IdRequestHandler extends AbstractRequestHandler {
@Override
public void afterResponse(Request<?> request, Object obj, TimingInfo timingInfo) {
if (obj instanceof ChangeResourceRecordSetsResult) {
ChangeResourceRecordSetsResult result = (ChangeResourceRecordSetsResult)obj;
removePrefix(result.getChangeInfo());
} else if (obj instanceof CreateHostedZoneResult) {
CreateHostedZoneResult result = (CreateHostedZoneResult)obj;
removePrefix(result.getChangeInfo());
removePrefix(result.getHostedZone());
} else if (obj instanceof DeleteHostedZoneResult) {
DeleteHostedZoneResult result = (DeleteHostedZoneResult)obj;
removePrefix(result.getChangeInfo());
} else if (obj instanceof GetChangeResult) {
GetChangeResult result = (GetChangeResult)obj;
removePrefix(result.getChangeInfo());
} else if (obj instanceof GetHostedZoneResult) {
GetHostedZoneResult result = (GetHostedZoneResult)obj;
removePrefix(result.getHostedZone());
} 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;
for (ResourceRecordSet rrset : result.getResourceRecordSets()) removePrefix(rrset);
}
}