package com.creatubbles.api.model.partner_application;

import android.support.annotation.NonNull;

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

/**
 * @author Pawel Szymanski
 */
public enum VideoProvider {
    NONE(""),
    YOUTUBE("youtube"),
    VIMEO("vimeo");

    private String name;

    @JsonCreator
    VideoProvider(String name) {
        this.name = name;
    }

    @JsonValue
    @NonNull
    public String getName() {
        return name;
    }
}

@@ -317,18 +317,39 @@
 %22vimeo%22)
+,%0A    DIRECT(%22ctbs3%22)
 ;%0A
-
 %0A    pri
@@ -371,25 +371,8 @@
 e;%0A%0A
-    @JsonCreator%0A
     
@@ -396,24 +396,24 @@
 ing name) %7B%0A
-
         this
@@ -433,16 +433,285 @@
 %0A    %7D%0A%0A
+    @JsonCreator%0A    public static VideoProvider fromName(String name) %7B%0A        for (VideoProvider videoProvider : values()) %7B%0A            if (videoProvider.name.equals(name)) %7B%0A                return videoProvider;%0A            %7D%0A        %7D%0A        return NONE;%0A    %7D%0A%0A
     @Jso

Add new partner video provider type