class PostViewModel extends ViewModel {

    public Post getPost() {
        Post post = new Post(name.get(), content.get(), category.get(), HttpUrl.parse(inReplyTo.get()));
        if (!this.photo.get().equals("")) {
            post.setPhoto(this.photo.get());
        }
        if (!this.likeOf.get().equals("")) {
            post.setLikeOf(HttpUrl.parse(likeOf.get()));
        }
        if (!this.bookmarkOf.get().equals("")) {
            post.setBookmarkOf(HttpUrl.parse(bookmarkOf.get()));
        }
        if (!this.postStatus.get().equals("")) {
            post.setPostStatus((postStatus.get()));
        }

        int id = this.checkedVisibility.get();
        switch (id) {
            case R.id.radioButtonPublic:
                this.visibility.set("public");
                break;

            case R.id.radioButtonUnlisted:
                this.visibility.set("unlisted");
                break;

            case R.id.radioButtonProtected:
                this.visibility.set("protected");
                break;

            case R.id.radioButtonPrivate:
                this.visibility.set("private");
                break;
        }

        if (!this.visibility.get().equals("")) {
            post.setVisibility((visibility.get()));
        }
        return post;
    }

    public  PostViewModel();

}