{-# 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.DeleteQuickConnect
-- Copyright   : (c) 2013-2021 Brendan Hay
-- License     : Mozilla Public License, v. 2.0.
-- Maintainer  : Brendan Hay <brendan.g.hay+amazonka@gmail.com>
-- Stability   : auto-generated
-- Portability : non-portable (GHC extensions)
--
-- Deletes a quick connect.
module Amazonka.Connect.DeleteQuickConnect
  ( -- * Creating a Request
    DeleteQuickConnect (..),
    newDeleteQuickConnect,

    -- * Request Lenses
    deleteQuickConnect_instanceId,
    deleteQuickConnect_quickConnectId,

    -- * Destructuring the Response
    DeleteQuickConnectResponse (..),
    newDeleteQuickConnectResponse,
  )
where

import Amazonka.Connect.Types
import qualified Amazonka.Core as Core
import qualified Amazonka.Lens as Lens
import qualified Amazonka.Prelude as Prelude
import qualified Amazonka.Request as Request
import qualified Amazonka.Response as Response

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

-- |
-- Create a value of 'DeleteQuickConnect' 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', 'deleteQuickConnect_instanceId' - The identifier of the Amazon Connect instance. You can find the
-- instanceId in the ARN of the instance.
--
-- 'quickConnectId', 'deleteQuickConnect_quickConnectId' - The identifier for the quick connect.
newDeleteQuickConnect ::
  -- | 'instanceId'
  Prelude.Text ->
  -- | 'quickConnectId'
  Prelude.Text ->
  DeleteQuickConnect
newDeleteQuickConnect :: Text -> Text -> DeleteQuickConnect
newDeleteQuickConnect Text
pInstanceId_ Text
pQuickConnectId_ =
  DeleteQuickConnect' :: Text -> Text -> DeleteQuickConnect
DeleteQuickConnect'
    { $sel:instanceId:DeleteQuickConnect' :: Text
instanceId = Text
pInstanceId_,
      $sel:quickConnectId:DeleteQuickConnect' :: Text
quickConnectId = Text
pQuickConnectId_
    }

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

-- | The identifier for the quick connect.
deleteQuickConnect_quickConnectId :: Lens.Lens' DeleteQuickConnect Prelude.Text
deleteQuickConnect_quickConnectId :: (Text -> f Text) -> DeleteQuickConnect -> f DeleteQuickConnect
deleteQuickConnect_quickConnectId = (DeleteQuickConnect -> Text)
-> (DeleteQuickConnect -> Text -> DeleteQuickConnect)
-> Lens DeleteQuickConnect DeleteQuickConnect Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\DeleteQuickConnect' {Text
quickConnectId :: Text
$sel:quickConnectId:DeleteQuickConnect' :: DeleteQuickConnect -> Text
quickConnectId} -> Text
quickConnectId) (\s :: DeleteQuickConnect
s@DeleteQuickConnect' {} Text
a -> DeleteQuickConnect
s {$sel:quickConnectId:DeleteQuickConnect' :: Text
quickConnectId = Text
a} :: DeleteQuickConnect)

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

instance Prelude.Hashable DeleteQuickConnect

instance Prelude.NFData DeleteQuickConnect

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

instance Core.ToPath DeleteQuickConnect where
  toPath :: DeleteQuickConnect -> ByteString
toPath DeleteQuickConnect' {Text
quickConnectId :: Text
instanceId :: Text
$sel:quickConnectId:DeleteQuickConnect' :: DeleteQuickConnect -> Text
$sel:instanceId:DeleteQuickConnect' :: DeleteQuickConnect -> Text
..} =
    [ByteString] -> ByteString
forall a. Monoid a => [a] -> a
Prelude.mconcat
      [ ByteString
"/quick-connects/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
instanceId,
        ByteString
"/",
        Text -> ByteString
forall a. ToByteString a => a -> ByteString
Core.toBS Text
quickConnectId
      ]

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

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

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

instance Prelude.NFData DeleteQuickConnectResponse