/** * Used for conducting this operation from a Requester Pays Bucket. If * set the requester is charged for requests from the bucket. It returns this * updated PutObjectRequest object so that additional method calls can be * chained together. * * <p> * If a bucket is enabled for Requester Pays, then any attempt to upload or * download an object from it without Requester Pays enabled will result in * a 403 error and the bucket owner will be charged for the request. * * <p> * Enabling Requester Pays disables the ability to have anonymous access to * this bucket. * * @param isRequesterPays * Enable Requester Pays option for the operation. * * @return The updated PutObjectRequest object. */ public PutObjectRequest withRequesterPays(boolean isRequesterPays) { setRequesterPays(isRequesterPays); return this; } }
/** * Used for conducting this operation from a Requester Pays Bucket. If * set the requester is charged for requests from the bucket. It returns this * updated PutObjectRequest object so that additional method calls can be * chained together. * * <p> * If a bucket is enabled for Requester Pays, then any attempt to upload or * download an object from it without Requester Pays enabled will result in * a 403 error and the bucket owner will be charged for the request. * * <p> * Enabling Requester Pays disables the ability to have anonymous access to * this bucket. * * @param isRequesterPays * Enable Requester Pays option for the operation. * * @return The updated PutObjectRequest object. */ public PutObjectRequest withRequesterPays(boolean isRequesterPays) { setRequesterPays(isRequesterPays); return this; } }
putObjectRequest.setRequesterPays(REQUESTER_PAYS.equals(isRequesterPays) ? true : false);
/** * Used for conducting this operation from a Requester Pays Bucket. If * set the requester is charged for requests from the bucket. It returns this * updated PutObjectRequest object so that additional method calls can be * chained together. * * <p> * If a bucket is enabled for Requester Pays, then any attempt to upload or * download an object from it without Requester Pays enabled will result in * a 403 error and the bucket owner will be charged for the request. * * <p> * Enabling Requester Pays disables the ability to have anonymous access to * this bucket. * * @param isRequesterPays * Enable Requester Pays option for the operation. * * @return The updated PutObjectRequest object. */ public PutObjectRequest withRequesterPays(boolean isRequesterPays) { setRequesterPays(isRequesterPays); return this; } }
/** * Used for conducting this operation from a Requester Pays Bucket. If * set the requester is charged for requests from the bucket. It returns this * updated PutObjectRequest object so that additional method calls can be * chained together. * * <p> * If a bucket is enabled for Requester Pays, then any attempt to upload or * download an object from it without Requester Pays enabled will result in * a 403 error and the bucket owner will be charged for the request. * * <p> * Enabling Requester Pays disables the ability to have anonymous access to * this bucket. * * @param isRequesterPays * Enable Requester Pays option for the operation. * * @return The updated PutObjectRequest object. */ public PutObjectRequest withRequesterPays(boolean isRequesterPays) { setRequesterPays(isRequesterPays); return this; } }
putObjectRequest.setRequesterPays(REQUESTER_PAYS.equals(isRequesterPays) ? true : false);