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

com.urbanairship.api.push.model.notification.ios.IOSInterruptionLevel Maven / Gradle / Ivy

There is a newer version: 9.4.2
Show newest version
package com.urbanairship.api.push.model.notification.ios;

import java.util.Optional;

/**
 * Enum of iOS Interruption levels
 */
public enum IOSInterruptionLevel {

    PASSIVE("passive"),
    ACTIVE("active"),
    TIME_SENSITIVE("time-sensitive"),
    CRITICAL("critical");

    private final String interruptionLevel;

    private IOSInterruptionLevel(String interruptionLevel) {
        this.interruptionLevel = interruptionLevel;
    }

    public String getInterruptionLevel() {
        return interruptionLevel;
    }

    public static Optional find(String identifier) {
        for (IOSInterruptionLevel interruptionLevel : values()) {
            if (interruptionLevel.getInterruptionLevel().equals(identifier)) {
                return Optional.of(interruptionLevel);
            }
        }

        return Optional.empty();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy