com.afrozaar.wordpress.wpapi.v2.model.DeleteResponse Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of wp-api-v2-client-java Show documentation
Show all versions of wp-api-v2-client-java Show documentation
A Java client implementation to the WordPress WP-API v2 plugin.
package com.afrozaar.wordpress.wpapi.v2.model;
public class DeleteResponse {
/*
{
"deleted": true,
"previous": {
"id": 419,
"count": 0,
"description": "kAUst",
"link": "http:\/\/docker.dev\/tag\/tka\/",
"name": "TKA",
"slug": "tka",
"taxonomy": "post_tag",
"meta": []
}
}
*/
private Boolean deleted;
private T previous;
public Boolean getDeleted() {
return deleted;
}
public void setDeleted(Boolean deleted) {
this.deleted = deleted;
}
public T getPrevious() {
return previous;
}
public void setPrevious(T previous) {
this.previous = previous;
}
public static DeleteResponse of(Boolean deleted, T previous){
DeleteResponse response = new DeleteResponse<>();
response.setPrevious(previous);
response.setDeleted(deleted);
return response;
}
@Override
public String toString() {
final StringBuffer sb = new StringBuffer("DeleteRequest{");
sb.append("deleted=").append(deleted);
sb.append(", previous=").append(previous);
sb.append('}');
return sb.toString();
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy