{-# LANGUAGE DeriveGeneric #-} {-# LANGUAGE DuplicateRecordFields #-} {-# LANGUAGE NamedFieldPuns #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE RecordWildCards #-} {-# LANGUAGE StrictData #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE NoImplicitPrelude #-} {-# OPTIONS_GHC -fno-warn-unused-binds #-} {-# OPTIONS_GHC -fno-warn-unused-imports #-} {-# OPTIONS_GHC -fno-warn-unused-matches #-} -- Derived from AWS service descriptions, licensed under Apache 2.0. -- | -- Module : Amazonka.Transfer.DeleteCertificate -- Copyright : (c) 2013-2023 Brendan Hay -- License : Mozilla Public License, v. 2.0. -- Maintainer : Brendan Hay -- Stability : auto-generated -- Portability : non-portable (GHC extensions) -- -- Deletes the certificate that\'s specified in the @CertificateId@ -- parameter. module Amazonka.Transfer.DeleteCertificate ( -- * Creating a Request DeleteCertificate (..), newDeleteCertificate, -- * Request Lenses deleteCertificate_certificateId, -- * Destructuring the Response DeleteCertificateResponse (..), newDeleteCertificateResponse, ) 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 import qualified Amazonka.Request as Request import qualified Amazonka.Response as Response import Amazonka.Transfer.Types -- | /See:/ 'newDeleteCertificate' smart constructor. data DeleteCertificate = DeleteCertificate' { -- | The identifier of the certificate object that you are deleting. certificateId :: Prelude.Text } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'DeleteCertificate' 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: -- -- 'certificateId', 'deleteCertificate_certificateId' - The identifier of the certificate object that you are deleting. newDeleteCertificate :: -- | 'certificateId' Prelude.Text -> DeleteCertificate newDeleteCertificate pCertificateId_ = DeleteCertificate' {certificateId = pCertificateId_} -- | The identifier of the certificate object that you are deleting. deleteCertificate_certificateId :: Lens.Lens' DeleteCertificate Prelude.Text deleteCertificate_certificateId = Lens.lens (\DeleteCertificate' {certificateId} -> certificateId) (\s@DeleteCertificate' {} a -> s {certificateId = a} :: DeleteCertificate) instance Core.AWSRequest DeleteCertificate where type AWSResponse DeleteCertificate = DeleteCertificateResponse request overrides = Request.postJSON (overrides defaultService) response = Response.receiveNull DeleteCertificateResponse' instance Prelude.Hashable DeleteCertificate where hashWithSalt _salt DeleteCertificate' {..} = _salt `Prelude.hashWithSalt` certificateId instance Prelude.NFData DeleteCertificate where rnf DeleteCertificate' {..} = Prelude.rnf certificateId instance Data.ToHeaders DeleteCertificate where toHeaders = Prelude.const ( Prelude.mconcat [ "X-Amz-Target" Data.=# ( "TransferService.DeleteCertificate" :: Prelude.ByteString ), "Content-Type" Data.=# ( "application/x-amz-json-1.1" :: Prelude.ByteString ) ] ) instance Data.ToJSON DeleteCertificate where toJSON DeleteCertificate' {..} = Data.object ( Prelude.catMaybes [ Prelude.Just ("CertificateId" Data..= certificateId) ] ) instance Data.ToPath DeleteCertificate where toPath = Prelude.const "/" instance Data.ToQuery DeleteCertificate where toQuery = Prelude.const Prelude.mempty -- | /See:/ 'newDeleteCertificateResponse' smart constructor. data DeleteCertificateResponse = DeleteCertificateResponse' { } deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic) -- | -- Create a value of 'DeleteCertificateResponse' with all optional fields omitted. -- -- Use or to modify other optional fields. newDeleteCertificateResponse :: DeleteCertificateResponse newDeleteCertificateResponse = DeleteCertificateResponse' instance Prelude.NFData DeleteCertificateResponse where rnf _ = ()