001/*
002 * Copyright 2015 Aroma Tech.
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *      http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016
017package tech.aroma.client;
018
019import tech.sirwellington.alchemy.annotations.arguments.NonNull;
020
021/*
022 * This class exists to give some Schema Isolation to Clients from any changes that happen in the Thrift Specification.
023 */
024/**
025 * Describes how important a message is.
026 * 
027 * @author SirWellington
028 */
029public enum Urgency
030{
031  
032    /**
033     * LOW Messages are like an FYI; they are not important but you may want to know
034     * about it. For example, a new user sign-up for your service, or a post was flagged by a user.
035     */
036    LOW(tech.aroma.thrift.Urgency.LOW),
037    
038    /**
039     * MEDIUM Messages are considered Important.
040     */
041    MEDIUM(tech.aroma.thrift.Urgency.MEDIUM),
042   
043    /**
044     * HIGH messages typically indicate Show-Stopping events, such as a Database going down,
045     * or a network connection issue.
046     */
047    HIGH(tech.aroma.thrift.Urgency.HIGH);
048
049    private final tech.aroma.thrift.Urgency thriftUrgency;
050
051    private Urgency(@NonNull tech.aroma.thrift.Urgency thriftUrgency)
052    {
053        this.thriftUrgency = thriftUrgency;
054    }
055    
056    /**
057     * Map to the underlying Thrift version.
058     *
059     * @return
060     */
061    tech.aroma.thrift.Urgency toThrift()
062    {
063        return thriftUrgency;
064    }
065}