diff --git a/src/main/java/lol/pbu/z4j/model/Attachment.java b/src/main/java/lol/pbu/z4j/model/Attachment.java index d3b3a3a..70db3da 100644 --- a/src/main/java/lol/pbu/z4j/model/Attachment.java +++ b/src/main/java/lol/pbu/z4j/model/Attachment.java @@ -23,6 +23,7 @@ import jakarta.validation.Valid; import lombok.AllArgsConstructor; import lombok.Data; +import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; import lombok.experimental.Accessors; @@ -34,145 +35,32 @@ * @author Jonathan-Zollinger * @since 0.1.1 */ +@EqualsAndHashCode(callSuper = true) @Accessors(chain = true) @NoArgsConstructor @AllArgsConstructor @Data @JsonPropertyOrder({ - Attachment.JSON_PROPERTY_CONTENT_TYPE, - Attachment.JSON_PROPERTY_CONTENT_URL, - Attachment.JSON_PROPERTY_DELETED, - Attachment.JSON_PROPERTY_FILE_NAME, - Attachment.JSON_PROPERTY_HEIGHT, - Attachment.JSON_PROPERTY_ID, - Attachment.JSON_PROPERTY_INLINE, - Attachment.JSON_PROPERTY_MALWARE_ACCESS_OVERRIDE, - Attachment.JSON_PROPERTY_MALWARE_SCAN_RESULT, - Attachment.JSON_PROPERTY_MAPPED_CONTENT_URL, - Attachment.JSON_PROPERTY_SIZE, - Attachment.JSON_PROPERTY_URL, - Attachment.JSON_PROPERTY_WIDTH, + AttachmentBase.JSON_PROPERTY_CONTENT_TYPE, + AttachmentBase.JSON_PROPERTY_CONTENT_URL, + AttachmentBase.JSON_PROPERTY_DELETED, + AttachmentBase.JSON_PROPERTY_FILE_NAME, + AttachmentBase.JSON_PROPERTY_HEIGHT, + AttachmentBase.JSON_PROPERTY_ID, + AttachmentBase.JSON_PROPERTY_INLINE, + AttachmentBase.JSON_PROPERTY_MALWARE_ACCESS_OVERRIDE, + AttachmentBase.JSON_PROPERTY_MALWARE_SCAN_RESULT, + AttachmentBase.JSON_PROPERTY_MAPPED_CONTENT_URL, + AttachmentBase.JSON_PROPERTY_SIZE, + AttachmentBase.JSON_PROPERTY_URL, + AttachmentBase.JSON_PROPERTY_WIDTH, Attachment.JSON_PROPERTY_THUMBNAILS, }) @Serdeable -public class Attachment { +public class Attachment extends AttachmentBase { - public static final String JSON_PROPERTY_CONTENT_TYPE = "content_type"; - public static final String JSON_PROPERTY_CONTENT_URL = "content_url"; - public static final String JSON_PROPERTY_DELETED = "deleted"; - public static final String JSON_PROPERTY_FILE_NAME = "file_name"; - public static final String JSON_PROPERTY_HEIGHT = "height"; - public static final String JSON_PROPERTY_ID = "id"; - public static final String JSON_PROPERTY_INLINE = "inline"; - public static final String JSON_PROPERTY_MALWARE_ACCESS_OVERRIDE = "malware_access_override"; - public static final String JSON_PROPERTY_MALWARE_SCAN_RESULT = "malware_scan_result"; - public static final String JSON_PROPERTY_MAPPED_CONTENT_URL = "mapped_content_url"; - public static final String JSON_PROPERTY_SIZE = "size"; - public static final String JSON_PROPERTY_URL = "url"; - public static final String JSON_PROPERTY_WIDTH = "width"; public static final String JSON_PROPERTY_THUMBNAILS = "thumbnails"; - /** - * The content type of the image. Example value: \"image/png\" - */ - @Nullable - @JsonProperty(JSON_PROPERTY_CONTENT_TYPE) - @JsonInclude(JsonInclude.Include.USE_DEFAULTS) - private String contentType; - - /** - * A full URL where the attachment image file can be downloaded. The file may be hosted externally so take care not to inadvertently send Zendesk authentication credentials. See Working with url properties - */ - @Nullable - @JsonProperty(JSON_PROPERTY_CONTENT_URL) - @JsonInclude(JsonInclude.Include.USE_DEFAULTS) - private String contentUrl; - - /** - * If true, the attachment has been deleted - */ - @Nullable - @JsonProperty(JSON_PROPERTY_DELETED) - @JsonInclude(JsonInclude.Include.USE_DEFAULTS) - private Boolean deleted; - - /** - * The name of the image file - */ - @Nullable - @JsonProperty(JSON_PROPERTY_FILE_NAME) - @JsonInclude(JsonInclude.Include.USE_DEFAULTS) - private String fileName; - - /** - * The height of the image file in pixels. If height is unknown, returns null - */ - @Nullable - @JsonProperty(JSON_PROPERTY_HEIGHT) - @JsonInclude(JsonInclude.Include.USE_DEFAULTS) - private String height; - - /** - * Automatically assigned when created - */ - @Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(JsonInclude.Include.USE_DEFAULTS) - private Integer id; - - /** - * If true, the attachment is excluded from the attachment list and the attachment's URL can be referenced within the comment of a ticket. Default is false - */ - @Nullable - @JsonProperty(JSON_PROPERTY_INLINE) - @JsonInclude(JsonInclude.Include.USE_DEFAULTS) - private Boolean inline; - - /** - * If true, you can download an attachment flagged as malware. If false, you can't download such an attachment. - */ - @Nullable - @JsonProperty(JSON_PROPERTY_MALWARE_ACCESS_OVERRIDE) - @JsonInclude(JsonInclude.Include.USE_DEFAULTS) - private Boolean malwareAccessOverride; - - @Nullable - @JsonProperty(JSON_PROPERTY_MALWARE_SCAN_RESULT) - @JsonInclude(JsonInclude.Include.USE_DEFAULTS) - private AttachmentBaseMalwareScanResult malwareScanResult; - - /** - * The URL the attachment image file has been mapped to - */ - @Nullable - @JsonProperty(JSON_PROPERTY_MAPPED_CONTENT_URL) - @JsonInclude(JsonInclude.Include.USE_DEFAULTS) - private String mappedContentUrl; - - /** - * The size of the image file in bytes - */ - @Nullable - @JsonProperty(JSON_PROPERTY_SIZE) - @JsonInclude(JsonInclude.Include.USE_DEFAULTS) - private Integer size; - - /** - * A URL to access the attachment details - */ - @Nullable - @JsonProperty(JSON_PROPERTY_URL) - @JsonInclude(JsonInclude.Include.USE_DEFAULTS) - private String url; - - /** - * The width of the image file in pixels. If width is unknown, returns null - */ - @Nullable - @JsonProperty(JSON_PROPERTY_WIDTH) - @JsonInclude(JsonInclude.Include.USE_DEFAULTS) - private String width; - /** * An array of attachment objects. Note that photo thumbnails do not have thumbnails */ diff --git a/src/main/java/lol/pbu/z4j/model/Comment.java b/src/main/java/lol/pbu/z4j/model/Comment.java index 5d017dc..1ec0ce4 100644 --- a/src/main/java/lol/pbu/z4j/model/Comment.java +++ b/src/main/java/lol/pbu/z4j/model/Comment.java @@ -20,15 +20,11 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; import io.micronaut.core.annotation.Nullable; import io.micronaut.serde.annotation.Serdeable; -import jakarta.validation.constraints.NotNull; +import lombok.Data; import lombok.EqualsAndHashCode; -import lombok.Getter; -import lombok.Setter; import lombok.ToString; import lombok.experimental.Accessors; -import java.time.ZonedDateTime; - /** * Comment * @@ -36,108 +32,30 @@ * @since 0.1.1 */ @Accessors(chain = true) -@EqualsAndHashCode +@EqualsAndHashCode(callSuper = true) @ToString -@Getter -@Setter +@Data @JsonPropertyOrder({ - Comment.JSON_PROPERTY_BODY, - Comment.JSON_PROPERTY_LOCALE, - Comment.JSON_PROPERTY_AUTHOR_ID, - Comment.JSON_PROPERTY_CREATED_AT, - Comment.JSON_PROPERTY_HTML_URL, - Comment.JSON_PROPERTY_ID, - Comment.JSON_PROPERTY_NON_AUTHOR_EDITOR_ID, - Comment.JSON_PROPERTY_NON_AUTHOR_UPDATED_AT, + CommentBase.JSON_PROPERTY_BODY, + CommentBase.JSON_PROPERTY_LOCALE, + CommentBase.JSON_PROPERTY_AUTHOR_ID, + CommentBase.JSON_PROPERTY_CREATED_AT, + CommentBase.JSON_PROPERTY_HTML_URL, + CommentBase.JSON_PROPERTY_ID, + CommentBase.JSON_PROPERTY_NON_AUTHOR_EDITOR_ID, + CommentBase.JSON_PROPERTY_NON_AUTHOR_UPDATED_AT, Comment.JSON_PROPERTY_SOURCE_ID, Comment.JSON_PROPERTY_SOURCE_TYPE, - Comment.JSON_PROPERTY_UPDATED_AT, - Comment.JSON_PROPERTY_URL, - Comment.JSON_PROPERTY_VOTE_COUNT, - Comment.JSON_PROPERTY_VOTE_SUM, + CommentBase.JSON_PROPERTY_UPDATED_AT, + CommentBase.JSON_PROPERTY_URL, + CommentBase.JSON_PROPERTY_VOTE_COUNT, + CommentBase.JSON_PROPERTY_VOTE_SUM, }) @Serdeable -public class Comment { +public class Comment extends CommentBase { - public static final String JSON_PROPERTY_BODY = "body"; - public static final String JSON_PROPERTY_LOCALE = "locale"; - public static final String JSON_PROPERTY_AUTHOR_ID = "author_id"; - public static final String JSON_PROPERTY_CREATED_AT = "created_at"; - public static final String JSON_PROPERTY_HTML_URL = "html_url"; - public static final String JSON_PROPERTY_ID = "id"; - public static final String JSON_PROPERTY_NON_AUTHOR_EDITOR_ID = "non_author_editor_id"; - public static final String JSON_PROPERTY_NON_AUTHOR_UPDATED_AT = "non_author_updated_at"; public static final String JSON_PROPERTY_SOURCE_ID = "source_id"; public static final String JSON_PROPERTY_SOURCE_TYPE = "source_type"; - public static final String JSON_PROPERTY_UPDATED_AT = "updated_at"; - public static final String JSON_PROPERTY_URL = "url"; - public static final String JSON_PROPERTY_VOTE_COUNT = "vote_count"; - public static final String JSON_PROPERTY_VOTE_SUM = "vote_sum"; - - /** - * The comment made by the author. See User content - */ - @NotNull - @JsonProperty(JSON_PROPERTY_BODY) - private String body; - - /** - * The locale in which this comment was made - */ - @NotNull - @JsonProperty(JSON_PROPERTY_LOCALE) - private LocaleAbbreviation localeAbbreviation; - - /** - * The id of the author of this comment. Writable on create by Help Center managers. See Create Comment - */ - @Nullable - @JsonProperty(JSON_PROPERTY_AUTHOR_ID) - @JsonInclude(JsonInclude.Include.USE_DEFAULTS) - private Long authorId; - - /** - * The time the comment was created. Writable on create by Help Center managers. See Create Comment - */ - @Nullable - @JsonProperty(JSON_PROPERTY_CREATED_AT) - @JsonInclude(JsonInclude.Include.USE_DEFAULTS) - private String createdAt; - - /** - * The url at which the comment is presented in Help Center - */ - @Nullable - @JsonProperty(JSON_PROPERTY_HTML_URL) - @JsonInclude(JsonInclude.Include.USE_DEFAULTS) - private String htmlUrl; - - /** - * Automatically assigned when the comment is created - */ - @Nullable - @JsonProperty(JSON_PROPERTY_ID) - @JsonInclude(JsonInclude.Include.USE_DEFAULTS) - private Long id; - - /** - *
body or
- * author_id. Note that only edits made after May 17, 2021, will be reflected in this field.
- * If no non-author edits have occurred since May 17, 2021, then this field will benull.
- */
- @Nullable
- @JsonProperty(JSON_PROPERTY_NON_AUTHOR_EDITOR_ID)
- @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
- private Long nonAuthorEditorId;
-
- /**
- * When the comment was last edited by a non-author user
- */
- @Nullable
- @JsonProperty(JSON_PROPERTY_NON_AUTHOR_UPDATED_AT)
- @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
- private ZonedDateTime nonAuthorUpdatedAt;
/**
* The id of the item on which this comment was made
@@ -155,36 +73,8 @@ public class Comment {
@JsonInclude(JsonInclude.Include.USE_DEFAULTS)
private String sourceType;
- /**
- * The time at which the comment was last updated
- */
- @Nullable
- @JsonProperty(JSON_PROPERTY_UPDATED_AT)
- @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
- private String updatedAt;
-
- /**
- * The API url of this comment
- */
- @Nullable
- @JsonProperty(JSON_PROPERTY_URL)
- @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
- private String url;
-
- /**
- * The total number of upvotes and downvotes
- */
- @Nullable
- @JsonProperty(JSON_PROPERTY_VOTE_COUNT)
- @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
- private Long voteCount;
-
- /**
- * The sum of upvotes (+1) and downvotes (-1), which may be positive or negative
- */
- @Nullable
- @JsonProperty(JSON_PROPERTY_VOTE_SUM)
- @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
- private Long voteSum;
+ public Comment(String body) {
+ setBody(body);
+ }
}
diff --git a/src/main/java/lol/pbu/z4j/model/CommentBase.java b/src/main/java/lol/pbu/z4j/model/CommentBase.java
new file mode 100644
index 0000000..232315c
--- /dev/null
+++ b/src/main/java/lol/pbu/z4j/model/CommentBase.java
@@ -0,0 +1,132 @@
+package lol.pbu.z4j.model;
+
+import com.fasterxml.jackson.annotation.JsonInclude;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.micronaut.core.annotation.Nullable;
+import io.micronaut.serde.annotation.Serdeable;
+import jakarta.validation.constraints.NotNull;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import lombok.ToString;
+import lombok.experimental.Accessors;
+
+import java.time.ZonedDateTime;
+
+@Accessors(chain = true)
+@EqualsAndHashCode
+@ToString
+@Data
+@Serdeable
+public class CommentBase {
+
+ public static final String JSON_PROPERTY_BODY = "body";
+ public static final String JSON_PROPERTY_LOCALE = "locale";
+ public static final String JSON_PROPERTY_AUTHOR_ID = "author_id";
+ public static final String JSON_PROPERTY_CREATED_AT = "created_at";
+ public static final String JSON_PROPERTY_HTML_URL = "html_url";
+ public static final String JSON_PROPERTY_ID = "id";
+ public static final String JSON_PROPERTY_NON_AUTHOR_EDITOR_ID = "non_author_editor_id";
+ public static final String JSON_PROPERTY_NON_AUTHOR_UPDATED_AT = "non_author_updated_at";
+ public static final String JSON_PROPERTY_UPDATED_AT = "updated_at";
+ public static final String JSON_PROPERTY_URL = "url";
+ public static final String JSON_PROPERTY_VOTE_COUNT = "vote_count";
+ public static final String JSON_PROPERTY_VOTE_SUM = "vote_sum";
+
+ /**
+ * The comment made by the author. See User content
+ */
+ @NotNull
+ @JsonProperty(JSON_PROPERTY_BODY)
+ private String body;
+
+ /**
+ * The locale in which this comment was made
+ */
+ @NotNull
+ @JsonProperty(JSON_PROPERTY_LOCALE)
+ private LocaleAbbreviation localeAbbreviation;
+
+ /**
+ * The id of the author of this comment. Writable on create by Help Center managers. See Create Comment
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_AUTHOR_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long authorId;
+
+ /**
+ * The time the comment was created. Writable on create by Help Center managers. See Create Comment
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_CREATED_AT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String createdAt;
+
+ /**
+ * The url at which the comment is presented in Help Center
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_HTML_URL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String htmlUrl;
+
+ /**
+ * Automatically assigned when the comment is created
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long id;
+
+ /**
+ * body or
+ * author_id. Note that only edits made after May 17, 2021, will be reflected in this field.
+ * If no non-author edits have occurred since May 17, 2021, then this field will benull.
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_NON_AUTHOR_EDITOR_ID)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long nonAuthorEditorId;
+
+ /**
+ * When the comment was last edited by a non-author user
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_NON_AUTHOR_UPDATED_AT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private ZonedDateTime nonAuthorUpdatedAt;
+
+ /**
+ * The time at which the comment was last updated
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_UPDATED_AT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String updatedAt;
+
+ /**
+ * The API url of this comment
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_URL)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private String url;
+
+ /**
+ * The total number of upvotes and downvotes
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_VOTE_COUNT)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long voteCount;
+
+ /**
+ * The sum of upvotes (+1) and downvotes (-1), which may be positive or negative
+ */
+ @Nullable
+ @JsonProperty(JSON_PROPERTY_VOTE_SUM)
+ @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
+ private Long voteSum;
+
+}
\ No newline at end of file
diff --git a/src/main/java/lol/pbu/z4j/model/PostComment.java b/src/main/java/lol/pbu/z4j/model/PostComment.java
index 7843a38..d72c330 100644
--- a/src/main/java/lol/pbu/z4j/model/PostComment.java
+++ b/src/main/java/lol/pbu/z4j/model/PostComment.java
@@ -20,15 +20,11 @@
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import io.micronaut.core.annotation.Nullable;
import io.micronaut.serde.annotation.Serdeable;
-import jakarta.validation.constraints.NotNull;
+import lombok.Data;
import lombok.EqualsAndHashCode;
-import lombok.Getter;
-import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;
-import java.time.ZonedDateTime;
-
/**
* PostComment
*
@@ -36,96 +32,29 @@
* @since 0.1.1
*/
@Accessors(chain = true)
-@EqualsAndHashCode
+@EqualsAndHashCode(callSuper = true)
@ToString
-@Getter
-@Setter
+@Data
@JsonPropertyOrder({
- PostComment.JSON_PROPERTY_BODY,
- PostComment.JSON_PROPERTY_AUTHOR_ID,
- PostComment.JSON_PROPERTY_CREATED_AT,
- PostComment.JSON_PROPERTY_HTML_URL,
- PostComment.JSON_PROPERTY_ID,
- PostComment.JSON_PROPERTY_NON_AUTHOR_EDITOR_ID,
- PostComment.JSON_PROPERTY_NON_AUTHOR_UPDATED_AT,
+ CommentBase.JSON_PROPERTY_BODY,
+ CommentBase.JSON_PROPERTY_AUTHOR_ID,
+ CommentBase.JSON_PROPERTY_CREATED_AT,
+ CommentBase.JSON_PROPERTY_HTML_URL,
+ CommentBase.JSON_PROPERTY_ID,
+ CommentBase.JSON_PROPERTY_NON_AUTHOR_EDITOR_ID,
+ CommentBase.JSON_PROPERTY_NON_AUTHOR_UPDATED_AT,
PostComment.JSON_PROPERTY_OFFICIAL,
PostComment.JSON_PROPERTY_POST_ID,
- PostComment.JSON_PROPERTY_UPDATED_AT,
- PostComment.JSON_PROPERTY_URL,
- PostComment.JSON_PROPERTY_VOTE_COUNT,
- PostComment.JSON_PROPERTY_VOTE_SUM,
+ CommentBase.JSON_PROPERTY_UPDATED_AT,
+ CommentBase.JSON_PROPERTY_URL,
+ CommentBase.JSON_PROPERTY_VOTE_COUNT,
+ CommentBase.JSON_PROPERTY_VOTE_SUM,
})
@Serdeable
-public class PostComment implements SearchResultsInner {
+public class PostComment extends CommentBase implements SearchResultsInner {
- public static final String JSON_PROPERTY_BODY = "body";
- public static final String JSON_PROPERTY_AUTHOR_ID = "author_id";
- public static final String JSON_PROPERTY_CREATED_AT = "created_at";
- public static final String JSON_PROPERTY_HTML_URL = "html_url";
- public static final String JSON_PROPERTY_ID = "id";
- public static final String JSON_PROPERTY_NON_AUTHOR_EDITOR_ID = "non_author_editor_id";
- public static final String JSON_PROPERTY_NON_AUTHOR_UPDATED_AT = "non_author_updated_at";
public static final String JSON_PROPERTY_OFFICIAL = "official";
public static final String JSON_PROPERTY_POST_ID = "post_id";
- public static final String JSON_PROPERTY_UPDATED_AT = "updated_at";
- public static final String JSON_PROPERTY_URL = "url";
- public static final String JSON_PROPERTY_VOTE_COUNT = "vote_count";
- public static final String JSON_PROPERTY_VOTE_SUM = "vote_sum";
-
- /**
- * The comment made by the author. See User content
- */
- @NotNull
- @JsonProperty(JSON_PROPERTY_BODY)
- private String body;
-
- /**
- * The id of the author of the comment. Writable on create by Help Center managers. See Create Post Comment
- */
- @Nullable
- @JsonProperty(JSON_PROPERTY_AUTHOR_ID)
- @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
- private Long authorId;
-
- /**
- * When the comment was created. Writable on create by Help Center managers. See Create Post Comment
- */
- @Nullable
- @JsonProperty(JSON_PROPERTY_CREATED_AT)
- @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
- private String createdAt;
-
- /**
- * The community url of the comment
- */
- @Nullable
- @JsonProperty(JSON_PROPERTY_HTML_URL)
- @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
- private String htmlUrl;
-
- /**
- * Automatically assigned when the comment is created
- */
- @Nullable
- @JsonProperty(JSON_PROPERTY_ID)
- @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
- private Long id;
-
- /**
- * The user id of whoever performed the most recent (if any) non-author edit. A non-author edit consists of an edit make by a user other than the author that creates or updates the body. Note that only edits made after May 17, 2021 will be reflected in this field. If no non-author edits have occured since May 17, 2021, then this field will be null.
- */
- @Nullable
- @JsonProperty(JSON_PROPERTY_NON_AUTHOR_EDITOR_ID)
- @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
- private Long nonAuthorEditorId;
-
- /**
- * When the comment was last edited by a non-author user
- */
- @Nullable
- @JsonProperty(JSON_PROPERTY_NON_AUTHOR_UPDATED_AT)
- @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
- private ZonedDateTime nonAuthorUpdatedAt;
/**
* Whether the comment is marked as official
@@ -143,40 +72,9 @@ public class PostComment implements SearchResultsInner {
@JsonInclude(JsonInclude.Include.USE_DEFAULTS)
private Long postId;
- /**
- * When the comment was last updated
- */
- @Nullable
- @JsonProperty(JSON_PROPERTY_UPDATED_AT)
- @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
- private String updatedAt;
-
- /**
- * The API url of the comment
- */
- @Nullable
- @JsonProperty(JSON_PROPERTY_URL)
- @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
- private String url;
-
- /**
- * The total number of upvotes and downvotes
- */
- @Nullable
- @JsonProperty(JSON_PROPERTY_VOTE_COUNT)
- @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
- private Long voteCount;
-
- /**
- * The sum of upvotes (+1) and downvotes (-1), which may be positive or negative
- */
- @Nullable
- @JsonProperty(JSON_PROPERTY_VOTE_SUM)
- @JsonInclude(JsonInclude.Include.USE_DEFAULTS)
- private Long voteSum;
public PostComment(String body) {
- this.body = body;
+ setBody(body);
}
}