{-# 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.UpdateQueueHoursOfOperation
(
UpdateQueueHoursOfOperation (..),
newUpdateQueueHoursOfOperation,
updateQueueHoursOfOperation_instanceId,
updateQueueHoursOfOperation_queueId,
updateQueueHoursOfOperation_hoursOfOperationId,
UpdateQueueHoursOfOperationResponse (..),
newUpdateQueueHoursOfOperationResponse,
)
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
data UpdateQueueHoursOfOperation = UpdateQueueHoursOfOperation'
{
UpdateQueueHoursOfOperation -> Text
instanceId :: Prelude.Text,
UpdateQueueHoursOfOperation -> Text
queueId :: Prelude.Text,
UpdateQueueHoursOfOperation -> Text
hoursOfOperationId :: Prelude.Text
}
deriving (UpdateQueueHoursOfOperation -> UpdateQueueHoursOfOperation -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateQueueHoursOfOperation -> UpdateQueueHoursOfOperation -> Bool
$c/= :: UpdateQueueHoursOfOperation -> UpdateQueueHoursOfOperation -> Bool
== :: UpdateQueueHoursOfOperation -> UpdateQueueHoursOfOperation -> Bool
$c== :: UpdateQueueHoursOfOperation -> UpdateQueueHoursOfOperation -> Bool
Prelude.Eq, ReadPrec [UpdateQueueHoursOfOperation]
ReadPrec UpdateQueueHoursOfOperation
Int -> ReadS UpdateQueueHoursOfOperation
ReadS [UpdateQueueHoursOfOperation]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateQueueHoursOfOperation]
$creadListPrec :: ReadPrec [UpdateQueueHoursOfOperation]
readPrec :: ReadPrec UpdateQueueHoursOfOperation
$creadPrec :: ReadPrec UpdateQueueHoursOfOperation
readList :: ReadS [UpdateQueueHoursOfOperation]
$creadList :: ReadS [UpdateQueueHoursOfOperation]
readsPrec :: Int -> ReadS UpdateQueueHoursOfOperation
$creadsPrec :: Int -> ReadS UpdateQueueHoursOfOperation
Prelude.Read, Int -> UpdateQueueHoursOfOperation -> ShowS
[UpdateQueueHoursOfOperation] -> ShowS
UpdateQueueHoursOfOperation -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateQueueHoursOfOperation] -> ShowS
$cshowList :: [UpdateQueueHoursOfOperation] -> ShowS
show :: UpdateQueueHoursOfOperation -> String
$cshow :: UpdateQueueHoursOfOperation -> String
showsPrec :: Int -> UpdateQueueHoursOfOperation -> ShowS
$cshowsPrec :: Int -> UpdateQueueHoursOfOperation -> ShowS
Prelude.Show, forall x.
Rep UpdateQueueHoursOfOperation x -> UpdateQueueHoursOfOperation
forall x.
UpdateQueueHoursOfOperation -> Rep UpdateQueueHoursOfOperation x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateQueueHoursOfOperation x -> UpdateQueueHoursOfOperation
$cfrom :: forall x.
UpdateQueueHoursOfOperation -> Rep UpdateQueueHoursOfOperation x
Prelude.Generic)
newUpdateQueueHoursOfOperation ::
Prelude.Text ->
Prelude.Text ->
Prelude.Text ->
UpdateQueueHoursOfOperation
newUpdateQueueHoursOfOperation :: Text -> Text -> Text -> UpdateQueueHoursOfOperation
newUpdateQueueHoursOfOperation
Text
pInstanceId_
Text
pQueueId_
Text
pHoursOfOperationId_ =
UpdateQueueHoursOfOperation'
{ $sel:instanceId:UpdateQueueHoursOfOperation' :: Text
instanceId =
Text
pInstanceId_,
$sel:queueId:UpdateQueueHoursOfOperation' :: Text
queueId = Text
pQueueId_,
$sel:hoursOfOperationId:UpdateQueueHoursOfOperation' :: Text
hoursOfOperationId = Text
pHoursOfOperationId_
}
updateQueueHoursOfOperation_instanceId :: Lens.Lens' UpdateQueueHoursOfOperation Prelude.Text
updateQueueHoursOfOperation_instanceId :: Lens' UpdateQueueHoursOfOperation Text
updateQueueHoursOfOperation_instanceId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateQueueHoursOfOperation' {Text
instanceId :: Text
$sel:instanceId:UpdateQueueHoursOfOperation' :: UpdateQueueHoursOfOperation -> Text
instanceId} -> Text
instanceId) (\s :: UpdateQueueHoursOfOperation
s@UpdateQueueHoursOfOperation' {} Text
a -> UpdateQueueHoursOfOperation
s {$sel:instanceId:UpdateQueueHoursOfOperation' :: Text
instanceId = Text
a} :: UpdateQueueHoursOfOperation)
updateQueueHoursOfOperation_queueId :: Lens.Lens' UpdateQueueHoursOfOperation Prelude.Text
updateQueueHoursOfOperation_queueId :: Lens' UpdateQueueHoursOfOperation Text
updateQueueHoursOfOperation_queueId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateQueueHoursOfOperation' {Text
queueId :: Text
$sel:queueId:UpdateQueueHoursOfOperation' :: UpdateQueueHoursOfOperation -> Text
queueId} -> Text
queueId) (\s :: UpdateQueueHoursOfOperation
s@UpdateQueueHoursOfOperation' {} Text
a -> UpdateQueueHoursOfOperation
s {$sel:queueId:UpdateQueueHoursOfOperation' :: Text
queueId = Text
a} :: UpdateQueueHoursOfOperation)
updateQueueHoursOfOperation_hoursOfOperationId :: Lens.Lens' UpdateQueueHoursOfOperation Prelude.Text
updateQueueHoursOfOperation_hoursOfOperationId :: Lens' UpdateQueueHoursOfOperation Text
updateQueueHoursOfOperation_hoursOfOperationId = forall s a b t. (s -> a) -> (s -> b -> t) -> Lens s t a b
Lens.lens (\UpdateQueueHoursOfOperation' {Text
hoursOfOperationId :: Text
$sel:hoursOfOperationId:UpdateQueueHoursOfOperation' :: UpdateQueueHoursOfOperation -> Text
hoursOfOperationId} -> Text
hoursOfOperationId) (\s :: UpdateQueueHoursOfOperation
s@UpdateQueueHoursOfOperation' {} Text
a -> UpdateQueueHoursOfOperation
s {$sel:hoursOfOperationId:UpdateQueueHoursOfOperation' :: Text
hoursOfOperationId = Text
a} :: UpdateQueueHoursOfOperation)
instance Core.AWSRequest UpdateQueueHoursOfOperation where
type
AWSResponse UpdateQueueHoursOfOperation =
UpdateQueueHoursOfOperationResponse
request :: (Service -> Service)
-> UpdateQueueHoursOfOperation
-> Request UpdateQueueHoursOfOperation
request Service -> Service
overrides =
forall a. (ToRequest a, ToJSON a) => Service -> a -> Request a
Request.postJSON (Service -> Service
overrides Service
defaultService)
response :: forall (m :: * -> *).
MonadResource m =>
(ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy UpdateQueueHoursOfOperation
-> ClientResponse ClientBody
-> m (Either
Error (ClientResponse (AWSResponse UpdateQueueHoursOfOperation)))
response =
forall (m :: * -> *) a.
MonadResource m =>
AWSResponse a
-> (ByteStringLazy -> IO ByteStringLazy)
-> Service
-> Proxy a
-> ClientResponse ClientBody
-> m (Either Error (ClientResponse (AWSResponse a)))
Response.receiveNull
UpdateQueueHoursOfOperationResponse
UpdateQueueHoursOfOperationResponse'
instance Prelude.Hashable UpdateQueueHoursOfOperation where
hashWithSalt :: Int -> UpdateQueueHoursOfOperation -> Int
hashWithSalt Int
_salt UpdateQueueHoursOfOperation' {Text
hoursOfOperationId :: Text
queueId :: Text
instanceId :: Text
$sel:hoursOfOperationId:UpdateQueueHoursOfOperation' :: UpdateQueueHoursOfOperation -> Text
$sel:queueId:UpdateQueueHoursOfOperation' :: UpdateQueueHoursOfOperation -> Text
$sel:instanceId:UpdateQueueHoursOfOperation' :: UpdateQueueHoursOfOperation -> Text
..} =
Int
_salt
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
instanceId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
queueId
forall a. Hashable a => Int -> a -> Int
`Prelude.hashWithSalt` Text
hoursOfOperationId
instance Prelude.NFData UpdateQueueHoursOfOperation where
rnf :: UpdateQueueHoursOfOperation -> ()
rnf UpdateQueueHoursOfOperation' {Text
hoursOfOperationId :: Text
queueId :: Text
instanceId :: Text
$sel:hoursOfOperationId:UpdateQueueHoursOfOperation' :: UpdateQueueHoursOfOperation -> Text
$sel:queueId:UpdateQueueHoursOfOperation' :: UpdateQueueHoursOfOperation -> Text
$sel:instanceId:UpdateQueueHoursOfOperation' :: UpdateQueueHoursOfOperation -> 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
queueId
seq :: forall a b. a -> b -> b
`Prelude.seq` forall a. NFData a => a -> ()
Prelude.rnf Text
hoursOfOperationId
instance Data.ToHeaders UpdateQueueHoursOfOperation where
toHeaders :: UpdateQueueHoursOfOperation -> [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.ToJSON UpdateQueueHoursOfOperation where
toJSON :: UpdateQueueHoursOfOperation -> Value
toJSON UpdateQueueHoursOfOperation' {Text
hoursOfOperationId :: Text
queueId :: Text
instanceId :: Text
$sel:hoursOfOperationId:UpdateQueueHoursOfOperation' :: UpdateQueueHoursOfOperation -> Text
$sel:queueId:UpdateQueueHoursOfOperation' :: UpdateQueueHoursOfOperation -> Text
$sel:instanceId:UpdateQueueHoursOfOperation' :: UpdateQueueHoursOfOperation -> Text
..} =
[Pair] -> Value
Data.object
( forall a. [Maybe a] -> [a]
Prelude.catMaybes
[ forall a. a -> Maybe a
Prelude.Just
(Key
"HoursOfOperationId" forall kv v. (KeyValue kv, ToJSON v) => Key -> v -> kv
Data..= Text
hoursOfOperationId)
]
)
instance Data.ToPath UpdateQueueHoursOfOperation where
toPath :: UpdateQueueHoursOfOperation -> ByteString
toPath UpdateQueueHoursOfOperation' {Text
hoursOfOperationId :: Text
queueId :: Text
instanceId :: Text
$sel:hoursOfOperationId:UpdateQueueHoursOfOperation' :: UpdateQueueHoursOfOperation -> Text
$sel:queueId:UpdateQueueHoursOfOperation' :: UpdateQueueHoursOfOperation -> Text
$sel:instanceId:UpdateQueueHoursOfOperation' :: UpdateQueueHoursOfOperation -> Text
..} =
forall a. Monoid a => [a] -> a
Prelude.mconcat
[ ByteString
"/queues/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
instanceId,
ByteString
"/",
forall a. ToByteString a => a -> ByteString
Data.toBS Text
queueId,
ByteString
"/hours-of-operation"
]
instance Data.ToQuery UpdateQueueHoursOfOperation where
toQuery :: UpdateQueueHoursOfOperation -> QueryString
toQuery = forall a b. a -> b -> a
Prelude.const forall a. Monoid a => a
Prelude.mempty
data UpdateQueueHoursOfOperationResponse = UpdateQueueHoursOfOperationResponse'
{
}
deriving (UpdateQueueHoursOfOperationResponse
-> UpdateQueueHoursOfOperationResponse -> Bool
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: UpdateQueueHoursOfOperationResponse
-> UpdateQueueHoursOfOperationResponse -> Bool
$c/= :: UpdateQueueHoursOfOperationResponse
-> UpdateQueueHoursOfOperationResponse -> Bool
== :: UpdateQueueHoursOfOperationResponse
-> UpdateQueueHoursOfOperationResponse -> Bool
$c== :: UpdateQueueHoursOfOperationResponse
-> UpdateQueueHoursOfOperationResponse -> Bool
Prelude.Eq, ReadPrec [UpdateQueueHoursOfOperationResponse]
ReadPrec UpdateQueueHoursOfOperationResponse
Int -> ReadS UpdateQueueHoursOfOperationResponse
ReadS [UpdateQueueHoursOfOperationResponse]
forall a.
(Int -> ReadS a)
-> ReadS [a] -> ReadPrec a -> ReadPrec [a] -> Read a
readListPrec :: ReadPrec [UpdateQueueHoursOfOperationResponse]
$creadListPrec :: ReadPrec [UpdateQueueHoursOfOperationResponse]
readPrec :: ReadPrec UpdateQueueHoursOfOperationResponse
$creadPrec :: ReadPrec UpdateQueueHoursOfOperationResponse
readList :: ReadS [UpdateQueueHoursOfOperationResponse]
$creadList :: ReadS [UpdateQueueHoursOfOperationResponse]
readsPrec :: Int -> ReadS UpdateQueueHoursOfOperationResponse
$creadsPrec :: Int -> ReadS UpdateQueueHoursOfOperationResponse
Prelude.Read, Int -> UpdateQueueHoursOfOperationResponse -> ShowS
[UpdateQueueHoursOfOperationResponse] -> ShowS
UpdateQueueHoursOfOperationResponse -> String
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [UpdateQueueHoursOfOperationResponse] -> ShowS
$cshowList :: [UpdateQueueHoursOfOperationResponse] -> ShowS
show :: UpdateQueueHoursOfOperationResponse -> String
$cshow :: UpdateQueueHoursOfOperationResponse -> String
showsPrec :: Int -> UpdateQueueHoursOfOperationResponse -> ShowS
$cshowsPrec :: Int -> UpdateQueueHoursOfOperationResponse -> ShowS
Prelude.Show, forall x.
Rep UpdateQueueHoursOfOperationResponse x
-> UpdateQueueHoursOfOperationResponse
forall x.
UpdateQueueHoursOfOperationResponse
-> Rep UpdateQueueHoursOfOperationResponse x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x.
Rep UpdateQueueHoursOfOperationResponse x
-> UpdateQueueHoursOfOperationResponse
$cfrom :: forall x.
UpdateQueueHoursOfOperationResponse
-> Rep UpdateQueueHoursOfOperationResponse x
Prelude.Generic)
newUpdateQueueHoursOfOperationResponse ::
UpdateQueueHoursOfOperationResponse
newUpdateQueueHoursOfOperationResponse :: UpdateQueueHoursOfOperationResponse
newUpdateQueueHoursOfOperationResponse =
UpdateQueueHoursOfOperationResponse
UpdateQueueHoursOfOperationResponse'
instance
Prelude.NFData
UpdateQueueHoursOfOperationResponse
where
rnf :: UpdateQueueHoursOfOperationResponse -> ()
rnf UpdateQueueHoursOfOperationResponse
_ = ()