def aws_cryptography_keystore_KeyStoreConfig()

in AwsCryptographicMaterialProviders/runtimes/python/src/aws_cryptographic_material_providers/smithygenerated/aws_cryptography_keystore/smithy_to_dafny.py [0:0]


def aws_cryptography_keystore_KeyStoreConfig(native_input):
    return DafnyKeyStoreConfig(
        ddbTableName=Seq(
            "".join(
                [
                    chr(int.from_bytes(pair, "big"))
                    for pair in zip(
                        *[iter(native_input.ddb_table_name.encode("utf-16-be"))] * 2
                    )
                ]
            )
        ),
        kmsConfiguration=aws_cryptographic_material_providers.smithygenerated.aws_cryptography_keystore.smithy_to_dafny.aws_cryptography_keystore_KMSConfiguration(
            native_input.kms_configuration
        ),
        logicalKeyStoreName=Seq(
            "".join(
                [
                    chr(int.from_bytes(pair, "big"))
                    for pair in zip(
                        *[iter(native_input.logical_key_store_name.encode("utf-16-be"))]
                        * 2
                    )
                ]
            )
        ),
        id=(
            (
                Option_Some(
                    Seq(
                        "".join(
                            [
                                chr(int.from_bytes(pair, "big"))
                                for pair in zip(
                                    *[iter(native_input.id.encode("utf-16-be"))] * 2
                                )
                            ]
                        )
                    )
                )
            )
            if (native_input.id is not None)
            else (Option_None())
        ),
        grantTokens=(
            (
                Option_Some(
                    Seq(
                        [
                            Seq(
                                "".join(
                                    [
                                        chr(int.from_bytes(pair, "big"))
                                        for pair in zip(
                                            *[iter(list_element.encode("utf-16-be"))]
                                            * 2
                                        )
                                    ]
                                )
                            )
                            for list_element in native_input.grant_tokens
                        ]
                    )
                )
            )
            if (native_input.grant_tokens is not None)
            else (Option_None())
        ),
        ddbClient=(
            (
                Option_Some(
                    aws_cryptographic_material_providers.smithygenerated.aws_cryptography_keystore.smithy_to_dafny.aws_cryptography_keystore_DdbClientReference(
                        native_input.ddb_client
                    )
                )
            )
            if (
                (native_input.ddb_client is not None)
                and (
                    aws_cryptographic_material_providers.smithygenerated.aws_cryptography_keystore.smithy_to_dafny.aws_cryptography_keystore_DdbClientReference(
                        native_input.ddb_client
                    )
                    is not None
                )
            )
            else (Option_None())
        ),
        kmsClient=(
            (
                Option_Some(
                    aws_cryptographic_material_providers.smithygenerated.aws_cryptography_keystore.smithy_to_dafny.aws_cryptography_keystore_KmsClientReference(
                        native_input.kms_client
                    )
                )
            )
            if (
                (native_input.kms_client is not None)
                and (
                    aws_cryptographic_material_providers.smithygenerated.aws_cryptography_keystore.smithy_to_dafny.aws_cryptography_keystore_KmsClientReference(
                        native_input.kms_client
                    )
                    is not None
                )
            )
            else (Option_None())
        ),
    )