docs: public void copyObject(String bucketName, String objectName, ServerSideEncryption sseSource, String destBucketName,
                           String destObjectName, CopyConditions copyConditions, ServerSideEncryption sseTarget)
        throws InvalidKeyException, InvalidBucketNameException, NoSuchAlgorithmException, InsufficientDataException,
        NoResponseException, ErrorResponseException, InternalException, IOException, XmlPullParserException,
        InvalidArgumentException {
  
      if ((sseTarget.getType() == ServerSideEncryption.Type.SSE_C) && (!this.baseUrl.isHttps())) {
        throw new InvalidArgumentException("SSE_C operations must be performed over a secure connection.");
      } else if ((sseTarget.getType() == (ServerSideEncryption.Type.SSE_KMS)) && (!this.baseUrl.isHttps())) {
        throw new InvalidArgumentException("SSE_KMS operations must be performed over a secure connection.");
      }
      Map<String, String> headerTarget = new HashMap<>();
      Map<String, String> headers = new HashMap<>();
      sseTarget.marshal(headerTarget);
      if (sseTarget.getType() == ServerSideEncryption.Type.SSE_C) {
        Map<String, String> headerSource = new HashMap<>();
        sseSource.marshal(headerSource);
        headers.putAll(headerSource);
        headers.putAll(headerTarget);
      } else {
        headers.putAll(headerTarget);
      }
      copyObject(bucketName, objectName, destBucketName, destObjectName, copyConditions, headers);
    }