类 GenericRequest
java.lang.Object
cn.warpin.thirdPart.huawei.obs.obs.services.model.GenericRequest
- 直接已知子类:
AbstractBulkRequest,BaseBucketRequest,BaseObjectRequest,ContentSummaryFsRequest,CreateBucketRequest,DeleteObjectsRequest,ListContentSummaryFsRequest,ListContentSummaryRequest,ListMultipartUploadsRequest,ListObjectsRequest,ListVersionsRequest,OptionsInfoRequest,ReadAheadRequest
Basic class of all requests, which encapsulates common parameters used by all requests.
- 从以下版本开始:
- 3.20.3
-
字段概要
字段修饰符和类型字段说明protected Stringprotected HttpMethodEnumprivate booleanIf the requester-pays function is enabled, the requester pays for his/her operations on the bucket. -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明voidaddUserHeaders(String key, String value) Obtain the bucket name.booleanIf the requester is allowed to pay, true is returned.voidsetBucketName(String bucketName) Set the bucket name.voidsetRequesterPays(boolean isRequesterPays) Used to configure whether to enable the requester-pays function.voidsetUserHeaders(HashMap<String, String> userHeaders) toString()
-
字段详细资料
-
bucketName
-
isRequesterPays
private boolean isRequesterPaysIf the requester-pays function is enabled, the requester pays for his/her operations on the bucket. -
userHeaders
-
httpMethod
-
-
构造器详细资料
-
GenericRequest
public GenericRequest() -
GenericRequest
-
-
方法详细资料
-
getHttpMethod
-
setBucketName
Set the bucket name.- 参数:
bucketName- Bucket name
-
getBucketName
Obtain the bucket name.- 返回:
- Bucket name
-
addUserHeaders
-
setUserHeaders
-
getUserHeaders
-
isRequesterPays
public boolean isRequesterPays()If the requester is allowed to pay, true is returned. Otherwise, false is returned.If the requester-pays function is enabled for a bucket, this attribute must be set to true when the bucket is requested by a requester other than the bucket owner. Otherwise, status code 403 is returned.
After the requester-pays function is enabled, anonymous access to the bucket is not allowed.
- 返回:
- If the requester is allowed to pay, true is returned. Otherwise, false is returned.
-
setRequesterPays
public void setRequesterPays(boolean isRequesterPays) Used to configure whether to enable the requester-pays function.If the requester-pays function is enabled for a bucket, this attribute must be set to true when the bucket is requested by a requester other than the bucket owner. Otherwise, status code 403 is returned.
After the requester-pays function is enabled, anonymous access to the bucket is not allowed.
- 参数:
isRequesterPays- True indicates to enable the requester-pays function. False indicates to disable the requester-pays function.
-
toString
-