private SetBucketLoggingCommand(IServiceClient client, Uri endpoint, ExecutionContext context,
                                        string bucketName, SetBucketLoggingRequest setBucketLoggingRequest)
            : base(client, endpoint, context)
        {
            OssUtils.CheckBucketName(setBucketLoggingRequest.BucketName);
            OssUtils.CheckBucketName(setBucketLoggingRequest.TargetBucket);

            if (!OssUtils.IsLoggingPrefixValid(setBucketLoggingRequest.TargetPrefix))
            {
                throw new ArgumentException("Invalid logging prefix " + setBucketLoggingRequest.TargetPrefix);
            }

            _bucketName = bucketName;
            _setBucketLoggingRequest = setBucketLoggingRequest;
        }