package com.qiniu.common;

/**
 * 上传多区域
 */
public abstract class Zone {

    public static Zone zone0() {
        return new FixedZone("http://up.qiniu.com", "http://upload.qiniu.com",
                "", "http://rs.qbox.me", "http://rsf.qbox.me", "http://iovip.qbox.me",
                "https://up.qbox.me", "http://api.qiniu.com");
    }

    public static Zone zone1() {
        return new FixedZone("http://up-z1.qiniu.com", "http://upload-z1.qiniu.com",
                "", "http://rs-z1.qbox.me", "http://rsf-z1.qbox.me", "http://iovip-z1.qbox.me",
                "https://up-z1.qbox.me", "http://api-z1.qiniu.com");
    }

    public static Zone zone2() {
        return new FixedZone("http://up-z2.qiniu.com", "http://upload-z2.qiniu.com",
                "", "http://rs-z2.qbox.me", "http://rsf-z2.qbox.me", "http://iovip-z2.qbox.me",
                "https://up-z2.qbox.me", "http://api-z2.qiniu.com");
    }

    public static Zone autoZone() {
        return AutoZone.instance;
    }

    protected static String upHostFromPolicy(String token) {
        return null;
    }

    public String upHost(String token) {
        throw new UnsupportedOperationException();
    }

    public String upHostBackup(String token) {
        throw new UnsupportedOperationException();
    }

    public String upIpBackup(String token) {
        throw new UnsupportedOperationException();
    }

    public String upHostHttps(String token) {
        throw new UnsupportedOperationException();
    }

    public String rsHost(String ak, String bucket) {
        throw new UnsupportedOperationException();
    }

    public String rsHost() {
        return rsHost("", "");
    }

    public String rsfHost(String ak, String bucket) {
        throw new UnsupportedOperationException();
    }

    public String rsfHost() {
        return rsfHost("", "");
    }

    public String ioHost(String ak, String bucket) {
        throw new UnsupportedOperationException();
    }

    public String ioHost() {
        return ioHost("", "");
    }

    public String apiHost(String ak, String bucket) {
        throw new UnsupportedOperationException();
    }

    public String apiHost() {
        return apiHost("", "");
    }
}

@@ -67,16 +67,29 @@
 Zone %7B%0A%0A
+    //    %E5%8D%8E%E4%B8%9C%0A
     publ
@@ -109,24 +109,24 @@
 e zone0() %7B%0A
-
         retu
@@ -341,32 +341,45 @@
 u.com%22);%0A    %7D%0A%0A
+    //    %E5%8D%8E%E5%8C%97%0A
     public stati
@@ -644,32 +644,45 @@
 u.com%22);%0A    %7D%0A%0A
+    //    %E5%8D%8E%E5%8D%97%0A
     public stati
@@ -871,32 +871,32 @@
 ip-z2.qbox.me%22,%0A
-
                 
@@ -947,32 +947,345 @@
 u.com%22);%0A    %7D%0A%0A
+    //    %E5%8C%97%E7%BE%8E%0A    public static Zone zone_na0() %7B%0A        return new FixedZone(%22http://up-na0.qiniu.com%22, %22http://upload-na0.qiniu.com%22,%0A                %22%22, %22http://rs-na0.qbox.me%22, %22http://rsf-na0.qbox.me%22, %22http://iovip-na0.qbox.me%22,%0A                %22https://up-na0.qbox.me%22, %22http://api-na0.qiniu.com%22);%0A    %7D%0A%0A
     public stati

add us zone