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

com.urbanairship.api.reports.model.PlatformType Maven / Gradle / Ivy

There is a newer version: 9.3.0
Show newest version
/*
 * Copyright (c) 2013-2016.  Urban Airship and Contributors
 */

package com.urbanairship.api.reports.model;

import com.google.common.base.Optional;

/**
 * @deprecated Marked to be removed in 2.0.0. Urban Airship stopped recommending use of these endpoints in October 2015,
 * so we are now completing their removal from our libraries.
 */
@Deprecated
public enum PlatformType {

    IOS("ios"),
    AMAZON("amazon"),
    ANDROID("android"),
    WEB("web"),
    ALL("all"),
    VARIANT("variant");

    private final String identifier;

    private PlatformType(String identifier) {
        this.identifier = identifier;
    }

    public static Optional find(String identifier) {
        for (PlatformType deviceType : values()) {
            if (deviceType.getIdentifier().equals(identifier)) {
                return Optional.of(deviceType);
            }
        }

        return Optional.absent();
    }

    public String getIdentifier() {
        return identifier;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy