package com.vimeo.networking.model.notifications;

import org.jetbrains.annotations.NotNull;

/**
 * A simple enum describing notification types
 * Created by zetterstromk on 1/11/17.
 */
public enum NotificationType {
    NOTIFICATION_TYPE_COMMENT,
    NOTIFICATION_TYPE_CREDIT,
    NOTIFICATION_TYPE_FOLLOW,
    NOTIFICATION_TYPE_LIKE,
    NOTIFICATION_TYPE_REPLY,
    NOTIFICATION_TYPE_VIDEO_AVAILABLE,
    NOTIFICATION_TYPE_UNKNOWN;

    @NotNull
    public static NotificationType notificationTypeFromString(@NotNull String type) {
        switch (type) {
            case NotificationConstants.NOTIFICATION_COMMENT:
                return NOTIFICATION_TYPE_COMMENT;
            case NotificationConstants.NOTIFICATION_CREDIT:
                return NOTIFICATION_TYPE_CREDIT;
            case NotificationConstants.NOTIFICATION_FOLLOW:
                return NOTIFICATION_TYPE_FOLLOW;
            case NotificationConstants.NOTIFICATION_LIKE:
                return NOTIFICATION_TYPE_LIKE;
            case NotificationConstants.NOTIFICATION_REPLY:
                return NOTIFICATION_TYPE_REPLY;
            case NotificationConstants.NOTIFICATION_VIDEO_AVAILABLE:
                return NOTIFICATION_TYPE_VIDEO_AVAILABLE;
            default:
                return NOTIFICATION_TYPE_UNKNOWN;
        }
    }

}

@@ -85,16 +85,59 @@
 NotNull;
+%0Aimport org.jetbrains.annotations.Nullable;
 %0A%0A/**%0A *
@@ -1353,10 +1353,1014 @@
 %0A    %7D%0A%0A
+    @Override%0A    public String toString() %7B%0A        return stringFromNotificationType(this);%0A    %7D%0A%0A    @Nullable%0A    public static String stringFromNotificationType(@NotNull NotificationType type) %7B%0A        switch (type) %7B%0A            case NOTIFICATION_TYPE_COMMENT:%0A                return NotificationConstants.NOTIFICATION_COMMENT;%0A            case NOTIFICATION_TYPE_CREDIT:%0A                return NotificationConstants.NOTIFICATION_CREDIT;%0A            case NOTIFICATION_TYPE_FOLLOW:%0A                return NotificationConstants.NOTIFICATION_FOLLOW;%0A            case NOTIFICATION_TYPE_LIKE:%0A                return NotificationConstants.NOTIFICATION_LIKE;%0A            case NOTIFICATION_TYPE_REPLY:%0A                return NotificationConstants.NOTIFICATION_REPLY;%0A            case NOTIFICATION_TYPE_VIDEO_AVAILABLE:%0A                return NotificationConstants.NOTIFICATION_VIDEO_AVAILABLE;%0A            case NOTIFICATION_TYPE_UNKNOWN:%0A            default:%0A                return null;%0A        %7D%0A    %7D%0A%0A
 %7D%0A

add toString