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

com.softlayer.api.service.ticket.attachment.File Maven / Gradle / Ivy

There is a newer version: 0.3.4
Show newest version
package com.softlayer.api.service.ticket.attachment;

import com.softlayer.api.ApiClient;
import com.softlayer.api.ResponseHandler;
import com.softlayer.api.annotation.ApiMethod;
import com.softlayer.api.annotation.ApiProperty;
import com.softlayer.api.annotation.ApiType;
import com.softlayer.api.service.Entity;
import com.softlayer.api.service.Ticket;
import com.softlayer.api.service.ticket.Update;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;

/**
 * SoftLayer tickets can have have files attached to them. Attaching a file to a ticket is a good way to report issues, provide documentation, and give examples of an issue. Both SoftLayer customers and employees have the ability to attach files to a ticket. The SoftLayer_Ticket_Attachment_File data type models a single file attached to a ticket. 
 *
 * @see SoftLayer_Ticket_Attachment_File
 */
@ApiType("SoftLayer_Ticket_Attachment_File")
public class File extends Entity {

    @ApiProperty
    protected Ticket ticket;

    public Ticket getTicket() {
        return ticket;
    }

    public void setTicket(Ticket ticket) {
        this.ticket = ticket;
    }

    /**
     * The ticket that a file is attached to.
     */
    @ApiProperty
    protected Update update;

    public Update getUpdate() {
        return update;
    }

    public void setUpdate(Update update) {
        this.update = update;
    }

    /**
     * The date a file was originally attached to a ticket.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected GregorianCalendar createDate;

    public GregorianCalendar getCreateDate() {
        return createDate;
    }

    public void setCreateDate(GregorianCalendar createDate) {
        createDateSpecified = true;
        this.createDate = createDate;
    }

    protected boolean createDateSpecified;

    public boolean isCreateDateSpecified() {
        return createDateSpecified;
    }

    public void unsetCreateDate() {
        createDate = null;
        createDateSpecified = false;
    }

    /**
     * The name of a file attached to a ticket.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String fileName;

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        fileNameSpecified = true;
        this.fileName = fileName;
    }

    protected boolean fileNameSpecified;

    public boolean isFileNameSpecified() {
        return fileNameSpecified;
    }

    public void unsetFileName() {
        fileName = null;
        fileNameSpecified = false;
    }

    /**
     * The size of a file attached to a ticket, measured in bytes.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String fileSize;

    public String getFileSize() {
        return fileSize;
    }

    public void setFileSize(String fileSize) {
        fileSizeSpecified = true;
        this.fileSize = fileSize;
    }

    protected boolean fileSizeSpecified;

    public boolean isFileSizeSpecified() {
        return fileSizeSpecified;
    }

    public void unsetFileSize() {
        fileSize = null;
        fileSizeSpecified = false;
    }

    /**
     * A ticket file attachment's internal identifier.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long id;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        idSpecified = true;
        this.id = id;
    }

    protected boolean idSpecified;

    public boolean isIdSpecified() {
        return idSpecified;
    }

    public void unsetId() {
        id = null;
        idSpecified = false;
    }

    /**
     * The date that a file attachment record was last modified.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected GregorianCalendar modifyDate;

    public GregorianCalendar getModifyDate() {
        return modifyDate;
    }

    public void setModifyDate(GregorianCalendar modifyDate) {
        modifyDateSpecified = true;
        this.modifyDate = modifyDate;
    }

    protected boolean modifyDateSpecified;

    public boolean isModifyDateSpecified() {
        return modifyDateSpecified;
    }

    public void unsetModifyDate() {
        modifyDate = null;
        modifyDateSpecified = false;
    }

    /**
     * The internal identifier of the ticket that a file is attached to.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long ticketId;

    public Long getTicketId() {
        return ticketId;
    }

    public void setTicketId(Long ticketId) {
        ticketIdSpecified = true;
        this.ticketId = ticketId;
    }

    protected boolean ticketIdSpecified;

    public boolean isTicketIdSpecified() {
        return ticketIdSpecified;
    }

    public void unsetTicketId() {
        ticketId = null;
        ticketIdSpecified = false;
    }

    /**
     * The internal identifier of the ticket update the attached file is associated with. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long updateId;

    public Long getUpdateId() {
        return updateId;
    }

    public void setUpdateId(Long updateId) {
        updateIdSpecified = true;
        this.updateId = updateId;
    }

    protected boolean updateIdSpecified;

    public boolean isUpdateIdSpecified() {
        return updateIdSpecified;
    }

    public void unsetUpdateId() {
        updateId = null;
        updateIdSpecified = false;
    }

    /**
     * The internal identifier of the user that uploaded a ticket file attachment. This is only used when A file attachment's ''uploaderType'' is set to "USER". 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String uploaderId;

    public String getUploaderId() {
        return uploaderId;
    }

    public void setUploaderId(String uploaderId) {
        uploaderIdSpecified = true;
        this.uploaderId = uploaderId;
    }

    protected boolean uploaderIdSpecified;

    public boolean isUploaderIdSpecified() {
        return uploaderIdSpecified;
    }

    public void unsetUploaderId() {
        uploaderId = null;
        uploaderIdSpecified = false;
    }

    /**
     * The type of user that attached a file to a ticket. This is either "USER" if the file was uploaded by a portal or API user or "EMPLOYEE" if the file was uploaded by a SoftLayer employee. 
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String uploaderType;

    public String getUploaderType() {
        return uploaderType;
    }

    public void setUploaderType(String uploaderType) {
        uploaderTypeSpecified = true;
        this.uploaderType = uploaderType;
    }

    protected boolean uploaderTypeSpecified;

    public boolean isUploaderTypeSpecified() {
        return uploaderTypeSpecified;
    }

    public void unsetUploaderType() {
        uploaderType = null;
        uploaderTypeSpecified = false;
    }

    public Service asService(ApiClient client) {
        return service(client, id);
    }

    public static Service service(ApiClient client) {
        return client.createService(Service.class, null);
    }

    public static Service service(ApiClient client, Long id) {
        return client.createService(Service.class, id == null ? null : id.toString());
    }

    /**
     * @see SoftLayer_Ticket_Attachment_File
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Ticket_Attachment_File")
    public static interface Service extends com.softlayer.api.Service {

        public ServiceAsync asAsync();
        public Mask withNewMask();
        public Mask withMask();
        public void setMask(Mask mask);

        /**
         * @see SoftLayer_Ticket_Attachment_File::getExtensionWhitelist
         */
        @ApiMethod
        public List getExtensionWhitelist();

        /**
         * @see SoftLayer_Ticket_Attachment_File::getObject
         */
        @ApiMethod(instanceRequired = true)
        public File getObject();

        /**
         * @see SoftLayer_Ticket_Attachment_File::getTicket
         */
        @ApiMethod(instanceRequired = true)
        public Ticket getTicket();

        /**
         * The ticket that a file is attached to.
         *
         * @see SoftLayer_Ticket_Attachment_File::getUpdate
         */
        @ApiMethod(instanceRequired = true)
        public Update getUpdate();

    }

    public static interface ServiceAsync extends com.softlayer.api.ServiceAsync {

        public Mask withNewMask();
        public Mask withMask();
        public void setMask(Mask mask);

        /**
         * Async version of {@link Service#getExtensionWhitelist}
         */
        public Future> getExtensionWhitelist();

        public Future getExtensionWhitelist(ResponseHandler> callback);

        /**
         * Async version of {@link Service#getObject}
         */
        public Future getObject();

        public Future getObject(ResponseHandler callback);

        /**
         * Async version of {@link Service#getTicket}
         */
        public Future getTicket();

        /**
         * Async callback version of {@link Service#getTicket}
         */
        public Future getTicket(ResponseHandler callback);

        /**
         * Async version of {@link Service#getUpdate}
         */
        public Future getUpdate();

        /**
         * Async callback version of {@link Service#getUpdate}
         */
        public Future getUpdate(ResponseHandler callback);

    }

    public static class Mask extends com.softlayer.api.service.Entity.Mask {

        public com.softlayer.api.service.Ticket.Mask ticket() {
            return withSubMask("ticket", com.softlayer.api.service.Ticket.Mask.class);
        }

        public com.softlayer.api.service.ticket.Update.Mask update() {
            return withSubMask("update", com.softlayer.api.service.ticket.Update.Mask.class);
        }

        public Mask createDate() {
            withLocalProperty("createDate");
            return this;
        }

        public Mask fileName() {
            withLocalProperty("fileName");
            return this;
        }

        public Mask fileSize() {
            withLocalProperty("fileSize");
            return this;
        }

        public Mask id() {
            withLocalProperty("id");
            return this;
        }

        public Mask modifyDate() {
            withLocalProperty("modifyDate");
            return this;
        }

        public Mask ticketId() {
            withLocalProperty("ticketId");
            return this;
        }

        public Mask updateId() {
            withLocalProperty("updateId");
            return this;
        }

        public Mask uploaderId() {
            withLocalProperty("uploaderId");
            return this;
        }

        public Mask uploaderType() {
            withLocalProperty("uploaderType");
            return this;
        }

    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy