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

com.softlayer.api.service.network.media.transcode.Job Maven / Gradle / Ivy

There is a newer version: 0.3.4
Show newest version
package com.softlayer.api.service.network.media.transcode;

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.container.network.media.transcode.job.Watermark;
import com.softlayer.api.service.network.media.transcode.Account;
import com.softlayer.api.service.network.media.transcode.job.History;
import com.softlayer.api.service.network.media.transcode.job.Status;
import com.softlayer.api.service.user.Customer;
import java.util.ArrayList;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.concurrent.Future;

/**
 * The SoftLayer_Network_Media_Transcode_Job contains information regarding a transcode job such as input file, output format, user id and so on. 
 *
 * @see SoftLayer_Network_Media_Transcode_Job
 */
@ApiType("SoftLayer_Network_Media_Transcode_Job")
public class Job extends Entity {

    @ApiProperty
    protected List history;

    public List getHistory() {
        if (history == null) {
            history = new ArrayList();
        }
        return history;
    }

    /**
     * The transcode service account
     */
    @ApiProperty
    protected Account transcodeAccount;

    public Account getTranscodeAccount() {
        return transcodeAccount;
    }

    public void setTranscodeAccount(Account transcodeAccount) {
        this.transcodeAccount = transcodeAccount;
    }

    /**
     * The status information of a transcode job
     */
    @ApiProperty
    protected Status transcodeStatus;

    public Status getTranscodeStatus() {
        return transcodeStatus;
    }

    public void setTranscodeStatus(Status transcodeStatus) {
        this.transcodeStatus = transcodeStatus;
    }

    /**
     * The status of a transcode job
     */
    @ApiProperty
    protected String transcodeStatusName;

    public String getTranscodeStatusName() {
        return transcodeStatusName;
    }

    public void setTranscodeStatusName(String transcodeStatusName) {
        this.transcodeStatusName = transcodeStatusName;
    }

    /**
     * The SoftLayer user that created the transcode job
     */
    @ApiProperty
    protected Customer user;

    public Customer getUser() {
        return user;
    }

    public void setUser(Customer user) {
        this.user = user;
    }

    /**
     * The auto-deletion duration in seconds.  This value determines how long the input file will be kept on the storage.
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long autoDeleteDuration;

    public Long getAutoDeleteDuration() {
        return autoDeleteDuration;
    }

    public void setAutoDeleteDuration(Long autoDeleteDuration) {
        autoDeleteDurationSpecified = true;
        this.autoDeleteDuration = autoDeleteDuration;
    }

    protected boolean autoDeleteDurationSpecified;

    public boolean isAutoDeleteDurationSpecified() {
        return autoDeleteDurationSpecified;
    }

    public void unsetAutoDeleteDuration() {
        autoDeleteDuration = null;
        autoDeleteDurationSpecified = false;
    }

    /**
     * The size of an input file in byte
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long byteIn;

    public Long getByteIn() {
        return byteIn;
    }

    public void setByteIn(Long byteIn) {
        byteInSpecified = true;
        this.byteIn = byteIn;
    }

    protected boolean byteInSpecified;

    public boolean isByteInSpecified() {
        return byteInSpecified;
    }

    public void unsetByteIn() {
        byteIn = null;
        byteInSpecified = false;
    }

    /**
     * The created date
     */
    @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 internal identifier of a transcode job
     */
    @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 input file name
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String inputFile;

    public String getInputFile() {
        return inputFile;
    }

    public void setInputFile(String inputFile) {
        inputFileSpecified = true;
        this.inputFile = inputFile;
    }

    protected boolean inputFileSpecified;

    public boolean isInputFileSpecified() {
        return inputFileSpecified;
    }

    public void unsetInputFile() {
        inputFile = null;
        inputFileSpecified = false;
    }

    /**
     * The last modified date
     */
    @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 name of a transcode job
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String name;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        nameSpecified = true;
        this.name = name;
    }

    protected boolean nameSpecified;

    public boolean isNameSpecified() {
        return nameSpecified;
    }

    public void unsetName() {
        name = null;
        nameSpecified = false;
    }

    /**
     * The output file name
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String outputFile;

    public String getOutputFile() {
        return outputFile;
    }

    public void setOutputFile(String outputFile) {
        outputFileSpecified = true;
        this.outputFile = outputFile;
    }

    protected boolean outputFileSpecified;

    public boolean isOutputFileSpecified() {
        return outputFileSpecified;
    }

    public void unsetOutputFile() {
        outputFile = null;
        outputFileSpecified = false;
    }

    /**
     * The internal identifier of SoftLayer account
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long transcodeAccountId;

    public Long getTranscodeAccountId() {
        return transcodeAccountId;
    }

    public void setTranscodeAccountId(Long transcodeAccountId) {
        transcodeAccountIdSpecified = true;
        this.transcodeAccountId = transcodeAccountId;
    }

    protected boolean transcodeAccountIdSpecified;

    public boolean isTranscodeAccountIdSpecified() {
        return transcodeAccountIdSpecified;
    }

    public void unsetTranscodeAccountId() {
        transcodeAccountId = null;
        transcodeAccountIdSpecified = false;
    }

    /**
     * The unique id of a transcode job
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String transcodeJobGuid;

    public String getTranscodeJobGuid() {
        return transcodeJobGuid;
    }

    public void setTranscodeJobGuid(String transcodeJobGuid) {
        transcodeJobGuidSpecified = true;
        this.transcodeJobGuid = transcodeJobGuid;
    }

    protected boolean transcodeJobGuidSpecified;

    public boolean isTranscodeJobGuidSpecified() {
        return transcodeJobGuidSpecified;
    }

    public void unsetTranscodeJobGuid() {
        transcodeJobGuid = null;
        transcodeJobGuidSpecified = false;
    }

    /**
     * The unique id of a pre-defined output format
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String transcodePresetGuid;

    public String getTranscodePresetGuid() {
        return transcodePresetGuid;
    }

    public void setTranscodePresetGuid(String transcodePresetGuid) {
        transcodePresetGuidSpecified = true;
        this.transcodePresetGuid = transcodePresetGuid;
    }

    protected boolean transcodePresetGuidSpecified;

    public boolean isTranscodePresetGuidSpecified() {
        return transcodePresetGuidSpecified;
    }

    public void unsetTranscodePresetGuid() {
        transcodePresetGuid = null;
        transcodePresetGuidSpecified = false;
    }

    /**
     * The name of a transcode output preset
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected String transcodePresetName;

    public String getTranscodePresetName() {
        return transcodePresetName;
    }

    public void setTranscodePresetName(String transcodePresetName) {
        transcodePresetNameSpecified = true;
        this.transcodePresetName = transcodePresetName;
    }

    protected boolean transcodePresetNameSpecified;

    public boolean isTranscodePresetNameSpecified() {
        return transcodePresetNameSpecified;
    }

    public void unsetTranscodePresetName() {
        transcodePresetName = null;
        transcodePresetNameSpecified = false;
    }

    /**
     * The internal identifier of a transcode status
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long transcodeStatusId;

    public Long getTranscodeStatusId() {
        return transcodeStatusId;
    }

    public void setTranscodeStatusId(Long transcodeStatusId) {
        transcodeStatusIdSpecified = true;
        this.transcodeStatusId = transcodeStatusId;
    }

    protected boolean transcodeStatusIdSpecified;

    public boolean isTranscodeStatusIdSpecified() {
        return transcodeStatusIdSpecified;
    }

    public void unsetTranscodeStatusId() {
        transcodeStatusId = null;
        transcodeStatusIdSpecified = false;
    }

    /**
     * The internal identifier of the user who created a transcode job
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Long userId;

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        userIdSpecified = true;
        this.userId = userId;
    }

    protected boolean userIdSpecified;

    public boolean isUserIdSpecified() {
        return userIdSpecified;
    }

    public void unsetUserId() {
        userId = null;
        userIdSpecified = false;
    }

    /**
     * Watermark to apply to job
     */
    @ApiProperty(canBeNullOrNotSet = true)
    protected Watermark watermark;

    public Watermark getWatermark() {
        return watermark;
    }

    public void setWatermark(Watermark watermark) {
        watermarkSpecified = true;
        this.watermark = watermark;
    }

    protected boolean watermarkSpecified;

    public boolean isWatermarkSpecified() {
        return watermarkSpecified;
    }

    public void unsetWatermark() {
        watermark = null;
        watermarkSpecified = false;
    }

    /**
     * A count of 
     */
    @ApiProperty
    protected Long historyCount;

    public Long getHistoryCount() {
        return historyCount;
    }

    public void setHistoryCount(Long historyCount) {
        this.historyCount = historyCount;
    }

    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());
    }

    /**
     * SoftLayer_Network_Media_Transcode_Job holds information on a transcode job. To create a transcode job, use a [[SoftLayer_Network_Media_Transcode_Account|Transcode account]] object. 
     *
     * @see SoftLayer_Network_Media_Transcode_Job
     */
    @com.softlayer.api.annotation.ApiService("SoftLayer_Network_Media_Transcode_Job")
    public static interface Service extends com.softlayer.api.Service {

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

        /**
         * With this method, you can create a transcode job. 
*
* The very first step of creating a transcode job is to upload your media files to the /in directory on your Transcode FTP space. Then, you have to pass a [[SoftLayer_Network_Media_Transcode_Job|Transcode job]] object as a parameter for this method.
*
* There are 4 required properties of SoftLayer_Network_Media_Transcode_Job object: transcodePresetName, transcodePresetGuid, inputFile, and outputFile. A transcode preset is a configuration that defines a certain media output. You can retrieve all the supported presets with the [[SoftLayer_Network_Media_Transcode_Account::getPresets|getPresets]] method. You can also use [[SoftLayer_Network_Media_Transcode_Account::getPresetDetail|getPresetDetail]] method to get more information on a preset. Use these two methods to determine appropriate values for "transcodePresetName" and "transcodePresetGuid" properties. For an "inputFile", you must specify a file that exists in the /in directory of your Transcode FTP space. An "outputFile" name will be used by the Transcode server for naming a transcoded file. An output file name must be in /out directory. If your outputFile name already exists in the /out directory, the Transcode server will append a file name with _n (an underscore and the total number of files with the identical name plus 1).
*
* The "name" property is optional and it can help you keep track of transcode jobs easily. "autoDeleteDuration" is another optional property that you can specify. It determines how soon your input file will be deleted. If autoDeleteDuration is set to zero, your input file will be removed immediately after the last transcode job running on it is completed. A value for autoDeleteDuration property is in seconds and the maximum value is 259200 which is 3 days.
*
* An example SoftLayer_Network_Media_Transcode_Job parameter looks like this:
*
*
* * name: My transcoding
* * transcodePresetName: F4V 896kbps 640x352 16x9 29.97fps
* * transcodePresetGuid: {87E01268-C3E3-4A85-9701-052C9AC42BD4}
* * inputFile: /in/my_birthday.wmv
* * outputFile: /out/my_birthday_flash
*
*
* Notice that an output file does not have a file extension. The Transcode server will append a file extension based on an output format. A newly created transcode job will be in "Pending" status and it will be added to the Transcoding queue. You will receive a notification email whenever there is a status change on your transcode job. For example, the Transcode server starts to process your transcode job, you will be notified via an email.
*
* You can add up to 3 pending jobs at a time. Transcode jobs with any other status such as "Complete" or "Error" will not be counted toward your pending jobs.
*
* Once a job is complete, the Transcode server will place the output file into the /out directory along with a notification email. The files in the /out directory will be removed 3 days after they were created. You will need to use an FTP client to download transcoded files.
*
* * * @see SoftLayer_Network_Media_Transcode_Job::createObject */ @ApiMethod public Job createObject(Job templateObject); /** * @see SoftLayer_Network_Media_Transcode_Job::getObject */ @ApiMethod(instanceRequired = true) public Job getObject(); /** * @see SoftLayer_Network_Media_Transcode_Job::getHistory */ @ApiMethod(instanceRequired = true) public List getHistory(); /** * The transcode service account * * @see SoftLayer_Network_Media_Transcode_Job::getTranscodeAccount */ @ApiMethod(instanceRequired = true) public Account getTranscodeAccount(); /** * The status information of a transcode job * * @see SoftLayer_Network_Media_Transcode_Job::getTranscodeStatus */ @ApiMethod(instanceRequired = true) public Status getTranscodeStatus(); /** * The status of a transcode job * * @see SoftLayer_Network_Media_Transcode_Job::getTranscodeStatusName */ @ApiMethod(instanceRequired = true) public String getTranscodeStatusName(); /** * The SoftLayer user that created the transcode job * * @see SoftLayer_Network_Media_Transcode_Job::getUser */ @ApiMethod(instanceRequired = true) public Customer getUser(); } 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#createObject} */ public Future createObject(Job templateObject); public Future createObject(Job templateObject, ResponseHandler callback); /** * Async version of {@link Service#getObject} */ public Future getObject(); public Future getObject(ResponseHandler callback); /** * Async version of {@link Service#getHistory} */ public Future> getHistory(); /** * Async callback version of {@link Service#getHistory} */ public Future getHistory(ResponseHandler> callback); /** * Async version of {@link Service#getTranscodeAccount} */ public Future getTranscodeAccount(); /** * Async callback version of {@link Service#getTranscodeAccount} */ public Future getTranscodeAccount(ResponseHandler callback); /** * Async version of {@link Service#getTranscodeStatus} */ public Future getTranscodeStatus(); /** * Async callback version of {@link Service#getTranscodeStatus} */ public Future getTranscodeStatus(ResponseHandler callback); /** * Async version of {@link Service#getTranscodeStatusName} */ public Future getTranscodeStatusName(); /** * Async callback version of {@link Service#getTranscodeStatusName} */ public Future getTranscodeStatusName(ResponseHandler callback); /** * Async version of {@link Service#getUser} */ public Future getUser(); /** * Async callback version of {@link Service#getUser} */ public Future getUser(ResponseHandler callback); } public static class Mask extends com.softlayer.api.service.Entity.Mask { public com.softlayer.api.service.network.media.transcode.job.History.Mask history() { return withSubMask("history", com.softlayer.api.service.network.media.transcode.job.History.Mask.class); } public Account.Mask transcodeAccount() { return withSubMask("transcodeAccount", Account.Mask.class); } public com.softlayer.api.service.network.media.transcode.job.Status.Mask transcodeStatus() { return withSubMask("transcodeStatus", com.softlayer.api.service.network.media.transcode.job.Status.Mask.class); } public Mask transcodeStatusName() { withLocalProperty("transcodeStatusName"); return this; } public com.softlayer.api.service.user.Customer.Mask user() { return withSubMask("user", com.softlayer.api.service.user.Customer.Mask.class); } public Mask autoDeleteDuration() { withLocalProperty("autoDeleteDuration"); return this; } public Mask byteIn() { withLocalProperty("byteIn"); return this; } public Mask createDate() { withLocalProperty("createDate"); return this; } public Mask id() { withLocalProperty("id"); return this; } public Mask inputFile() { withLocalProperty("inputFile"); return this; } public Mask modifyDate() { withLocalProperty("modifyDate"); return this; } public Mask name() { withLocalProperty("name"); return this; } public Mask outputFile() { withLocalProperty("outputFile"); return this; } public Mask transcodeAccountId() { withLocalProperty("transcodeAccountId"); return this; } public Mask transcodeJobGuid() { withLocalProperty("transcodeJobGuid"); return this; } public Mask transcodePresetGuid() { withLocalProperty("transcodePresetGuid"); return this; } public Mask transcodePresetName() { withLocalProperty("transcodePresetName"); return this; } public Mask transcodeStatusId() { withLocalProperty("transcodeStatusId"); return this; } public Mask userId() { withLocalProperty("userId"); return this; } public com.softlayer.api.service.container.network.media.transcode.job.Watermark.Mask watermark() { return withSubMask("watermark", com.softlayer.api.service.container.network.media.transcode.job.Watermark.Mask.class); } public Mask historyCount() { withLocalProperty("historyCount"); return this; } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy