{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Amazonka.VoiceId.Types.ServerSideEncryptionConfiguration -- Copyright : (c) 2013-2023 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) module Amazonka.VoiceId.Types.ServerSideEncryptionConfiguration where import qualified Amazonka.Core as Core import qualified Amazonka.Core.Lens.Internal as Lens import qualified Amazonka.Data as Data import qualified Amazonka.Prelude as Prelude -- | The configuration containing information about the customer managed key -- used for encrypting customer data. -- -- /See:/ 'newServerSideEncryptionConfiguration' smart constructor. data ServerSideEncryptionConfiguration = ServerSideEncryptionConfiguration' { -- | The identifier of the KMS key to use to encrypt data stored by Voice ID. -- Voice ID doesn\'t support asymmetric customer managed keys. kmsKeyId :: Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'ServerSideEncryptionConfiguration' with all optional fields omitted. -- -- Use or to modify other optional fields. -- -- The following record fields are available, with the corresponding lenses provided -- for backwards compatibility: -- -- 'kmsKeyId', 'serverSideEncryptionConfiguration_kmsKeyId' - The identifier of the KMS key to use to encrypt data stored by Voice ID. -- Voice ID doesn\'t support asymmetric customer managed keys. newServerSideEncryptionConfiguration :: -- | 'kmsKeyId' Prelude.Text -> ServerSideEncryptionConfiguration newServerSideEncryptionConfiguration pKmsKeyId_ = ServerSideEncryptionConfiguration' { kmsKeyId = pKmsKeyId_ } -- | The identifier of the KMS key to use to encrypt data stored by Voice ID. -- Voice ID doesn\'t support asymmetric customer managed keys. serverSideEncryptionConfiguration_kmsKeyId :: Lens.Lens' ServerSideEncryptionConfiguration Prelude.Text serverSideEncryptionConfiguration_kmsKeyId = Lens.lens (\ServerSideEncryptionConfiguration' {kmsKeyId} -> kmsKeyId) (\s@ServerSideEncryptionConfiguration' {} a -> s {kmsKeyId = a} :: ServerSideEncryptionConfiguration) instance Data.FromJSON ServerSideEncryptionConfiguration where parseJSON = Data.withObject "ServerSideEncryptionConfiguration" ( \x -> ServerSideEncryptionConfiguration' Prelude.<$> (x Data..: "KmsKeyId") ) instance Prelude.Hashable ServerSideEncryptionConfiguration where hashWithSalt _salt ServerSideEncryptionConfiguration' {..} = _salt `Prelude.hashWithSalt` kmsKeyId instance Prelude.NFData ServerSideEncryptionConfiguration where rnf ServerSideEncryptionConfiguration' {..} = Prelude.rnf kmsKeyId instance Data.ToJSON ServerSideEncryptionConfiguration where toJSON ServerSideEncryptionConfiguration' {..} = Data.object ( Prelude.catMaybes [Prelude.Just ("KmsKeyId" Data..= kmsKeyId)] )