package no.stelar7.api.r4j.basic.constants.api.regions;

import no.stelar7.api.r4j.basic.constants.types.RealmSpesificEnum;

import java.util.Optional;
import java.util.stream.Stream;

public enum RuneterraShard implements RealmSpesificEnum
{
    /**
     * Unknown platform
     */
    UNKNOWN("", ""),
    /**
     * North america
     */
    AMERICAS("AMERICAS", "americas"),
    /**
     * Europe
     */
    EUROPE("EUROPE", "europe"),
    /**
     * Asia
     */
    ASIA("ASIA", "asia"),
    /**
     * SEA
     */
    SEA("SEA", "SEA");
    
    private final String[] key;
    
    RuneterraShard(String... s)
    {
        this.key = s;
    }
    
    /**
     * Returns a Platform from the provided code
     *
     * @param code the lookup key
     * @return Platform from code
     */
    public static Optional<RuneterraShard> getFromCode(final String code)
    {
        return Stream.of(RuneterraShard.values()).filter(t -> t.key[0].equalsIgnoreCase(code)).findFirst();
    }
    
    
    /**
     * Used internaly in the api...
     *
     * @return the value
     */
    public String getValue()
    {
        return this.key[0];
    }
    
    /**
     * Used internaly in the api...
     *
     * @return the value
     */
    @Override
    public String getRealmValue()
    {
        return this.key[1];
    }
    
    @Override
    public String toString()
    {
        return this.getValue();
    }
}

@@ -458,24 +458,40 @@
 sia%0A     */%0A
+    @Deprecated%0A
     ASIA(%22AS
@@ -539,25 +539,102 @@
     
-SEA(%22SEA%22, %22SEA%22)
+@Deprecated%0A    SEA(%22SEA%22, %22sea%22),%0A    /**%0A     * Asia-Pacific%0A     */%0A    APAC(%22SEA%22, %22sea%22),
 ;%0A  

Update shard enum to APAC