from typing import List


def _code_template(error_codes_list: List[str]) -> str:
    """
    Create the blueprint code.
    """
    def _make_content() -> str:
        lines = []
        for e in error_codes_list:
            lines.append(f"    {{ static_cast<int32>(GameKit::{e}), \"{e}\" }}")

        return ",\n".join(lines)

    return f"""// Copyright 2022 Amazon.com, Inc. or its affiliates. All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0

/** @file
* @brief The Blueprint-friendly GameKit status codes. This was generated by a script, do not modify!"
*/

// GameKit
#include "AwsGameKitErrorCodes.h"
#include <aws/gamekit/core/errors.h>

const FString UAwsGameKitErrorCodes::UnknownError = "UnknownErrorCode";

const TMap<int32, FString> UAwsGameKitErrorCodes::CodeToFriendlyName =
{{
{_make_content()}
}};
"""