{-# 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.Connect.DeleteSecurityProfile
-- Copyright   : (c) 2013-2023 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- This API is in preview release for Amazon Connect and is subject to
-- change.
--
-- Deletes a security profile.
module Amazonka.Connect.DeleteSecurityProfile
  ( -- * Creating a Request
    DeleteSecurityProfile (..),
    newDeleteSecurityProfile,

    -- * Request Lenses
    deleteSecurityProfile_instanceId,
    deleteSecurityProfile_securityProfileId,

    -- * Destructuring the Response
    DeleteSecurityProfileResponse (..),
    newDeleteSecurityProfileResponse,
  )
where

import Amazonka.Connect.Types
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

-- | /See:/ 'newDeleteSecurityProfile' smart constructor.
data DeleteSecurityProfile = DeleteSecurityProfile'
  { -- | The identifier of the Amazon Connect instance. You can find the
    -- instanceId in the ARN of the instance.
    DeleteSecurityProfile -> Text
instanceId :: Prelude.Text,
    -- | The identifier for the security profle.
    DeleteSecurityProfile -> Text
securityProfileId :: Prelude.Text
  }
  deriving (DeleteSecurityProfile -> DeleteSecurityProfile -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSecurityProfile -> DeleteSecurityProfile -> Bool
$c/= :: DeleteSecurityProfile -> DeleteSecurityProfile -> Bool
== :: DeleteSecurityProfile -> DeleteSecurityProfile -> Bool
$c== :: DeleteSecurityProfile -> DeleteSecurityProfile -> Bool
Prelude.Eq, ReadPrec [DeleteSecurityProfile]
ReadPrec DeleteSecurityProfile
Int -> ReadS DeleteSecurityProfile
ReadS [DeleteSecurityProfile]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSecurityProfile]
$creadListPrec :: ReadPrec [DeleteSecurityProfile]
readPrec :: ReadPrec DeleteSecurityProfile
$creadPrec :: ReadPrec DeleteSecurityProfile
readList :: ReadS [DeleteSecurityProfile]
$creadList :: ReadS [DeleteSecurityProfile]
readsPrec :: Int -> ReadS DeleteSecurityProfile
$creadsPrec :: Int -> ReadS DeleteSecurityProfile
Prelude.Read, Int -> DeleteSecurityProfile -> ShowS
[DeleteSecurityProfile] -> ShowS
DeleteSecurityProfile -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSecurityProfile] -> ShowS
$cshowList :: [DeleteSecurityProfile] -> ShowS
show :: DeleteSecurityProfile -> String
$cshow :: DeleteSecurityProfile -> String
showsPrec :: Int -> DeleteSecurityProfile -> ShowS
$cshowsPrec :: Int -> DeleteSecurityProfile -> ShowS
Prelude.Show, forall x. Rep DeleteSecurityProfile x -> DeleteSecurityProfile
forall x. DeleteSecurityProfile -> Rep DeleteSecurityProfile x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep DeleteSecurityProfile x -> DeleteSecurityProfile
$cfrom :: forall x. DeleteSecurityProfile -> Rep DeleteSecurityProfile x
Prelude.Generic)

-- |
-- Create a value of 'DeleteSecurityProfile' 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:
--
-- 'instanceId', 'deleteSecurityProfile_instanceId' - The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
--
-- 'securityProfileId', 'deleteSecurityProfile_securityProfileId' - The identifier for the security profle.
newDeleteSecurityProfile ::
  -- | 'instanceId'
  Prelude.Text ->
  -- | 'securityProfileId'
  Prelude.Text ->
  DeleteSecurityProfile
newDeleteSecurityProfile :: Text -> Text -> DeleteSecurityProfile
newDeleteSecurityProfile
  Text
pInstanceId_
  Text
pSecurityProfileId_ =
    DeleteSecurityProfile'
      { $sel:instanceId:DeleteSecurityProfile' :: Text
instanceId = Text
pInstanceId_,
        $sel:securityProfileId:DeleteSecurityProfile' :: Text
securityProfileId = Text
pSecurityProfileId_
      }

-- | The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
deleteSecurityProfile_instanceId :: Lens.Lens' DeleteSecurityProfile Prelude.Text
deleteSecurityProfile_instanceId :: Lens' DeleteSecurityProfile Text
deleteSecurityProfile_instanceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSecurityProfile' {Text
instanceId :: Text
$sel:instanceId:DeleteSecurityProfile' :: DeleteSecurityProfile -> Text
instanceId} -> Text
instanceId) (\s :: DeleteSecurityProfile
s@DeleteSecurityProfile' {} Text
a -> DeleteSecurityProfile
s {$sel:instanceId:DeleteSecurityProfile' :: Text
instanceId = Text
a} :: DeleteSecurityProfile)

-- | The identifier for the security profle.
deleteSecurityProfile_securityProfileId :: Lens.Lens' DeleteSecurityProfile Prelude.Text
deleteSecurityProfile_securityProfileId :: Lens' DeleteSecurityProfile Text
deleteSecurityProfile_securityProfileId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteSecurityProfile' {Text
securityProfileId :: Text
$sel:securityProfileId:DeleteSecurityProfile' :: DeleteSecurityProfile -> Text
securityProfileId} -> Text
securityProfileId) (\s :: DeleteSecurityProfile
s@DeleteSecurityProfile' {} Text
a -> DeleteSecurityProfile
s {$sel:securityProfileId:DeleteSecurityProfile' :: Text
securityProfileId = Text
a} :: DeleteSecurityProfile)

instance Core.AWSRequest DeleteSecurityProfile where
  type
    AWSResponse DeleteSecurityProfile =
      DeleteSecurityProfileResponse
  request :: (Service -> Service)
-> DeleteSecurityProfile -> Request DeleteSecurityProfile
request Service -> Service
overrides =
    forall a. ToRequest a => Service -> a -> Request a
Request.delete (Service -> Service
overrides Service
defaultService)
  response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy DeleteSecurityProfile
-> ClientResponse ClientBody
-> m (Either
        Error (ClientResponse (AWSResponse DeleteSecurityProfile)))
response =
    forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull DeleteSecurityProfileResponse
DeleteSecurityProfileResponse'

instance Prelude.Hashable DeleteSecurityProfile where
  hashWithSalt :: Int -> DeleteSecurityProfile -> Int
hashWithSalt Int
_salt DeleteSecurityProfile' {Text
securityProfileId :: Text
instanceId :: Text
$sel:securityProfileId:DeleteSecurityProfile' :: DeleteSecurityProfile -> Text
$sel:instanceId:DeleteSecurityProfile' :: DeleteSecurityProfile -> Text
..} =
    Int
_salt
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
instanceId
      forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
securityProfileId

instance Prelude.NFData DeleteSecurityProfile where
  rnf :: DeleteSecurityProfile -> ()
rnf DeleteSecurityProfile' {Text
securityProfileId :: Text
instanceId :: Text
$sel:securityProfileId:DeleteSecurityProfile' :: DeleteSecurityProfile -> Text
$sel:instanceId:DeleteSecurityProfile' :: DeleteSecurityProfile -> Text
..} =
    forall a. NFData a => a -> ()
Prelude.rnf Text
instanceId
      seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
securityProfileId

instance Data.ToHeaders DeleteSecurityProfile where
  toHeaders :: DeleteSecurityProfile -> [Header]
toHeaders =
    forall a b. a -> b -> a
Prelude.const
      ( forall a. Monoid a => [a] -> a
Prelude.mconcat
          [ HeaderName
"Content-Type"
              forall a. ToHeader a => HeaderName -> a -> [Header]
Data.=# ( ByteString
"application/x-amz-json-1.1" ::
                          Prelude.ByteString
                      )
          ]
      )

instance Data.ToPath DeleteSecurityProfile where
  toPath :: DeleteSecurityProfile -> ByteString
toPath DeleteSecurityProfile' {Text
securityProfileId :: Text
instanceId :: Text
$sel:securityProfileId:DeleteSecurityProfile' :: DeleteSecurityProfile -> Text
$sel:instanceId:DeleteSecurityProfile' :: DeleteSecurityProfile -> Text
..} =
    forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/security-profiles/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
instanceId,
        ByteString
"/",
        forall a. ToByteString a => a -> ByteString
Data.toBS Text
securityProfileId
      ]

instance Data.ToQuery DeleteSecurityProfile where
  toQuery :: DeleteSecurityProfile -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty

-- | /See:/ 'newDeleteSecurityProfileResponse' smart constructor.
data DeleteSecurityProfileResponse = DeleteSecurityProfileResponse'
  {
  }
  deriving (DeleteSecurityProfileResponse
-> DeleteSecurityProfileResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: DeleteSecurityProfileResponse
-> DeleteSecurityProfileResponse -> Bool
$c/= :: DeleteSecurityProfileResponse
-> DeleteSecurityProfileResponse -> Bool
== :: DeleteSecurityProfileResponse
-> DeleteSecurityProfileResponse -> Bool
$c== :: DeleteSecurityProfileResponse
-> DeleteSecurityProfileResponse -> Bool
Prelude.Eq, ReadPrec [DeleteSecurityProfileResponse]
ReadPrec DeleteSecurityProfileResponse
Int -> ReadS DeleteSecurityProfileResponse
ReadS [DeleteSecurityProfileResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [DeleteSecurityProfileResponse]
$creadListPrec :: ReadPrec [DeleteSecurityProfileResponse]
readPrec :: ReadPrec DeleteSecurityProfileResponse
$creadPrec :: ReadPrec DeleteSecurityProfileResponse
readList :: ReadS [DeleteSecurityProfileResponse]
$creadList :: ReadS [DeleteSecurityProfileResponse]
readsPrec :: Int -> ReadS DeleteSecurityProfileResponse
$creadsPrec :: Int -> ReadS DeleteSecurityProfileResponse
Prelude.Read, Int -> DeleteSecurityProfileResponse -> ShowS
[DeleteSecurityProfileResponse] -> ShowS
DeleteSecurityProfileResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [DeleteSecurityProfileResponse] -> ShowS
$cshowList :: [DeleteSecurityProfileResponse] -> ShowS
show :: DeleteSecurityProfileResponse -> String
$cshow :: DeleteSecurityProfileResponse -> String
showsPrec :: Int -> DeleteSecurityProfileResponse -> ShowS
$cshowsPrec :: Int -> DeleteSecurityProfileResponse -> ShowS
Prelude.Show, forall x.
Rep DeleteSecurityProfileResponse x
-> DeleteSecurityProfileResponse
forall x.
DeleteSecurityProfileResponse
-> Rep DeleteSecurityProfileResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep DeleteSecurityProfileResponse x
-> DeleteSecurityProfileResponse
$cfrom :: forall x.
DeleteSecurityProfileResponse
-> Rep DeleteSecurityProfileResponse x
Prelude.Generic)

-- |
-- Create a value of 'DeleteSecurityProfileResponse' 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.
newDeleteSecurityProfileResponse ::
  DeleteSecurityProfileResponse
newDeleteSecurityProfileResponse :: DeleteSecurityProfileResponse
newDeleteSecurityProfileResponse =
  DeleteSecurityProfileResponse
DeleteSecurityProfileResponse'

instance Prelude.NFData DeleteSecurityProfileResponse where
  rnf :: DeleteSecurityProfileResponse -> ()
rnf DeleteSecurityProfileResponse
_ = ()