All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.ksyun.ks3.service.request.GetBucketEncryptionRequest Maven / Gradle / Ivy

package com.ksyun.ks3.service.request;

import com.ksyun.ks3.http.HttpMethod;
import com.ksyun.ks3.http.Request;
import com.ksyun.ks3.utils.StringUtils;

import static com.ksyun.ks3.exception.client.ClientIllegalArgumentExceptionGenerator.notNull;

public class GetBucketEncryptionRequest extends Ks3WebServiceRequest {
    private String bucketName;

    public GetBucketEncryptionRequest(String bucketName) {
        this.bucketName = bucketName;
    }

    public String getBucketName() {
        return this.bucketName;
    }

    public void setBucketName(String bucketName) {
        this.bucketName = bucketName;
    }



    @Override
    public void buildRequest(Request request) {
        request.setMethod(HttpMethod.GET);
        request.setBucket(bucketName);
        request.addQueryParam("encryption","");

    }

    @Override
    public void validateParams() {
        if(StringUtils.isBlank(this.bucketName))
            throw notNull("bucketName");

    }

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy