You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: append_package_file_service.rb
    path of file: ./repos/gitlabhq/app/services/packages/maven/metadata
    
    the code of the file until where you have to start completion: # frozen_string_literal: true

module Packages
  module Maven
    module Metadata
      class AppendPackageFileService
        XML_CONTENT_TYPE = 'application/xml'
        DEFAULT_CONTENT_TYPE = 'application/octet-stream'

        MD5_FILE_NAME = "#{Metadata.filename}.md5"
        SHA1_FILE_NAME = "#{Metadata.filename}.sha1"
        SHA256_FILE_NAME = "#{Metadata.filename}.sha256"
        SHA512_FILE_NAME = "#{Metadata.filename}.sha512"

        def initialize(package:, metadata_content:)
          @package = package
          @metadata_content = metadata_content
        end

        def exec
    
        def append_metadata_file(content:, file_name:, content_type: DEFAULT_CONTENT_TYPE, sha1: nil, md5: nil, sha256: nil)
          file_md5 = md5 || digest_from(content, :md5)
          file_sha1 = sha1 || digest_from(content, :sha1)
          file_sha256 = sha256 || digest_from(content, :sha256)

          file = CarrierWaveStringFile.new_file(
            file_content: content,
            filename: file_name,
            content_type: content_type
          )

          ::Packages::CreatePackageFileService.new(
            @package,
            file: file,
            size: file.size,
            file_name: file_name,
            file_sha1: file_sha1,
            file_md5: file_md5,
            file_sha256: file_sha256
          ).execute
        end