18 changed files with 231 additions and 34 deletions
@ -0,0 +1,36 @@ |
|||||
|
package org.dromara.common.sdk.cloudapi.media; |
||||
|
|
||||
|
import com.fasterxml.jackson.annotation.JsonCreator; |
||||
|
import com.fasterxml.jackson.annotation.JsonValue; |
||||
|
import org.dromara.common.sdk.exception.CloudSDKException; |
||||
|
|
||||
|
import java.util.Arrays; |
||||
|
|
||||
|
/** |
||||
|
* @author sean |
||||
|
* @version 1.3 |
||||
|
* @date 2022/11/14 |
||||
|
*/ |
||||
|
public enum FilghtTypeEnum { |
||||
|
|
||||
|
ROUTE(0), |
||||
|
|
||||
|
ONECLIKE(1); |
||||
|
|
||||
|
private final int type; |
||||
|
|
||||
|
FilghtTypeEnum(int type) { |
||||
|
this.type = type; |
||||
|
} |
||||
|
|
||||
|
@JsonValue |
||||
|
public int getType() { |
||||
|
return type; |
||||
|
} |
||||
|
|
||||
|
@JsonCreator |
||||
|
public static FilghtTypeEnum find(int type) { |
||||
|
return Arrays.stream(values()).filter(subFile -> subFile.type == type).findAny() |
||||
|
.orElseThrow(() -> new CloudSDKException(MediaSubFileTypeEnum.class, type)); |
||||
|
} |
||||
|
} |
@ -0,0 +1,54 @@ |
|||||
|
package org.dromara.common.sdk.cloudapi.media; |
||||
|
|
||||
|
/** |
||||
|
* @author sean |
||||
|
* @version 1.1 |
||||
|
* @date 2022/6/9 |
||||
|
*/ |
||||
|
public class FlightTask { |
||||
|
|
||||
|
private Integer uploadedFileCount; |
||||
|
|
||||
|
private Integer expectedFileCount; |
||||
|
|
||||
|
private FilghtTypeEnum flightType; |
||||
|
|
||||
|
|
||||
|
public FlightTask() { |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return "FlightTask{" + |
||||
|
"uploadedFileCount=" + uploadedFileCount + |
||||
|
", expectedFileCount=" + expectedFileCount + |
||||
|
", flightType=" + flightType + |
||||
|
'}'; |
||||
|
} |
||||
|
|
||||
|
public Integer getUploadedFileCount() { |
||||
|
return uploadedFileCount; |
||||
|
} |
||||
|
|
||||
|
public void setUploadedFileCount(Integer uploadedFileCount) { |
||||
|
this.uploadedFileCount = uploadedFileCount; |
||||
|
} |
||||
|
|
||||
|
public Integer getExpectedFileCount() { |
||||
|
return expectedFileCount; |
||||
|
} |
||||
|
|
||||
|
public void setExpectedFileCount(Integer expectedFileCount) { |
||||
|
this.expectedFileCount = expectedFileCount; |
||||
|
} |
||||
|
|
||||
|
public FilghtTypeEnum getFlightType() { |
||||
|
return flightType; |
||||
|
} |
||||
|
|
||||
|
public void setFlightType(FilghtTypeEnum flightType) { |
||||
|
this.flightType = flightType; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
Loading…
Reference in new issue