Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/main/java/org/zendesk/client/v2/model/Comment.java
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
package org.zendesk.client.v2.model;

import static com.fasterxml.jackson.annotation.JsonTypeInfo.As.EXTERNAL_PROPERTY;
import static com.fasterxml.jackson.annotation.JsonTypeInfo.Id.NAME;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import java.io.Serializable;
import java.util.Arrays;
import java.util.Date;
import java.util.List;
import org.zendesk.client.v2.model.comments.VoiceComment;

/**
* @author stephenc
* @since 09/04/2013 15:09
*/
@JsonTypeInfo(use = NAME, include = EXTERNAL_PROPERTY, property = "type", visible = true)
@JsonSubTypes({
@JsonSubTypes.Type(value = Comment.class, name = "Comment"),
@JsonSubTypes.Type(value = VoiceComment.class, name = "VoiceComment")
})
public class Comment implements Serializable {

private static final long serialVersionUID = 1L;
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
package org.zendesk.client.v2.model.comments;

import com.fasterxml.jackson.annotation.JsonProperty;
import org.zendesk.client.v2.model.Comment;

public class VoiceComment extends Comment {

private VoiceCommentData data;

@JsonProperty("data")
public VoiceCommentData getData() {
return data;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
package org.zendesk.client.v2.model.comments;

import com.fasterxml.jackson.annotation.JsonProperty;

/**
* @author besbes
* @since 05/03/2024 13:51
*/
public class VoiceCommentData {

private Long callDuration;

@JsonProperty("call_duration")
public Long getCallDuration() {
return callDuration;
}
}