Skip to content
Closed
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
118 changes: 3 additions & 115 deletions src/main/java/lol/pbu/z4j/model/Attachment.java
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
import jakarta.validation.Valid;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

Expand All @@ -38,6 +39,7 @@
@NoArgsConstructor
@AllArgsConstructor
@Data
@EqualsAndHashCode(callSuper = false)
@JsonPropertyOrder({
Attachment.JSON_PROPERTY_CONTENT_TYPE,
Attachment.JSON_PROPERTY_CONTENT_URL,
Expand All @@ -55,124 +57,10 @@
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 <a href=\"/documentation/ticketing/managing-tickets/working-with-url-properties\">Working with url properties</a>
*/
@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
*/
Expand Down
66 changes: 0 additions & 66 deletions src/main/java/lol/pbu/z4j/model/TicketAuditVia.java

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/java/lol/pbu/z4j/model/TicketComment.java
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ public class TicketComment {
@Valid
@JsonProperty(JSON_PROPERTY_VIA)
@JsonInclude(JsonInclude.Include.USE_DEFAULTS)
private TicketAuditVia via;
private TicketVia via;

/**
* Add an item to the uploads property in a chainable fashion.
Expand Down
Loading
Loading