package com.djhk.uav.uav.enums;

import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonValue;

import java.util.Arrays;

/**
 * @author jiachengshuai
 * @version 1.4
 * @date 2023/3/3
 */
public enum SyunCameraModeEnum {

    PHOTO, VIDEO;

    @JsonValue
    public int getVal() {
        return ordinal();
    }

    @JsonCreator
    public static SyunCameraModeEnum find(int val) {
        return Arrays.stream(values()).filter(modeEnum -> modeEnum.ordinal() == val).findAny().get();
    }
}
