All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.afrozaar.wordpress.wpapi.v2.model.Page Maven / Gradle / Ivy

There is a newer version: 4.8.3
Show newest version
package com.afrozaar.wordpress.wpapi.v2.model;

import com.google.common.collect.ImmutableMap;

import com.fasterxml.jackson.annotation.JsonAnyGetter;
import com.fasterxml.jackson.annotation.JsonAnySetter;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;

import javax.annotation.Generated;

import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import java.util.Optional;
import java.util.function.BiConsumer;

@JsonInclude(JsonInclude.Include.NON_NULL)
@Generated("org.jsonschema2pojo")
@JsonPropertyOrder({
        "_links",
        "author",
        "comment_status",
        "content",
        "date",
        "date_gmt",
        "excerpt",
        "featured_image",
        "guid",
        "id",
        "link",
        "menu_order",
        "modified",
        "modified_gmt",
        "parent",
        "password",
        "ping_status",
        "slug",
        "status",
        "template",
        "title",
        "type"
})
public class Page {

    @JsonProperty("_links")
    private com.afrozaar.wordpress.wpapi.v2.model.Links Links;
    @JsonProperty("author")
    private Long author;
    @JsonProperty("comment_status")
    private String commentStatus;
    @JsonProperty("content")
    private Content content;
    @JsonProperty("date")
    private String date;
    @JsonProperty("date_gmt")
    private String dateGmt;
    @JsonProperty("excerpt")
    private Excerpt excerpt;
    @JsonProperty("featured_image")
    private Long featuredImage;
    @JsonProperty("guid")
    private Guid guid;
    @JsonProperty("id")
    private Long id;
    @JsonProperty("link")
    private String link;
    @JsonProperty("menu_order")
    private Long menuOrder;
    @JsonProperty("modified")
    private String modified;
    @JsonProperty("modified_gmt")
    private String modifiedGmt;
    @JsonProperty("parent")
    private Long parent;
    @JsonProperty("password")
    private String password;
    @JsonProperty("ping_status")
    private String pingStatus;
    @JsonProperty("slug")
    private String slug;
    @JsonProperty("status")
    private String status;
    @JsonProperty("template")
    private String template;
    @JsonProperty("title")
    private Title title;
    @JsonProperty("type")
    private String type;
    @JsonIgnore
    private Map additionalProperties = new HashMap();

    /**
     * @return The Links
     */
    @JsonProperty("_links")
    public com.afrozaar.wordpress.wpapi.v2.model.Links getLinks() {
        return Links;
    }

    /**
     * @param Links The _links
     */
    @JsonProperty("_links")
    public void setLinks(com.afrozaar.wordpress.wpapi.v2.model.Links Links) {
        this.Links = Links;
    }

    /**
     * @return The author
     */
    @JsonProperty("author")
    public Long getAuthor() {
        return author;
    }

    /**
     * @param author The author
     */
    @JsonProperty("author")
    public void setAuthor(Long author) {
        this.author = author;
    }

    /**
     * @return The commentStatus
     */
    @JsonProperty("comment_status")
    public String getCommentStatus() {
        return commentStatus;
    }

    /**
     * @param commentStatus The comment_status
     */
    @JsonProperty("comment_status")
    public void setCommentStatus(String commentStatus) {
        this.commentStatus = commentStatus;
    }

    /**
     * @return The content
     */
    @JsonProperty("content")
    public Content getContent() {
        return content;
    }

    /**
     * @param content The content
     */
    @JsonProperty("content")
    public void setContent(Content content) {
        this.content = content;
    }

    /**
     * @return The date
     */
    @JsonProperty("date")
    public String getDate() {
        return date;
    }

    /**
     * @param date The date
     */
    @JsonProperty("date")
    public void setDate(String date) {
        this.date = date;
    }

    /**
     * @return The dateGmt
     */
    @JsonProperty("date_gmt")
    public String getDateGmt() {
        return dateGmt;
    }

    /**
     * @param dateGmt The date_gmt
     */
    @JsonProperty("date_gmt")
    public void setDateGmt(String dateGmt) {
        this.dateGmt = dateGmt;
    }

    /**
     * @return The excerpt
     */
    @JsonProperty("excerpt")
    public Excerpt getExcerpt() {
        return excerpt;
    }

    /**
     * @param excerpt The excerpt
     */
    @JsonProperty("excerpt")
    public void setExcerpt(Excerpt excerpt) {
        this.excerpt = excerpt;
    }

    /**
     * @return The featuredImage
     */
    @JsonProperty("featured_image")
    public Long getFeaturedImage() {
        return featuredImage;
    }

    /**
     * @param featuredImage The featured_image
     */
    @JsonProperty("featured_image")
    public void setFeaturedImage(Long featuredImage) {
        this.featuredImage = featuredImage;
    }

    /**
     * @return The guid
     */
    @JsonProperty("guid")
    public Guid getGuid() {
        return guid;
    }

    /**
     * @param guid The guid
     */
    @JsonProperty("guid")
    public void setGuid(Guid guid) {
        this.guid = guid;
    }

    /**
     * @return The id
     */
    @JsonProperty("id")
    public Long getId() {
        return id;
    }

    /**
     * @param id The id
     */
    @JsonProperty("id")
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return The link
     */
    @JsonProperty("link")
    public String getLink() {
        return link;
    }

    /**
     * @param link The link
     */
    @JsonProperty("link")
    public void setLink(String link) {
        this.link = link;
    }

    /**
     * @return The menuOrder
     */
    @JsonProperty("menu_order")
    public Long getMenuOrder() {
        return menuOrder;
    }

    /**
     * @param menuOrder The menu_order
     */
    @JsonProperty("menu_order")
    public void setMenuOrder(Long menuOrder) {
        this.menuOrder = menuOrder;
    }

    /**
     * @return The modified
     */
    @JsonProperty("modified")
    public String getModified() {
        return modified;
    }

    /**
     * @param modified The modified
     */
    @JsonProperty("modified")
    public void setModified(String modified) {
        this.modified = modified;
    }

    /**
     * @return The modifiedGmt
     */
    @JsonProperty("modified_gmt")
    public String getModifiedGmt() {
        return modifiedGmt;
    }

    /**
     * @param modifiedGmt The modified_gmt
     */
    @JsonProperty("modified_gmt")
    public void setModifiedGmt(String modifiedGmt) {
        this.modifiedGmt = modifiedGmt;
    }

    /**
     * @return The parent
     */
    @JsonProperty("parent")
    public Long getParent() {
        return parent;
    }

    /**
     * @param parent The parent
     */
    @JsonProperty("parent")
    public void setParent(Long parent) {
        this.parent = parent;
    }

    /**
     * @return The password
     */
    @JsonProperty("password")
    public String getPassword() {
        return password;
    }

    /**
     * @param password The password
     */
    @JsonProperty("password")
    public void setPassword(String password) {
        this.password = password;
    }

    /**
     * @return The pingStatus
     */
    @JsonProperty("ping_status")
    public String getPingStatus() {
        return pingStatus;
    }

    /**
     * @param pingStatus The ping_status
     */
    @JsonProperty("ping_status")
    public void setPingStatus(String pingStatus) {
        this.pingStatus = pingStatus;
    }

    /**
     * @return The slug
     */
    @JsonProperty("slug")
    public String getSlug() {
        return slug;
    }

    /**
     * @param slug The slug
     */
    @JsonProperty("slug")
    public void setSlug(String slug) {
        this.slug = slug;
    }

    /**
     * @return The status
     */
    @JsonProperty("status")
    public String getStatus() {
        return status;
    }

    /**
     * @param status The status
     */
    @JsonProperty("status")
    public void setStatus(String status) {
        this.status = status;
    }

    /**
     * @return The template
     */
    @JsonProperty("template")
    public String getTemplate() {
        return template;
    }

    /**
     * @param template The template
     */
    @JsonProperty("template")
    public void setTemplate(String template) {
        this.template = template;
    }

    /**
     * @return The title
     */
    @JsonProperty("title")
    public Title getTitle() {
        return title;
    }

    /**
     * @param title The title
     */
    @JsonProperty("title")
    public void setTitle(Title title) {
        this.title = title;
    }

    /**
     * @return The type
     */
    @JsonProperty("type")
    public String getType() {
        return type;
    }

    /**
     * @param type The type
     */
    @JsonProperty("type")
    public void setType(String type) {
        this.type = type;
    }

    @JsonAnyGetter
    public Map getAdditionalProperties() {
        return this.additionalProperties;
    }

    @JsonAnySetter
    public void setAdditionalProperty(String name, Object value) {
        this.additionalProperties.put(name, value);
    }

    public Map asMap() {
        final ImmutableMap.Builder builder = new ImmutableMap.Builder<>();
        BiConsumer c = (index, value) -> Optional.ofNullable(value).ifPresent(val -> builder.put(index, val));

        c.accept("author", author);
        c.accept("comment_status", commentStatus);
        c.accept("content", Objects.nonNull(content) ? content.getRaw() : null);
        c.accept("date", date);
        c.accept("date_gmt", dateGmt);
        c.accept("excerpt", Objects.nonNull(excerpt) ? excerpt.getRaw() : null);
        c.accept("featured_image", featuredImage);
        c.accept("guid", Objects.nonNull(guid) ? guid.getRaw() : null);
        c.accept("id", id);
        c.accept("link", link);
        c.accept("menu_order", menuOrder);
        c.accept("modified", modified);
        c.accept("modified_gmt", modifiedGmt);
        c.accept("parent", parent);
        c.accept("password", password);
        c.accept("ping_status", pingStatus);
        c.accept("slug", slug);
        c.accept("status", status);
        c.accept("template", template);
        c.accept("title", Objects.nonNull(title) ? title.getRaw() : null);
        c.accept("type", type);

        return builder.build();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy