{-# 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 #-}
module Amazonka.Connect.UpdateQuickConnectName
(
UpdateQuickConnectName (..),
newUpdateQuickConnectName,
updateQuickConnectName_name,
updateQuickConnectName_description,
updateQuickConnectName_instanceId,
updateQuickConnectName_quickConnectId,
UpdateQuickConnectNameResponse (..),
newUpdateQuickConnectNameResponse,
)
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
data UpdateQuickConnectName = UpdateQuickConnectName'
{
UpdateQuickConnectName -> Maybe Text
name :: Prelude.Maybe Prelude.Text,
UpdateQuickConnectName -> Maybe Text
description :: Prelude.Maybe Prelude.Text,
UpdateQuickConnectName -> Text
instanceId :: Prelude.Text,
UpdateQuickConnectName -> Text
quickConnectId :: Prelude.Text
}
deriving (UpdateQuickConnectName -> UpdateQuickConnectName -> Bool
(UpdateQuickConnectName -> UpdateQuickConnectName -> Bool)
-> (UpdateQuickConnectName -> UpdateQuickConnectName -> Bool)
-> Eq UpdateQuickConnectName
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateQuickConnectName -> UpdateQuickConnectName -> Bool
$c/= :: UpdateQuickConnectName -> UpdateQuickConnectName -> Bool
== :: UpdateQuickConnectName -> UpdateQuickConnectName -> Bool
$c== :: UpdateQuickConnectName -> UpdateQuickConnectName -> Bool
Prelude.Eq, ReadPrec [UpdateQuickConnectName]
ReadPrec UpdateQuickConnectName
Int -> ReadS UpdateQuickConnectName
ReadS [UpdateQuickConnectName]
(Int -> ReadS UpdateQuickConnectName)
-> ReadS [UpdateQuickConnectName]
-> ReadPrec UpdateQuickConnectName
-> ReadPrec [UpdateQuickConnectName]
-> Read UpdateQuickConnectName
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateQuickConnectName]
$creadListPrec :: ReadPrec [UpdateQuickConnectName]
readPrec :: ReadPrec UpdateQuickConnectName
$creadPrec :: ReadPrec UpdateQuickConnectName
readList :: ReadS [UpdateQuickConnectName]
$creadList :: ReadS [UpdateQuickConnectName]
readsPrec :: Int -> ReadS UpdateQuickConnectName
$creadsPrec :: Int -> ReadS UpdateQuickConnectName
Prelude.Read, Int -> UpdateQuickConnectName -> ShowS
[UpdateQuickConnectName] -> ShowS
UpdateQuickConnectName -> String
(Int -> UpdateQuickConnectName -> ShowS)
-> (UpdateQuickConnectName -> String)
-> ([UpdateQuickConnectName] -> ShowS)
-> Show UpdateQuickConnectName
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateQuickConnectName] -> ShowS
$cshowList :: [UpdateQuickConnectName] -> ShowS
show :: UpdateQuickConnectName -> String
$cshow :: UpdateQuickConnectName -> String
showsPrec :: Int -> UpdateQuickConnectName -> ShowS
$cshowsPrec :: Int -> UpdateQuickConnectName -> ShowS
Prelude.Show, (forall x. UpdateQuickConnectName -> Rep UpdateQuickConnectName x)
-> (forall x.
Rep UpdateQuickConnectName x -> UpdateQuickConnectName)
-> Generic UpdateQuickConnectName
forall x. Rep UpdateQuickConnectName x -> UpdateQuickConnectName
forall x. UpdateQuickConnectName -> Rep UpdateQuickConnectName x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep UpdateQuickConnectName x -> UpdateQuickConnectName
$cfrom :: forall x. UpdateQuickConnectName -> Rep UpdateQuickConnectName x
Prelude.Generic)
newUpdateQuickConnectName ::
Prelude.Text ->
Prelude.Text ->
UpdateQuickConnectName
newUpdateQuickConnectName :: Text -> Text -> UpdateQuickConnectName
newUpdateQuickConnectName
Text
pInstanceId_
Text
pQuickConnectId_ =
UpdateQuickConnectName' :: Maybe Text -> Maybe Text -> Text -> Text -> UpdateQuickConnectName
UpdateQuickConnectName'
{ $sel:name:UpdateQuickConnectName' :: Maybe Text
name = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:description:UpdateQuickConnectName' :: Maybe Text
description = Maybe Text
forall a. Maybe a
Prelude.Nothing,
$sel:instanceId:UpdateQuickConnectName' :: Text
instanceId = Text
pInstanceId_,
$sel:quickConnectId:UpdateQuickConnectName' :: Text
quickConnectId = Text
pQuickConnectId_
}
updateQuickConnectName_name :: Lens.Lens' UpdateQuickConnectName (Prelude.Maybe Prelude.Text)
updateQuickConnectName_name :: (Maybe Text -> f (Maybe Text))
-> UpdateQuickConnectName -> f UpdateQuickConnectName
updateQuickConnectName_name = (UpdateQuickConnectName -> Maybe Text)
-> (UpdateQuickConnectName -> Maybe Text -> UpdateQuickConnectName)
-> Lens
UpdateQuickConnectName
UpdateQuickConnectName
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateQuickConnectName' {Maybe Text
name :: Maybe Text
$sel:name:UpdateQuickConnectName' :: UpdateQuickConnectName -> Maybe Text
name} -> Maybe Text
name) (\s :: UpdateQuickConnectName
s@UpdateQuickConnectName' {} Maybe Text
a -> UpdateQuickConnectName
s {$sel:name:UpdateQuickConnectName' :: Maybe Text
name = Maybe Text
a} :: UpdateQuickConnectName)
updateQuickConnectName_description :: Lens.Lens' UpdateQuickConnectName (Prelude.Maybe Prelude.Text)
updateQuickConnectName_description :: (Maybe Text -> f (Maybe Text))
-> UpdateQuickConnectName -> f UpdateQuickConnectName
updateQuickConnectName_description = (UpdateQuickConnectName -> Maybe Text)
-> (UpdateQuickConnectName -> Maybe Text -> UpdateQuickConnectName)
-> Lens
UpdateQuickConnectName
UpdateQuickConnectName
(Maybe Text)
(Maybe Text)
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateQuickConnectName' {Maybe Text
description :: Maybe Text
$sel:description:UpdateQuickConnectName' :: UpdateQuickConnectName -> Maybe Text
description} -> Maybe Text
description) (\s :: UpdateQuickConnectName
s@UpdateQuickConnectName' {} Maybe Text
a -> UpdateQuickConnectName
s {$sel:description:UpdateQuickConnectName' :: Maybe Text
description = Maybe Text
a} :: UpdateQuickConnectName)
updateQuickConnectName_instanceId :: Lens.Lens' UpdateQuickConnectName Prelude.Text
updateQuickConnectName_instanceId :: (Text -> f Text)
-> UpdateQuickConnectName -> f UpdateQuickConnectName
updateQuickConnectName_instanceId = (UpdateQuickConnectName -> Text)
-> (UpdateQuickConnectName -> Text -> UpdateQuickConnectName)
-> Lens UpdateQuickConnectName UpdateQuickConnectName Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateQuickConnectName' {Text
instanceId :: Text
$sel:instanceId:UpdateQuickConnectName' :: UpdateQuickConnectName -> Text
instanceId} -> Text
instanceId) (\s :: UpdateQuickConnectName
s@UpdateQuickConnectName' {} Text
a -> UpdateQuickConnectName
s {$sel:instanceId:UpdateQuickConnectName' :: Text
instanceId = Text
a} :: UpdateQuickConnectName)
updateQuickConnectName_quickConnectId :: Lens.Lens' UpdateQuickConnectName Prelude.Text
updateQuickConnectName_quickConnectId :: (Text -> f Text)
-> UpdateQuickConnectName -> f UpdateQuickConnectName
updateQuickConnectName_quickConnectId = (UpdateQuickConnectName -> Text)
-> (UpdateQuickConnectName -> Text -> UpdateQuickConnectName)
-> Lens UpdateQuickConnectName UpdateQuickConnectName Text Text
forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateQuickConnectName' {Text
quickConnectId :: Text
$sel:quickConnectId:UpdateQuickConnectName' :: UpdateQuickConnectName -> Text
quickConnectId} -> Text
quickConnectId) (\s :: UpdateQuickConnectName
s@UpdateQuickConnectName' {} Text
a -> UpdateQuickConnectName
s {$sel:quickConnectId:UpdateQuickConnectName' :: Text
quickConnectId = Text
a} :: UpdateQuickConnectName)
instance Core.AWSRequest UpdateQuickConnectName where
type
AWSResponse UpdateQuickConnectName =
UpdateQuickConnectNameResponse
request :: UpdateQuickConnectName -> Request UpdateQuickConnectName
request = Service -> UpdateQuickConnectName -> Request UpdateQuickConnectName
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON Service
defaultService
response :: Logger
-> Service
-> Proxy UpdateQuickConnectName
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateQuickConnectName)))
response =
AWSResponse UpdateQuickConnectName
-> Logger
-> Service
-> Proxy UpdateQuickConnectName
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateQuickConnectName)))
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> Logger
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
AWSResponse UpdateQuickConnectName
UpdateQuickConnectNameResponse
UpdateQuickConnectNameResponse'
instance Prelude.Hashable UpdateQuickConnectName
instance Prelude.NFData UpdateQuickConnectName
instance Core.ToHeaders UpdateQuickConnectName where
toHeaders :: UpdateQuickConnectName -> [Header]
toHeaders =
[Header] -> UpdateQuickConnectName -> [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.ToJSON UpdateQuickConnectName where
toJSON :: UpdateQuickConnectName -> Value
toJSON UpdateQuickConnectName' {Maybe Text
Text
quickConnectId :: Text
instanceId :: Text
description :: Maybe Text
name :: Maybe Text
$sel:quickConnectId:UpdateQuickConnectName' :: UpdateQuickConnectName -> Text
$sel:instanceId:UpdateQuickConnectName' :: UpdateQuickConnectName -> Text
$sel:description:UpdateQuickConnectName' :: UpdateQuickConnectName -> Maybe Text
$sel:name:UpdateQuickConnectName' :: UpdateQuickConnectName -> Maybe Text
..} =
[Pair] -> Value
Core.object
( [Maybe Pair] -> [Pair]
forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ (Text
"Name" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
name,
(Text
"Description" Text -> Text -> Pair
forall kv v. (KeyValue kv, ToJSON v) => Text -> v -> kv
Core..=) (Text -> Pair) -> Maybe Text -> Maybe Pair
forall (f :: * -> *) a b. Functor f => (a -> b) -> f a -> f b
Prelude.<$> Maybe Text
description
]
)
instance Core.ToPath UpdateQuickConnectName where
toPath :: UpdateQuickConnectName -> ByteString
toPath UpdateQuickConnectName' {Maybe Text
Text
quickConnectId :: Text
instanceId :: Text
description :: Maybe Text
name :: Maybe Text
$sel:quickConnectId:UpdateQuickConnectName' :: UpdateQuickConnectName -> Text
$sel:instanceId:UpdateQuickConnectName' :: UpdateQuickConnectName -> Text
$sel:description:UpdateQuickConnectName' :: UpdateQuickConnectName -> Maybe Text
$sel:name:UpdateQuickConnectName' :: UpdateQuickConnectName -> Maybe 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,
ByteString
"/name"
]
instance Core.ToQuery UpdateQuickConnectName where
toQuery :: UpdateQuickConnectName -> QueryString
toQuery = QueryString -> UpdateQuickConnectName -> QueryString
forall a b. a -> b -> a
Prelude.const QueryString
forall a. Monoid a => a
Prelude.mempty
data UpdateQuickConnectNameResponse = UpdateQuickConnectNameResponse'
{
}
deriving (UpdateQuickConnectNameResponse
-> UpdateQuickConnectNameResponse -> Bool
(UpdateQuickConnectNameResponse
-> UpdateQuickConnectNameResponse -> Bool)
-> (UpdateQuickConnectNameResponse
-> UpdateQuickConnectNameResponse -> Bool)
-> Eq UpdateQuickConnectNameResponse
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateQuickConnectNameResponse
-> UpdateQuickConnectNameResponse -> Bool
$c/= :: UpdateQuickConnectNameResponse
-> UpdateQuickConnectNameResponse -> Bool
== :: UpdateQuickConnectNameResponse
-> UpdateQuickConnectNameResponse -> Bool
$c== :: UpdateQuickConnectNameResponse
-> UpdateQuickConnectNameResponse -> Bool
Prelude.Eq, ReadPrec [UpdateQuickConnectNameResponse]
ReadPrec UpdateQuickConnectNameResponse
Int -> ReadS UpdateQuickConnectNameResponse
ReadS [UpdateQuickConnectNameResponse]
(Int -> ReadS UpdateQuickConnectNameResponse)
-> ReadS [UpdateQuickConnectNameResponse]
-> ReadPrec UpdateQuickConnectNameResponse
-> ReadPrec [UpdateQuickConnectNameResponse]
-> Read UpdateQuickConnectNameResponse
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateQuickConnectNameResponse]
$creadListPrec :: ReadPrec [UpdateQuickConnectNameResponse]
readPrec :: ReadPrec UpdateQuickConnectNameResponse
$creadPrec :: ReadPrec UpdateQuickConnectNameResponse
readList :: ReadS [UpdateQuickConnectNameResponse]
$creadList :: ReadS [UpdateQuickConnectNameResponse]
readsPrec :: Int -> ReadS UpdateQuickConnectNameResponse
$creadsPrec :: Int -> ReadS UpdateQuickConnectNameResponse
Prelude.Read, Int -> UpdateQuickConnectNameResponse -> ShowS
[UpdateQuickConnectNameResponse] -> ShowS
UpdateQuickConnectNameResponse -> String
(Int -> UpdateQuickConnectNameResponse -> ShowS)
-> (UpdateQuickConnectNameResponse -> String)
-> ([UpdateQuickConnectNameResponse] -> ShowS)
-> Show UpdateQuickConnectNameResponse
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateQuickConnectNameResponse] -> ShowS
$cshowList :: [UpdateQuickConnectNameResponse] -> ShowS
show :: UpdateQuickConnectNameResponse -> String
$cshow :: UpdateQuickConnectNameResponse -> String
showsPrec :: Int -> UpdateQuickConnectNameResponse -> ShowS
$cshowsPrec :: Int -> UpdateQuickConnectNameResponse -> ShowS
Prelude.Show, (forall x.
UpdateQuickConnectNameResponse
-> Rep UpdateQuickConnectNameResponse x)
-> (forall x.
Rep UpdateQuickConnectNameResponse x
-> UpdateQuickConnectNameResponse)
-> Generic UpdateQuickConnectNameResponse
forall x.
Rep UpdateQuickConnectNameResponse x
-> UpdateQuickConnectNameResponse
forall x.
UpdateQuickConnectNameResponse
-> Rep UpdateQuickConnectNameResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateQuickConnectNameResponse x
-> UpdateQuickConnectNameResponse
$cfrom :: forall x.
UpdateQuickConnectNameResponse
-> Rep UpdateQuickConnectNameResponse x
Prelude.Generic)
newUpdateQuickConnectNameResponse ::
UpdateQuickConnectNameResponse
newUpdateQuickConnectNameResponse :: UpdateQuickConnectNameResponse
newUpdateQuickConnectNameResponse =
UpdateQuickConnectNameResponse
UpdateQuickConnectNameResponse'
instance
Prelude.NFData
UpdateQuickConnectNameResponse