commit
92c3171f54
@ -0,0 +1,32 @@ |
||||
package com.github.catvod.bean.ali; |
||||
|
||||
import android.text.TextUtils; |
||||
|
||||
import com.google.gson.Gson; |
||||
import com.google.gson.annotations.SerializedName; |
||||
|
||||
public class Download { |
||||
|
||||
@SerializedName("url") |
||||
private String url; |
||||
@SerializedName("file_id") |
||||
private String fileId; |
||||
@SerializedName("expiration") |
||||
private String expiration; |
||||
|
||||
public static Download objectFrom(String str) { |
||||
return new Gson().fromJson(str, Download.class); |
||||
} |
||||
|
||||
public String getUrl() { |
||||
return TextUtils.isEmpty(url) ? "" : url; |
||||
} |
||||
|
||||
public String getFileId() { |
||||
return TextUtils.isEmpty(fileId) ? "" : fileId; |
||||
} |
||||
|
||||
public String getExpiration() { |
||||
return TextUtils.isEmpty(expiration) ? "" : expiration; |
||||
} |
||||
} |
||||
@ -0,0 +1,84 @@ |
||||
package com.github.catvod.bean.ali; |
||||
|
||||
import android.text.TextUtils; |
||||
|
||||
import com.github.catvod.bean.Sub; |
||||
import com.google.gson.Gson; |
||||
import com.google.gson.annotations.SerializedName; |
||||
|
||||
import java.util.Collections; |
||||
import java.util.List; |
||||
|
||||
public class Preview { |
||||
|
||||
@SerializedName("video_preview_play_info") |
||||
private Info videoPreviewPlayInfo; |
||||
@SerializedName("drive_id") |
||||
private String driveId; |
||||
@SerializedName("file_id") |
||||
private String fileId; |
||||
|
||||
public static Preview objectFrom(String str) { |
||||
return new Gson().fromJson(str, Preview.class); |
||||
} |
||||
|
||||
public Info getVideoPreviewPlayInfo() { |
||||
return videoPreviewPlayInfo == null ? new Info() : videoPreviewPlayInfo; |
||||
} |
||||
|
||||
public String getDriveId() { |
||||
return TextUtils.isEmpty(driveId) ? "" : driveId; |
||||
} |
||||
|
||||
public String getFileId() { |
||||
return TextUtils.isEmpty(fileId) ? "" : fileId; |
||||
} |
||||
|
||||
public static class Info { |
||||
|
||||
@SerializedName("live_transcoding_task_list") |
||||
private List<LiveTranscodingTask> liveTranscodingTaskList; |
||||
@SerializedName("live_transcoding_subtitle_task_list") |
||||
private List<LiveTranscodingTask> liveTranscodingSubtitleTaskList; |
||||
|
||||
public List<LiveTranscodingTask> getLiveTranscodingTaskList() { |
||||
return liveTranscodingTaskList == null ? Collections.emptyList() : liveTranscodingTaskList; |
||||
} |
||||
|
||||
public List<LiveTranscodingTask> getLiveTranscodingSubtitleTaskList() { |
||||
return liveTranscodingSubtitleTaskList == null ? Collections.emptyList() : liveTranscodingSubtitleTaskList; |
||||
} |
||||
} |
||||
|
||||
public static class LiveTranscodingTask { |
||||
|
||||
@SerializedName("template_id") |
||||
private String templateId; |
||||
@SerializedName("language") |
||||
private String language; |
||||
@SerializedName("status") |
||||
private String status; |
||||
@SerializedName("url") |
||||
private String url; |
||||
|
||||
public String getTemplateId() { |
||||
return TextUtils.isEmpty(templateId) ? "" : templateId; |
||||
} |
||||
|
||||
public String getLanguage() { |
||||
return TextUtils.isEmpty(language) ? "" : language; |
||||
} |
||||
|
||||
public String getStatus() { |
||||
return TextUtils.isEmpty(status) ? "" : status; |
||||
} |
||||
|
||||
public String getUrl() { |
||||
return TextUtils.isEmpty(url) ? "" : url; |
||||
} |
||||
|
||||
public Sub getSub() { |
||||
return Sub.create().url(getUrl()).name(getLanguage()).lang(getLanguage()).ext("vtt"); |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,79 @@ |
||||
package com.github.catvod.bean.ali; |
||||
|
||||
import android.text.TextUtils; |
||||
|
||||
import com.google.gson.Gson; |
||||
import com.google.gson.annotations.SerializedName; |
||||
|
||||
import java.util.Collections; |
||||
import java.util.List; |
||||
|
||||
public class Res { |
||||
|
||||
@SerializedName("responses") |
||||
private List<Res> responses; |
||||
@SerializedName("body") |
||||
private Body body; |
||||
@SerializedName("id") |
||||
private String id; |
||||
@SerializedName("status") |
||||
private int status; |
||||
|
||||
public static Res objectFrom(String str) { |
||||
return new Gson().fromJson(str, Res.class); |
||||
} |
||||
|
||||
public List<Res> getResponses() { |
||||
return responses == null ? Collections.emptyList() : responses; |
||||
} |
||||
|
||||
public Res getResponse() { |
||||
return getResponses().isEmpty() ? new Res() : getResponses().get(0); |
||||
} |
||||
|
||||
public Body getBody() { |
||||
return body == null ? new Body() : body; |
||||
} |
||||
|
||||
public String getId() { |
||||
return TextUtils.isEmpty(id) ? "" : id; |
||||
} |
||||
|
||||
public int getStatus() { |
||||
return status; |
||||
} |
||||
|
||||
public static class Body { |
||||
|
||||
@SerializedName("domain_id") |
||||
private String domainId; |
||||
@SerializedName("drive_id") |
||||
private String driveId; |
||||
@SerializedName("file_id") |
||||
private String fileId; |
||||
@SerializedName("code") |
||||
private String code; |
||||
@SerializedName("message") |
||||
private String message; |
||||
|
||||
public String getDomainId() { |
||||
return TextUtils.isEmpty(domainId) ? "" : domainId; |
||||
} |
||||
|
||||
public String getDriveId() { |
||||
return TextUtils.isEmpty(driveId) ? "" : driveId; |
||||
} |
||||
|
||||
public String getFileId() { |
||||
return TextUtils.isEmpty(fileId) ? "" : fileId; |
||||
} |
||||
|
||||
public String getCode() { |
||||
return TextUtils.isEmpty(code) ? "" : code; |
||||
} |
||||
|
||||
public String getMessage() { |
||||
return TextUtils.isEmpty(message) ? "" : message; |
||||
} |
||||
} |
||||
} |
||||
@ -0,0 +1,108 @@ |
||||
package com.github.catvod.bean.ali; |
||||
|
||||
import android.text.TextUtils; |
||||
|
||||
import com.google.gson.Gson; |
||||
import com.google.gson.annotations.SerializedName; |
||||
|
||||
import java.util.Collections; |
||||
import java.util.List; |
||||
|
||||
public class Share { |
||||
|
||||
@SerializedName("share_token") |
||||
private String shareToken; |
||||
@SerializedName("expire_time") |
||||
private String expireTime; |
||||
@SerializedName("expires_in") |
||||
private int expiresIn; |
||||
|
||||
@SerializedName("creator_id") |
||||
private String creatorId; |
||||
@SerializedName("creator_name") |
||||
private String creatorName; |
||||
@SerializedName("creator_phone") |
||||
private String creatorPhone; |
||||
@SerializedName("expiration") |
||||
private String expiration; |
||||
@SerializedName("updated_at") |
||||
private String updatedAt; |
||||
@SerializedName("vip") |
||||
private String vip; |
||||
@SerializedName("avatar") |
||||
private String avatar; |
||||
@SerializedName("share_name") |
||||
private String shareName; |
||||
@SerializedName("display_name") |
||||
private String displayName; |
||||
@SerializedName("share_title") |
||||
private String shareTitle; |
||||
@SerializedName("has_pwd") |
||||
private boolean hasPwd; |
||||
@SerializedName("file_infos") |
||||
private List<Item> fileInfos; |
||||
|
||||
public static Share objectFrom(String str) { |
||||
return new Gson().fromJson(str, Share.class); |
||||
} |
||||
|
||||
public String getShareToken() { |
||||
return TextUtils.isEmpty(shareToken) ? "" : shareToken; |
||||
} |
||||
|
||||
public String getExpireTime() { |
||||
return TextUtils.isEmpty(expireTime) ? "" : expireTime; |
||||
} |
||||
|
||||
public int getExpiresIn() { |
||||
return expiresIn; |
||||
} |
||||
|
||||
public String getCreatorId() { |
||||
return TextUtils.isEmpty(creatorId) ? "" : creatorId; |
||||
} |
||||
|
||||
public String getCreatorName() { |
||||
return TextUtils.isEmpty(creatorName) ? "" : creatorName; |
||||
} |
||||
|
||||
public String getCreatorPhone() { |
||||
return TextUtils.isEmpty(creatorPhone) ? "" : creatorPhone; |
||||
} |
||||
|
||||
public String getExpiration() { |
||||
return TextUtils.isEmpty(expiration) ? "" : expiration; |
||||
} |
||||
|
||||
public String getUpdatedAt() { |
||||
return TextUtils.isEmpty(updatedAt) ? "" : updatedAt; |
||||
} |
||||
|
||||
public String getVip() { |
||||
return TextUtils.isEmpty(vip) ? "" : vip; |
||||
} |
||||
|
||||
public String getAvatar() { |
||||
return TextUtils.isEmpty(avatar) ? "" : avatar; |
||||
} |
||||
|
||||
public String getShareName() { |
||||
return TextUtils.isEmpty(shareName) ? "" : shareName; |
||||
} |
||||
|
||||
public String getDisplayName() { |
||||
return TextUtils.isEmpty(displayName) ? "" : displayName; |
||||
} |
||||
|
||||
public String getShareTitle() { |
||||
return TextUtils.isEmpty(shareTitle) ? "" : shareTitle; |
||||
} |
||||
|
||||
public boolean isHasPwd() { |
||||
return hasPwd; |
||||
} |
||||
|
||||
public List<Item> getFileInfos() { |
||||
return fileInfos == null ? Collections.emptyList() : fileInfos; |
||||
} |
||||
} |
||||
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue