amazonka-transfer-2.0: gen/Amazonka/Transfer/DeleteProfile.hs
{-# 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.DeleteProfile
-- 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 profile that\'s specified in the @ProfileId@ parameter.
module Amazonka.Transfer.DeleteProfile
( -- * Creating a Request
DeleteProfile (..),
newDeleteProfile,
-- * Request Lenses
deleteProfile_profileId,
-- * Destructuring the Response
DeleteProfileResponse (..),
newDeleteProfileResponse,
)
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:/ 'newDeleteProfile' smart constructor.
data DeleteProfile = DeleteProfile'
{ -- | The identifier of the profile that you are deleting.
profileId :: Prelude.Text
}
deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)
-- |
-- Create a value of 'DeleteProfile' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
--
-- The following record fields are available, with the corresponding lenses provided
-- for backwards compatibility:
--
-- 'profileId', 'deleteProfile_profileId' - The identifier of the profile that you are deleting.
newDeleteProfile ::
-- | 'profileId'
Prelude.Text ->
DeleteProfile
newDeleteProfile pProfileId_ =
DeleteProfile' {profileId = pProfileId_}
-- | The identifier of the profile that you are deleting.
deleteProfile_profileId :: Lens.Lens' DeleteProfile Prelude.Text
deleteProfile_profileId = Lens.lens (\DeleteProfile' {profileId} -> profileId) (\s@DeleteProfile' {} a -> s {profileId = a} :: DeleteProfile)
instance Core.AWSRequest DeleteProfile where
type
AWSResponse DeleteProfile =
DeleteProfileResponse
request overrides =
Request.postJSON (overrides defaultService)
response =
Response.receiveNull DeleteProfileResponse'
instance Prelude.Hashable DeleteProfile where
hashWithSalt _salt DeleteProfile' {..} =
_salt `Prelude.hashWithSalt` profileId
instance Prelude.NFData DeleteProfile where
rnf DeleteProfile' {..} = Prelude.rnf profileId
instance Data.ToHeaders DeleteProfile where
toHeaders =
Prelude.const
( Prelude.mconcat
[ "X-Amz-Target"
Data.=# ( "TransferService.DeleteProfile" ::
Prelude.ByteString
),
"Content-Type"
Data.=# ( "application/x-amz-json-1.1" ::
Prelude.ByteString
)
]
)
instance Data.ToJSON DeleteProfile where
toJSON DeleteProfile' {..} =
Data.object
( Prelude.catMaybes
[Prelude.Just ("ProfileId" Data..= profileId)]
)
instance Data.ToPath DeleteProfile where
toPath = Prelude.const "/"
instance Data.ToQuery DeleteProfile where
toQuery = Prelude.const Prelude.mempty
-- | /See:/ 'newDeleteProfileResponse' smart constructor.
data DeleteProfileResponse = DeleteProfileResponse'
{
}
deriving (Prelude.Eq, Prelude.Read, Prelude.Show, Prelude.Generic)
-- |
-- Create a value of 'DeleteProfileResponse' with all optional fields omitted.
--
-- Use <https://hackage.haskell.org/package/generic-lens generic-lens> or <https://hackage.haskell.org/package/optics optics> to modify other optional fields.
newDeleteProfileResponse ::
DeleteProfileResponse
newDeleteProfileResponse = DeleteProfileResponse'
instance Prelude.NFData DeleteProfileResponse where
rnf _ = ()