/** * Constructs a new DeleteHostedZoneRequest object. Callers should use the setter or fluent setter (with...) methods * to initialize any additional object members. * * @param id * The ID of the hosted zone you want to delete. */ public DeleteHostedZoneRequest(String id) { setId(id); }
@TaskAction public void createHostedZone() { // to enable conventionMappings feature String hostedZoneId = getHostedZoneId(); AmazonRoute53PluginExtension ext = getProject().getExtensions().getByType(AmazonRoute53PluginExtension.class); AmazonRoute53 route53 = ext.getClient(); route53.deleteHostedZone(new DeleteHostedZoneRequest(hostedZoneId)); getLogger().info("HostedZone {} is deleted successfully.", hostedZoneId); } }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof DeleteHostedZoneRequest == false) return false; DeleteHostedZoneRequest other = (DeleteHostedZoneRequest) obj; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; return true; }
/** * <p> * The ID of the hosted zone you want to delete. * </p> * * @param id * The ID of the hosted zone you want to delete. * @return Returns a reference to this object so that method calls can be chained together. */ public DeleteHostedZoneRequest withId(String id) { setId(id); return this; }
/** * 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 (getId() != null) sb.append("Id: ").append(getId()); sb.append("}"); return sb.toString(); }
public Request<DeleteHostedZoneRequest> marshall(DeleteHostedZoneRequest deleteHostedZoneRequest) { if (deleteHostedZoneRequest == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } Request<DeleteHostedZoneRequest> request = new DefaultRequest<DeleteHostedZoneRequest>(deleteHostedZoneRequest, "AmazonRoute53"); request.setHttpMethod(HttpMethodName.DELETE); String uriResourcePath = "/2013-04-01/hostedzone/{Id}"; uriResourcePath = com.amazonaws.transform.PathMarshallers.NON_GREEDY.marshall(uriResourcePath, "Id", deleteHostedZoneRequest.getId()); request.setResourcePath(uriResourcePath); return request; }