![JAR search and dependency download from the Maven repository](/logo.png)
com.ksyun.ks3.dto.CreateBucketConfiguration Maven / Gradle / Ivy
package com.ksyun.ks3.dto;
import com.ksyun.ks3.exception.client.ClientIllegalArgumentExceptionGenerator;
import com.ksyun.ks3.utils.StringUtils;
/**
* @author lijunwei[[email protected]]
*
* @date 2014年11月10日 下午1:47:26
*
* @description
* public CreateBucketConfiguration({@link REGION} region)
* bucket存储地点配置,用于{@link com.ksyun.ks3.service.request.CreateBucketRequest}
**/
public class CreateBucketConfiguration {
/**
* bucket存储地点
* @author LIJUNWEI
*
*/
public static enum REGION {
HANGZHOU,AMERICA,HONGKONG,BEIJING,SHANGHAI,GUANGZHOU,SINGAPORE,RUSSIA,TAIWAN,QINGDAO,JR_BEIJING,JR_SHANGHAI,GOV_BEIJING,INDIA;
public static REGION load(String s){
for(REGION region :REGION.values()){
if(region.toString().equals(s))
return region;
}
throw ClientIllegalArgumentExceptionGenerator.notCorrect("region",s,
"AMERICA,HANGZHOU,HONGKONG,BEIJING,SHANGHAI,GUANGZHOU,SINGAPORE,RUSSIA,TAIWAN,QINGDAO,JR_BEIJING,JR_SHANGHAI,GOV_BEIJING,INDIA");
}
}
public CreateBucketConfiguration(REGION region){
this.location = region;
}
private REGION location;
public REGION getLocation() {
return location;
}
public void setLocation(REGION location) {
this.location = location;
}
public String toString() {
return StringUtils.object2string(this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy